pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java
@@ -73,7 +73,7 @@ * @param id * @return */ @PostMapping(path="delete") @GetMapping(path="delete") @SsoPowerAop(power = "10100011") @Log("删除角色信息") public BaseResponse<BaRole> delete(String id){ @@ -85,6 +85,23 @@ } } /** * 禁用角色信息 * @param role * @return */ @PostMapping(path="disabled") @SsoPowerAop(power = "10100011") @Log("禁用或启用角色信息") public BaseResponse<BaRole> disabled(@RequestBody BaRole role){ try { return BaseResponseUtils.buildSuccess(roleSv.disabled(role.id,role.disabled)); }catch (Exception e){ log.error("禁用角色异常", e); return BaseResponseUtils.buildException(e.getMessage()); } } /** * 根据ID查询角色信息 pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java
@@ -49,6 +49,19 @@ return this.dao.deleteLogicById(id); } /** * 禁用或启用角色信息 * @param id * @param disabled * @return */ public int disabled(Long id,Boolean disabled) { BaRole role=new BaRole(); role.id=id; role.disabled=disabled; return dao.updateByPrimaryKeySelective(role); } @Transactional public int update(BaRole role) { int count = dao.updateByPrimaryKeySelective(role);