|
|
@@ -590,6 +590,7 @@ public class RiskServiceImpl implements RiskService {
|
|
|
.collect(Collectors.toList());
|
|
|
if (revenues.size() > hourTaskLimit) {
|
|
|
String format = StrUtil.emptyToDefault(dyzUser.getPowerLimitTip(), "当前设备完成任务次数过多,请{}后重试!");
|
|
|
+ log.warn(StrUtil.format("[risk 768] adRecord count[{}] > hour limit[{}]", revenues.size(), hourTaskLimit));
|
|
|
throw new CommonException(StrUtil.format(format,StrUtil.format("{}小时", hourCount)));
|
|
|
}
|
|
|
}
|
|
|
@@ -617,7 +618,7 @@ public class RiskServiceImpl implements RiskService {
|
|
|
recordCount = Integer.parseInt(object.get("data").toString());
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
- log.warn("下游服务未实现接口 queryRecordMonthCount,使用原有逻辑");
|
|
|
+ log.warn(StrUtil.format("下游服务[{}]未实现接口 queryRecordMonthCount,使用原有逻辑", userApp.getServiceName()));
|
|
|
List<YtDyzAdRecord> revenues = adRecords.stream().filter(
|
|
|
s -> Objects.nonNull(s.getRevenue()) && (s.getRevenue().compareTo(BigDecimal.ZERO)) > 0)
|
|
|
.filter(item -> DateUtil.parse(item.getFinishTime()).after(limitStartDate))
|
|
|
@@ -693,6 +694,7 @@ public class RiskServiceImpl implements RiskService {
|
|
|
.divide(new BigDecimal(count), RoundingMode.HALF_UP);
|
|
|
}
|
|
|
if (averageRevenue.compareTo(averageRevenueLimit) < 0) {
|
|
|
+ log.warn(StrUtil.format("[risk 766] averageRevenue{} averageRevenueLimit {}", averageRevenue, averageRevenueLimit));
|
|
|
// 自定义响应
|
|
|
throw new CommonException("766");
|
|
|
}
|
|
|
@@ -718,6 +720,7 @@ public class RiskServiceImpl implements RiskService {
|
|
|
//获取最先的两条
|
|
|
BigDecimal reduce = revenues.stream().map(YtDyzAdRecord::getRevenue).reduce(BigDecimal.ZERO, BigDecimal::add);
|
|
|
if(reduce.compareTo(income)<0){
|
|
|
+ log.warn(StrUtil.format("[risk 746] reduce{} income {}", reduce, income));
|
|
|
if (dyzUser.getIosId()!=null) {
|
|
|
riskLockUserForIos(dyzUser,"322","系统判定重复刷单用户限制",getTipsMsg());
|
|
|
} else {
|
|
|
@@ -749,6 +752,7 @@ public class RiskServiceImpl implements RiskService {
|
|
|
//判断小于预设值的视频数超出预设次数
|
|
|
int haveCount = Integer.parseInt(limitMap.get("haveCount"));
|
|
|
if(exact>haveCount){
|
|
|
+ log.warn(StrUtil.format("[risk 742] exact{} > haveCount {}", exact, haveCount));
|
|
|
if (dyzUser.getIosId()!=null) {
|
|
|
riskLockUserForIos(dyzUser,"322","系统判定重复刷单用户限制",getTipsMsg());
|
|
|
} else {
|