BandingTaskMajorConditionMapper.xml 1.6 KB

123456789101112131415161718192021222324252627
  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.banding.mapper.BandingTaskMajorConditionMapper">
  6. <select id="getList" parameterType="com.xjrsoft.module.banding.dto.BandingTaskMajorConditionListDto"
  7. resultType="com.xjrsoft.module.banding.vo.BandingTaskMajorConditionListVo">
  8. SELECT t1.id, t.id AS major_set_id, t.name AS major_set_name,t1.banding_task_id,t1.height,t1.score, t1.sort_code FROM base_major_set t
  9. LEFT JOIN banding_task_major_condition t1 ON t1.major_set_id = t.id and t1.banding_task_id = #{dto.bandingTaskId} and t1.delete_mark = 0
  10. WHERE t.delete_mark = 0
  11. <if test="dto.majorIds != null and !dto.majorIds.isEmpty()">
  12. and t1.major_set_id in
  13. <foreach item="id" index="index" collection="dto.majorIds" open="(" close=")" separator=",">
  14. #{id}
  15. </foreach>
  16. </if>
  17. <if test="dto.majorSetName != null and dto.majorSetName != ''">
  18. and t1.name like concat('', #{dto.majorSetName},'')
  19. </if>
  20. </select>
  21. <select id="getStudentMajorId" parameterType="com.xjrsoft.module.banding.dto.BandingTaskClassPageDto" resultType="com.xjrsoft.module.student.entity.BaseNewStudent">
  22. SELECT t1.* FROM base_new_student t1
  23. INNER JOIN enrollment_plan t2 ON t1.enrollment_plan_id = t2.id
  24. WHERE t1.delete_mark = 0
  25. AND t2.enroll_type = #{dto.enrollType} and t2.grade_id = #{dto.gradeId}
  26. </select>
  27. </mapper>