update 优化 适配mp新版本 方法名改动
This commit is contained in:
parent
6b05ddb576
commit
64289c16f3
@ -155,8 +155,8 @@ public interface BaseMapperPlus<T, V> extends BaseMapper<T> {
|
|||||||
* @param idList 主键ID集合
|
* @param idList 主键ID集合
|
||||||
* @return 查询到的VO对象列表
|
* @return 查询到的VO对象列表
|
||||||
*/
|
*/
|
||||||
default List<V> selectVoBatchIds(Collection<? extends Serializable> idList) {
|
default List<V> selectVoByIds(Collection<? extends Serializable> idList) {
|
||||||
return selectVoBatchIds(idList, this.currentVoClass());
|
return selectVoByIds(idList, this.currentVoClass());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -167,8 +167,8 @@ public interface BaseMapperPlus<T, V> extends BaseMapper<T> {
|
|||||||
* @param <C> VO类的类型
|
* @param <C> VO类的类型
|
||||||
* @return 查询到的VO对象列表,经过转换为指定的VO类后返回
|
* @return 查询到的VO对象列表,经过转换为指定的VO类后返回
|
||||||
*/
|
*/
|
||||||
default <C> List<C> selectVoBatchIds(Collection<? extends Serializable> idList, Class<C> voClass) {
|
default <C> List<C> selectVoByIds(Collection<? extends Serializable> idList, Class<C> voClass) {
|
||||||
List<T> list = this.selectBatchIds(idList);
|
List<T> list = this.selectByIds(idList);
|
||||||
if (CollUtil.isEmpty(list)) {
|
if (CollUtil.isEmpty(list)) {
|
||||||
return CollUtil.newArrayList();
|
return CollUtil.newArrayList();
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ public interface TestDemoMapper extends BaseMapperPlus<TestDemo, TestDemoVo> {
|
|||||||
@DataColumn(key = "deptName", value = "dept_id"),
|
@DataColumn(key = "deptName", value = "dept_id"),
|
||||||
@DataColumn(key = "userName", value = "user_id")
|
@DataColumn(key = "userName", value = "user_id")
|
||||||
}, joinStr = "AND")
|
}, joinStr = "AND")
|
||||||
List<TestDemo> selectBatchIds(@Param(Constants.COLL) Collection<? extends Serializable> idList);
|
List<TestDemo> selectByIds(@Param(Constants.COLL) Collection<? extends Serializable> idList);
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@DataPermission({
|
@DataPermission({
|
||||||
|
@ -101,7 +101,7 @@ public class TestDemoServiceImpl implements ITestDemoService {
|
|||||||
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
public Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid) {
|
||||||
if (isValid) {
|
if (isValid) {
|
||||||
// 做一些业务上的校验,判断是否需要校验
|
// 做一些业务上的校验,判断是否需要校验
|
||||||
List<TestDemo> list = baseMapper.selectBatchIds(ids);
|
List<TestDemo> list = baseMapper.selectByIds(ids);
|
||||||
if (list.size() != ids.size()) {
|
if (list.size() != ids.size()) {
|
||||||
throw new ServiceException("您没有删除权限!");
|
throw new ServiceException("您没有删除权限!");
|
||||||
}
|
}
|
||||||
|
@ -244,7 +244,7 @@ public class SysOssServiceImpl implements ISysOssService, OssService {
|
|||||||
if (isValid) {
|
if (isValid) {
|
||||||
// 做一些业务上的校验,判断是否需要校验
|
// 做一些业务上的校验,判断是否需要校验
|
||||||
}
|
}
|
||||||
List<SysOss> list = baseMapper.selectBatchIds(ids);
|
List<SysOss> list = baseMapper.selectByIds(ids);
|
||||||
for (SysOss sysOss : list) {
|
for (SysOss sysOss : list) {
|
||||||
OssClient storage = OssFactory.instance(sysOss.getService());
|
OssClient storage = OssFactory.instance(sysOss.getService());
|
||||||
storage.delete(sysOss.getUrl());
|
storage.delete(sysOss.getUrl());
|
||||||
|
@ -41,7 +41,7 @@ public class WfFormManageServiceImpl implements IWfFormManageService {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<WfFormManageVo> queryByIds(List<Long> ids) {
|
public List<WfFormManageVo> queryByIds(List<Long> ids) {
|
||||||
return baseMapper.selectVoBatchIds(ids);
|
return baseMapper.selectVoByIds(ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user