From 9644fb41cd6f23a032c56beba0c548e64b2693de Mon Sep 17 00:00:00 2001
From: liuxm <liuxm@fescotech.com>
Date: 星期一, 29 四月 2024 16:23:18 +0800
Subject: [PATCH] 角色管理方法修改
---
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java | 13 +++++++++++++
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java | 19 ++++++++++++++++++-
2 files changed, 31 insertions(+), 1 deletions(-)
diff --git a/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java b/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java
index 5ead477..db987f5 100644
--- a/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java
+++ b/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鏌ヨ瑙掕壊淇℃伅
diff --git a/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java b/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java
index ce9d298..14f39c5 100644
--- a/pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java
+++ b/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);
--
Gitblit v1.8.0