Explorar o código

增加all_satisfy 风控条件满足范围

marxjaw hai 4 meses
pai
achega
e6e630b6db

+ 2 - 0
yt-common/src/main/java/com/ytpm/risk/model/YtRiskTemplate.java

@@ -23,4 +23,6 @@ public class YtRiskTemplate {
     private Date updateTime;
     private Date updateTime;
     private String updateUserId;
     private String updateUserId;
     private Integer enabled;
     private Integer enabled;
+    private Integer canModify;
+    private Integer allSatisfy;
 }
 }

+ 2 - 0
yt-common/src/main/java/com/ytpm/risk/param/RiskConfigParam.java

@@ -34,4 +34,6 @@ public class RiskConfigParam extends BaseParam {
     private String operator;
     private String operator;
     @ApiModelProperty(value = "操作人名称")
     @ApiModelProperty(value = "操作人名称")
     private String operatorName;
     private String operatorName;
+    @ApiModelProperty(value = "是否满足所有 1-全部 2-任意一条即可")
+    private Integer allSatisfy;
 }
 }

+ 4 - 0
yt-common/src/main/java/com/ytpm/risk/view/RiskConfigListView.java

@@ -42,4 +42,8 @@ public class RiskConfigListView extends PageMeta {
     private String appNames;
     private String appNames;
     @ApiModelProperty("修改者")
     @ApiModelProperty("修改者")
     private String updateNickName;
     private String updateNickName;
+    @ApiModelProperty("允许修改")
+    private Integer canModify;
+    @ApiModelProperty("条件范围")
+    private Integer allSatisfy;
 }
 }

+ 2 - 0
yt-common/src/main/java/com/ytpm/risk/view/RiskTemplateView.java

@@ -36,6 +36,8 @@ public class RiskTemplateView {
     private String updateUserId;
     private String updateUserId;
     @ApiModelProperty("是否启用")
     @ApiModelProperty("是否启用")
     private Integer enabled;
     private Integer enabled;
+    @ApiModelProperty("是否启用")
+    private Integer allSatisfy;
     @ApiModelProperty("配置项列表")
     @ApiModelProperty("配置项列表")
     private List<RiskConfigView> configList;
     private List<RiskConfigView> configList;
 }
 }

+ 3 - 0
yt-risk/risk-manage/src/main/java/com/ytpm/service/impl/RiskServiceImpl.java

@@ -407,7 +407,10 @@ public class RiskServiceImpl extends ReflectUtil implements RiskService {
     @Override
     @Override
     public Result<?> checkRisk(YtDyzUser dyzUser) {
     public Result<?> checkRisk(YtDyzUser dyzUser) {
         RiskTemplateView view = configMapper.getByCode(dyzUser.getRiskCode());
         RiskTemplateView view = configMapper.getByCode(dyzUser.getRiskCode());
+        //校验默认的风控配置
         checkDefaultRiskConfig(dyzUser, view.getConfigList());
         checkDefaultRiskConfig(dyzUser, view.getConfigList());
+        //查询用户所在app是否配置其他风控规则
+
         return Result.resultOk(RepMessage.QUERY_SUCCESS);
         return Result.resultOk(RepMessage.QUERY_SUCCESS);
     }
     }
 
 

+ 6 - 0
yt-risk/risk-manage/src/main/resources/mapper/RiskConfigMapper.xml

@@ -34,6 +34,7 @@
              template_content,
              template_content,
              template_code,
              template_code,
              channel_id,
              channel_id,
+             all_satisfy,
              app_id,
              app_id,
              create_time,
              create_time,
              create_user_id,
              create_user_id,
@@ -46,6 +47,7 @@
                 #{templateContent},
                 #{templateContent},
                 #{templateCode},
                 #{templateCode},
                 #{channelId},
                 #{channelId},
+                #{allSatisfy},
                 #{appId},
                 #{appId},
                 #{createTime},
                 #{createTime},
                 #{createUserId},
                 #{createUserId},
@@ -116,6 +118,8 @@
             t.template_content,
             t.template_content,
             u.nick_name as nickName,
             u.nick_name as nickName,
             t.enabled,
             t.enabled,
+            t.all_satisfy,
+            t.can_modify,
             t.update_time,
             t.update_time,
             u_update.nick_name as updateNickName
             u_update.nick_name as updateNickName
         FROM
         FROM
@@ -139,6 +143,7 @@
         <result column="template_name" property="templateName" />
         <result column="template_name" property="templateName" />
         <result column="template_content" property="templateContent" />
         <result column="template_content" property="templateContent" />
         <result column="enabled" property="enabled" />
         <result column="enabled" property="enabled" />
+        <result column="all_satisfy" property="allSatisfy" />
         <collection property="configList" ofType="com.ytpm.risk.view.RiskConfigView">
         <collection property="configList" ofType="com.ytpm.risk.view.RiskConfigView">
             <id column="config_id" property="configId" />
             <id column="config_id" property="configId" />
             <result column="field_name" property="fieldName" />
             <result column="field_name" property="fieldName" />
@@ -155,6 +160,7 @@
             rt.template_name,
             rt.template_name,
             rt.template_content,
             rt.template_content,
             rt.enabled,
             rt.enabled,
+            rt.all_satisfy,
             rc.config_id,
             rc.config_id,
             rc.field_name,
             rc.field_name,
             rc.field_desc,
             rc.field_desc,