|
|
@@ -113,6 +113,11 @@ public class RiskServiceImpl implements RiskService {
|
|
|
private RedisService redisService;
|
|
|
@Resource
|
|
|
private AppMapper appMapper;
|
|
|
+
|
|
|
+ @Value("${risk.visitor.validity-period:48}")
|
|
|
+ private Integer loginCheckValidityPeriod;
|
|
|
+
|
|
|
+
|
|
|
/**
|
|
|
* 查询配置字段选项
|
|
|
*/
|
|
|
@@ -1010,6 +1015,12 @@ public class RiskServiceImpl implements RiskService {
|
|
|
}
|
|
|
// 游客用户总收益校验
|
|
|
if(dyzUser.getLoginType() != null && LoginType.VISITOR == dyzUser.getLoginType()){
|
|
|
+ // 已通过用户 不再进行校验
|
|
|
+ String cacheKey = StrUtil.format("visitor:login_validity_{}_{}", dyzUser.getAppId(), dyzUser.getUserId());
|
|
|
+ if (redisService.hasKey(cacheKey)) {
|
|
|
+ log.info("visitor[{}] last check success time < {} h", dyzUser.getUserId(), loginCheckValidityPeriod);
|
|
|
+ return Result.resultOk(RepMessage.RISK_SUCCESS);
|
|
|
+ }
|
|
|
boolean checkResult = checkVisitorRisk(dyzUser);
|
|
|
if (!checkResult) {
|
|
|
// 20250911 需求调整 锁定用户
|
|
|
@@ -1045,6 +1056,7 @@ public class RiskServiceImpl implements RiskService {
|
|
|
return Result.resultErr(RepMessage.RISK_VISITOR_LOWER_VALUE);
|
|
|
}
|
|
|
// return checkResult ? Result.resultOk(RepMessage.RISK_SUCCESS) : Result.resultErr(RepMessage.RISK_VISITOR_LOWER_VALUE);
|
|
|
+ redisService.setTimeOutHoursStr(cacheKey, "ok", loginCheckValidityPeriod);
|
|
|
}
|
|
|
return Result.resultOk(RepMessage.RISK_SUCCESS);
|
|
|
}
|