记得上下班打卡 | git大法好,push需谨慎

Commit 411eddf1 authored by zhangguobing's avatar zhangguobing

~api:券商品业务-关联人证件类型去除军官证;

parent c2121f70
...@@ -16,7 +16,7 @@ public class GoblinOrderSkuParam { ...@@ -16,7 +16,7 @@ public class GoblinOrderSkuParam {
private String spuId; private String spuId;
@ApiModelProperty(required = true, value = "数量") @ApiModelProperty(required = true, value = "数量")
private Integer number; private Integer number;
@ApiModelProperty(required = false, value = "关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证") @ApiModelProperty(required = false, value = "关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照")
private Integer idType; private Integer idType;
@ApiModelProperty(required = false, value = "关联人姓名") @ApiModelProperty(required = false, value = "关联人姓名")
private String idName; private String idName;
......
...@@ -214,4 +214,9 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable { ...@@ -214,4 +214,9 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
return new GoblinGoodsSkuInfoVo(); return new GoblinGoodsSkuInfoVo();
} }
} }
public String getCouponSnapshot() {
String str = "skuId=%s,price=%s,valFace=%s,buyLimit=%d,useScope=%s,effectAt=%s,expireAt=%s,isTrueName=%s;";
return String.format(str, this.getSkuId(), this.getPrice().toPlainString());
}
} }
...@@ -245,8 +245,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -245,8 +245,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
List<GoblinOrderSku> goblinOrderSkuList = ObjectUtil.getGoblinOrderSkuArrayList(); List<GoblinOrderSku> goblinOrderSkuList = ObjectUtil.getGoblinOrderSkuArrayList();
List<String> storeSpuIds = CollectionUtil.linkedListString(); List<String> storeSpuIds = CollectionUtil.linkedListString();
List<String> platformSpuIds = CollectionUtil.linkedListString(); List<String> platformSpuIds = CollectionUtil.linkedListString();
String marketId = ""; String marketId = "", marketType = "", goodsSkuCouponSnapshot = "";
String marketType = "";
Map<String, GoblinOrderSkuParam> orderSkuParamMap = ObjectUtil.cloneGoblinOrderSkuParamMap(); Map<String, GoblinOrderSkuParam> orderSkuParamMap = ObjectUtil.cloneGoblinOrderSkuParamMap();
for (GoblinOrderSkuParam skuParam : storeParam.getGoblinOrderSkuParamArrayList()) { for (GoblinOrderSkuParam skuParam : storeParam.getGoblinOrderSkuParamArrayList()) {
String pre = GoblinStatusConst.MarketPreStatus.getPre(skuParam.getSkuId()); String pre = GoblinStatusConst.MarketPreStatus.getPre(skuParam.getSkuId());
...@@ -263,7 +262,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -263,7 +262,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
if (Objects.isNull(skuParam.getIdType()) || Objects.isNull(skuParam.getIdName()) || Objects.isNull(skuParam.getIdNo())) { if (Objects.isNull(skuParam.getIdType()) || Objects.isNull(skuParam.getIdName()) || Objects.isNull(skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "关联人信息缺失,请核实"); throw new LiquidnetServiceException("-1", "关联人信息缺失,请核实");
} }
switch (skuParam.getIdType()) {// 证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证 switch (skuParam.getIdType()) {// 证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照
case 1: case 1:
if (!Pattern.matches(LnsRegex.Valid.CN_HANZI, skuParam.getIdName())) { if (!Pattern.matches(LnsRegex.Valid.CN_HANZI, skuParam.getIdName())) {
throw new LiquidnetServiceException("-1", "身份证姓名不合规"); throw new LiquidnetServiceException("-1", "身份证姓名不合规");
...@@ -291,11 +290,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -291,11 +290,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
throw new LiquidnetServiceException("-1", "护照号码不合规"); throw new LiquidnetServiceException("-1", "护照号码不合规");
} }
break; break;
case 5:
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_MO, skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "军官证号不合规");
}
break;
default: default:
throw new LiquidnetServiceException("-1", "无效证件类型,请重新选择"); throw new LiquidnetServiceException("-1", "无效证件类型,请重新选择");
} }
...@@ -303,6 +297,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -303,6 +297,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
} }
writeOffCode = "EMPTY"; writeOffCode = "EMPTY";
goodsSkuCouponSnapshot = goodsSkuCouponSnapshot.concat(skuVo.getCouponSnapshot());
} }
marketId = spuVo.getMarketId(); marketId = spuVo.getMarketId();
marketType = pre; marketType = pre;
...@@ -432,6 +427,10 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -432,6 +427,10 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
storeOrder.setUserMobile(userInfoVo.getMobile()); storeOrder.setUserMobile(userInfoVo.getMobile());
} }
if (StringUtils.isNotEmpty(goodsSkuCouponSnapshot)) {
log.info("券类商品下单[uid={},mobile={},orderId={},masterOrderCode={},orderCode={},goodsSkuCouponSnapshot={}]",
uid, storeOrder.getUserMobile(), orderId, orderMasterCode, orderCode, goodsSkuCouponSnapshot);
}
if (addressesVo == null) { if (addressesVo == null) {
storeOrder.setPriceExpress(BigDecimal.ZERO); storeOrder.setPriceExpress(BigDecimal.ZERO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment