Authored by 匡佳华

闲鱼用户实名认证跳过百度刷脸

@@ -13,6 +13,8 @@ public interface IZhiMaCertDao { @@ -13,6 +13,8 @@ public interface IZhiMaCertDao {
13 13
14 int updateValidStatusByPrimaryKey(int id); 14 int updateValidStatusByPrimaryKey(int id);
15 15
  16 + int updateIdleFishValidStatus(int id);
  17 +
16 int updatePhotoStatusByPrimaryKeyAndValidStatus(@Param("id")int id,@Param("validPhoto")int validPhoto); 18 int updatePhotoStatusByPrimaryKeyAndValidStatus(@Param("id")int id,@Param("validPhoto")int validPhoto);
17 19
18 int updateBizNoByByPrimaryKey(@Param("id")int id, @Param("bizNo")String bizNo); 20 int updateBizNoByByPrimaryKey(@Param("id")int id, @Param("bizNo")String bizNo);
@@ -100,6 +100,12 @@ @@ -100,6 +100,12 @@
100 where id = #{id} 100 where id = #{id}
101 </update> 101 </update>
102 102
  103 + <update id="updateIdleFishValidStatus">
  104 + update zhima_cert
  105 + set valid_status = 1, is_idlefish = 1
  106 + where id = #{id}
  107 + </update>
  108 +
103 <update id="updatePhotoToValidByPK"> 109 <update id="updatePhotoToValidByPK">
104 update zhima_cert 110 update zhima_cert
105 set image_url = #{imageUrl} , valid_photo = #{validPhoto} 111 set image_url = #{imageUrl} , valid_photo = #{validPhoto}
@@ -43,5 +43,7 @@ public class RealNameAuthorizeReqVO extends BaseBO { @@ -43,5 +43,7 @@ public class RealNameAuthorizeReqVO extends BaseBO {
43 //版本 43 //版本
44 private String app_version; 44 private String app_version;
45 45
  46 + private String client_type;
  47 +
46 48
47 } 49 }
@@ -34,6 +34,14 @@ public class AlipayServiceImpl implements IAlipayService { @@ -34,6 +34,14 @@ public class AlipayServiceImpl implements IAlipayService {
34 @Override 34 @Override
35 public void beginAlipayCert(RealNameAuthorizeReqVO reqVO, ZhiMaCert zhiMaCert, AuthorizeResultRespVO respBO){ 35 public void beginAlipayCert(RealNameAuthorizeReqVO reqVO, ZhiMaCert zhiMaCert, AuthorizeResultRespVO respBO){
36 logger.info("BeginAlipayCert: Begin alipay certification. reqVO is {}, zhiMaCert is {}", reqVO, zhiMaCert); 36 logger.info("BeginAlipayCert: Begin alipay certification. reqVO is {}, zhiMaCert is {}", reqVO, zhiMaCert);
  37 + // 闲鱼用户不进行百度刷脸认证,直接认证成功
  38 + if("h5".equals(reqVO.getClient_type())){
  39 + logger.info("BeginAlipayCert: client_type is h5, reqVO is {}, zhiMaCert is {}", reqVO, zhiMaCert);
  40 + zhiMaCertDao.updateIdleFishValidStatus(zhiMaCert.getId());
  41 + respBO.setCallZhiMa("1");
  42 + respBO.setZhiMaCertId(zhiMaCert.getId());
  43 + return;
  44 + }
37 //(1)支付宝刷脸认证初始化 45 //(1)支付宝刷脸认证初始化
38 String certifyId = AlipayCertHelper.alipayCertifyInit(reqVO.getCertName(), reqVO.getCertNo()); 46 String certifyId = AlipayCertHelper.alipayCertifyInit(reqVO.getCertName(), reqVO.getCertNo());
39 logger.info("BeginAlipayCert: alipay init result. uid is {}, certNO is {}, certName is {}, certifyId is {}", reqVO.getUid(), reqVO.getCertNo(), reqVO.getCertName(), certifyId); 47 logger.info("BeginAlipayCert: alipay init result. uid is {}, certNO is {}, certName is {}, certifyId is {}", reqVO.getUid(), reqVO.getCertNo(), reqVO.getCertName(), certifyId);
@@ -115,7 +115,7 @@ public class CertificationServiceImpl implements ICertificationService { @@ -115,7 +115,7 @@ public class CertificationServiceImpl implements ICertificationService {
115 logger.info("BeginCertificate: call alipay certify end. reqVO is {}, zhiMaCert is {}, respBO is {}", reqVO, zhiMaCert, respBO); 115 logger.info("BeginCertificate: call alipay certify end. reqVO is {}, zhiMaCert is {}, respBO is {}", reqVO, zhiMaCert, respBO);
116 } 116 }
117 117
118 - //(9)删除实名认证信息 118 + //(9)删除实名认证信息缓存
119 try { 119 try {
120 cacheService.delZhiMaCert(reqVO.getUid()); 120 cacheService.delZhiMaCert(reqVO.getUid());
121 }catch(Exception e){ 121 }catch(Exception e){