From a2d80b4d8342882169d1dc0f4213d5cb055773f6 Mon Sep 17 00:00:00 2001 From: sunzheng Date: Fri, 2 Aug 2024 16:33:23 +0800 Subject: [PATCH] =?UTF-8?q?update:=E4=BF=AE=E6=94=B9=E5=88=86=E7=BB=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=9A=84=E6=8E=92=E5=BA=8F,=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E5=91=98=E8=87=AA=E5=B7=B1=E5=88=9B=E5=BB=BA=E7=9A=84?= =?UTF-8?q?=E5=88=86=E7=BB=84=E6=8E=92=E5=9C=A8=E5=89=8D=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/20240802新增sql.sql | 6 ++++++ .../com/jero/modules/sys/mapper/xml/SysGroupMapper.xml | 8 ++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/db/20240802新增sql.sql b/db/20240802新增sql.sql index 48b57472..0efe23ed 100644 --- a/db/20240802新增sql.sql +++ b/db/20240802新增sql.sql @@ -19,3 +19,9 @@ CREATE TABLE `sys_user_group` ( ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户分组表' ROW_FORMAT = DYNAMIC; SET FOREIGN_KEY_CHECKS = 1; + +INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`, `app_id`) VALUES ('897f89d79111ddc0019111df7bc70004', '897f89d79111ddc0019111ddc0240000', '删除', NULL, NULL, NULL, NULL, 2, 'sys:groupManage:delete', '1', 4.00, 0, NULL, 1, 1, 0, 0, NULL, 'ldq1', '2024-08-02 14:55:45', NULL, NULL, 0, 0, '1', 0, NULL, NULL); +INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`, `app_id`) VALUES ('897f89d79111ddc0019111df26ae0003', '897f89d79111ddc0019111ddc0240000', '编辑', NULL, NULL, NULL, NULL, 2, 'sys:groupManage:edit', '1', 3.00, 0, NULL, 1, 1, 0, 0, NULL, 'ldq1', '2024-08-02 14:55:23', NULL, NULL, 0, 0, '1', 0, NULL, NULL); +INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`, `app_id`) VALUES ('897f89d79111ddc0019111dedcca0002', '897f89d79111ddc0019111ddc0240000', '新增', NULL, NULL, NULL, NULL, 2, 'sys:groupManage:add', '1', 2.00, 0, NULL, 1, 1, 0, 0, NULL, 'ldq1', '2024-08-02 14:55:04', NULL, NULL, 0, 0, '1', 0, NULL, NULL); +INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`, `app_id`) VALUES ('897f89d79111ddc0019111de80370001', '897f89d79111ddc0019111ddc0240000', '查询', NULL, NULL, NULL, NULL, 2, 'sys:groupManage:search', '1', 1.00, 0, NULL, 1, 1, 0, 0, NULL, 'ldq1', '2024-08-02 14:54:40', NULL, NULL, 0, 0, '1', 0, NULL, NULL); +INSERT INTO `sys_permission`(`id`, `parent_id`, `name`, `url`, `component`, `component_name`, `redirect`, `menu_type`, `perms`, `perms_type`, `sort_no`, `always_show`, `icon`, `is_route`, `is_leaf`, `keep_alive`, `hidden`, `description`, `create_by`, `create_time`, `update_by`, `update_time`, `del_flag`, `rule_flag`, `status`, `internal_or_external`, `menu_en`, `app_id`) VALUES ('897f89d79111ddc0019111ddc0240000', 'd7d6e2e4e2934f2c9385a623fd98c6f3', '分组管理', '/system/groupManage', 'system/groupManage/GroupManageList', NULL, NULL, 1, NULL, '1', 10.00, 0, NULL, 1, 0, 0, 0, NULL, 'ldq1', '2024-08-02 14:53:51', NULL, NULL, 0, 0, '1', 0, NULL, NULL); diff --git a/laws-modules/src/main/java/com/jero/modules/sys/mapper/xml/SysGroupMapper.xml b/laws-modules/src/main/java/com/jero/modules/sys/mapper/xml/SysGroupMapper.xml index 17fe0902..f358fc52 100644 --- a/laws-modules/src/main/java/com/jero/modules/sys/mapper/xml/SysGroupMapper.xml +++ b/laws-modules/src/main/java/com/jero/modules/sys/mapper/xml/SysGroupMapper.xml @@ -10,7 +10,11 @@ sg.create_time, count(sug.id) as count, GROUP_CONCAT(sug.user_id) as ids, - GROUP_CONCAT(CONCAT(su.realname, '(', su.username, ')') ORDER BY su.realname, su.username) as userNames + GROUP_CONCAT(CONCAT(su.realname, '(', su.username, ')') ORDER BY su.realname, su.username) as userNames, + CASE + WHEN sg.create_by = #{sysGroup.currentUserName} THEN 1 + ELSE 0 + END as is_admin_created from sys_group sg LEFT JOIN sys_user_group sug on sg.id = sug.group_id LEFT JOIN sys_user su on sug.user_id = su.id @@ -33,7 +37,7 @@ group by sg.id,sg.group_name - order by sg.create_time desc + order by is_admin_created desc, sg.create_time desc