|
@@ -51,7 +51,7 @@ public class SysCustomerUserCommonService {
|
|
|
*/
|
|
*/
|
|
|
public List<Long> queryUserCityIds(Long provinceId) {
|
|
public List<Long> queryUserCityIds(Long provinceId) {
|
|
|
List<Long> cityIds = Lists.newArrayList();
|
|
List<Long> cityIds = Lists.newArrayList();
|
|
|
- SysCustomerSelectBO selectBO = this.querySelectDataByType1(false, false);
|
|
|
|
|
|
|
+ SysCustomerSelectBO selectBO = this.querySelectDataByType1(false);
|
|
|
if (CollUtil.isNotEmpty(selectBO.getRegionData())) {
|
|
if (CollUtil.isNotEmpty(selectBO.getRegionData())) {
|
|
|
selectBO.getRegionData().stream()
|
|
selectBO.getRegionData().stream()
|
|
|
.filter(x -> provinceId != null && provinceId.equals(x.getId()))
|
|
.filter(x -> provinceId != null && provinceId.equals(x.getId()))
|
|
@@ -70,7 +70,7 @@ public class SysCustomerUserCommonService {
|
|
|
*/
|
|
*/
|
|
|
public List<Long> queryUserCityIds1(Long provinceId) {
|
|
public List<Long> queryUserCityIds1(Long provinceId) {
|
|
|
List<Long> cityIds = Lists.newArrayList();
|
|
List<Long> cityIds = Lists.newArrayList();
|
|
|
- SysCustomerSelectBO selectBO = this.querySelectDataByType2(false, false);
|
|
|
|
|
|
|
+ SysCustomerSelectBO selectBO = this.querySelectDataByType2(false);
|
|
|
if (CollUtil.isNotEmpty(selectBO.getRegionData())) {
|
|
if (CollUtil.isNotEmpty(selectBO.getRegionData())) {
|
|
|
selectBO.getRegionData().stream()
|
|
selectBO.getRegionData().stream()
|
|
|
.filter(x -> provinceId != null && provinceId.equals(x.getId()))
|
|
.filter(x -> provinceId != null && provinceId.equals(x.getId()))
|
|
@@ -204,7 +204,7 @@ public class SysCustomerUserCommonService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public SysCustomerSelectBO querySelectDataByType1(Boolean allStatus, Boolean userStatus) {
|
|
|
|
|
|
|
+ public SysCustomerSelectBO querySelectDataByType1(Boolean userStatus) {
|
|
|
//获取用户角色
|
|
//获取用户角色
|
|
|
List<String> roles = UserContextHolder.getUserContext().getRoles();
|
|
List<String> roles = UserContextHolder.getUserContext().getRoles();
|
|
|
if (CollUtil.isEmpty(roles)) {
|
|
if (CollUtil.isEmpty(roles)) {
|
|
@@ -215,11 +215,11 @@ public class SysCustomerUserCommonService {
|
|
|
List<Long> groupIds = Lists.newArrayList();
|
|
List<Long> groupIds = Lists.newArrayList();
|
|
|
//管理员
|
|
//管理员
|
|
|
if (roles.contains("Admin")) {
|
|
if (roles.contains("Admin")) {
|
|
|
- return this.handleAdminRole(provinceIds, cityIds, groupIds, allStatus, userStatus);
|
|
|
|
|
|
|
+ return this.handleAdminRole(provinceIds, cityIds, groupIds, userStatus);
|
|
|
}
|
|
}
|
|
|
//普通成员或小组组长
|
|
//普通成员或小组组长
|
|
|
if (roles.contains("Member") || roles.contains("GroupManager")) {
|
|
if (roles.contains("Member") || roles.contains("GroupManager")) {
|
|
|
- return this.handleMemberRole(provinceIds, cityIds, groupIds, allStatus, userStatus);
|
|
|
|
|
|
|
+ return this.handleMemberRole(provinceIds, cityIds, groupIds, userStatus);
|
|
|
}
|
|
}
|
|
|
return SysCustomerSelectBO.builder().build();
|
|
return SysCustomerSelectBO.builder().build();
|
|
|
}
|
|
}
|
|
@@ -231,7 +231,7 @@ public class SysCustomerUserCommonService {
|
|
|
*
|
|
*
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public SysCustomerSelectBO querySelectDataByType2(Boolean allStatus, Boolean userStatus) {
|
|
|
|
|
|
|
+ public SysCustomerSelectBO querySelectDataByType2(Boolean userStatus) {
|
|
|
//获取用户角色
|
|
//获取用户角色
|
|
|
List<String> roles = UserContextHolder.getUserContext().getRoles();
|
|
List<String> roles = UserContextHolder.getUserContext().getRoles();
|
|
|
if (CollUtil.isEmpty(roles)) {
|
|
if (CollUtil.isEmpty(roles)) {
|
|
@@ -242,15 +242,15 @@ public class SysCustomerUserCommonService {
|
|
|
List<Long> groupIds = Lists.newArrayList();
|
|
List<Long> groupIds = Lists.newArrayList();
|
|
|
//管理员
|
|
//管理员
|
|
|
if (roles.contains("Admin")) {
|
|
if (roles.contains("Admin")) {
|
|
|
- return this.handleAdminRole(provinceIds, cityIds, groupIds, allStatus, userStatus);
|
|
|
|
|
|
|
+ return this.handleAdminRole(provinceIds, cityIds, groupIds, userStatus);
|
|
|
}
|
|
}
|
|
|
//小组组长
|
|
//小组组长
|
|
|
if (roles.contains("GroupManager")) {
|
|
if (roles.contains("GroupManager")) {
|
|
|
- return this.handeGroupManagerRole(provinceIds, cityIds, allStatus, userStatus);
|
|
|
|
|
|
|
+ return this.handeGroupManagerRole(provinceIds, cityIds, userStatus);
|
|
|
}
|
|
}
|
|
|
//普通成员
|
|
//普通成员
|
|
|
if (roles.contains("Member")) {
|
|
if (roles.contains("Member")) {
|
|
|
- return this.handleMemberRole(provinceIds, cityIds, groupIds, allStatus, userStatus);
|
|
|
|
|
|
|
+ return this.handleMemberRole(provinceIds, cityIds, groupIds, userStatus);
|
|
|
}
|
|
}
|
|
|
return SysCustomerSelectBO.builder().build();
|
|
return SysCustomerSelectBO.builder().build();
|
|
|
}
|
|
}
|
|
@@ -266,11 +266,11 @@ public class SysCustomerUserCommonService {
|
|
|
//查询所有学段信息
|
|
//查询所有学段信息
|
|
|
List<SysParamBaseDataEntity> stageDataList = this.queryParamBaseData(0);
|
|
List<SysParamBaseDataEntity> stageDataList = this.queryParamBaseData(0);
|
|
|
if (CollUtil.isNotEmpty(stageDataList)) {
|
|
if (CollUtil.isNotEmpty(stageDataList)) {
|
|
|
- SelectBO all = SelectBO.builder().build();
|
|
|
|
|
- all.setName("全部");
|
|
|
|
|
- all.setSortCode(0);
|
|
|
|
|
- all.setSelectStatus(true);
|
|
|
|
|
- stageData.add(all);
|
|
|
|
|
|
|
+// SelectBO all = SelectBO.builder().build();
|
|
|
|
|
+// all.setName("全部");
|
|
|
|
|
+// all.setSortCode(0);
|
|
|
|
|
+// all.setSelectStatus(true);
|
|
|
|
|
+// stageData.add(all);
|
|
|
stageDataList.forEach(e -> {
|
|
stageDataList.forEach(e -> {
|
|
|
SelectBO bo = SelectBO.builder().build();
|
|
SelectBO bo = SelectBO.builder().build();
|
|
|
bo.setId(e.getId());
|
|
bo.setId(e.getId());
|
|
@@ -293,11 +293,11 @@ public class SysCustomerUserCommonService {
|
|
|
//查询所有学段信息
|
|
//查询所有学段信息
|
|
|
List<SysParamBaseDataEntity> stageDataList = this.queryParamBaseData(1);
|
|
List<SysParamBaseDataEntity> stageDataList = this.queryParamBaseData(1);
|
|
|
if (CollUtil.isNotEmpty(stageDataList)) {
|
|
if (CollUtil.isNotEmpty(stageDataList)) {
|
|
|
- SelectBO all = SelectBO.builder().build();
|
|
|
|
|
- all.setName("全部");
|
|
|
|
|
- all.setSortCode(0);
|
|
|
|
|
- all.setSelectStatus(true);
|
|
|
|
|
- stageData.add(all);
|
|
|
|
|
|
|
+// SelectBO all = SelectBO.builder().build();
|
|
|
|
|
+// all.setName("全部");
|
|
|
|
|
+// all.setSortCode(0);
|
|
|
|
|
+// all.setSelectStatus(true);
|
|
|
|
|
+// stageData.add(all);
|
|
|
stageDataList.forEach(e -> {
|
|
stageDataList.forEach(e -> {
|
|
|
SelectBO bo = SelectBO.builder().build();
|
|
SelectBO bo = SelectBO.builder().build();
|
|
|
bo.setId(e.getId());
|
|
bo.setId(e.getId());
|
|
@@ -319,11 +319,11 @@ public class SysCustomerUserCommonService {
|
|
|
public List<SelectBO> handleTypeData() {
|
|
public List<SelectBO> handleTypeData() {
|
|
|
List<SelectBO> typeData = Lists.newArrayList();
|
|
List<SelectBO> typeData = Lists.newArrayList();
|
|
|
//查询所有类型信息
|
|
//查询所有类型信息
|
|
|
- SelectBO all = SelectBO.builder().build();
|
|
|
|
|
- all.setName("全部");
|
|
|
|
|
- all.setSortCode(0);
|
|
|
|
|
- all.setSelectStatus(true);
|
|
|
|
|
- typeData.add(all);
|
|
|
|
|
|
|
+// SelectBO all = SelectBO.builder().build();
|
|
|
|
|
+// all.setName("全部");
|
|
|
|
|
+// all.setSortCode(0);
|
|
|
|
|
+// all.setSelectStatus(true);
|
|
|
|
|
+// typeData.add(all);
|
|
|
|
|
|
|
|
SelectBO firstBO = SelectBO.builder().build();
|
|
SelectBO firstBO = SelectBO.builder().build();
|
|
|
firstBO.setId(1L);
|
|
firstBO.setId(1L);
|
|
@@ -356,7 +356,6 @@ public class SysCustomerUserCommonService {
|
|
|
public SysCustomerSelectBO handleAdminRole(List<Long> provinceIds,
|
|
public SysCustomerSelectBO handleAdminRole(List<Long> provinceIds,
|
|
|
List<Long> cityIds,
|
|
List<Long> cityIds,
|
|
|
List<Long> groupIds,
|
|
List<Long> groupIds,
|
|
|
- Boolean allStatus,
|
|
|
|
|
Boolean userStatus) {
|
|
Boolean userStatus) {
|
|
|
|
|
|
|
|
List<DictProvinceRegionEntity> provinceRegionEntityList =
|
|
List<DictProvinceRegionEntity> provinceRegionEntityList =
|
|
@@ -370,7 +369,7 @@ public class SysCustomerUserCommonService {
|
|
|
);
|
|
);
|
|
|
if (CollUtil.isNotEmpty(provinceRegionEntityList)) {
|
|
if (CollUtil.isNotEmpty(provinceRegionEntityList)) {
|
|
|
this.handleAdmin(provinceRegionEntityList, provinceIds, cityIds, groupIds);
|
|
this.handleAdmin(provinceRegionEntityList, provinceIds, cityIds, groupIds);
|
|
|
- return this.handleResultData(provinceIds, cityIds, groupIds, allStatus, userStatus);
|
|
|
|
|
|
|
+ return this.handleResultData(provinceIds, cityIds, groupIds, userStatus);
|
|
|
}
|
|
}
|
|
|
return SysCustomerSelectBO.builder().build();
|
|
return SysCustomerSelectBO.builder().build();
|
|
|
}
|
|
}
|
|
@@ -384,7 +383,6 @@ public class SysCustomerUserCommonService {
|
|
|
*/
|
|
*/
|
|
|
public SysCustomerSelectBO handeGroupManagerRole(List<Long> provinceIds,
|
|
public SysCustomerSelectBO handeGroupManagerRole(List<Long> provinceIds,
|
|
|
List<Long> cityIds,
|
|
List<Long> cityIds,
|
|
|
- Boolean allStatus,
|
|
|
|
|
Boolean userStatus) {
|
|
Boolean userStatus) {
|
|
|
List<SysUserRoleRelationEntity> groupManagerRelationEntityList =
|
|
List<SysUserRoleRelationEntity> groupManagerRelationEntityList =
|
|
|
sysUserRoleRelationMapper.selectList(
|
|
sysUserRoleRelationMapper.selectList(
|
|
@@ -402,7 +400,7 @@ public class SysCustomerUserCommonService {
|
|
|
.map(SysUserRoleRelationEntity::getGroupId)
|
|
.map(SysUserRoleRelationEntity::getGroupId)
|
|
|
.distinct().toList();
|
|
.distinct().toList();
|
|
|
//开通的省市都有相同的小组,所有这里查询开通的省市查询使用管理员的查询
|
|
//开通的省市都有相同的小组,所有这里查询开通的省市查询使用管理员的查询
|
|
|
- return this.handleAdminRole(provinceIds, cityIds, groupIds, allStatus, userStatus);
|
|
|
|
|
|
|
+ return this.handleAdminRole(provinceIds, cityIds, groupIds, userStatus);
|
|
|
}
|
|
}
|
|
|
return SysCustomerSelectBO.builder().build();
|
|
return SysCustomerSelectBO.builder().build();
|
|
|
}
|
|
}
|
|
@@ -418,7 +416,6 @@ public class SysCustomerUserCommonService {
|
|
|
public SysCustomerSelectBO handleMemberRole(List<Long> provinceIds,
|
|
public SysCustomerSelectBO handleMemberRole(List<Long> provinceIds,
|
|
|
List<Long> cityIds,
|
|
List<Long> cityIds,
|
|
|
List<Long> groupIds,
|
|
List<Long> groupIds,
|
|
|
- Boolean allStatus,
|
|
|
|
|
Boolean userStatus) {
|
|
Boolean userStatus) {
|
|
|
List<SysUserGroupRelationEntity> userGroupRelationEntityList =
|
|
List<SysUserGroupRelationEntity> userGroupRelationEntityList =
|
|
|
sysUserGroupRelationMapper.selectList(
|
|
sysUserGroupRelationMapper.selectList(
|
|
@@ -433,7 +430,7 @@ public class SysCustomerUserCommonService {
|
|
|
);
|
|
);
|
|
|
if (CollUtil.isNotEmpty(userGroupRelationEntityList)) {
|
|
if (CollUtil.isNotEmpty(userGroupRelationEntityList)) {
|
|
|
this.handleMemberData(userGroupRelationEntityList, provinceIds, cityIds, groupIds);
|
|
this.handleMemberData(userGroupRelationEntityList, provinceIds, cityIds, groupIds);
|
|
|
- return this.handleResultData(provinceIds, cityIds, groupIds, allStatus, userStatus);
|
|
|
|
|
|
|
+ return this.handleResultData(provinceIds, cityIds, groupIds, userStatus);
|
|
|
}
|
|
}
|
|
|
return SysCustomerSelectBO.builder().build();
|
|
return SysCustomerSelectBO.builder().build();
|
|
|
}
|
|
}
|
|
@@ -448,12 +445,11 @@ public class SysCustomerUserCommonService {
|
|
|
*/
|
|
*/
|
|
|
public SysCustomerSelectBO handleResultData(List<Long> provinceIds,
|
|
public SysCustomerSelectBO handleResultData(List<Long> provinceIds,
|
|
|
List<Long> cityIds,
|
|
List<Long> cityIds,
|
|
|
- List<Long> groupIds,
|
|
|
|
|
- Boolean allStatus, Boolean userStatus) {
|
|
|
|
|
|
|
+ List<Long> groupIds, Boolean userStatus) {
|
|
|
|
|
|
|
|
SysCustomerSelectBO selectBO = SysCustomerSelectBO.builder().build();
|
|
SysCustomerSelectBO selectBO = SysCustomerSelectBO.builder().build();
|
|
|
//小组
|
|
//小组
|
|
|
- selectBO.setGroupData(this.handeGroupData(groupIds, allStatus));
|
|
|
|
|
|
|
+ selectBO.setGroupData(this.handeGroupData(groupIds));
|
|
|
|
|
|
|
|
List<SysUserEntity> userEntityList =
|
|
List<SysUserEntity> userEntityList =
|
|
|
sysUserMapper.selectList(
|
|
sysUserMapper.selectList(
|
|
@@ -461,7 +457,7 @@ public class SysCustomerUserCommonService {
|
|
|
.eq(SysUserEntity::getStatus, 1)
|
|
.eq(SysUserEntity::getStatus, 1)
|
|
|
);
|
|
);
|
|
|
//省市
|
|
//省市
|
|
|
- List<SelectBO> regionData = this.handleRegionData(provinceIds, cityIds, allStatus);
|
|
|
|
|
|
|
+ List<SelectBO> regionData = this.handleRegionData(provinceIds, cityIds);
|
|
|
//省市
|
|
//省市
|
|
|
selectBO.setRegionData(regionData);
|
|
selectBO.setRegionData(regionData);
|
|
|
//成员
|
|
//成员
|
|
@@ -483,7 +479,7 @@ public class SysCustomerUserCommonService {
|
|
|
);
|
|
);
|
|
|
if (userStatus) {
|
|
if (userStatus) {
|
|
|
regionData.forEach(province -> {
|
|
regionData.forEach(province -> {
|
|
|
- if(CollUtil.isNotEmpty(province.getSubData())){
|
|
|
|
|
|
|
+ if (CollUtil.isNotEmpty(province.getSubData())) {
|
|
|
province.getSubData().forEach(city -> {
|
|
province.getSubData().forEach(city -> {
|
|
|
if (CollUtil.isNotEmpty(groupIds) && CollUtil.isNotEmpty(groupRelationEntityList)) {
|
|
if (CollUtil.isNotEmpty(groupIds) && CollUtil.isNotEmpty(groupRelationEntityList)) {
|
|
|
|
|
|
|
@@ -493,41 +489,24 @@ public class SysCustomerUserCommonService {
|
|
|
.filter(x -> CollUtil.isNotEmpty(groupIds) && groupIds.contains(x.getGroupId()))
|
|
.filter(x -> CollUtil.isNotEmpty(groupIds) && groupIds.contains(x.getGroupId()))
|
|
|
.sorted(Comparator.comparing(SysUserGroupRelationEntity::getCreatedAt))
|
|
.sorted(Comparator.comparing(SysUserGroupRelationEntity::getCreatedAt))
|
|
|
.collect(Collectors.groupingBy(SysUserGroupRelationEntity::getGroupId, LinkedHashMap::new, Collectors.toList()))
|
|
.collect(Collectors.groupingBy(SysUserGroupRelationEntity::getGroupId, LinkedHashMap::new, Collectors.toList()))
|
|
|
- .forEach((key, value) -> {
|
|
|
|
|
- if (allStatus) {
|
|
|
|
|
- if(CollUtil.isEmpty(userData) || userData.stream().map(BindUserBO::getUsername).noneMatch("全部"::equals)){
|
|
|
|
|
- BindUserBO userBO = BindUserBO.builder().build();
|
|
|
|
|
- userBO.setProvinceId(province.getId());
|
|
|
|
|
- userBO.setCityId(city.getId());
|
|
|
|
|
- userBO.setGroupId(key);
|
|
|
|
|
- userBO.setUsername("全部");
|
|
|
|
|
- userBO.setSortCode(0);
|
|
|
|
|
- userBO.setSelectStatus(true);
|
|
|
|
|
- userData.add(userBO);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- AtomicInteger sortCode = new AtomicInteger(0);
|
|
|
|
|
- value.forEach(user -> {
|
|
|
|
|
- if (CollUtil.isNotEmpty(userEntityList)) {
|
|
|
|
|
- userEntityList.stream()
|
|
|
|
|
- .filter(x -> x.getId().equals(user.getUserId()))
|
|
|
|
|
- .findFirst()
|
|
|
|
|
- .ifPresent(e -> {
|
|
|
|
|
- if(CollUtil.isEmpty(userData)||userData.stream().map(BindUserBO::getId).noneMatch(user.getUserId()::equals)){
|
|
|
|
|
|
|
+ .forEach((key, value) ->
|
|
|
|
|
+ value.forEach(user -> {
|
|
|
|
|
+ if (CollUtil.isNotEmpty(userEntityList)) {
|
|
|
|
|
+ userEntityList.stream()
|
|
|
|
|
+ .filter(x -> x.getId().equals(user.getUserId()))
|
|
|
|
|
+ .findFirst()
|
|
|
|
|
+ .ifPresent(e -> {
|
|
|
BindUserBO userBO = BindUserBO.builder().build();
|
|
BindUserBO userBO = BindUserBO.builder().build();
|
|
|
|
|
+ userBO.setGroupId(user.getGroupId());
|
|
|
userBO.setId(user.getUserId());
|
|
userBO.setId(user.getUserId());
|
|
|
userBO.setProvinceId(user.getProvinceId());
|
|
userBO.setProvinceId(user.getProvinceId());
|
|
|
userBO.setCityId(user.getCityId());
|
|
userBO.setCityId(user.getCityId());
|
|
|
- userBO.setGroupId(user.getGroupId());
|
|
|
|
|
userBO.setUsername(e.getUserName());
|
|
userBO.setUsername(e.getUserName());
|
|
|
userBO.setSelectStatus(false);
|
|
userBO.setSelectStatus(false);
|
|
|
- userBO.setSortCode(sortCode.incrementAndGet());
|
|
|
|
|
userData.add(userBO);
|
|
userData.add(userBO);
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
);
|
|
);
|
|
@@ -535,7 +514,23 @@ public class SysCustomerUserCommonService {
|
|
|
|
|
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
- selectBO.setMemberData(userData);
|
|
|
|
|
|
|
+ List<BindUserBO> userData1 = Lists.newArrayList();
|
|
|
|
|
+
|
|
|
|
|
+ if (CollUtil.isNotEmpty(userData)) {
|
|
|
|
|
+ userData.stream()
|
|
|
|
|
+ .collect(Collectors.groupingBy(BindUserBO::getId))
|
|
|
|
|
+ .forEach((key, value) -> {
|
|
|
|
|
+ BindUserBO userBO = value.getFirst();
|
|
|
|
|
+ userBO.setGroupId(null);
|
|
|
|
|
+ userBO.setGroupIds(value.stream().map(BindUserBO::getGroupId).filter(Objects::nonNull).distinct().toList());
|
|
|
|
|
+ userBO.setProvinceId(null);
|
|
|
|
|
+ userBO.setProvinceIds(value.stream().map(BindUserBO::getProvinceId).filter(Objects::nonNull).distinct().toList());
|
|
|
|
|
+ userBO.setCityId(null);
|
|
|
|
|
+ userBO.setCityIds(value.stream().map(BindUserBO::getCityId).filter(Objects::nonNull).distinct().toList());
|
|
|
|
|
+ userData1.add(userBO);
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ selectBO.setMemberData(userData1);
|
|
|
return selectBO;
|
|
return selectBO;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -631,19 +626,18 @@ public class SysCustomerUserCommonService {
|
|
|
* @param groupIds
|
|
* @param groupIds
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
- public List<SelectBO> handeGroupData(List<Long> groupIds,
|
|
|
|
|
- Boolean allStatus) {
|
|
|
|
|
|
|
+ public List<SelectBO> handeGroupData(List<Long> groupIds) {
|
|
|
List<SelectBO> groupData = Lists.newArrayList();
|
|
List<SelectBO> groupData = Lists.newArrayList();
|
|
|
//小组
|
|
//小组
|
|
|
if (CollUtil.isNotEmpty(groupIds)) {
|
|
if (CollUtil.isNotEmpty(groupIds)) {
|
|
|
- if (allStatus) {
|
|
|
|
|
- SelectBO selectBO = SelectBO.builder()
|
|
|
|
|
- .name("全部")
|
|
|
|
|
- .sortCode(0)
|
|
|
|
|
- .selectStatus(true)
|
|
|
|
|
- .build();
|
|
|
|
|
- groupData.add(selectBO);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (allStatus) {
|
|
|
|
|
+// SelectBO selectBO = SelectBO.builder()
|
|
|
|
|
+// .name("全部")
|
|
|
|
|
+// .sortCode(0)
|
|
|
|
|
+// .selectStatus(true)
|
|
|
|
|
+// .build();
|
|
|
|
|
+// groupData.add(selectBO);
|
|
|
|
|
+// }
|
|
|
List<SysGroupEntity> groupEntityList = sysGroupMapper.selectByIds(groupIds);
|
|
List<SysGroupEntity> groupEntityList = sysGroupMapper.selectByIds(groupIds);
|
|
|
if (CollUtil.isNotEmpty(groupEntityList)) {
|
|
if (CollUtil.isNotEmpty(groupEntityList)) {
|
|
|
groupEntityList.stream()
|
|
groupEntityList.stream()
|
|
@@ -670,17 +664,16 @@ public class SysCustomerUserCommonService {
|
|
|
* @return
|
|
* @return
|
|
|
*/
|
|
*/
|
|
|
public List<SelectBO> handleRegionData(List<Long> provinceIds,
|
|
public List<SelectBO> handleRegionData(List<Long> provinceIds,
|
|
|
- List<Long> cityIds,
|
|
|
|
|
- Boolean allStatus) {
|
|
|
|
|
|
|
+ List<Long> cityIds) {
|
|
|
List<SelectBO> regionData = Lists.newArrayList();
|
|
List<SelectBO> regionData = Lists.newArrayList();
|
|
|
- SelectBO selectBO = SelectBO.builder()
|
|
|
|
|
- .name("全部")
|
|
|
|
|
- .sortCode(0)
|
|
|
|
|
- .selectStatus(true)
|
|
|
|
|
- .build();
|
|
|
|
|
- if (allStatus) {
|
|
|
|
|
- regionData.add(selectBO);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// SelectBO selectBO = SelectBO.builder()
|
|
|
|
|
+// .name("全部")
|
|
|
|
|
+// .sortCode(0)
|
|
|
|
|
+// .selectStatus(true)
|
|
|
|
|
+// .build();
|
|
|
|
|
+// if (allStatus) {
|
|
|
|
|
+// regionData.add(selectBO);
|
|
|
|
|
+// }
|
|
|
//省份
|
|
//省份
|
|
|
List<DictProvinceRegionEntity> regionEntityList = dictProvinceRegionMapper.selectByIds(provinceIds);
|
|
List<DictProvinceRegionEntity> regionEntityList = dictProvinceRegionMapper.selectByIds(provinceIds);
|
|
|
//城市
|
|
//城市
|
|
@@ -696,9 +689,9 @@ public class SysCustomerUserCommonService {
|
|
|
provinceBO.setSortCode(province.getSortCode());
|
|
provinceBO.setSortCode(province.getSortCode());
|
|
|
provinceBO.setSelectStatus(false);
|
|
provinceBO.setSelectStatus(false);
|
|
|
List<SelectBO> subData = Lists.newArrayList();
|
|
List<SelectBO> subData = Lists.newArrayList();
|
|
|
- if (allStatus) {
|
|
|
|
|
- subData.add(selectBO);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+// if (allStatus) {
|
|
|
|
|
+// subData.add(selectBO);
|
|
|
|
|
+// }
|
|
|
AtomicInteger sortCode = new AtomicInteger(0);
|
|
AtomicInteger sortCode = new AtomicInteger(0);
|
|
|
dictCityRegionEntities.stream()
|
|
dictCityRegionEntities.stream()
|
|
|
.filter(x -> x.getParentCode().equals(province.getCode()))
|
|
.filter(x -> x.getParentCode().equals(province.getCode()))
|