Browse Source

Merge remote-tracking branch 'origin/master'

main
parent
commit
7bc6248b8c
  1. 2
      src/main/java/com/biutag/supervision/mapper/ModelClassMapper.java
  2. 4
      src/main/java/com/biutag/supervision/mapper/RiskScoreRuleMapper.java
  3. 5
      src/main/java/com/biutag/supervision/pojo/entity/ModelClass.java

2
src/main/java/com/biutag/supervision/mapper/ModelClassMapper.java

@ -9,7 +9,7 @@ import java.util.List;
public interface ModelClassMapper extends BaseMapper<ModelClass> {
@Select("select mc.id, mc.name, mc.sort, count(m.id) size from model_class mc left join model m on mc.id = m.class_id GROUP BY mc.id, mc.name, mc.sort order by sort")
@Select("select mc.id, mc.name, mc.sort, count(m.id) size from model_class mc left join model m on mc.id = m.class_id where status = 1 GROUP BY mc.id, mc.name, mc.sort order by sort")
List<ModelClassModel> selectListAll();
}

4
src/main/java/com/biutag/supervision/mapper/RiskScoreRuleMapper.java

@ -9,10 +9,10 @@ import java.util.List;
public interface RiskScoreRuleMapper extends BaseMapper<RiskScoreRule> {
@Select("select mc.id, mc.pid, mc.risk_name NAME, mc.sort_id, count(mc2.id) size from risk_score_rule mc left join model m on mc.id = m.risk_score_rule_id LEFT JOIN risk_score_rule mc2 on mc.id = mc2.pid where mc.pid = 0 GROUP BY mc.id, mc.risk_name, mc.sort_id order by sort_id")
@Select("select mc.id, mc.pid, mc.risk_name NAME, mc.sort_id, count(mc2.id) size from risk_score_rule mc left join model m on mc.id = m.risk_score_rule_id LEFT JOIN risk_score_rule mc2 on mc.id = mc2.pid where mc.pid = 0 and mc2.status = 1 GROUP BY mc.id, mc.risk_name, mc.sort_id order by sort_id")
List<RiskClassModel> selectListRoot();
@Select("select mc.id, mc.pid, mc.risk_name NAME, mc.sort_id, count(m.risk_score_rule_id) size from risk_score_rule mc left join model m on mc.id = m.risk_score_rule_id GROUP BY mc.id, mc.risk_name, mc.sort_id order by sort_id")
@Select("select mc.id, mc.pid, mc.risk_name NAME, mc.sort_id, count(m.risk_score_rule_id) size from risk_score_rule mc left join model m on mc.id = m.risk_score_rule_id where mc.status = 1 GROUP BY mc.id, mc.risk_name, mc.sort_id order by sort_id")
List<RiskClassModel> selectListAll();
}

5
src/main/java/com/biutag/supervision/pojo/entity/ModelClass.java

@ -6,8 +6,6 @@ import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.Setter;
import java.time.LocalDateTime;
@Setter
@Getter
public class ModelClass {
@ -24,4 +22,7 @@ public class ModelClass {
@TableField("sort")
private Integer sort;
@TableField("status")
private Integer status;
}
Loading…
Cancel
Save