中扬CRM客户关系管理系统
LSH
2023-07-26 a4aa79c7f7832669aee04e315c303531e782c521
src/main/java/com/zy/crm/manager/controller/CstmrController.java
@@ -67,10 +67,23 @@
    @ManagerAuth
    public R page(@RequestParam(defaultValue = "1") Integer curr,
                  @RequestParam(defaultValue = "10") Integer limit,
                  @RequestParam(required = false) String followerName,
                  @RequestParam(required = false) String conditionName,
                  @RequestParam(required = false) String condition,
                  @RequestParam(required = false, value = "dept_id") Long deptId,
                  @RequestParam(required = false, value = "user_id") Long userId){
        List<Integer> ids = new ArrayList<>();
        if (!Cools.isEmpty(followerName)){
            User username = userService.selectOne(new EntityWrapper<User>().eq("username", followerName));
            if (!Cools.isEmpty(username)){
                List<Integer> cstmrIds = cstmrFollService.selectCstmrIdUserId(username.getId().intValue());
                for (Integer id : cstmrIds){
                    ids.add(id);
                }
            }else {
                return R.error("未查询到跟进人信息!");
            }
        }
        if (!Cools.isEmpty(conditionName)){
            switch (conditionName){
                case "director":
@@ -84,10 +97,11 @@
            }
        }
        return R.ok(cstmrService.getPage1(new Page<>(curr, limit)
        return R.ok(cstmrService.getPage3(new Page<>(curr, limit)
                , getHostId()
                , deptId == null ? null : String.valueOf(deptId)
                , userId == null ? getUserId() : userId
                , Cools.isEmpty(followerName) ? null : ids
                , conditionName
                , condition)
        );