Commit 6f30e8cb by 邓实川 Committed by chenzg

业务组名列表bug修复

parent 93823108
......@@ -233,10 +233,13 @@ public class CrmController {
List<CrmBusinessGroupMember> crmBusinessGroupManagers = CrmBusinessGroupMember.builder().build()
.selectList(new QueryWrapper<CrmBusinessGroupMember>().lambda()
.eq(CrmBusinessGroupMember::getGid, gid).eq(CrmBusinessGroupMember::getType, 1)
.eq(CrmBusinessGroupMember::getOrgCode, getOrgCode(userBean))
.select(CrmBusinessGroupMember::getEmpNum));
List<CrmBusinessGroupMember> crmBusinessGroupMembers = CrmBusinessGroupMember.builder().build()
.selectList(new QueryWrapper<CrmBusinessGroupMember>().lambda()
.eq(CrmBusinessGroupMember::getGid, gid).eq(CrmBusinessGroupMember::getType, 0)
.eq(CrmBusinessGroupMember::getOrgCode, getOrgCode(userBean))
.select(CrmBusinessGroupMember::getEmpNum));
List<Map<String, Object>> managers = new ArrayList<Map<String, Object>>();
for (CrmBusinessGroupMember crmBusinessGroupManager : crmBusinessGroupManagers) {
......@@ -274,10 +277,10 @@ public class CrmController {
@GetMapping("getBusinessGroupId")
@ApiOperation(value = "获取业务组列表(id,name)", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> getBusinessGroupId(@CurrentUser UserBean userBean) {
Integer empNum = getEmpNum(userBean);
List<CrmBusinessGroupMember> list = CrmBusinessGroupMember.builder().build()
.selectList(new LambdaQueryWrapper<CrmBusinessGroupMember>()
.eq(CrmBusinessGroupMember::getEmpNum, empNum).select(CrmBusinessGroupMember::getGid));
.eq(CrmBusinessGroupMember::getOrgCode, getOrgCode(userBean))
.select(CrmBusinessGroupMember::getGid));
List<Integer> gids = list.stream().map(CrmBusinessGroupMember::getGid).collect(Collectors.toList()).stream()
.distinct().collect(Collectors.toList());
List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
......@@ -1137,8 +1140,7 @@ public class CrmController {
// 业务组
CrmBusinessGroup crmBusinessGroup = CrmBusinessGroup.builder().build()
.selectOne(new LambdaQueryWrapper<CrmBusinessGroup>()
.eq(CrmBusinessGroup::getOrgCode, orgCode)
.selectOne(new LambdaQueryWrapper<CrmBusinessGroup>().eq(CrmBusinessGroup::getOrgCode, orgCode)
.eq(CrmBusinessGroup::getName, belongGroupName).select(CrmBusinessGroup::getId));
if (crmBusinessGroup == null)
return ResultUtil.error("没有匹配的业务组名称");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment