From 9fb18505b5ad92ba03e460da0a6a9cfa668fd941 Mon Sep 17 00:00:00 2001 From: linbangquan <1437892690@qq.com> Date: Wed, 24 Jan 2024 14:44:16 +0800 Subject: [PATCH 1/6] =?UTF-8?q?[=E4=BF=AE=E5=A4=8D]=20=E5=B7=A5=E5=8D=95?= =?UTF-8?q?=E5=A4=84=E7=90=86-=E5=B7=A5=E5=8D=95=E5=A4=84=E7=90=86?= =?UTF-8?q?=E4=BA=BA=E6=98=AF=E5=88=86=E7=BB=84=EF=BC=8C=E5=88=A0=E9=99=A4?= =?UTF-8?q?=E7=BB=84=E5=90=8E=EF=BC=8C=E5=BA=94=E8=AF=A5=E4=BF=9D=E7=95=99?= =?UTF-8?q?=E7=BB=84=E6=95=B0=E6=8D=AE=EF=BC=8C=E6=8F=90=E7=A4=BA=E5=B7=B2?= =?UTF-8?q?=E5=88=A0=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 关联 #[1070994834292736]工单处理-工单处理人是分组,删除组后,应该保留组数据,提示已删除 http://192.168.0.96:8090/demo/rdm.html#/bug-detail/939050947543040/939050947543057/1070994834292736 --- .../framework/dao/mapper/RoleMapper.java | 8 ++- .../framework/dao/mapper/RoleMapper.xml | 50 +++++++++++--- .../framework/dao/mapper/TeamMapper.java | 10 ++- .../framework/dao/mapper/TeamMapper.xml | 69 +++++++++++++++++-- .../framework/util/NotifyPolicyUtil.java | 2 +- 5 files changed, 122 insertions(+), 17 deletions(-) diff --git a/src/main/java/neatlogic/framework/dao/mapper/RoleMapper.java b/src/main/java/neatlogic/framework/dao/mapper/RoleMapper.java index 42fb263ec..2f624da71 100644 --- a/src/main/java/neatlogic/framework/dao/mapper/RoleMapper.java +++ b/src/main/java/neatlogic/framework/dao/mapper/RoleMapper.java @@ -27,6 +27,8 @@ public interface RoleMapper { int checkRoleIsExists(String uuid); + int checkRoleNameIsIsRepeat(RoleVo roleVo); + List searchRole(RoleVo roleVo); List getRoleListByAuthName(String auth); @@ -49,6 +51,8 @@ public interface RoleMapper { RoleVo getRoleByUuid(String uuid); + RoleVo getRoleByName(String name); + RoleVo getRoleSimpleInfoByUuid(String uuid); List getRoleByUuidList(List uuidList); @@ -109,11 +113,13 @@ public interface RoleMapper { int updateTeamRole(RoleTeamVo roleTeamVo); + int updateRoleIsDeletedByUuid(String uuid); + int deleteRoleAuthByRoleUuid(String roleUuid); int deleteRoleAuth(RoleAuthVo roleAuthVo); - int deleteRoleByUuid(String uuid); +// int deleteRoleByUuid(String uuid); int deleteMenuRoleByRoleUuid(String roleUuid); diff --git a/src/main/java/neatlogic/framework/dao/mapper/RoleMapper.xml b/src/main/java/neatlogic/framework/dao/mapper/RoleMapper.xml index 697c25ec6..1ad875755 100644 --- a/src/main/java/neatlogic/framework/dao/mapper/RoleMapper.xml +++ b/src/main/java/neatlogic/framework/dao/mapper/RoleMapper.xml @@ -28,9 +28,17 @@ limitations under the License. + + @@ -49,6 +57,7 @@ limitations under the License. FROM `role` a LEFT JOIN `role_authority` c ON a.`uuid` = c.`role_uuid` + `is_delete` = 0 AND (name LIKE CONCAT('%',#{keyword}, '%') OR description LIKE CONCAT('%',#{keyword}, '%')) @@ -102,8 +111,7 @@ limitations under the License. COUNT(DISTINCT (a.`uuid`)) FROM `role` a LEFT JOIN `role_authority` b ON a.`uuid` = b.`role_uuid` - WHERE - 1=1 + WHERE `is_delete` = 0 AND (a.`name` LIKE CONCAT('%', #{keyword}, '%') OR a.`description` LIKE CONCAT('%', #{keyword}, '%')) @@ -132,11 +140,26 @@ limitations under the License. WHERE `uuid` = #{value} + + @@ -377,8 +400,8 @@ limitations under the License. - INSERT INTO `role` (`id`, `uuid`, `name`, `description`, `rule`) - VALUES (#{id}, #{uuid}, #{name}, #{description}, #{rule}) + INSERT INTO `role` (`id`, `uuid`, `name`, `description`, `rule`, `is_delete`) + VALUES (#{id}, #{uuid}, #{name}, #{description}, #{rule}, 0) @@ -411,7 +434,8 @@ limitations under the License. UPDATE `role` SET `name` = #{name}, `description` = #{description}, - `rule` = #{rule} + `rule` = #{rule}, + `is_delete` = #{isDelete} WHERE `uuid` = #{uuid} @@ -422,11 +446,17 @@ limitations under the License. AND `team_uuid` = #{teamUuid} - + + UPDATE `role` + SET `is_delete` = 1 + WHERE `uuid` = #{value} + + + DELETE diff --git a/src/main/java/neatlogic/framework/dao/mapper/TeamMapper.java b/src/main/java/neatlogic/framework/dao/mapper/TeamMapper.java index 6de28a512..cc760fe77 100644 --- a/src/main/java/neatlogic/framework/dao/mapper/TeamMapper.java +++ b/src/main/java/neatlogic/framework/dao/mapper/TeamMapper.java @@ -15,6 +15,8 @@ public interface TeamMapper { int checkTeamIsExists(String uuid); + int checkTeamNameIsIsRepeat(TeamVo teamVo); + List getTeamUuidListByUuidList(List uuidList); TeamVo getTeamByUuid(String uuid); @@ -35,6 +37,8 @@ public interface TeamMapper { List getTeamByUuidList(List teamUuidList); + List getTeamListContainsDeletedByUuidList(List teamUuidList); + List getTeamByIdList(List idList); List getTeamUuidListByUserUuid(String userUuid); @@ -55,6 +59,8 @@ public interface TeamMapper { List getTeamUuidByName(String name); + TeamVo getTeamByNameAndParentUuid(TeamVo teamVo); + List getRepeatTeamNameByNameList(List list); List getChildrenUuidListByLeftRightCode(@Param("lft") Integer lft, @Param("rht") Integer rht); @@ -85,13 +91,15 @@ public interface TeamMapper { int updateUpwardNamePathByLftRht(@Param("lft") Integer lft, @Param("rht") Integer rht); + int updateTeamIsDeletedByUuidList(List uuidList); + int deleteTeamUserByTeamUuid(String teamUuid); int deleteTeamUserByTeamUuidList(List teamUuidList); int deleteTeamUserByTeamUuidAndUserUuidList(@Param("teamUuid") String teamUuid, @Param("userUuidList") List userUuidList); - int deleteTeamByUuidList(List uuidList); +// int deleteTeamByUuidList(List uuidList); int deleteTeamRoleByTeamUuidList(List teamUuidList); diff --git a/src/main/java/neatlogic/framework/dao/mapper/TeamMapper.xml b/src/main/java/neatlogic/framework/dao/mapper/TeamMapper.xml index 9151b91f2..10e72a7b7 100644 --- a/src/main/java/neatlogic/framework/dao/mapper/TeamMapper.xml +++ b/src/main/java/neatlogic/framework/dao/mapper/TeamMapper.xml @@ -178,7 +178,8 @@ limitations under the License. SELECT a.`id`, a.`uuid`, - a.`name` + a.`name`, + a.`is_delete` AS isDelete FROM `team` a @@ -205,11 +206,20 @@ limitations under the License. + + + + + + select `uuid` from `role` - where `name` = #{value} + where `is_delete` = 0 AND `name` = #{value}