From 2787212362c5a23bf5dd94b1bb9cae4ec3fe4caa Mon Sep 17 00:00:00 2001
From: MichelleChung <1242874891@qq.com>
Date: 星期五, 03 二月 2023 09:47:41 +0800
Subject: [PATCH] !284 更新常量 GenConstants,优化 Map 返回结构 * update 优化返回结构, 将 Map 改为指定 Vo 对象 ; * update GenConstants 扩展数据库数据类型, 更新 BO, VO, ENTITY 字段, 并移动到 generator 模块 ;

---
 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysRoleController.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysRoleController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysRoleController.java
index 87d6ca2..7a0868f 100644
--- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysRoleController.java
+++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/system/SysRoleController.java
@@ -16,6 +16,7 @@
 import com.ruoyi.system.domain.SysUser;
 import com.ruoyi.system.domain.SysUserRole;
 import com.ruoyi.system.domain.bo.SysRoleBo;
+import com.ruoyi.system.domain.vo.DeptTreeSelectVo;
 import com.ruoyi.system.domain.vo.SysRoleVo;
 import com.ruoyi.system.service.ISysDeptService;
 import com.ruoyi.system.service.ISysRoleService;
@@ -27,7 +28,6 @@
 import org.springframework.web.bind.annotation.*;
 
 import java.util.List;
-import java.util.Map;
 
 /**
  * 瑙掕壊淇℃伅
@@ -228,10 +228,10 @@
      */
     @SaCheckPermission("system:role:list")
     @GetMapping(value = "/deptTree/{roleId}")
-    public R<Map<String, Object>> roleDeptTreeselect(@PathVariable("roleId") Long roleId) {
-        return R.ok(Map.of(
-                "checkedKeys", deptService.selectDeptListByRoleId(roleId),
-                "depts", deptService.selectDeptTreeList(new SysDept())
-        ));
+    public R<DeptTreeSelectVo> roleDeptTreeselect(@PathVariable("roleId") Long roleId) {
+        DeptTreeSelectVo selectVo = new DeptTreeSelectVo();
+        selectVo.setCheckedKeys(deptService.selectDeptListByRoleId(roleId));
+        selectVo.setDepts(deptService.selectDeptTreeList(new SysDept()));
+        return R.ok(selectVo);
     }
 }

--
Gitblit v1.9.3