refactor(crm): 重构用户结构树功能
- 更新了 AchievementService 接口,移除了相关方法 - 重构了 AchievementServiceImpl 中的业绩相关方法,使用 UserLiveTreeService 替代原有的 AdminUserApi- 更新了 CustomerServiceImpl 中的客户相关方法,使用 UserLiveTreeService 替代原有的 AdminUserApi- 调整了 UserLiveTreeController 的接口设计,改为使用 UserLiveTreeService - 重构了 UserLiveTreeService 接口,增加了新的方法 - 实现了 UserLiveTreeServiceImpl 中的新的方法,包括获取用户列表和分页查询 - 更新了数据库查询,使用 user_id 替代 id 在 CRM 用户结构树表中进行查询
This commit is contained in:
parent
3c8796d0de
commit
c2db457a63
@ -55,13 +55,4 @@ public class AchievementController {
|
||||
public CommonResult<List<SalesVO>> getSales(@RequestParam(name = "relation",defaultValue = "my",required=false) String relation) {
|
||||
return success(achievementService.getSales(relation));
|
||||
}
|
||||
|
||||
@GetMapping("/product-performance")
|
||||
@Operation(summary = "获得产品业绩分析")
|
||||
public CommonResult<List<DeptAchieveVO>> getAchievement(@Valid AchievementPageReqVO pageReqVO) {
|
||||
List<DeptAchieveVO> deptAchieveRespVOS = achievementService.getDeptAchieve(pageReqVO);
|
||||
return success(deptAchieveRespVOS);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,33 +1,33 @@
|
||||
package cn.iocoder.yudao.module.crm.controller.admin.userlivetree;
|
||||
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
|
||||
import javax.validation.constraints.*;
|
||||
import javax.validation.*;
|
||||
import javax.servlet.http.*;
|
||||
import java.util.*;
|
||||
import java.io.IOException;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageParam;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
|
||||
import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils;
|
||||
|
||||
import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.*;
|
||||
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.userlivetree.vo.*;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.userlivetree.vo.UserLiveTreeListVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.userlivetree.vo.UserLiveTreePageReqVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.userlivetree.vo.UserLiveTreeRespVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.userlivetree.vo.UserLiveTreeSaveReqVO;
|
||||
import cn.iocoder.yudao.module.crm.dal.dataobject.userlivetree.UserLiveTreeDO;
|
||||
import cn.iocoder.yudao.module.crm.service.userlivetree.UserLiveTreeService;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.Parameter;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.Valid;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
||||
import static cn.iocoder.yudao.framework.operatelog.core.enums.OperateTypeEnum.EXPORT;
|
||||
|
||||
@Tag(name = "管理后台 - crm用户结构树")
|
||||
@RestController
|
||||
@ -38,6 +38,9 @@ public class UserLiveTreeController {
|
||||
@Resource
|
||||
private UserLiveTreeService userLiveTreeService;
|
||||
|
||||
@Resource
|
||||
private AdminUserApi userApi;
|
||||
|
||||
@PostMapping("/create")
|
||||
@Operation(summary = "创建crm用户结构树")
|
||||
@PreAuthorize("@ss.hasPermission('crm:user-live-tree:create')")
|
||||
@ -46,10 +49,10 @@ public class UserLiveTreeController {
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/list")
|
||||
@GetMapping("/list")
|
||||
@Operation(summary = "crm用户结构树列表")
|
||||
public CommonResult<List<UserLiveTreeListVO>> userLiveTreeList(@Valid @RequestBody UserLiveTreePageReqVO pageReqVO) {
|
||||
return success(userLiveTreeService.userLiveTreeList(pageReqVO));
|
||||
public CommonResult<List<UserLiveTreeListVO>> userLiveTreeList() {
|
||||
return success(userLiveTreeService.userLiveTreeList());
|
||||
}
|
||||
|
||||
@PutMapping("/update")
|
||||
@ -81,9 +84,9 @@ public class UserLiveTreeController {
|
||||
@GetMapping("/page")
|
||||
@Operation(summary = "获得crm用户结构树分页")
|
||||
@PreAuthorize("@ss.hasPermission('crm:user-live-tree:query')")
|
||||
public CommonResult<PageResult<UserLiveTreeRespVO>> getUserLiveTreePage(@Valid UserLiveTreePageReqVO pageReqVO) {
|
||||
PageResult<UserLiveTreeDO> pageResult = userLiveTreeService.getUserLiveTreePage(pageReqVO);
|
||||
return success(BeanUtils.toBean(pageResult, UserLiveTreeRespVO.class));
|
||||
public CommonResult<PageResult<UserLiveTreeListVO>> getUserLiveTreePage(@Valid UserLiveTreePageReqVO pageReqVO) {
|
||||
|
||||
return success(userLiveTreeService.getUserLiveTreePage(pageReqVO));
|
||||
}
|
||||
|
||||
@GetMapping("/export-excel")
|
||||
@ -93,7 +96,7 @@ public class UserLiveTreeController {
|
||||
public void exportUserLiveTreeExcel(@Valid UserLiveTreePageReqVO pageReqVO,
|
||||
HttpServletResponse response) throws IOException {
|
||||
pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE);
|
||||
List<UserLiveTreeDO> list = userLiveTreeService.getUserLiveTreePage(pageReqVO).getList();
|
||||
List<UserLiveTreeListVO> list = userLiveTreeService.getUserLiveTreePage(pageReqVO).getList();
|
||||
// 导出 Excel
|
||||
ExcelUtils.write(response, "crm用户结构树.xls", "数据", UserLiveTreeRespVO.class,
|
||||
BeanUtils.toBean(list, UserLiveTreeRespVO.class));
|
||||
|
@ -41,6 +41,4 @@ public interface AchievementService {
|
||||
* @return
|
||||
*/
|
||||
List<SalesVO> getSales(String relation);
|
||||
|
||||
|
||||
}
|
||||
|
@ -15,6 +15,8 @@ import cn.iocoder.yudao.module.bpm.api.oa.vo.contract.ContractStatisticsDTO;
|
||||
import cn.iocoder.yudao.module.bpm.api.oa.vo.receipt.ReceiptStatisticsDTO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.*;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmclues.vo.CrmCluesStatisticsRespVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.userlivetree.vo.UserLiveTreeListVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.userlivetree.vo.UserLiveTreePageReqVO;
|
||||
import cn.iocoder.yudao.module.crm.dal.dataobject.crmachievement.CrmAchievementDO;
|
||||
import cn.iocoder.yudao.module.crm.dal.dataobject.crmbusiness.CrmBusinessDO;
|
||||
import cn.iocoder.yudao.module.crm.dal.dataobject.crmclues.CrmCluesDO;
|
||||
@ -36,8 +38,6 @@ import cn.iocoder.yudao.module.system.api.dept.DeptApi;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.DeptApiDTO;
|
||||
import cn.iocoder.yudao.module.system.api.dept.dto.DeptApiVO;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserApiVO;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserPageApiDTO;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
@ -91,15 +91,15 @@ public class AchievementServiceImpl implements AchievementService {
|
||||
|
||||
@Override
|
||||
public PageResult<UserAchieveVO> getAchievementPage(AchievementPageReqVO pageReqVO) {
|
||||
AdminUserPageApiDTO dto = new AdminUserPageApiDTO();
|
||||
dto.setNickname(pageReqVO.getName());
|
||||
dto.setPageNo(pageReqVO.getPageNo());
|
||||
dto.setPageSize(pageReqVO.getPageSize());
|
||||
dto.setRoleCodes("sale"); // 设置查询用户的角色类型
|
||||
|
||||
// 获取销售角色 分页列表
|
||||
PageResult<AdminUserApiVO> pageResult = adminUserApi.getUserPageByRole(dto).getCheckedData();
|
||||
PageResult<UserAchieveVO> pageResult1 = BeanUtils.toBean(pageResult, UserAchieveVO.class);
|
||||
PageResult<UserLiveTreeListVO> pageResult = userLiveTreeService.getUserLiveTreePage(new UserLiveTreePageReqVO());
|
||||
List<UserAchieveVO> achieveVOS = pageResult.getList().stream()
|
||||
.map(v -> new UserAchieveVO()
|
||||
.setId(v.getUserId())
|
||||
.setNickname(v.getNickname()))
|
||||
.collect(Collectors.toList());
|
||||
PageResult<UserAchieveVO> pageResult1 = new PageResult<>(achieveVOS, pageResult.getTotal());
|
||||
|
||||
if (CollUtil.isNotEmpty(pageResult1.getList())) {
|
||||
|
||||
|
@ -4,21 +4,20 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import cn.iocoder.yudao.framework.common.enums.ShopCommonEnum;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.AchievementPageReqVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.CustomerLevelVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.UserRecordVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmanalysis.vo.UserVolumeVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmcustomer.vo.CustomerStatisticRespVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.crmrecord.vo.RecordStatisticsRespVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.userlivetree.vo.UserLiveTreeListVO;
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.userlivetree.vo.UserLiveTreePageReqVO;
|
||||
import cn.iocoder.yudao.module.crm.dal.dataobject.crmcustomer.CrmCustomerDO;
|
||||
import cn.iocoder.yudao.module.crm.dal.mysql.crmcustomer.CrmCustomerMapper;
|
||||
import cn.iocoder.yudao.module.crm.service.crmrecord.CrmRecordService;
|
||||
import cn.iocoder.yudao.module.crm.service.userlivetree.UserLiveTreeService;
|
||||
import cn.iocoder.yudao.module.system.api.dict.DictDataApi;
|
||||
import cn.iocoder.yudao.module.system.api.dict.dto.DictDataRespDTO;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserApiVO;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserPageApiDTO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@ -46,15 +45,15 @@ public class CustomerServiceImpl implements CustomerService {
|
||||
@Resource
|
||||
private DictDataApi dictDataApi;
|
||||
|
||||
@Resource
|
||||
private AdminUserApi adminUserApi;
|
||||
|
||||
@Resource
|
||||
private CrmCustomerMapper customerMapper;
|
||||
|
||||
@Resource
|
||||
private CrmRecordService recordService;
|
||||
|
||||
@Resource
|
||||
private UserLiveTreeService userLiveTreeService;
|
||||
|
||||
@Override
|
||||
public CustomerLevelVO getCustomerLevel() {
|
||||
List<DictDataRespDTO> list = dictDataApi.getDictDataList("customer_level").getCheckedData();
|
||||
@ -120,14 +119,15 @@ public class CustomerServiceImpl implements CustomerService {
|
||||
@Override
|
||||
public PageResult<UserVolumeVO> getCustomerVolume(AchievementPageReqVO pageReqVO) {
|
||||
|
||||
AdminUserPageApiDTO dto = new AdminUserPageApiDTO();
|
||||
dto.setNickname(pageReqVO.getName());
|
||||
dto.setPageNo(pageReqVO.getPageNo());
|
||||
dto.setPageSize(pageReqVO.getPageSize());
|
||||
dto.setRoleCodes("sale"); // 设置查询用户的角色类型
|
||||
// 获取销售角色 分页列表
|
||||
PageResult<UserLiveTreeListVO> pageResult = userLiveTreeService.getUserLiveTreePage(new UserLiveTreePageReqVO());
|
||||
List<UserVolumeVO> volumeVOS = pageResult.getList().stream()
|
||||
.map(v -> new UserVolumeVO()
|
||||
.setId(v.getUserId())
|
||||
.setNickname(v.getNickname()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
PageResult<AdminUserApiVO> pageResult = adminUserApi.getUserPageByRole(dto).getCheckedData();
|
||||
PageResult<UserVolumeVO> pageResult1 = BeanUtils.toBean(pageResult, UserVolumeVO.class);
|
||||
PageResult<UserVolumeVO> pageResult1 = new PageResult<>(volumeVOS, pageResult.getTotal());
|
||||
if (CollectionUtil.isNotEmpty(pageResult1.getList())) {
|
||||
|
||||
List<Long> userIds = convertList(pageResult1.getList(), UserVolumeVO::getId);
|
||||
@ -160,14 +160,16 @@ public class CustomerServiceImpl implements CustomerService {
|
||||
|
||||
@Override
|
||||
public PageResult<UserRecordVO> getRecord(AchievementPageReqVO pageReqVO) {
|
||||
AdminUserPageApiDTO dto = new AdminUserPageApiDTO();
|
||||
dto.setNickname(pageReqVO.getName());
|
||||
dto.setPageNo(pageReqVO.getPageNo());
|
||||
dto.setPageSize(pageReqVO.getPageSize());
|
||||
dto.setRoleCodes("sale"); // 设置查询用户的角色类型
|
||||
|
||||
PageResult<AdminUserApiVO> pageResult = adminUserApi.getUserPageByRole(dto).getCheckedData();
|
||||
PageResult<UserRecordVO> pageResult1 = BeanUtils.toBean(pageResult, UserRecordVO.class);
|
||||
// 获取销售角色 分页列表
|
||||
PageResult<UserLiveTreeListVO> pageResult = userLiveTreeService.getUserLiveTreePage(new UserLiveTreePageReqVO());
|
||||
List<UserRecordVO> recordVOS = pageResult.getList().stream()
|
||||
.map(v -> new UserRecordVO()
|
||||
.setId(v.getUserId())
|
||||
.setNickname(v.getNickname()))
|
||||
.collect(Collectors.toList());
|
||||
PageResult<UserRecordVO> pageResult1 = new PageResult<>(recordVOS, pageResult.getTotal());
|
||||
|
||||
if (CollectionUtil.isNotEmpty(pageResult1.getList())) {
|
||||
// 获取所有用户跟进统计列表
|
||||
List<Long> userIds = convertList(pageResult1.getList(), UserRecordVO::getId);
|
||||
|
@ -52,15 +52,14 @@ public interface UserLiveTreeService {
|
||||
* @param pageReqVO 分页查询
|
||||
* @return crm用户结构树分页
|
||||
*/
|
||||
PageResult<UserLiveTreeDO> getUserLiveTreePage(UserLiveTreePageReqVO pageReqVO);
|
||||
PageResult<UserLiveTreeListVO> getUserLiveTreePage(UserLiveTreePageReqVO pageReqVO);
|
||||
|
||||
/**
|
||||
* 获取列表
|
||||
*
|
||||
* @param pageReqVO
|
||||
* @return
|
||||
* @return 用户列表
|
||||
*/
|
||||
List<UserLiveTreeListVO> userLiveTreeList(@Valid UserLiveTreePageReqVO pageReqVO);
|
||||
List<UserLiveTreeListVO> userLiveTreeList();
|
||||
|
||||
/**
|
||||
* 通过用户id获取所有子集用户id
|
||||
@ -69,4 +68,10 @@ public interface UserLiveTreeService {
|
||||
* @return
|
||||
*/
|
||||
List<Long> getItemIdsByUserId(Long id);
|
||||
|
||||
/**
|
||||
* 获取所有用户列表
|
||||
* @return 用户列表
|
||||
*/
|
||||
List<UserLiveTreeListVO> getUserLiveList();
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package cn.iocoder.yudao.module.crm.service.userlivetree;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
||||
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
|
||||
@ -8,16 +9,17 @@ import cn.iocoder.yudao.module.crm.controller.admin.userlivetree.vo.UserLiveTree
|
||||
import cn.iocoder.yudao.module.crm.controller.admin.userlivetree.vo.UserLiveTreeSaveReqVO;
|
||||
import cn.iocoder.yudao.module.crm.dal.dataobject.userlivetree.UserLiveTreeDO;
|
||||
import cn.iocoder.yudao.module.crm.dal.mysql.userlivetree.UserLiveTreeMapper;
|
||||
import cn.iocoder.yudao.module.system.api.user.AdminUserApi;
|
||||
import cn.iocoder.yudao.module.system.api.user.dto.AdminUserRespDTO;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.collection.CollectionUtils.convertSet;
|
||||
|
||||
/**
|
||||
* crm用户结构树 Service 实现类
|
||||
*
|
||||
@ -30,6 +32,9 @@ public class UserLiveTreeServiceImpl implements UserLiveTreeService {
|
||||
@Resource
|
||||
private UserLiveTreeMapper userLiveTreeMapper;
|
||||
|
||||
@Resource
|
||||
private AdminUserApi userApi;
|
||||
|
||||
|
||||
@Override
|
||||
public Long createUserLiveTree(UserLiveTreeSaveReqVO createReqVO) {
|
||||
@ -59,13 +64,25 @@ public class UserLiveTreeServiceImpl implements UserLiveTreeService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<UserLiveTreeDO> getUserLiveTreePage(UserLiveTreePageReqVO pageReqVO) {
|
||||
return userLiveTreeMapper.selectPage(pageReqVO);
|
||||
public PageResult<UserLiveTreeListVO> getUserLiveTreePage(UserLiveTreePageReqVO pageReqVO) {
|
||||
|
||||
PageResult<UserLiveTreeListVO> pageResult = BeanUtils.toBean(userLiveTreeMapper.selectPage(pageReqVO), UserLiveTreeListVO.class);
|
||||
if (CollUtil.isNotEmpty(pageResult.getList())) {
|
||||
// 获取用户编号
|
||||
Set<Long> userIds = convertSet(pageResult.getList(), UserLiveTreeListVO::getUserId);
|
||||
// 获取用户信息
|
||||
Map<Long, AdminUserRespDTO> userMap = userApi.getUserMap(userIds);
|
||||
|
||||
pageResult.getList().forEach(item -> {
|
||||
item.setNickname(userMap.get(item.getUserId()) != null ? userMap.get(item.getUserId()).getNickname() : null);
|
||||
});
|
||||
}
|
||||
return pageResult;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<UserLiveTreeListVO> userLiveTreeList(UserLiveTreePageReqVO pageReqVO) {
|
||||
List<UserLiveTreeListVO> userLiveTreeDOS = this.userLiveTreeList();
|
||||
public List<UserLiveTreeListVO> userLiveTreeList() {
|
||||
List<UserLiveTreeListVO> userLiveTreeDOS = this.getUserLiveTreeList();
|
||||
return userLiveTreeDOS.stream()
|
||||
.filter(vo -> vo.getPid() == 0)
|
||||
.collect(Collectors.toList());
|
||||
@ -73,7 +90,7 @@ public class UserLiveTreeServiceImpl implements UserLiveTreeService {
|
||||
|
||||
@Override
|
||||
public List<Long> getItemIdsByUserId(Long userId) {
|
||||
List<UserLiveTreeListVO> userLiveTreeListVOS = this.userLiveTreeList();
|
||||
List<UserLiveTreeListVO> userLiveTreeListVOS = this.getUserLiveTreeList();
|
||||
Map<Long, List<UserLiveTreeListVO>> map = userLiveTreeListVOS.stream().collect(Collectors.groupingBy(UserLiveTreeListVO::getUserId));
|
||||
List<UserLiveTreeListVO> list = map.get(userId);
|
||||
List<Long> ids = new ArrayList<>();
|
||||
@ -96,7 +113,13 @@ public class UserLiveTreeServiceImpl implements UserLiveTreeService {
|
||||
recursionGetId(nextList, ids);
|
||||
}
|
||||
|
||||
public List<UserLiveTreeListVO> userLiveTreeList(){
|
||||
@Override
|
||||
public List<UserLiveTreeListVO> getUserLiveList() {
|
||||
// -- 这里将所有的数据拉出来 -
|
||||
return userLiveTreeMapper.userLiveTreeList();
|
||||
}
|
||||
|
||||
public List<UserLiveTreeListVO> getUserLiveTreeList(){
|
||||
// -- 这里将所有的数据拉出来 -
|
||||
List<UserLiveTreeListVO> userLiveTreeDOS = userLiveTreeMapper.userLiveTreeList();
|
||||
// 1. 按父ID分组,获取每个父节点下的子节点列表
|
||||
|
@ -207,7 +207,7 @@
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="filterCrmUserFlag != null and filterCrmUserFlag == 1">
|
||||
not exists (SELECT id from crm_user_live_tree where a.id = id)
|
||||
and not exists (SELECT user_id from crm_user_live_tree where a.id = user_id)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
Loading…
Reference in New Issue
Block a user