当前使用版本3.5.3
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl#getObj(Wrapper
Function<? super Object, V> mapper这个参数,下限约定的条件只能是Object对象,那么就只能使用Object的方法,并不能使用自己的实体Entity。 例如: Function<? super Object, V> mapper=Object::hashCode。 例如我想获取苹果,重量的集合 Function<? super Object, V> mapper=Apple::getColor,这种是无法使用的
我觉得这个方法,第二个参数是否改成Function<? super T, V>这种方式会好点
Comment From: miemieYaho
不是
Comment From: yanluhua
那这个方法的使用场景是在哪里,该如何使用
Comment From: miemieYaho
object转其他
Comment From: tccoca
getObj查出来的是符合查询条件的数据中的首个字段数据,比如主键id。然后可以通过Function参数将主键id进行处理转换等操作。