liuxm
2024-04-29 9644fb41cd6f23a032c56beba0c548e64b2693de
角色管理方法修改
2个文件已修改
32 ■■■■■ 已修改文件
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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);