Authored by 匡佳华

香港仓商品下单校验update

... ... @@ -4,5 +4,4 @@ public interface ClientSpecialSemanticCode {
int needRealName = 440;
int WaitingPayLimit = 512;
int realNameMisMatch = 443;
int mobileMisMatch = 444;
}
... ...
... ... @@ -71,18 +71,12 @@ public class ShoppingRiskWatchDog {
logger.warn("checkOverseaOrderUserInfo: need realName cert, uid is {}", uid);
throw new UfoServiceException(ClientSpecialSemanticCode.needRealName, "请完成实名认证后操作");
}
//(3) 校验和收件人的姓名,手机号是否一致
//(3) 校验和收件人姓名是否和实名认证的姓名一致
String buyerName = zhimaCert.getCertName();
String receiverName = addressInfo.getConsignee();
if(!buyerName.equals(receiverName)){
logger.warn("checkOverseaOrderUserInfo: name not match, receiverName is {}, buyerMobile is {}", receiverName, buyerName);
throw new UfoServiceException(ClientSpecialSemanticCode.realNameMisMatch, "收件人姓名必须与实名认证信息一致");
}
String buyerMobile = userProxyService.getMobile(uid);
String receiverMobile = addressInfo.getMobile();
if(!buyerMobile.equals(receiverMobile)){
logger.warn("checkOverseaOrderUserInfo: mobile not match, receiverMobile is {}, buyerMobile is {}", receiverMobile, buyerMobile);
throw new UfoServiceException(ClientSpecialSemanticCode.mobileMisMatch, "收件人手机号必须与账号对应手机号一致");
throw new UfoServiceException(ClientSpecialSemanticCode.realNameMisMatch, "收件人姓名必须与实名认证的姓名一致");
}
}
... ...
... ... @@ -552,7 +552,7 @@ public class ShoppingServiceImpl implements IShoppingService {
//查询并校验用户地址
Pair<AddressInfo, AddressInfo> userAddressPair = getAndCheckAddressInfo(shoppingRequest);
//若购买的是香港仓商品,uid必须实名认证,且姓名和手机号必须与收货人一致
//若购买的是香港仓商品,uid必须实名认证,收货人姓名必须和实名认证姓名一致
shoppingRiskWatchDog.checkOverseasOrderUserInfo(uid, psog.getAttributes(), userAddressPair.getKey());
//算费
... ...