fix:78587
This commit is contained in:
+11
@@ -1,5 +1,6 @@
|
||||
package com.jero.modules.personal.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
|
||||
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
|
||||
@@ -295,6 +296,16 @@ public class LawsStandardSharingController extends JeroController<LawsStandardSh
|
||||
if (!map.containsKey("ids") || StringUtils.isEmpty(map.get("ids"))) {
|
||||
throw new JeroBootException(ResultCommon.PLEASE_SELECT_DATA);
|
||||
}
|
||||
List<String> listIds = Arrays.asList(map.get("ids").split(","));
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
LambdaQueryWrapper<LawsStandardSharing> queryLawsStandardSharing = new LambdaQueryWrapper<>();
|
||||
queryLawsStandardSharing.in(LawsStandardSharing::getId,listIds);
|
||||
queryLawsStandardSharing.ne(LawsStandardSharing::getStandardId,sysUser.getId());
|
||||
long l = lawsStandardSharingService.count(queryLawsStandardSharing);
|
||||
if(l > 0){
|
||||
throw new JeroBootException(ResultCommon.HORIZONTAL_TRANSGRESSION);
|
||||
}
|
||||
|
||||
this.lawsStandardSharingService.deleteByIds(Arrays.asList(map.get("ids").split(",")));
|
||||
return Result.OK(MessageUtils.getMessage(ResultCommon.OK));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user