PoolController.java
4.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
package cn.fw.valhalla.controller.app;
import cn.fw.common.page.AppPage;
import cn.fw.common.web.annotation.ControllerMethod;
import cn.fw.common.web.auth.LoginAuthBean;
import cn.fw.common.web.auth.annotation.CurrentUser;
import cn.fw.data.base.domain.common.Message;
import cn.fw.security.auth.client.annotation.Authorization;
import cn.fw.security.auth.client.annotation.IgnoreAuth;
import cn.fw.security.auth.client.enums.AuthType;
import cn.fw.valhalla.domain.query.*;
import cn.fw.valhalla.domain.vo.pool.*;
import cn.fw.valhalla.service.bus.follow.PoolBizService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import static cn.fw.common.web.util.ResultBuilder.success;
/**
* @author : kurisu
* @className : StammkundePoolController
* @description : 保有客池
* @date: 2020-11-11 17:26
*/
@Slf4j
@RestController
@Authorization(AuthType.APP)
@RequiredArgsConstructor
@Validated
@RequestMapping("/app/pool")
public class PoolController {
private final PoolBizService poolBizService;
@GetMapping("/follow/own/list")
@ControllerMethod("查询自己的跟进池列表")
public Message<AppPage<FollowPoolListVO>> ownFollowList(@CurrentUser LoginAuthBean currentUser, final FollowPoolQueryVO queryVO) {
AppPage<FollowPoolListVO> page = poolBizService.followList(currentUser, queryVO);
return success(page);
}
@GetMapping("/follow/list")
@IgnoreAuth
@ControllerMethod("查询跟进池列表")
public Message<AppPage<FollowPoolListVO>> followList(final FollowPoolQueryVO queryVO) {
queryVO.setIgnoreChangeRole(Boolean.TRUE);
AppPage<FollowPoolListVO> page = poolBizService.followList(null, queryVO);
return success(page);
}
@GetMapping("/public/list")
@IgnoreAuth
@ControllerMethod("查询公共池列表")
public Message<AppPage<PublicPoolVO>> publicList(@CurrentUser LoginAuthBean currentUser, final PublicPoolQueryVO queryVO) {
AppPage<PublicPoolVO> page = poolBizService.publicList(currentUser, queryVO);
return success(page);
}
@GetMapping("/stammkunde/own/list")
@ControllerMethod("查询自己的保有客池列表")
public Message<AppPage<StammkundePoolVO>> ownStammkundeList(@CurrentUser LoginAuthBean currentUser, final StammkundePoolQueryVO queryVO) {
AppPage<StammkundePoolVO> page = poolBizService.stammkundeList(currentUser, queryVO);
return success(page);
}
@GetMapping("/stammkunde/list")
@IgnoreAuth
@ControllerMethod("查询保有客池列表")
public Message<AppPage<StammkundePoolVO>> stammkundeList(final StammkundePoolQueryVO queryVO) {
AppPage<StammkundePoolVO> page = poolBizService.stammkundeList(null, queryVO);
return success(page);
}
@GetMapping("/clue/list")
@IgnoreAuth
@ControllerMethod("查询客户线索池列表")
public Message<AppPage<CustomerCluePoolVO>> clueList(final CustomerCluePoolQueryVO queryVO) {
AppPage<CustomerCluePoolVO> page = poolBizService.clueList(queryVO);
return success(page);
}
@GetMapping("/clue/summary")
@IgnoreAuth
@ControllerMethod("查询客户线索池概况")
public Message<CustomerClueSummaryVO> clueSummary(final CustomerCluePoolQueryVO queryVO) {
return success(poolBizService.summary(queryVO));
}
/**
* @param queryVO
* @return
* @description
*/
@GetMapping("/public/clue/own/list")
@ControllerMethod("查询自己的公共客户池列表")
public Message<AppPage<PublicCluePoolVO>> ownPublicClueList(@CurrentUser LoginAuthBean currentUser, final PublicCluePoolQueryVO queryVO) {
AppPage<PublicCluePoolVO> page = poolBizService.publicClueList(queryVO, currentUser);
return success(page);
}
/**
* @param queryVO
* @return
* @description
*/
@GetMapping("/public/clue/list")
@IgnoreAuth
@ControllerMethod("查询公共客户池列表")
public Message<AppPage<PublicCluePoolVO>> publicClueList(final PublicCluePoolQueryVO queryVO) {
AppPage<PublicCluePoolVO> page = poolBizService.publicClueList(queryVO, null);
return success(page);
}
}