| | |
| | | @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 = "role_id") Long roleId, |
| | | @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<CstmrFoll> cstmrIds = cstmrFollService.selectCstmrIdUserId(username.getId().intValue()); |
| | | for (CstmrFoll id : cstmrIds){ |
| | | ids.add(id.getCstmrId().intValue()); |
| | | } |
| | | }else { |
| | | return R.error("未查询到跟进人信息!"); |
| | | } |
| | | } |
| | | if (!Cools.isEmpty(conditionName)){ |
| | | switch (conditionName){ |
| | | case "director": |
| | |
| | | |
| | | } |
| | | } |
| | | return R.ok(cstmrService.getPage2(new Page<>(curr, limit) |
| | | return R.ok(cstmrService.getPage3(new Page<>(curr, limit) |
| | | , getHostId() |
| | | , deptId == null ? userService.selectById(getUserId()).getDeptId() : deptId |
| | | , deptId == null ? null : String.valueOf(deptId) |
| | | , userId == null ? getUserId() : userId |
| | | , roleId == null ? userService.selectById(getUserId()).getRoleId() : roleId |
| | | , Cools.isEmpty(followerName) ? null : ids |
| | | , conditionName |
| | | , condition) |
| | | ); |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/cstmr/delete/one/{id}") |
| | | @ManagerAuth |
| | | public R deleteOne(@PathVariable Long id) { |
| | | cstmrService.deleteById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/cstmrQuery/auth") |