Commit 3f0a2bad by 邓实川

业务组名列表bug修复

parent ff668539
...@@ -233,10 +233,13 @@ public class CrmController { ...@@ -233,10 +233,13 @@ public class CrmController {
List<CrmBusinessGroupMember> crmBusinessGroupManagers = CrmBusinessGroupMember.builder().build() List<CrmBusinessGroupMember> crmBusinessGroupManagers = CrmBusinessGroupMember.builder().build()
.selectList(new QueryWrapper<CrmBusinessGroupMember>().lambda() .selectList(new QueryWrapper<CrmBusinessGroupMember>().lambda()
.eq(CrmBusinessGroupMember::getGid, gid).eq(CrmBusinessGroupMember::getType, 1) .eq(CrmBusinessGroupMember::getGid, gid).eq(CrmBusinessGroupMember::getType, 1)
.eq(CrmBusinessGroupMember::getOrgCode, getOrgCode(userBean))
.select(CrmBusinessGroupMember::getEmpNum)); .select(CrmBusinessGroupMember::getEmpNum));
List<CrmBusinessGroupMember> crmBusinessGroupMembers = CrmBusinessGroupMember.builder().build() List<CrmBusinessGroupMember> crmBusinessGroupMembers = CrmBusinessGroupMember.builder().build()
.selectList(new QueryWrapper<CrmBusinessGroupMember>().lambda() .selectList(new QueryWrapper<CrmBusinessGroupMember>().lambda()
.eq(CrmBusinessGroupMember::getGid, gid).eq(CrmBusinessGroupMember::getType, 0) .eq(CrmBusinessGroupMember::getGid, gid).eq(CrmBusinessGroupMember::getType, 0)
.eq(CrmBusinessGroupMember::getOrgCode, getOrgCode(userBean))
.select(CrmBusinessGroupMember::getEmpNum)); .select(CrmBusinessGroupMember::getEmpNum));
List<Map<String, Object>> managers = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> managers = new ArrayList<Map<String, Object>>();
for (CrmBusinessGroupMember crmBusinessGroupManager : crmBusinessGroupManagers) { for (CrmBusinessGroupMember crmBusinessGroupManager : crmBusinessGroupManagers) {
...@@ -274,10 +277,10 @@ public class CrmController { ...@@ -274,10 +277,10 @@ public class CrmController {
@GetMapping("getBusinessGroupId") @GetMapping("getBusinessGroupId")
@ApiOperation(value = "获取业务组列表(id,name)", httpMethod = "GET", notes = "接口发布说明") @ApiOperation(value = "获取业务组列表(id,name)", httpMethod = "GET", notes = "接口发布说明")
public Result<Object> getBusinessGroupId(@CurrentUser UserBean userBean) { public Result<Object> getBusinessGroupId(@CurrentUser UserBean userBean) {
Integer empNum = getEmpNum(userBean);
List<CrmBusinessGroupMember> list = CrmBusinessGroupMember.builder().build() List<CrmBusinessGroupMember> list = CrmBusinessGroupMember.builder().build()
.selectList(new LambdaQueryWrapper<CrmBusinessGroupMember>() .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() List<Integer> gids = list.stream().map(CrmBusinessGroupMember::getGid).collect(Collectors.toList()).stream()
.distinct().collect(Collectors.toList()); .distinct().collect(Collectors.toList());
List<Map<String, Object>> result = new ArrayList<Map<String, Object>>(); List<Map<String, Object>> result = new ArrayList<Map<String, Object>>();
...@@ -1137,8 +1140,7 @@ public class CrmController { ...@@ -1137,8 +1140,7 @@ public class CrmController {
// 业务组 // 业务组
CrmBusinessGroup crmBusinessGroup = CrmBusinessGroup.builder().build() CrmBusinessGroup crmBusinessGroup = CrmBusinessGroup.builder().build()
.selectOne(new LambdaQueryWrapper<CrmBusinessGroup>() .selectOne(new LambdaQueryWrapper<CrmBusinessGroup>().eq(CrmBusinessGroup::getOrgCode, orgCode)
.eq(CrmBusinessGroup::getOrgCode, orgCode)
.eq(CrmBusinessGroup::getName, belongGroupName).select(CrmBusinessGroup::getId)); .eq(CrmBusinessGroup::getName, belongGroupName).select(CrmBusinessGroup::getId));
if (crmBusinessGroup == null) if (crmBusinessGroup == null)
return ResultUtil.error("没有匹配的业务组名称"); 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