update 优化 适配mp新版本 方法名改动

2.X
疯狂的狮子Li 5 months ago
parent 77bf53800d
commit f6cf5ab6ca

@ -160,8 +160,8 @@ public interface BaseMapperPlus<T, V> extends BaseMapper<T> {
* @param idList ID
* @return VO
*/
default List<V> selectVoBatchIds(Collection<? extends Serializable> idList) {
return selectVoBatchIds(idList, this.currentVoClass());
default List<V> selectVoByIds(Collection<? extends Serializable> idList) {
return selectVoByIds(idList, this.currentVoClass());
}
/**
@ -172,8 +172,8 @@ public interface BaseMapperPlus<T, V> extends BaseMapper<T> {
* @param <C> VO
* @return VOVO
*/
default <C> List<C> selectVoBatchIds(Collection<? extends Serializable> idList, Class<C> voClass) {
List<T> list = this.selectBatchIds(idList);
default <C> List<C> selectVoByIds(Collection<? extends Serializable> idList, Class<C> voClass) {
List<T> list = this.selectByIds(idList);
if (CollUtil.isEmpty(list)) {
return CollUtil.newArrayList();
}

@ -49,7 +49,7 @@ public interface TestDemoMapper extends BaseMapperPlus<TestDemo, TestDemoVo> {
@DataColumn(key = "deptName", value = "dept_id"),
@DataColumn(key = "userName", value = "user_id")
}, joinStr = "AND")
List<TestDemo> selectBatchIds(@Param(Constants.COLL) Collection<? extends Serializable> idList);
List<TestDemo> selectByIds(@Param(Constants.COLL) Collection<? extends Serializable> idList);
@Override
@DataPermission({

@ -101,7 +101,7 @@ public class TestDemoServiceImpl implements ITestDemoService {
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
if (isValid) {
// 做一些业务上的校验,判断是否需要校验
List<TestDemo> list = baseMapper.selectBatchIds(ids);
List<TestDemo> list = baseMapper.selectByIds(ids);
if (list.size() != ids.size()) {
throw new ServiceException("您没有删除权限!");
}

@ -237,7 +237,7 @@ public class SysOssServiceImpl implements ISysOssService {
if (isValid) {
// 做一些业务上的校验,判断是否需要校验
}
List<SysOss> list = baseMapper.selectBatchIds(ids);
List<SysOss> list = baseMapper.selectByIds(ids);
for (SysOss sysOss : list) {
OssClient storage = OssFactory.instance(sysOss.getService());
storage.delete(sysOss.getUrl());

@ -41,7 +41,7 @@ public class WfFormManageServiceImpl implements IWfFormManageService {
@Override
public List<WfFormManageVo> queryByIds(List<Long> ids) {
return baseMapper.selectVoBatchIds(ids);
return baseMapper.selectVoByIds(ids);
}
/**

Loading…
Cancel
Save