BaseStudentScholarshipApplicantMapper.xml 1.5 KB

1234567891011121314151617181920212223242526
  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.BaseStudentScholarshipApplicantMapper">
  6. <select id="getScholarshiPage" parameterType="com.xjrsoft.module.student.dto.BaseStudentScholarshipApplicantPageDto" resultType="com.xjrsoft.module.student.vo.BaseStudentScholarshipApplicantCategoryPageVo">
  7. SELECT t.id, t.name,(
  8. SELECT SUM(t2.amount) FROM base_student_scholarship_applicant t1
  9. INNER JOIN base_student_scholarship_level t2 ON t1.scholarship_level = t2.level
  10. WHERE t1.base_student_scholarship_category_id = t.id
  11. AND t1.release_status = 0
  12. ) AS report_amount,
  13. (
  14. SELECT SUM(t2.amount) FROM base_student_scholarship_applicant t1
  15. INNER JOIN base_student_scholarship_level t2 ON t1.scholarship_level = t2.level
  16. WHERE t1.base_student_scholarship_category_id = t.id
  17. AND t1.release_status = 1
  18. ) AS grant_amount,(
  19. SELECT COUNT(*) FROM base_student_scholarship_applicant
  20. WHERE base_student_scholarship_category_id = t.id
  21. ) AS applicant_user_count FROM base_student_scholarship_category t
  22. WHERE delete_mark = 0
  23. </select>
  24. </mapper>