@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")
@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();
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")