1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?xml version="1.0" encoding="UTF-8" ?>
- <!DOCTYPE mapper
- PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
- <mapper namespace="com.xjrsoft.module.student.mapper.ClassHonorsMapper">
- <select id="getPagePC" parameterType="com.xjrsoft.module.student.dto.ClassHonorsPageDto" resultType="com.xjrsoft.module.student.vo.ClassHonorsPageVo">
- SELECT
- t.id,
- t.sort_code,
- t1.name AS honorsLevelCN,
- t2.name AS honorsGradeCN,
- t.name,
- t.award_date
- FROM class_honors t
- LEFT JOIN xjr_dictionary_detail t1 ON t1.code = t.honors_level
- LEFT JOIN xjr_dictionary_detail t2 ON t2.code = t.honors_grade
- WHERE
- t.delete_mark = 0
- <if test="dto.honorsLevel != null and dto.honorsLevel != ''">
- and t.honors_level = #{dto.honorsLevel}
- </if>
- <if test="dto.honorsGrade != null and dto.honorsGrade != ''">
- and t.honors_grade = #{dto.honorsGrade}
- </if>
- <if test="dto.awardDate != null and dto.awardDate != ''">
- and t.award_date = #{dto.awardDate}
- </if>
- <if test="dto.name != null and dto.name != ''">
- and t.name like concat('%',#{dto.name},'%')
- </if>
- ORDER BY
- t.id DESC;
- </select>
- <select id="getInfoById"
- resultType="com.xjrsoft.module.student.vo.ClassHonorsVo">
- SELECT
- t.*,
- t1.name AS honorsLevelCN,
- t2.name AS honorsGradeCN,
- t3.name AS baseSemesterIdCN,
- t4.name AS classIdCN,
- FROM class_honors t
- LEFT JOIN xjr_dictionary_detail t1 ON t1.code = t.honors_level
- LEFT JOIN xjr_dictionary_detail t2 ON t2.code = t.honors_grade
- LEFT JOIN base_semester t3 ON t3.id = t.base_semester_id
- LEFT JOIN base_class t4 ON t4.id = t.class_id
- WHERE
- t.id = #{id} AND t.delete_mark = 0;
- </select>
- </mapper>
|