CollisionInfoController.java
8.74 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
package cn.com.glsx.entmicro.controller.collision;
import cn.com.glsx.entmicro.request.collision.*;
import cn.com.glsx.entmicro.request.outbound.PhoneCheckRopRequest;
import cn.com.glsx.entmicro.response.collision.*;
import cn.com.glsx.entmicro.response.outbound.PhoneCheckRopResponse;
import cn.com.glsx.entmicro.service.collision.CollisionInfoService;
import cn.com.glsx.entmicro.utils.Pagination;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.List;
/**
* 碰撞线索
*/
@Slf4j
@Api("碰撞线模块接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
public class CollisionInfoController {
@Autowired
private CollisionInfoService collisionInfoService;
@ServiceMethod(method = "entmicro.api.collision.customer.device.list.export")
@ApiOperation("设备管理-列表查询导出")
public RopResponse<String> exportCustomerDeviceList(CollisionSnInfoSearchRopRequest request) {
try {
return RopResponse.success(collisionInfoService.exportCustomerDeviceList(request));
} catch (RpcServiceException e) {
log.info("=======CollisionInfoController__invoke__exportCustomerDeviceList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
} catch (Exception e) {
log.info(e.getMessage(), e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.collision.customer.device.list")
@ApiOperation("设备管理-列表查询")
public RopResponse<Pagination<CollisionSnInfoRopResponse>> getCustomerDeviceList(CollisionSnInfoSearchRopRequest request) {
try {
return RopResponse.success(collisionInfoService.getCustomerDeviceList(request));
} catch (RpcServiceException e) {
log.info("=======CollisionInfoController__invoke__getCustomerDeviceList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
} catch (Exception e) {
log.info(e.getMessage(), e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.collision.customer.device.edit")
@ApiOperation("设备管理-编辑")
public RopResponse<Boolean> customerDeviceEdit(CollisionSnInfoEditRopRequest request) {
try {
return RopResponse.success(collisionInfoService.customerDeviceEdit(request));
} catch (RpcServiceException e) {
log.info("=======CollisionInfoController__invoke__customerDeviceDetail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
} catch (Exception e) {
log.info(e.getMessage(), e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.collision.customer.device.detail")
@ApiOperation("设备管理-查询详情")
public RopResponse<CollisionSnInfoRopResponse> getCustomerDeviceDetail(CollisionSnInfoSearchRopRequest request) {
try {
return RopResponse.success(collisionInfoService.getCustomerDeviceDetail(request));
} catch (RpcServiceException e) {
log.info("=======CollisionInfoController__invoke__getCustomerDeviceDetail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
} catch (Exception e) {
log.info(e.getMessage(), e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.collision.device.import")
@ApiOperation("设备管理-设备信息导入")
public RopResponse<CustomerDeviceImportRopResponse> customerDeviceImport(CustomerDeviceImportRopRequest request) {
try {
return RopResponse.success(collisionInfoService.customerDeviceImport(request));
} catch (RpcServiceException e) {
log.info("=======CollisionInfoController__invoke__customerDeviceImport__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
} catch (Exception e) {
log.info(e.getMessage(), e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.collision.info.listCollisionInfoByPage")
@ApiOperation("碰撞线索-分页查询")
public RopResponse<Pagination<CollisionInfoRopResponse>> listCollisionInfoByPage(CollisionInfoSearchRopRequest request) {
try {
return RopResponse.success(collisionInfoService.listCollisionInfoByPage(request));
} catch (RpcServiceException e) {
log.info("=======CollisionInfoController__invoke__listCollisionInfoByPage__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
} catch (Exception e) {
log.info(e.getMessage(), e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.collision.info.exportCollisionInfo")
@ApiOperation("碰撞线索-列表导出")
public RopResponse<String> exportCollisionInfo(CollisionInfoSearchRopRequest request) {
try {
return RopResponse.success(collisionInfoService.exportCollisionInfo(request));
} catch (RpcServiceException e) {
log.info("=======CollisionInfoController__invoke__exportCollisionInfo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
} catch (Exception e) {
log.info(e.getMessage(), e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.collision.info.getDetail")
@ApiOperation("碰撞线索-查询详情")
public RopResponse<CollisionDetailInfoRopResponse> getCollisionDetail(CollisionInfoSearchRopRequest request) {
try {
return RopResponse.success(collisionInfoService.getCollisionDetail(request));
} catch (RpcServiceException e) {
log.info("=======CollisionInfoController__invoke__getCollisionDetail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
} catch (Exception e) {
log.info(e.getMessage(), e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.collision.info.follow")
@ApiOperation("碰撞线索-回访")
public RopResponse<FollowInfoRopResponse> followCollisionInfo(FollowInfoRopRequest request) {
try {
return RopResponse.success(collisionInfoService.followCollisionInfo(request));
} catch (RpcServiceException e) {
log.info("=======CollisionInfoController__invoke__followCollisionInfo__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
} catch (Exception e) {
log.info(e.getMessage(), e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.collision.config.addOrUpdatePushConfig")
@ApiOperation("碰撞线索-推送配置添加/修改")
public RopResponse<CollisionPushConfigRopResponse> addOrUpdatePushConfig(CollisionPushConfigRopRequest request) {
try {
return RopResponse.success(collisionInfoService.addOrUpdatePushConfig(request));
} catch (RpcServiceException e) {
log.info("=======CollisionInfoController__invoke__addOrUpdatePushConfig__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
} catch (Exception e) {
log.info(e.getMessage(), e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.collision.config.getDetail")
@ApiOperation("碰撞线索-查询推送配置详情")
public RopResponse<List<CollisionPushConfigRopResponse>> getPushConfigDetail(CollisionPushConfigRopRequest request) {
try {
return RopResponse.success(collisionInfoService.getPushConfigDetail(request));
} catch (RpcServiceException e) {
log.info("=======CollisionInfoController__invoke__getPushConfigDetail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
} catch (Exception e) {
log.info(e.getMessage(), e);
return RopResponse.error(e.getMessage());
}
}
}