|
|
@ -144,6 +144,10 @@ public interface BaseMapperPlus<T, V> extends BaseMapper<T> {
|
|
|
|
return selectVoOne(wrapper, this.currentVoClass());
|
|
|
|
return selectVoOne(wrapper, this.currentVoClass());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
default V selectVoOne(Wrapper<T> wrapper, boolean throwEx) {
|
|
|
|
|
|
|
|
return selectVoOne(wrapper, this.currentVoClass(), throwEx);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* 根据 entity 条件,查询一条记录
|
|
|
|
* 根据 entity 条件,查询一条记录
|
|
|
|
*/
|
|
|
|
*/
|
|
|
@ -155,6 +159,17 @@ public interface BaseMapperPlus<T, V> extends BaseMapper<T> {
|
|
|
|
return MapstructUtils.convert(obj, voClass);
|
|
|
|
return MapstructUtils.convert(obj, voClass);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 根据 entity 条件,查询一条记录
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
default <C> C selectVoOne(Wrapper<T> wrapper, Class<C> voClass, boolean throwEx) {
|
|
|
|
|
|
|
|
T obj = this.selectOne(wrapper, throwEx);
|
|
|
|
|
|
|
|
if (ObjectUtil.isNull(obj)) {
|
|
|
|
|
|
|
|
return null;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return MapstructUtils.convert(obj, voClass);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
default List<V> selectVoList() {
|
|
|
|
default List<V> selectVoList() {
|
|
|
|
return selectVoList(new QueryWrapper<>(), this.currentVoClass());
|
|
|
|
return selectVoList(new QueryWrapper<>(), this.currentVoClass());
|
|
|
|
}
|
|
|
|
}
|
|
|
|