更新社区人员和B端用户列表
This commit is contained in:
parent
22ec3d921e
commit
73c8f1816e
@ -22,10 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
|
|||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author yuyang
|
* @author yuyang
|
||||||
@ -62,11 +59,15 @@ public class XhpcCommunityServiceImpl extends BaseService implements IXhpcCommun
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Map<String, Object> commMap: list){
|
Iterator<Map<String, Object>> iterator = list.iterator();
|
||||||
List<Map<String, Object>> userMapList = xhpcCommunityMapper.communityPersonnelTree(commMap.get("id").toString().replaceAll("COMM_", ""));
|
while (iterator.hasNext()){
|
||||||
if(userMapList.size() > 0){
|
Map<String, Object> commMap = iterator.next();
|
||||||
commMap.put("children", userMapList);
|
List<Map<String, Object>> userMapList = xhpcCommunityMapper.communityPersonnelTree(commMap.get("id").toString().replaceAll("COMM_", ""));
|
||||||
}
|
if (userMapList.size() < 1){
|
||||||
|
iterator.remove();
|
||||||
|
} else {
|
||||||
|
commMap.put("children", userMapList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -38,7 +38,7 @@ public class XhpcCustomersServiceImpl extends BaseService implements IXhpcCustom
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Map<String, Object>> userList(HttpServletRequest request,String name){
|
public List<Map<String, Object>> userList(HttpServletRequest request,String name){
|
||||||
List<Map<String, Object>> list =new ArrayList<>();
|
List<Map<String, Object>> list = new ArrayList<>();
|
||||||
LoginUser loginUser = tokenService.getLoginUser(request);
|
LoginUser loginUser = tokenService.getLoginUser(request);
|
||||||
String userType = loginUser.getSysUser().getUserType();
|
String userType = loginUser.getSysUser().getUserType();
|
||||||
if(UserTypeUtil.SYS_USER_TYPE_ZERO.equals(userType)){
|
if(UserTypeUtil.SYS_USER_TYPE_ZERO.equals(userType)){
|
||||||
@ -47,13 +47,16 @@ public class XhpcCustomersServiceImpl extends BaseService implements IXhpcCustom
|
|||||||
list = xhpcCustomersMapper.tree(name,loginUser.getSysUser().getOperatorId(),loginUser.getTenantId());
|
list = xhpcCustomersMapper.tree(name,loginUser.getSysUser().getOperatorId(),loginUser.getTenantId());
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Map<String, Object> cusMap: list){
|
Iterator<Map<String, Object>> iterator = list.iterator();
|
||||||
|
while (iterator.hasNext()){
|
||||||
|
Map<String, Object> cusMap = iterator.next();
|
||||||
List<Map<String, Object>> userList = xhpcCustomersMapper.customersPersonnelTree(cusMap.get("id").toString().replaceAll("CUS_", ""));
|
List<Map<String, Object>> userList = xhpcCustomersMapper.customersPersonnelTree(cusMap.get("id").toString().replaceAll("CUS_", ""));
|
||||||
if (userList.size() > 0){
|
if (userList.size() < 1){
|
||||||
|
iterator.remove();
|
||||||
|
} else {
|
||||||
cusMap.put("children", userList);
|
cusMap.put("children", userList);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user