|
@@ -21,6 +21,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="status" column="status"/>
|
|
|
<result property="encoder" column="encoder"/>
|
|
|
<result property="num" column="num"/>
|
|
|
+ <result property="categoryName" column="category_name"/>
|
|
|
+ <result property="majorId" column="major_id"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="queryList" parameterType="com.zhongzheng.modules.course.bo.MajorLabelQueryBo" resultMap="MajorLabelVoResult">
|
|
@@ -44,4 +46,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</if>
|
|
|
|
|
|
</select>
|
|
|
+
|
|
|
+ <select id="listMajor" parameterType="com.zhongzheng.modules.course.bo.MajorLabelQueryBo" resultMap="MajorLabelVoResult">
|
|
|
+ SELECT
|
|
|
+ l.*,
|
|
|
+ m.category_name,
|
|
|
+ m.id as major_id
|
|
|
+ FROM
|
|
|
+ major_label l
|
|
|
+ LEFT JOIN major m ON l.id = m.label_id
|
|
|
+ WHERE
|
|
|
+ 1 = 1
|
|
|
+ AND l.id =1
|
|
|
+ <if test="status != null and status.size()!=0 ">
|
|
|
+ AND l.status in
|
|
|
+ <foreach collection="status" item="item" index="index" open="(" close=")" separator=",">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ <if test="encoder != null and encoder != ''">
|
|
|
+ AND l.encoder = #{encoder}
|
|
|
+ </if>
|
|
|
+ <if test="labelName != null and labelName != ''">
|
|
|
+ AND l.label_name = #{labelName}
|
|
|
+ </if>
|
|
|
+ <if test="id != null and id != ''">
|
|
|
+ AND l.id = #{id}
|
|
|
+ </if>
|
|
|
+
|
|
|
+ </select>
|
|
|
</mapper>
|