Jelajahi Sumber

修改用户查看ecpm
修改风控及时锁

marxjaw 2 bulan lalu
induk
melakukan
029cd73f3b
27 mengubah file dengan 31 tambahan dan 31 penghapusan
  1. 1 1
      yt-adage/adage-service/src/main/resources/mapper/AdRecordMapper.xml
  2. 1 1
      yt-agent/agent-service/src/main/java/com/ytpm/service/impl/YtAppUserServiceImpl.java
  3. 1 1
      yt-algebraic/algebraic-service/src/main/resources/mapper/AdRecordMapper.xml
  4. 1 1
      yt-allusion/allusion-service/src/main/resources/mapper/AdRecordMapper.xml
  5. 1 1
      yt-answer/answer-service/src/main/resources/mapper/AdRecordMapper.xml
  6. 1 1
      yt-app/app-service/src/main/resources/mapper/dyz/AdRecordMapper.xml
  7. 1 1
      yt-arithmetic/arithmetic-service/src/main/resources/mapper/AdRecordMapper.xml
  8. 1 1
      yt-calculator/calculator-service/src/main/resources/mapper/AdRecordMapper.xml
  9. 1 1
      yt-carp/carp-service/src/main/resources/mapper/AdRecordMapper.xml
  10. 1 1
      yt-countstep/countstep-service/src/main/resources/mapper/AdRecordMapper.xml
  11. 1 1
      yt-diary/diary-service/src/main/resources/mapper/AdRecordMapper.xml
  12. 1 1
      yt-dtw/dtw-service/src/main/resources/mapper/AdRecordMapper.xml
  13. 1 1
      yt-emoticons/emoticons-service/src/main/resources/mapper/AdRecordMapper.xml
  14. 1 1
      yt-funarith/funarith-service/src/main/resources/mapper/AdRecordMapper.xml
  15. 1 1
      yt-idiom/idiom-service/src/main/resources/mapper/AdRecordMapper.xml
  16. 1 1
      yt-irun/irun-service/src/main/resources/mapper/AdRecordMapper.xml
  17. 1 1
      yt-lemon/lemon-service/src/main/resources/mapper/AdRecordMapper.xml
  18. 1 1
      yt-lime/lime-service/src/main/resources/mapper/AdRecordMapper.xml
  19. 1 1
      yt-mileage/mileage-service/src/main/resources/mapper/AdRecordMapper.xml
  20. 1 1
      yt-nofeeds/nofeeds-service/src/main/resources/mapper/AdRecordMapper.xml
  21. 1 1
      yt-picking/picking-service/src/main/resources/mapper/AdRecordMapper.xml
  22. 1 1
      yt-raisepig/raisepig-service/src/main/resources/mapper/AdRecordMapper.xml
  23. 0 1
      yt-risk/risk-manage/src/main/java/com/ytpm/controller/RiskManageController.java
  24. 6 5
      yt-risk/risk-manage/src/main/java/com/ytpm/service/impl/RiskServiceImpl.java
  25. 1 1
      yt-summary/summary-service/src/main/resources/mapper/AdRecordMapper.xml
  26. 1 1
      yt-vitality/vitality-service/src/main/resources/mapper/AdRecordMapper.xml
  27. 1 1
      yt-walk/walk-service/src/main/resources/mapper/AdRecordMapper.xml

+ 1 - 1
yt-adage/adage-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-agent/agent-service/src/main/java/com/ytpm/service/impl/YtAppUserServiceImpl.java

