mirror of https://gitee.com/stylefeng/roses
【7.2.3】更新分组业务的所有分组列表查询
parent
541d44fda3
commit
f15241e313
|
@ -47,6 +47,11 @@ public interface GroupConstants {
|
||||||
*/
|
*/
|
||||||
String GROUP_ADD_NAME = "添加分组";
|
String GROUP_ADD_NAME = "添加分组";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所有分组
|
||||||
|
*/
|
||||||
|
String ALL_GROUP_NAME = "所有分组";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 未分组
|
* 未分组
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class SysGroupServiceImpl extends ServiceImpl<SysGroupMapper, SysGroup> i
|
||||||
List<SysGroup> userGroupList = this.baseMapper.getUserGroupList(groupBizCode, userId);
|
List<SysGroup> userGroupList = this.baseMapper.getUserGroupList(groupBizCode, userId);
|
||||||
|
|
||||||
// 增加两个固定的选中和取消选项
|
// 增加两个固定的选中和取消选项
|
||||||
addCommonGroup(groupBizCode, userGroupList);
|
addAllGroup(groupBizCode, userGroupList);
|
||||||
|
|
||||||
return userGroupList;
|
return userGroupList;
|
||||||
}
|
}
|
||||||
|
@ -130,4 +130,27 @@ public class SysGroupServiceImpl extends ServiceImpl<SysGroupMapper, SysGroup> i
|
||||||
result.add(0, addGroup);
|
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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue