Commit 4427ce2e authored by liwei's avatar liwei

修改了实名认证接口

parent 37d5d307
......@@ -18,6 +18,7 @@ import org.rcisoft.business.memGoldCoinFlow.dao.MemGoldCoinFlowRepository;
import org.rcisoft.business.memGoldCoinFlow.entity.MemGoldCoinFlow;
import org.rcisoft.business.memInfo.dao.MemInfoRepository;
import org.rcisoft.business.memInfo.entity.MemInfo;
import org.rcisoft.business.memInfo.service.impl.MemInfoServiceImpl;
import org.rcisoft.core.exception.CyServiceException;
import org.rcisoft.core.jwt.util.CyJwtUtil;
import org.rcisoft.core.service.CyRedisService;
......@@ -59,6 +60,8 @@ public class FaceVerifyServiceImpl extends ServiceImpl<MemInfoRepository, MemInf
private DictionaryServiceImpl dictionaryService;
@Autowired
private MemGoldCoinFlowRepository memGoldCoinFlowRepository;
@Autowired
private MemInfoServiceImpl memInfoServiceImpl;
/**
* 发起认证请求
* @param memInfo
......@@ -69,6 +72,7 @@ public class FaceVerifyServiceImpl extends ServiceImpl<MemInfoRepository, MemInf
// MemInfo memInfo = memInfoRepository.getInfoByUserId(CyUserUtil.getAuthenBusinessId());
// String idCard = CyAESUtils.decrypt(memInfo.getMemIdcard());
// String name = CyAESUtils.decrypt(memInfo.getMemRealName());
memInfoServiceImpl.checkIdCard(memInfo);
Object detail = cyRedisServiceImpl.get(FaceVerifyRedisBean.FACEVERIFY_USER+CyUserUtil.getAuthenBusinessId());
if (detail!=null) {
MemInfo info = JSON.parseObject(JSON.toJSONString(detail), MemInfo.class);
......
......@@ -572,7 +572,7 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
if (captcha != null) {
int count = (int)captcha;
if (count >= faceVerifyAliComp.getIpDayCount())
throw new CyServiceException("实名认证发起频繁,请稍后重试");
throw new CyServiceException("实名认证次数已达上限,请明日再试!");
}
//3. 同一身份证,每分钟失败次数
captcha = cyRedisServiceImpl.get(FaceVerifyRedisBean.FACEVERIFY_IDCARD_MINUTES + memInfo.getMemIdcard());
......@@ -586,7 +586,7 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
if (captcha != null) {
int count = (int)captcha;
if (count >= faceVerifyAliComp.getIdCardDayCount())
throw new CyServiceException("实名认证发起频繁,请稍后重试");
throw new CyServiceException("实名认证次数已达上限,请明日再试!");
}
cyRedisServiceImpl.set(FaceVerifyRedisBean.FACEVERIFY_USER+memInfo.getUserId(),memInfo,3600L);
return new CyPersistModel(1);
......
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