CollisionController.java 1.62 KB
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());
        }
    }

}