CollisionController.java
1.62 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
package cn.com.glsx.stoassistant.controller.collision;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.stoassistant.request.collision.FollowInfoRopRequest;
import cn.com.glsx.stoassistant.response.collision.FollowInfoRopResponse;
import cn.com.glsx.stoassistant.service.collision.CollisionInfoService;
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;
/**
* 碰撞线索
*/
@Slf4j
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
@Api("碰撞线索")
public class CollisionController {
@Autowired
private CollisionInfoService collisionInfoService;
@ApiOperation("碰撞线索-回访")
@ServiceMethod(method = "scrm.api.assistant.collision.follow", needInSession = NeedInSessionType.YES)
public RopResponse<FollowInfoRopResponse> followCollisionInfo(FollowInfoRopRequest request){
try {
return RopResponse.success(collisionInfoService.followCollisionInfo(request));
} catch (RpcServiceException e) {
log.info("=======CollisionController__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());
}
}
}