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

Commit 411eddf1 authored by zhangguobing's avatar zhangguobing

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

parent c2121f70
......@@ -16,7 +16,7 @@ public class GoblinOrderSkuParam {
private String spuId;
@ApiModelProperty(required = true, value = "数量")
private Integer number;
@ApiModelProperty(required = false, value = "关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证")
@ApiModelProperty(required = false, value = "关联人证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照")
private Integer idType;
@ApiModelProperty(required = false, value = "关联人姓名")
private String idName;
......
......@@ -214,4 +214,9 @@ public class GoblinGoodsSkuInfoVo implements Serializable, Cloneable {
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 {
List<GoblinOrderSku> goblinOrderSkuList = ObjectUtil.getGoblinOrderSkuArrayList();
List<String> storeSpuIds = CollectionUtil.linkedListString();
List<String> platformSpuIds = CollectionUtil.linkedListString();
String marketId = "";
String marketType = "";
String marketId = "", marketType = "", goodsSkuCouponSnapshot = "";
Map<String, GoblinOrderSkuParam> orderSkuParamMap = ObjectUtil.cloneGoblinOrderSkuParamMap();
for (GoblinOrderSkuParam skuParam : storeParam.getGoblinOrderSkuParamArrayList()) {
String pre = GoblinStatusConst.MarketPreStatus.getPre(skuParam.getSkuId());
......@@ -263,7 +262,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
if (Objects.isNull(skuParam.getIdType()) || Objects.isNull(skuParam.getIdName()) || Objects.isNull(skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "关联人信息缺失,请核实");
}
switch (skuParam.getIdType()) {// 证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照,5-军官证
switch (skuParam.getIdType()) {// 证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照
case 1:
if (!Pattern.matches(LnsRegex.Valid.CN_HANZI, skuParam.getIdName())) {
throw new LiquidnetServiceException("-1", "身份证姓名不合规");
......@@ -291,11 +290,6 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
throw new LiquidnetServiceException("-1", "护照号码不合规");
}
break;
case 5:
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_MO, skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "军官证号不合规");
}
break;
default:
throw new LiquidnetServiceException("-1", "无效证件类型,请重新选择");
}
......@@ -303,6 +297,7 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
}
writeOffCode = "EMPTY";
goodsSkuCouponSnapshot = goodsSkuCouponSnapshot.concat(skuVo.getCouponSnapshot());
}
marketId = spuVo.getMarketId();
marketType = pre;
......@@ -432,6 +427,10 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
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) {
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