Authored by caoyan

Merge branch 'test6.9.2' of http://git.yoho.cn/ufo/yohoufo-fore into test6.9.2

... ... @@ -27,7 +27,6 @@ public class BuyerOrderCancelShamDeliveryHandler implements IEventHandler<BuyerO
@Subscribe
public void handle(BuyerOrderCancelShamDeliveryEvent event) {
int minutes = DelayTime.CANCEL_SHAM_DELIVERY_TIME_MINUTE ;
minutes = 20;
logger.info("Subscribe Buyer Order Cancel ShamDelivery Event delay msg, minutes {} ,event {}", minutes ,event);
tradeMqSender.send(TopicConstants.BUYER_ORDER_CANCEL_SHAM_DELIVER, event, minutes);
... ...
... ... @@ -8,6 +8,7 @@ import com.yohobuy.ufo.model.order.common.EntrySellerType;
import com.yohobuy.ufo.model.order.resp.SellerResp;
import com.yohoufo.common.caller.UfoServiceCaller;
import com.yohoufo.common.constant.CertPhotoEnum;
import com.yohoufo.common.exception.UfoServiceException;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.dal.order.StoredSellerMapper;
import com.yohoufo.dal.order.SuperEntrySellerMapper;
... ... @@ -140,8 +141,30 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
sellerResp.setZhiMaCertWithPhoto(isZhiMaCertWithPhoto);//新的芝麻认证状态(带身份证图片)
//把已认证的信息带回去,给app
if(zhiMaCert!=null){
sellerResp.setCertName(zhiMaCert.getCertName());
sellerResp.setCertNo(zhiMaCert.getCertNo());
//mask处理,姓名只显示最后一个字,身份证号只显示3位******2位
if(StringUtils.isBlank(zhiMaCert.getCertName())||StringUtils.isBlank(zhiMaCert.getCertNo())){
throw new UfoServiceException(400,"芝麻认证信息数据异常");
}
StringBuilder maskCertName=new StringBuilder();
StringBuilder maskCertNo=new StringBuilder();
String name=zhiMaCert.getCertName();
for(int i=0;i<name.length();i++){
if(i==name.length()-1){
maskCertName.append(name.substring(i,i+1));
}else{
maskCertName.append("*");
}
}
String no=zhiMaCert.getCertNo();
for(int i=0;i<no.length();i++){
if(i<3||i>=16){
maskCertNo.append(no.substring(i,i+1));
}else{
maskCertNo.append("*");
}
}
sellerResp.setCertName(maskCertName.toString());
sellerResp.setCertNo(maskCertNo.toString());
}else{
sellerResp.setCertName(StringUtils.EMPTY);
sellerResp.setCertNo(StringUtils.EMPTY);
... ...
... ... @@ -172,6 +172,15 @@ public class RealNameAuthorizeController {
throw new GatewayException(400, "身份证号、姓名不能为空!");
}
//是否存在芝麻认证信息
ZhiMaCert zhiMaCert =realNameAuthorizeService.getValidZhiMaCert(reqVO.getUid());
if(zhiMaCert!=null&&(zhiMaCert.getCertName().contains("*")||zhiMaCert.getCertNo().contains("*"))){
//前端传过来的是mask的身份证号,用数据库的替换
reqVO.setCertName(zhiMaCert.getCertName());
reqVO.setCertNo(zhiMaCert.getCertNo());
logger.info("realNameAuthorize.zhiMaCertWithPhotoCheckInit reset mask ,zhiMaCert {} ,new reqVO is {}", zhiMaCert ,reqVO);
}
//身份证格式校验IDCardUtils
if(!IDCardUtils.validate(reqVO.getCertNo())){
throw new GatewayException(400, "身份证号输入不正确!");
... ... @@ -191,7 +200,7 @@ public class RealNameAuthorizeController {
reqVO.setBackImageUrl(yohoCardUrlPre+reqVO.getBackImageUrl());
//调用芝麻,得到回调url
AuthorizeResultRespVO resultVo=realNameAuthorizeService.zhiMaCertWithPhotoInit(reqVO);
AuthorizeResultRespVO resultVo=realNameAuthorizeService.zhiMaCertWithPhotoInit(zhiMaCert,reqVO);
logger.info("realNameAuthorize.zhiMaCertWithPhotoCheckInit result vo {} ",resultVo);
ApiResponse apiResponse=new ApiResponse();
if(resultVo==null){
... ...
... ... @@ -23,7 +23,7 @@ public interface IRealNameAuthorizeService {
ZhiMaCert getValidZhiMaCert(int uid);
AuthorizeResultRespVO zhiMaCertWithPhotoInit(RealNameAuthorizeReqVO reqVO);
AuthorizeResultRespVO zhiMaCertWithPhotoInit(ZhiMaCert zhiMaCert,RealNameAuthorizeReqVO reqVO);
AuthorizeResultRespVO zhiMaCertInit(RealNameAuthorizeReqVO reqVO);
... ...
... ... @@ -469,11 +469,11 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService {
}
@Override
public AuthorizeResultRespVO zhiMaCertWithPhotoInit(RealNameAuthorizeReqVO reqVO){
public AuthorizeResultRespVO zhiMaCertWithPhotoInit(ZhiMaCert zhiMaCert,RealNameAuthorizeReqVO reqVO){
logger.info("real name zhiMaCertWithPhotoInit reqVO {}", reqVO);
boolean justCheckPhoto = false;
int uid = reqVO.getUid();
ZhiMaCert zhiMaCert = this.getValidZhiMaCert(uid);
if(zhiMaCert!=null){
if(zhiMaCert.getValidPhoto()!=null&&CertPhotoEnum.valid.getStatus()==zhiMaCert.getValidPhoto()){
//已经有照片了,并且照片已经认证过了
... ...
... ... @@ -34,7 +34,7 @@ consumer:
- class: com.yohoufo.order.mq.consumer.BuyerOrderCancelShamDeliveryMsgConsumer
topic: buyerOrder.cancelShamDeliver
delay:
interval: 20
interval: 2880
#order.notPaidNotice
- class: com.yohoufo.order.mq.consumer.NotPaidNoticeDelayMsgConsumer
... ...