SubjectDictMapper.xml
1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<?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.meishu.mapper.SubjectDictMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.meishu.model.SubjectDictDO">
<id column="id" property="id" />
<result column="create_date" property="createDate" />
<result column="update_date" property="updateDate" />
<result column="school" property="school" />
<result column="grade" property="grade" />
<result column="classes" property="classes" />
<result column="class_name" property="className" />
<result column="subject" property="subject" />
<result column="subject_en" property="subjectEn" />
<result column="subject_type" property="subjectType" />
<result column="session" property="session" />
<result column="semester" property="semester" />
<result column="status" property="status" />
<result column="cover_page_url" property="coverPageUrl" />
<result column="front_page_url" property="frontPageUrl" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
create_date,
update_date,
id, school, grade, classes, class_name, subject, subject_en, subject_type, session, semester, status, cover_page_url, front_page_url
</sql>
<select id="getClassSubjectName" resultType="string">
SELECT
t.`subject`
FROM
subject_dict t
WHERE
t.delete_date IS NULL
AND t.grade = #{grade}
AND t.classes = #{classes}
AND t.`session` = #{session}
</select>
</mapper>