|
|
@@ -37,7 +37,7 @@ public class CustomerDataPrivateController {
|
|
|
|
|
|
@Operation(summary = "添加跟进信息接口")
|
|
|
@PostMapping(value = "/customer/data/follow/add")
|
|
|
- public ApiResult<Void> addFollow(@RequestBody AdminSysCustomerFollowInsertOrUpdateDTO dto) {
|
|
|
+ public ApiResult<Void> addFollow(@RequestBody AdminSysCustomerFollowInsertOrUpdateDTO dto) throws BusinessException{
|
|
|
sysCustomerFollowService.adminInsert(dto);
|
|
|
return ApiResult.success();
|
|
|
}
|
|
|
@@ -45,13 +45,13 @@ public class CustomerDataPrivateController {
|
|
|
|
|
|
@Operation(summary = "查询顶部筛选条件信息接口")
|
|
|
@GetMapping(value = "/customer/data/head/select")
|
|
|
- public ApiResult<SysCustomerPrivateSelectBO> queryHeadSelectPrivateData() {
|
|
|
+ public ApiResult<SysCustomerPrivateSelectBO> queryHeadSelectPrivateData() throws BusinessException{
|
|
|
return ApiResult.data(sysCustomerDataPrivateService.queryHeadSelectPrivateData());
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "分页查询私域客户信息接口")
|
|
|
@PostMapping(value = "/customer/data/list")
|
|
|
- public ApiResult<PageResult<SysCustomerDataPrivateBO>> adminList(@RequestBody AdminSysCustomerDataPrivateListDTO dto) {
|
|
|
+ public ApiResult<PageResult<SysCustomerDataPrivateBO>> adminList(@RequestBody AdminSysCustomerDataPrivateListDTO dto) throws BusinessException{
|
|
|
if (!UserContextHolder.getUserContext().getRoles().contains("Admin")) {
|
|
|
dto.setUserId(UserContextHolder.getUserId());
|
|
|
}
|
|
|
@@ -60,42 +60,42 @@ public class CustomerDataPrivateController {
|
|
|
|
|
|
@Operation(summary = "修改私域客户信息接口")
|
|
|
@PostMapping(value = "/customer/data/update")
|
|
|
- public ApiResult<Void> update(@RequestBody AdminSysCustomerDataInsertOrUpdateDTO dto) {
|
|
|
+ public ApiResult<Void> update(@RequestBody AdminSysCustomerDataInsertOrUpdateDTO dto) throws BusinessException{
|
|
|
sysCustomerDataPrivateService.adminUpdateCustomerData(dto);
|
|
|
return ApiResult.success();
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "退回公海客户信息接口")
|
|
|
@GetMapping(value = "/customer/data/return/{customerId}")
|
|
|
- public ApiResult<Void> returnCustomerData(@PathVariable Long customerId) {
|
|
|
+ public ApiResult<Void> returnCustomerData(@PathVariable Long customerId) throws BusinessException{
|
|
|
sysCustomerDataPrivateService.returnCustomerPublicData(customerId);
|
|
|
return ApiResult.success();
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "添加私域客户信息接口")
|
|
|
@PostMapping(value = "/customer/data/insert")
|
|
|
- public ApiResult<Void> insert(@RequestBody AdminSysCustomerPersonInsertOrUpdateDTO dto) {
|
|
|
+ public ApiResult<Void> insert(@RequestBody AdminSysCustomerPersonInsertOrUpdateDTO dto) throws BusinessException{
|
|
|
sysCustomerDataPrivateService.adminInsertCustomerPerson(dto);
|
|
|
return ApiResult.success();
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "修改私域客户联系人信息接口")
|
|
|
@PostMapping(value = "/customer/person/update")
|
|
|
- public ApiResult<Void> updateCustomerPerson(@RequestBody AdminSysCustomerPersonInsertOrUpdateDTO dto) {
|
|
|
+ public ApiResult<Void> updateCustomerPerson(@RequestBody AdminSysCustomerPersonInsertOrUpdateDTO dto) throws BusinessException{
|
|
|
sysCustomerDataPrivateService.adminUpdateCustomerPerson(dto);
|
|
|
return ApiResult.success();
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "删除私域客户联系人信息接口")
|
|
|
@GetMapping(value = "/customer/data/delete/{id}", produces = "application/json;charset=UTF-8")
|
|
|
- public ApiResult<Void> delete(@PathVariable Long id) {
|
|
|
+ public ApiResult<Void> delete(@PathVariable Long id) throws BusinessException{
|
|
|
sysCustomerDataPrivateService.adminDeleteCustomerPerson(id);
|
|
|
return ApiResult.success();
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "查询私域客户联系人信息接口")
|
|
|
@PostMapping(value = "/customer/data/select", produces = "application/json;charset=UTF-8")
|
|
|
- public ApiResult<List<SysCustomerPersonBO>> select(@RequestBody CustomerPersonReqDTO dto) {
|
|
|
+ public ApiResult<List<SysCustomerPersonBO>> select(@RequestBody CustomerPersonReqDTO dto) throws BusinessException{
|
|
|
List<String> roles = UserContextHolder.getUserContext().getRoles();
|
|
|
if (roles.contains("Member")) {
|
|
|
dto.setUserId(UserContextHolder.getUserId());
|
|
|
@@ -106,13 +106,13 @@ public class CustomerDataPrivateController {
|
|
|
|
|
|
@Operation(summary = "查询转让人列表信息接口")
|
|
|
@GetMapping(value = "/customer/data/transfer/data/{customerId}", produces = "application/json;charset=UTF-8")
|
|
|
- public ApiResult<List<TransferUserReqBO>> transferData(@PathVariable Long customerId) {
|
|
|
+ public ApiResult<List<TransferUserReqBO>> transferData(@PathVariable Long customerId) throws BusinessException{
|
|
|
return ApiResult.data(sysCustomerDataPrivateService.queryTransferUser(customerId));
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "转让操作信息接口")
|
|
|
@PostMapping(value = "/customer/data/transfer", produces = "application/json;charset=UTF-8")
|
|
|
- public ApiResult<Void> transfer(@RequestBody TransferUserReqDTO dto) {
|
|
|
+ public ApiResult<Void> transfer(@RequestBody TransferUserReqDTO dto) throws BusinessException{
|
|
|
sysCustomerDataPrivateService.transferUser(dto);
|
|
|
return ApiResult.success();
|
|
|
}
|
|
|
@@ -127,13 +127,13 @@ public class CustomerDataPrivateController {
|
|
|
|
|
|
@Operation(summary = "查度私域历史跟进信息接口")
|
|
|
@PostMapping(value = "/customer/data/follow/history/data", produces = "application/json;charset=UTF-8")
|
|
|
- public ApiResult<SysCustomerDetailBO> select(@RequestBody AdminSysCustomerFollowReqDTO dto) {
|
|
|
+ public ApiResult<SysCustomerDetailBO> select(@RequestBody AdminSysCustomerFollowReqDTO dto) throws BusinessException{
|
|
|
return ApiResult.data(sysCustomerDataFollowService.queryCustomerFollowHistoryDataByPage(dto));
|
|
|
}
|
|
|
|
|
|
@Operation(summary = "查询日志记录信息接口")
|
|
|
@PostMapping(value = "/customer/oper/log/", produces = "application/json;charset=UTF-8")
|
|
|
- public ApiResult<SysCustomerOperLogDataBO> queryOperLogData(@RequestBody AdminSysCustomerOperLogListDTO dto) {
|
|
|
+ public ApiResult<SysCustomerOperLogDataBO> queryOperLogData(@RequestBody AdminSysCustomerOperLogListDTO dto) throws BusinessException{
|
|
|
SysCustomerOperLogDataBO result = sysCustomerDataPrivateService.queryOperLogData(dto);
|
|
|
return ApiResult.data(result);
|
|
|
}
|