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

Commit f9e504be authored by zz's avatar zz

Merge remote-tracking branch 'origin/20240123_COUPON_SPU' into 阶梯退票_羊毛券_合并分支

parents 9b9d96ef fdd73c4e
...@@ -124,6 +124,44 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -124,6 +124,44 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
if (!skuParam.getSpuId().equals(skuVo.getSpuId())) { if (!skuParam.getSpuId().equals(skuVo.getSpuId())) {
throw new Exception("参数异常"); throw new Exception("参数异常");
} }
if (Objects.equals(skuVo.getSkuType(), 2)) {// 券类商品
if (Objects.equals(skuVo.getIsTrueName(), 1)) {// 需关联实名人
if (Objects.isNull(skuParam.getIdType()) || Objects.isNull(skuParam.getIdName()) || Objects.isNull(skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "关联人信息缺失,请核实");
}
switch (skuParam.getIdType()) {// 证件类型:1-大陆身份证,2-港澳通行证,3-台胞证,4-护照
case 1:
if (!Pattern.matches(LnsRegex.Valid.CN_HANZI, skuParam.getIdName())) {
throw new LiquidnetServiceException("-1", "身份证姓名不合规");
}
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_REF, skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "身份证号码不合规");
}
adamRedisUtils.identityHandler1(uid, skuParam.getIdName(), skuParam.getIdNo());
break;
case 2:
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_HM, skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "港澳居民来往内地通行证号码不合规");
}
break;
case 3:
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_TW, skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "台湾居民来往大陆通行证号码不合规");
}
break;
case 4:
if (Pattern.matches(LnsRegex.Valid.CN_ID_CARD_PP, skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "不支持中国大陆护照");
}
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_PP_NON, skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "护照号码不合规");
}
break;
default:
throw new LiquidnetServiceException("-1", "无效证件类型,请重新选择");
}
}
}
int limitCount = skuVo.getBuyLimit() == 0 ? Integer.MAX_VALUE : skuVo.getBuyLimit(); int limitCount = skuVo.getBuyLimit() == 0 ? Integer.MAX_VALUE : skuVo.getBuyLimit();
//判断限购 //判断限购
if (orderUtils.noZhengzaiOrder(uid)) { if (orderUtils.noZhengzaiOrder(uid)) {
...@@ -281,40 +319,40 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService { ...@@ -281,40 +319,40 @@ public class GoblinOrderServiceImpl implements IGoblinOrderService {
} }
if (Objects.equals(skuVo.getSkuType(), 2)) {// 券类商品 if (Objects.equals(skuVo.getSkuType(), 2)) {// 券类商品
if (Objects.equals(skuVo.getIsTrueName(), 1)) {// 需关联实名人 if (Objects.equals(skuVo.getIsTrueName(), 1)) {// 需关联实名人
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-护照 // 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", "身份证姓名不合规");
} // }
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_REF, skuParam.getIdNo())) { // if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_REF, skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "身份证号码不合规"); // throw new LiquidnetServiceException("-1", "身份证号码不合规");
} // }
adamRedisUtils.identityHandler1(uid, skuParam.getIdName(), skuParam.getIdNo()); // adamRedisUtils.identityHandler1(uid, skuParam.getIdName(), skuParam.getIdNo());
break; // break;
case 2: // case 2:
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_HM, skuParam.getIdNo())) { // if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_HM, skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "港澳居民来往内地通行证号码不合规"); // throw new LiquidnetServiceException("-1", "港澳居民来往内地通行证号码不合规");
} // }
break; // break;
case 3: // case 3:
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_TW, skuParam.getIdNo())) { // if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_TW, skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "台湾居民来往大陆通行证号码不合规"); // throw new LiquidnetServiceException("-1", "台湾居民来往大陆通行证号码不合规");
} // }
break; // break;
case 4: // case 4:
if (Pattern.matches(LnsRegex.Valid.CN_ID_CARD_PP, skuParam.getIdNo())) { // if (Pattern.matches(LnsRegex.Valid.CN_ID_CARD_PP, skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "不支持中国大陆护照"); // throw new LiquidnetServiceException("-1", "不支持中国大陆护照");
} // }
if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_PP_NON, skuParam.getIdNo())) { // if (!Pattern.matches(LnsRegex.Valid.CN_ID_CARD_PP_NON, skuParam.getIdNo())) {
throw new LiquidnetServiceException("-1", "护照号码不合规"); // throw new LiquidnetServiceException("-1", "护照号码不合规");
} // }
break; // break;
default: // default:
throw new LiquidnetServiceException("-1", "无效证件类型,请重新选择"); // throw new LiquidnetServiceException("-1", "无效证件类型,请重新选择");
} // }
orderSkuParamMap.put(skuParam.getSkuId(), skuParam); orderSkuParamMap.put(skuParam.getSkuId(), skuParam);
} }
......
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