FollowApiService.java
3.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
package cn.fw.shirasawa.sdk.api;
import cn.fw.data.base.domain.common.Message;
import cn.fw.shirasawa.sdk.param.*;
import cn.fw.shirasawa.sdk.result.SucessFollowRecordVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
/**
* @author : kurisu
* @className : FollowApiService
* @description : 跟进相关api
* @date: 2020-08-14 17:51
*/
@FeignClient(value = "fw-shirasawa", path = "/api/shirasawa/follow")
public interface FollowApiService {
/**
* 保存会产生跟进的业务数据
* 事故车的场景联系方式不能为空
*
* @param generateDTO
* @return
*/
@PostMapping("/generate")
Message<Void> generate(@Valid @RequestBody FollowGenerateDTO generateDTO);
/**
* 批量保存
* 最多支持1000条
* 事故车的场景联系方式不能为空
*
* @param paramList
* @return
*/
@PostMapping("/generate_batch")
Message<Void> generateBatch(@Valid @RequestBody CustomList<FollowGenerateDTO> paramList);
/**
* 完成跟进待办
*
* @param recordId 跟进待办id
* @param userId 完成人
* @return
*/
@PutMapping("/complete/record")
Message<Void> completeFollow(@RequestParam("recordId") Long recordId, @RequestParam("userId") Long userId);
/**
* 生成下一次待办
*
* @param newRecordDTO
* @return 结果
*/
@PostMapping("/create/record")
Message<Boolean> createNextRecord(@Valid @RequestBody NewRecordDTO newRecordDTO);
/**
* 完成跟进任务
*
* @param taskCompleteDTO
* @return
*/
@PostMapping("/complete/task")
Message<Void> completeTask(@Valid @RequestBody TaskCompleteDTO taskCompleteDTO);
/**
* 终止跟进任务
*
* @param terminationDTO
* @return
*/
@PostMapping("/termination/task")
Message<Void> terminationTask(@Valid @RequestBody TerminationDTO terminationDTO);
/**
* 批量终止任务
* 最多支持1000条
*
* @param paramList
* @return
*/
@PostMapping("/termination_batch")
Message<Void> terminationBatch(@Valid @RequestBody CustomList<TerminationDTO> paramList);
/**
* 根据类型和档案id查询已完成的跟进记录
*
* @param bizType 跟进业务类型 1-售前 2-售后
* @param customerId 档案id
* @return
*/
@GetMapping("/getCompletedFollowRecord")
Message<List<SucessFollowRecordVo>> getCompletedFollowRecord(@RequestParam("bizType") @NotNull(message = "业务类型不能为空!") Integer bizType,
@RequestParam("customerId") @NotEmpty(message = "档案id不能为空!") List<Long> customerId);
/**
* 查询用户剩余待办数
* @param userId 用户id
* @param bizType 业态类型 {@link cn.fw.shirasawa.sdk.enums.BusinessTypeEnum}
* @return
*/
@GetMapping("/query_record_remaining")
Message<Long> queryRecordRemaining(@RequestParam("userId") @NotNull(message = "userId不能为空!") Long userId,
@RequestParam("bizType") @NotNull(message = "业务类型不能为空!") Integer bizType);
}