From 1494d3e47a0dbdc5f49dacd779b5ffab871a2022 Mon Sep 17 00:00:00 2001
From: liuxm <liuxm@fescotech.com>
Date: 星期四, 16 五月 2024 09:21:00 +0800
Subject: [PATCH] 添加查询所有角色
---
pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoBa/BaRoleMapper.java | 2 ++
pms-parent/pms-global/src/main/resources/mapper/BaRoleMapper.xml | 7 +++++++
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleSv.java | 4 ++++
pms-parent/pms-web-base/src/main/java/com/dy/pmsBase/role/RoleCtrl.java | 17 +++++++++++++++++
4 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoBa/BaRoleMapper.java b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoBa/BaRoleMapper.java
index 37e8842..88a743f 100644
--- a/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoBa/BaRoleMapper.java
+++ b/pms-parent/pms-global/src/main/java/com/dy/pmsGlobal/daoBa/BaRoleMapper.java
@@ -42,4 +42,6 @@
Long selectSomeCount(Map<String, Object> params);
List<BaRole> selectSome(Map<String, Object> params);
+
+ List<BaRole> selectAll();
}
diff --git a/pms-parent/pms-global/src/main/resources/mapper/BaRoleMapper.xml b/pms-parent/pms-global/src/main/resources/mapper/BaRoleMapper.xml
index d395263..59557e2 100644
--- a/pms-parent/pms-global/src/main/resources/mapper/BaRoleMapper.xml
+++ b/pms-parent/pms-global/src/main/resources/mapper/BaRoleMapper.xml
@@ -167,4 +167,11 @@
</if>
</trim>
</select>
+ <select id="selectAll" resultType="com.dy.pmsGlobal.pojoBa.BaRole">
+ select
+ <include refid="Base_Column_List" />
+ from ba_role
+ where deleted != 1 and disabled !=1
+ </select>
+
</mapper>
\ No newline at end of file
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 db987f5..1c9f47e 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
@@ -121,6 +121,23 @@
}
/**
+ * 鏌ヨ鎵�鏈夎鑹�
+ * @return
+ */
+ @GetMapping(path="all")
+ @SsoPowerAop(power = "10100010") //鐧诲綍涓庢潈闄愬悓鏃堕獙璇�
+ @Log("鏌ヨ鎵�鏈夎鑹�")
+ public BaseResponse<List<BaRole>> all(String id){
+ try{
+ List<BaRole> roles=roleSv.selectAll();
+ return BaseResponseUtils.buildSuccess(roles);
+ }catch (Exception e){
+ log.error("鏌ヨ鎵�鏈夎鑹插紓甯�", e);
+ return BaseResponseUtils.buildException(e.getMessage());
+ }
+ }
+
+ /**
* 鏌ヨ瑙掕壊淇℃伅
* @param vo
* @return
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 14f39c5..6004a72 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
@@ -93,6 +93,10 @@
return dao.selectByPrimaryKey(Long.valueOf(roleId));
}
+ public List<BaRole> selectAll() {
+ return dao.selectAll();
+ }
+
/**
* 鑾峰彇瑙掕壊鍒楄〃
*/
--
Gitblit v1.8.0