QuotaFormulaRuleMapper.xml 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.xjrsoft.module.student.mapper.QuotaFormulaRuleMapper">
  6. <select id="getPage" parameterType="com.xjrsoft.module.student.dto.QuotaFormulaRulePageDto" resultType="com.xjrsoft.module.student.vo.QuotaFormulaRulePageVo">
  7. select t.id, t.name, t.formula
  8. from quota_formula_rule t
  9. where t.delete_mark = 0
  10. order by t.create_date
  11. </select>
  12. <select id="getQuota" parameterType="com.xjrsoft.module.student.dto.QuotaFormulaRulePageDto" resultType="com.xjrsoft.module.student.vo.QuotaFormulaRulePageVo">
  13. SELECT
  14. t.id,
  15. GROUP_CONCAT(t1.name SEPARATOR ',') AS bind_quota
  16. FROM
  17. quota_formula_rule t
  18. LEFT JOIN
  19. xjr_dictionary_detail t1
  20. ON
  21. t1.item_id = 1752246376061272065
  22. WHERE
  23. t.delete_mark = 0
  24. AND FIND_IN_SET(t1.code, t.bind_quota)
  25. GROUP BY
  26. t.id
  27. ORDER BY
  28. MAX(t.create_date);
  29. </select>
  30. </mapper>