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