【7.2.3】更新分组业务的所有分组列表查询

pull/30/head
fengshuonan 2022-06-29 11:37:49 +08:00
parent 541d44fda3
commit f15241e313
2 changed files with 29 additions and 1 deletions

View File

@ -47,6 +47,11 @@ public interface GroupConstants {
*/
String GROUP_ADD_NAME = "添加分组";
/**
*
*/
String ALL_GROUP_NAME = "所有分组";
/**
*
*/

View File

@ -32,7 +32,7 @@ public class SysGroupServiceImpl extends ServiceImpl<SysGroupMapper, SysGroup> i
List<SysGroup> userGroupList = this.baseMapper.getUserGroupList(groupBizCode, userId);
// 增加两个固定的选中和取消选项
addCommonGroup(groupBizCode, userGroupList);
addAllGroup(groupBizCode, userGroupList);
return userGroupList;
}
@ -130,4 +130,27 @@ public class SysGroupServiceImpl extends ServiceImpl<SysGroupMapper, SysGroup> i
result.add(0, addGroup);
}
/**
*
*
* @author fengshuonan
* @date 2022/6/28 10:50
*/
private void addAllGroup(String groupBizCode, List<SysGroup> result) {
// 添加分组
SysGroup addGroup = new SysGroup();
addGroup.setGroupBizCode(groupBizCode);
addGroup.setGroupName(GroupConstants.ALL_GROUP_NAME);
// 未分组
SysGroup noneGroup = new SysGroup();
noneGroup.setGroupBizCode(groupBizCode);
noneGroup.setGroupName(GroupConstants.GROUP_DELETE_NAME);
result.add(0, noneGroup);
result.add(0, addGroup);
}
}