Commit 35c4b83f by wangnb

包活干V1.9.0保单接口开发--think.wang

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@27000 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent fd2a0482
......@@ -10,9 +10,9 @@ package com.glsx.ordercenter.constants.insurance;
*/
public enum InsuranceSource {
/**
* 长城欧了
* 长城欧拉
*/
ORA(1, "ora", "长城欧了");
ORA(1, "ora", "长城欧拉");
private final Integer company;
private final String companyCode;
......
package com.glsx.ordercenter.constants.insurance;
/**
* <p>Description: 长城欧了返回状态码
* <p>Description: 长城欧拉返回状态码
*
* <p>Project: car-service
*
......
......@@ -25,7 +25,7 @@ public abstract class OraBaseController extends BaseController {
}
protected <T extends OraBaseResponse> T oraWebOops(Throwable t, T baseResponse) {
super.logError("长城欧了Controller异常", t);
super.logError("长城欧拉Controller异常", t);
baseResponse.setCode(OraResultCode.SERVER_ERROR.getCode());
baseResponse.setMessage(OraResultCode.SERVER_ERROR.getMessage());
......@@ -36,7 +36,7 @@ public abstract class OraBaseController extends BaseController {
protected <T extends OraBaseResponse> T oraWebOops(OraResultCode code, Throwable t,
T baseResponse) {
super.logError("长城欧了Controller异常", t);
super.logError("长城欧拉Controller异常", t);
baseResponse.setCode(code.getCode());
baseResponse.setMessage(t.getMessage());
......
......@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>Description: 长城欧了-保单接口
* <p>Description: 长城欧拉-保单接口
*
* <p>Project: car-service
*
......@@ -25,7 +25,7 @@ import org.springframework.web.bind.annotation.RestController;
* @date 2020-05-25
*/
@RestController
@RequestMapping("/api/ora-insurance")
@RequestMapping("/api/insurance")
public class OraInsuranceController extends OraBaseController {
@Value("${ora.api.url}")
private String serverUrl;
......@@ -41,18 +41,12 @@ public class OraInsuranceController extends OraBaseController {
@RequestMapping(value = "/update", method = RequestMethod.POST)
public OraInsuranceUpdateResp update(
@Validated @RequestBody OraInsuranceUpdateReq insuranceUpdateReq,
BindingResult bindingResult) {
super.logInfo("长城欧了修改保单-参数", insuranceUpdateReq);
@Validated @RequestBody OraInsuranceUpdateReq insuranceUpdateReq,
BindingResult bindingResult) {
super.logInfo("长城欧拉修改保单-参数", insuranceUpdateReq);
OraInsuranceUpdateResp insuranceUpdateResp;
try {
//OraSignUtil.verifyRequest(this.appKey, this.appSecret,
// insuranceUpdateReq);
super.checkRequestParam(bindingResult);
insuranceUpdateResp = this.oraInsuranceService.update(insuranceUpdateReq);
} catch (OraBizException e) {
insuranceUpdateResp = super.oraWebOops(e.getCode(), e, new OraInsuranceUpdateResp());
......@@ -60,34 +54,28 @@ public class OraInsuranceController extends OraBaseController {
insuranceUpdateResp = super.oraWebOops(e, new OraInsuranceUpdateResp());
}
super.logInfo("长城欧了修改保单-结果", insuranceUpdateResp);
super.logInfo("长城欧拉修改保单-结果", insuranceUpdateResp);
return insuranceUpdateResp;
}
@RequestMapping(value = "/refund", method = RequestMethod.POST)
public OraInsuranceRefundResp refund(
@Validated @RequestBody OraInsuranceRefundReq insuranceRefundReq,
BindingResult bindingResult) {
super.logInfo("长城欧了退保-参数", insuranceRefundReq);
@Validated @RequestBody OraInsuranceRefundReq insuranceRefundReq,
BindingResult bindingResult) {
super.logInfo("长城欧拉退保-参数", insuranceRefundReq);
OraInsuranceRefundResp insuranceRefundResp;
try {
OraSignUtil.verifyRequest(this.appKey, this.appSecret,
insuranceRefundReq);
insuranceRefundReq);
super.checkRequestParam(bindingResult);
insuranceRefundResp = this.oraInsuranceService.refund(insuranceRefundReq);
} catch (OraBizException e) {
insuranceRefundResp = super.oraWebOops(e.getCode(), e, new OraInsuranceRefundResp());
} catch (RuntimeException e) {
insuranceRefundResp = super.oraWebOops(e, new OraInsuranceRefundResp());
}
super.logInfo("长城欧了退保-结果", insuranceRefundResp);
super.logInfo("长城欧拉退保-结果", insuranceRefundResp);
return insuranceRefundResp;
}
}
......@@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
* @version 1.9.0
* @Title EulerOrderController
* @Package com.glsx.ordercenter.controller.api
* @Description 长城欧了对外工单接口提供
* @Description 长城欧拉对外工单接口提供
* @date 2020/5/25
*/
@RestController
......
......@@ -4,7 +4,7 @@ import com.alibaba.fastjson.JSON;
import com.glsx.ordercenter.constants.insurance.OraResultCode;
/**
* <p>Description: 长城欧了业务异常
* <p>Description: 长城欧拉业务异常
*
* <p>Project: car-service
*
......
......@@ -15,7 +15,7 @@ import com.glsx.ordercenter.dto.api.OraInsuranceUpdateResp;
*/
public interface OraInsuranceService {
/**
* 长城欧了-更新保单
* 长城欧拉-更新保单
*
* @param insuranceUpdateReq 请求体
* @return 更新结果
......@@ -23,7 +23,7 @@ public interface OraInsuranceService {
OraInsuranceUpdateResp update(OraInsuranceUpdateReq insuranceUpdateReq);
/**
* 长城欧了-退保
* 长城欧拉-退保
*
* @param insuranceRefundReq 请求体
* @return 退保结果
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!