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 @@ -27,7 +27,6 @@ public class BuyerOrderCancelShamDeliveryHandler implements IEventHandler<BuyerO
27 @Subscribe 27 @Subscribe
28 public void handle(BuyerOrderCancelShamDeliveryEvent event) { 28 public void handle(BuyerOrderCancelShamDeliveryEvent event) {
29 int minutes = DelayTime.CANCEL_SHAM_DELIVERY_TIME_MINUTE ; 29 int minutes = DelayTime.CANCEL_SHAM_DELIVERY_TIME_MINUTE ;
30 - minutes = 20;  
31 logger.info("Subscribe Buyer Order Cancel ShamDelivery Event delay msg, minutes {} ,event {}", minutes ,event); 30 logger.info("Subscribe Buyer Order Cancel ShamDelivery Event delay msg, minutes {} ,event {}", minutes ,event);
32 31
33 tradeMqSender.send(TopicConstants.BUYER_ORDER_CANCEL_SHAM_DELIVER, event, minutes); 32 tradeMqSender.send(TopicConstants.BUYER_ORDER_CANCEL_SHAM_DELIVER, event, minutes);
@@ -8,6 +8,7 @@ import com.yohobuy.ufo.model.order.common.EntrySellerType; @@ -8,6 +8,7 @@ import com.yohobuy.ufo.model.order.common.EntrySellerType;
8 import com.yohobuy.ufo.model.order.resp.SellerResp; 8 import com.yohobuy.ufo.model.order.resp.SellerResp;
9 import com.yohoufo.common.caller.UfoServiceCaller; 9 import com.yohoufo.common.caller.UfoServiceCaller;
10 import com.yohoufo.common.constant.CertPhotoEnum; 10 import com.yohoufo.common.constant.CertPhotoEnum;
  11 +import com.yohoufo.common.exception.UfoServiceException;
11 import com.yohoufo.common.utils.DateUtil; 12 import com.yohoufo.common.utils.DateUtil;
12 import com.yohoufo.dal.order.StoredSellerMapper; 13 import com.yohoufo.dal.order.StoredSellerMapper;
13 import com.yohoufo.dal.order.SuperEntrySellerMapper; 14 import com.yohoufo.dal.order.SuperEntrySellerMapper;
@@ -140,8 +141,30 @@ public class StoreSellerServiceImpl implements IStoredSellerService { @@ -140,8 +141,30 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
140 sellerResp.setZhiMaCertWithPhoto(isZhiMaCertWithPhoto);//新的芝麻认证状态(带身份证图片) 141 sellerResp.setZhiMaCertWithPhoto(isZhiMaCertWithPhoto);//新的芝麻认证状态(带身份证图片)
141 //把已认证的信息带回去,给app 142 //把已认证的信息带回去,给app
142 if(zhiMaCert!=null){ 143 if(zhiMaCert!=null){
143 - sellerResp.setCertName(zhiMaCert.getCertName());  
144 - sellerResp.setCertNo(zhiMaCert.getCertNo()); 144 + //mask处理,姓名只显示最后一个字,身份证号只显示3位******2位
  145 + if(StringUtils.isBlank(zhiMaCert.getCertName())||StringUtils.isBlank(zhiMaCert.getCertNo())){
  146 + throw new UfoServiceException(400,"芝麻认证信息数据异常");
  147 + }
  148 + StringBuilder maskCertName=new StringBuilder();
  149 + StringBuilder maskCertNo=new StringBuilder();
  150 + String name=zhiMaCert.getCertName();
  151 + for(int i=0;i<name.length();i++){
  152 + if(i==name.length()-1){
  153 + maskCertName.append(name.substring(i,i+1));
  154 + }else{
  155 + maskCertName.append("*");
  156 + }
  157 + }
  158 + String no=zhiMaCert.getCertNo();
  159 + for(int i=0;i<no.length();i++){
  160 + if(i<3||i>=16){
  161 + maskCertNo.append(no.substring(i,i+1));
  162 + }else{
  163 + maskCertNo.append("*");
  164 + }
  165 + }
  166 + sellerResp.setCertName(maskCertName.toString());
  167 + sellerResp.setCertNo(maskCertNo.toString());
145 }else{ 168 }else{
146 sellerResp.setCertName(StringUtils.EMPTY); 169 sellerResp.setCertName(StringUtils.EMPTY);
147 sellerResp.setCertNo(StringUtils.EMPTY); 170 sellerResp.setCertNo(StringUtils.EMPTY);
@@ -172,6 +172,15 @@ public class RealNameAuthorizeController { @@ -172,6 +172,15 @@ public class RealNameAuthorizeController {
172 throw new GatewayException(400, "身份证号、姓名不能为空!"); 172 throw new GatewayException(400, "身份证号、姓名不能为空!");
173 } 173 }
174 174
  175 + //是否存在芝麻认证信息
  176 + ZhiMaCert zhiMaCert =realNameAuthorizeService.getValidZhiMaCert(reqVO.getUid());
  177 + if(zhiMaCert!=null&&(zhiMaCert.getCertName().contains("*")||zhiMaCert.getCertNo().contains("*"))){
  178 + //前端传过来的是mask的身份证号,用数据库的替换
  179 + reqVO.setCertName(zhiMaCert.getCertName());
  180 + reqVO.setCertNo(zhiMaCert.getCertNo());
  181 + logger.info("realNameAuthorize.zhiMaCertWithPhotoCheckInit reset mask ,zhiMaCert {} ,new reqVO is {}", zhiMaCert ,reqVO);
  182 + }
  183 +
175 //身份证格式校验IDCardUtils 184 //身份证格式校验IDCardUtils
176 if(!IDCardUtils.validate(reqVO.getCertNo())){ 185 if(!IDCardUtils.validate(reqVO.getCertNo())){
177 throw new GatewayException(400, "身份证号输入不正确!"); 186 throw new GatewayException(400, "身份证号输入不正确!");
@@ -191,7 +200,7 @@ public class RealNameAuthorizeController { @@ -191,7 +200,7 @@ public class RealNameAuthorizeController {
191 reqVO.setBackImageUrl(yohoCardUrlPre+reqVO.getBackImageUrl()); 200 reqVO.setBackImageUrl(yohoCardUrlPre+reqVO.getBackImageUrl());
192 201
193 //调用芝麻,得到回调url 202 //调用芝麻,得到回调url
194 - AuthorizeResultRespVO resultVo=realNameAuthorizeService.zhiMaCertWithPhotoInit(reqVO); 203 + AuthorizeResultRespVO resultVo=realNameAuthorizeService.zhiMaCertWithPhotoInit(zhiMaCert,reqVO);
195 logger.info("realNameAuthorize.zhiMaCertWithPhotoCheckInit result vo {} ",resultVo); 204 logger.info("realNameAuthorize.zhiMaCertWithPhotoCheckInit result vo {} ",resultVo);
196 ApiResponse apiResponse=new ApiResponse(); 205 ApiResponse apiResponse=new ApiResponse();
197 if(resultVo==null){ 206 if(resultVo==null){
@@ -23,7 +23,7 @@ public interface IRealNameAuthorizeService { @@ -23,7 +23,7 @@ public interface IRealNameAuthorizeService {
23 23
24 ZhiMaCert getValidZhiMaCert(int uid); 24 ZhiMaCert getValidZhiMaCert(int uid);
25 25
26 - AuthorizeResultRespVO zhiMaCertWithPhotoInit(RealNameAuthorizeReqVO reqVO); 26 + AuthorizeResultRespVO zhiMaCertWithPhotoInit(ZhiMaCert zhiMaCert,RealNameAuthorizeReqVO reqVO);
27 27
28 AuthorizeResultRespVO zhiMaCertInit(RealNameAuthorizeReqVO reqVO); 28 AuthorizeResultRespVO zhiMaCertInit(RealNameAuthorizeReqVO reqVO);
29 29
@@ -469,11 +469,11 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService { @@ -469,11 +469,11 @@ public class RealNameAuthorizeServiceImpl implements IRealNameAuthorizeService {
469 } 469 }
470 470
471 @Override 471 @Override
472 - public AuthorizeResultRespVO zhiMaCertWithPhotoInit(RealNameAuthorizeReqVO reqVO){ 472 + public AuthorizeResultRespVO zhiMaCertWithPhotoInit(ZhiMaCert zhiMaCert,RealNameAuthorizeReqVO reqVO){
473 logger.info("real name zhiMaCertWithPhotoInit reqVO {}", reqVO); 473 logger.info("real name zhiMaCertWithPhotoInit reqVO {}", reqVO);
474 boolean justCheckPhoto = false; 474 boolean justCheckPhoto = false;
475 int uid = reqVO.getUid(); 475 int uid = reqVO.getUid();
476 - ZhiMaCert zhiMaCert = this.getValidZhiMaCert(uid); 476 +
477 if(zhiMaCert!=null){ 477 if(zhiMaCert!=null){
478 if(zhiMaCert.getValidPhoto()!=null&&CertPhotoEnum.valid.getStatus()==zhiMaCert.getValidPhoto()){ 478 if(zhiMaCert.getValidPhoto()!=null&&CertPhotoEnum.valid.getStatus()==zhiMaCert.getValidPhoto()){
479 //已经有照片了,并且照片已经认证过了 479 //已经有照片了,并且照片已经认证过了
@@ -34,7 +34,7 @@ consumer: @@ -34,7 +34,7 @@ consumer:
34 - class: com.yohoufo.order.mq.consumer.BuyerOrderCancelShamDeliveryMsgConsumer 34 - class: com.yohoufo.order.mq.consumer.BuyerOrderCancelShamDeliveryMsgConsumer
35 topic: buyerOrder.cancelShamDeliver 35 topic: buyerOrder.cancelShamDeliver
36 delay: 36 delay:
37 - interval: 20 37 + interval: 2880
38 38
39 #order.notPaidNotice 39 #order.notPaidNotice
40 - class: com.yohoufo.order.mq.consumer.NotPaidNoticeDelayMsgConsumer 40 - class: com.yohoufo.order.mq.consumer.NotPaidNoticeDelayMsgConsumer