@@ -141,7 +141,7 @@ public class YtAppUserServiceImpl implements YtAppUserService {
     public ResultTable<YtUserEcpmListView> ecpmList(String appId,String userId,Integer adsourceType) {
         YtApp ytApp = appMapper.selectPrimary(appId);
         YtPlatformUserApp app = agentAppMapper.selectByPrimaryKey(ytApp.getSuperiorId());
-        Object o = feignInvoker.invoke(app.getServiceName(), "adRecords", userId,1);
+        Object o = feignInvoker.invoke(app.getServiceName(), "adRecords", userId,888);
         JSONObject object = JSONObject.parseObject(JSON.toJSONString(o));
         List<YtDyzAdRecord> records = JSONArray.parseArray(object.getString("data"), YtDyzAdRecord.class);
         PageMeta pageMeta = JSON.parseObject(object.getString("pageMeta"), PageMeta.class);

+ 1 - 1
yt-algebraic/algebraic-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-allusion/allusion-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-answer/answer-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-app/app-service/src/main/resources/mapper/dyz/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-arithmetic/arithmetic-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-calculator/calculator-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-carp/carp-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-countstep/countstep-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-diary/diary-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-dtw/dtw-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-emoticons/emoticons-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-funarith/funarith-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-idiom/idiom-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-irun/irun-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-lemon/lemon-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-lime/lime-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-mileage/mileage-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-nofeeds/nofeeds-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-picking/picking-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-raisepig/raisepig-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 0 - 1
yt-risk/risk-manage/src/main/java/com/ytpm/controller/RiskManageController.java

@@ -142,7 +142,6 @@ public class RiskManageController {
                     Calendar calendar = Calendar.getInstance();
                     calendar.setTime(bannedTime);
                     int hour = calendar.get(Calendar.HOUR_OF_DAY);
-
                     if (hour >= 0 && hour < 24) {
                           lockCounts[hour]++;
                         }

+ 6 - 5
yt-risk/risk-manage/src/main/java/com/ytpm/service/impl/RiskServiceImpl.java

@@ -422,7 +422,7 @@ public class RiskServiceImpl extends ReflectUtil implements RiskService {
         ).count();
         //三天内注册的渠道数小于预设的渠道数通过校验,否则风控锁定用户
         if(ditchCount<uidCount)return;
-        riskLockUser(dyzUser,"322","系统判定重复刷单用户限制",getTipsMsg());
+        riskLockUser(dyzUser,"系统判定重复刷单用户限制",getTipsMsg());
     }
 
     /**
@@ -454,7 +454,7 @@ public class RiskServiceImpl extends ReflectUtil implements RiskService {
         }
         int ipSameCount = Integer.parseInt(configMap.get("ipSameCount"));
         if(intCount > ipSameCount){//校验同IP登录次数大于预设值,锁定用户
-            riskLockUser(dyzUser,"313","系统判定登录IP限制",getTipsMsg());
+            riskLockUser(dyzUser,"系统判定登录IP限制",getTipsMsg());
         }
     }
 
@@ -545,7 +545,7 @@ public class RiskServiceImpl extends ReflectUtil implements RiskService {
             //获取最先的两条
             BigDecimal reduce = revenues.stream().map(YtDyzAdRecord::getRevenue).reduce(BigDecimal.ZERO, BigDecimal::add);
             if(reduce.compareTo(income)<0){
-                riskLockUser(dyzUser, "746","系统判定小于最低收益限制",getTipsMsg());
+                riskLockUser(dyzUser, "系统判定小于最低收益限制",getTipsMsg());
             }
         }
     }
@@ -571,7 +571,7 @@ public class RiskServiceImpl extends ReflectUtil implements RiskService {
             //判断小于预设值的视频数超出预设次数
             int haveCount = Integer.parseInt(limitMap.get("haveCount"));
             if(exact>haveCount){
-                riskLockUser(dyzUser,"742","系统判定激励视频ecpm值过低",getTipsMsg());
+                riskLockUser(dyzUser,"系统判定激励视频ecpm值过低",getTipsMsg());
             }
         }
     }
@@ -579,7 +579,7 @@ public class RiskServiceImpl extends ReflectUtil implements RiskService {
     /**
      * 风控锁定用户
      */
-    private void riskLockUser(YtDyzUser dyzUser, String riskCode, String tempName, String errMsg) {
+    private void riskLockUser(YtDyzUser dyzUser, String tempName, String errMsg) {
         //增加用户风控记录
         RiskBannedParam param = new RiskBannedParam();
         param.setUserId(dyzUser.getUserId());
@@ -591,6 +591,7 @@ public class RiskServiceImpl extends ReflectUtil implements RiskService {
         param.setOperatorName("系统风控");
         param.setAgentId(configMapper.getApplicationOwner(dyzUser.getAppId()));
         addBannedRecord(Collections.singletonList(dyzUser.getUserId()),param);
+        redisService.setTimeOutStr("lock_"+dyzUser.getUserId(), dyzUser.getAppId(), 3000);
         //修改为解锁用户存入redis 24小时后进行解锁
         redisService.setTimeOutHoursStr("unlock_"+dyzUser.getUserId(),dyzUser.getAppId(), 24);
         throw new CustomerException(errMsg);

+ 1 - 1
yt-summary/summary-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-vitality/vitality-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc

+ 1 - 1
yt-walk/walk-service/src/main/resources/mapper/AdRecordMapper.xml

@@ -56,7 +56,7 @@
             record_id, user_id,app_id, nick_name, placement_id, ad_source_id, revenue, network_form_id, network_name, network_placement_id, finish_time, begin_time,result_json,ad_source_type,ad_source_index,ecpm
         from yt_dyz_ad_record
         where user_id = #{userId}
-          <if test="adsourceType != null">
+          <if test="adsourceType != null and adsourceType!=888">
               and ad_source_type = #{adsourceType}
           </if>
         order by finish_time desc