权限功能注释不必要的接口

This commit is contained in:
tiger_zhou 2022-10-24 13:52:41 +08:00
parent c856280724
commit 616d8898b4
2 changed files with 17 additions and 15 deletions

View File

@ -22,45 +22,45 @@ import static club.joylink.rtss.controller.advice.AuthenticateInterceptor.LOGIN_
public class SystemAbilityController {
@Autowired
private SystemAbilityService abilityService;
/**
/*
* 添加权限功能
*/
@PostMapping("/basic")
/*@PostMapping("/basic")
public void addAbility(@RequestBody BasicSystemAbilityVo req, @RequestAttribute(value = LOGIN_INFO_KEY) LoginUserInfoVO userInfoVO){
this.abilityService.saveOrUpdateBasicAbility(req,userInfoVO);
}
/**
}*/
/*
* 修改权限功能的名称和描述
*/
@PutMapping("/basic")
/* @PutMapping("/basic")
public void updateAbilityBasic(@RequestBody BasicSystemAbilityVo req,@RequestAttribute(value = LOGIN_INFO_KEY) LoginUserInfoVO userInfoVO){
this.abilityService.saveOrUpdateBasicAbility(req,userInfoVO);
}
/**
}*/
/*
* 修改权限功能的类型和关联的具体功能
*/
@PutMapping("/function")
/* @PutMapping("/function")
public void updateAbilityTypeAndFunc(@RequestBody UpdateAbilityFunctionReqVo req){
this.abilityService.updateTypeAndFunc(req);
}
}*/
/**
/*
* 全部添加
* @param vo
* @param userInfoVO
*/
@PostMapping("/save")
/*@PostMapping("/save")
public void autoCreateAbility(@RequestBody AutoCreateSystemAbilityReqVo vo, @RequestAttribute(value = LOGIN_INFO_KEY) LoginUserInfoVO userInfoVO){
this.abilityService.autoCreateAbility(vo,userInfoVO.getAccountVO().getId());
}
/**
}*/
/*
* 删除权限功能,注意对于已经启用的不能删除
* @return 返回成功删除的权限功能的id列表
*/
@DeleteMapping
/* @DeleteMapping
public void deleteAbilities(@RequestBody DeleteAbilitiesReqVo req){
this.abilityService.remove(req);
}
}*/
/**
* 根据权限功能的id查询完整信息
*/

View File

@ -135,11 +135,13 @@ public class SystemAbilityService {
public void remove(DeleteAbilitiesReqVo reqVo){
BusinessExceptionAssertEnum.ARGUMENT_ILLEGAL.assertTrue(!CollectionUtils.isEmpty(reqVo.getIds()),"删除数据的id不能为空");
List<Long> newIds = reqVo.getIds().stream().distinct().collect(Collectors.toList());
PermissionSystemAbilityExample pe = new PermissionSystemAbilityExample();
pe.createCriteria().andSystemAbilityIdIn(newIds);
List<PermissionSystemAbility> psaList = this.permissionSystemAbilityDAO.selectByExample(pe);
Map<Long,List<PermissionSystemAbility>> psaMapList = psaList.stream()
.collect(Collectors.groupingBy(PermissionSystemAbility::getSystemAbilityId));
StringBuilder sb = new StringBuilder();
psaMapList.forEach((k,v)->{
sb.append(String.format("id=%s有绑定的权限数量=%s,不能删除",k,v.size()));