Commit 551983e6 by wangnb

包活干V1.9.0新增修改保单idCardType校验--think.wang

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@27736 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent d893b2fa
package com.glsx.ordercenter.controller.api; package com.glsx.ordercenter.controller.api;
import com.glsx.common.utils.StringUtils;
import com.glsx.ordercenter.constants.insurance.OraResultCode; import com.glsx.ordercenter.constants.insurance.OraResultCode;
import com.glsx.ordercenter.controller.BaseController; import com.glsx.ordercenter.controller.BaseController;
import com.glsx.ordercenter.dto.req.OraInsuranceRefundReq; import com.glsx.ordercenter.dto.req.OraInsuranceRefundReq;
...@@ -50,11 +49,6 @@ public class OraInsuranceController extends BaseController { ...@@ -50,11 +49,6 @@ public class OraInsuranceController extends BaseController {
try { try {
OraInsuranceUpdateReq saveData = OraSignUtil.verifyRequest(appKey, appSecret, OraInsuranceUpdateReq saveData = OraSignUtil.verifyRequest(appKey, appSecret,
paramStr, OraInsuranceUpdateReq.class); paramStr, OraInsuranceUpdateReq.class);
if (StringUtils.isBlank(saveData.getIdCardType())) {
return new OraResultObject(OraResultCode.PARAM_ERROR.getCode(),
"idCardType不能为空");
}
resultObject = insuranceService.save(saveData); resultObject = insuranceService.save(saveData);
} catch (BusinessException e) { } catch (BusinessException e) {
super.logError("/api/ora/saveInsuranceOrder接口异常", e); super.logError("/api/ora/saveInsuranceOrder接口异常", e);
......
...@@ -68,6 +68,7 @@ public class OraInsuranceUpdateReq implements Serializable { ...@@ -68,6 +68,7 @@ public class OraInsuranceUpdateReq implements Serializable {
/** /**
* 证件类型(1.身份证 2.统一社会信用代码 3.其他) * 证件类型(1.身份证 2.统一社会信用代码 3.其他)
*/ */
@NotBlank(message = "idCardType不能为空")
private String idCardType; private String idCardType;
/** /**
......
...@@ -2,7 +2,6 @@ package com.glsx.ordercenter.service.api.impl; ...@@ -2,7 +2,6 @@ package com.glsx.ordercenter.service.api.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.glsx.common.utils.DateUtil; import com.glsx.common.utils.DateUtil;
import com.glsx.common.utils.StringUtils;
import com.glsx.ordercenter.config.ThreadPoolConfig; import com.glsx.ordercenter.config.ThreadPoolConfig;
import com.glsx.ordercenter.constants.insurance.*; import com.glsx.ordercenter.constants.insurance.*;
import com.glsx.ordercenter.dto.req.OraInsuranceRefundReq; import com.glsx.ordercenter.dto.req.OraInsuranceRefundReq;
...@@ -147,9 +146,6 @@ public class OraInsuranceServiceImpl extends BaseOrderService implements OraInsu ...@@ -147,9 +146,6 @@ public class OraInsuranceServiceImpl extends BaseOrderService implements OraInsu
public OraResultObject update(OraInsuranceUpdateReq updateReq) { public OraResultObject update(OraInsuranceUpdateReq updateReq) {
List<SysInsurancePolicy> list = this.getInsurancePolicy(updateReq.getInsuranceId()); List<SysInsurancePolicy> list = this.getInsurancePolicy(updateReq.getInsuranceId());
if (list.isEmpty()) { //修改保单如果不存在则走新增 if (list.isEmpty()) { //修改保单如果不存在则走新增
if (StringUtils.isBlank(updateReq.getIdCardType())) {
return new OraResultObject(OraResultCode.PARAM_ERROR.getCode(), "idCardType不能为空");
}
return this.saveCore(updateReq); return this.saveCore(updateReq);
} }
SysInsurancePolicy policy = list.get(0); SysInsurancePolicy policy = list.get(0);
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!