|
@@ -13,6 +13,9 @@
|
|
|
<result column="subject_name_" property="subjectName" />
|
|
|
<result column="mp3_url_" property="mp3Url" />
|
|
|
<result column="xml_url_" property="xmlUrl" />
|
|
|
+ <result column="name_" property="examSongName" />
|
|
|
+ <result column="type_" property="type" />
|
|
|
+ <result column="url_" property="url" />
|
|
|
<result column="del_flag_" property="delFlag" />
|
|
|
<result column="speed_" property="speed" />
|
|
|
<result column="create_time_" property="createTime" />
|
|
@@ -77,19 +80,19 @@
|
|
|
<foreach collection="sysExamSongAccompaniment" item="item" separator=";">
|
|
|
UPDATE sys_exam_song_accompaniment
|
|
|
<set>
|
|
|
- <if test="speed != null">
|
|
|
+ <if test="item.speed != null">
|
|
|
speed_ = #{item.speed},
|
|
|
</if>
|
|
|
- <if test="subjectId != null">
|
|
|
+ <if test="item.subjectId != null">
|
|
|
subject_id_ = #{item.subjectId},
|
|
|
</if>
|
|
|
- <if test="xmlUrl != null">
|
|
|
+ <if test="item.xmlUrl != null">
|
|
|
xml_url_ = #{item.xmlUrl},
|
|
|
</if>
|
|
|
- <if test="examSongId != null">
|
|
|
+ <if test="item.examSongId != null">
|
|
|
exam_song_id_ = #{item.examSongId},
|
|
|
</if>
|
|
|
- <if test="mp3Url != null">
|
|
|
+ <if test="item.mp3Url != null">
|
|
|
mp3_url_ = #{item.mp3Url},
|
|
|
</if>
|
|
|
update_time_ = NOW()
|
|
@@ -98,7 +101,7 @@
|
|
|
</update>
|
|
|
<update id="batchDel">
|
|
|
UPDATE sys_exam_song_accompaniment SET del_flag_ = 1,update_time_ = NOW() WHERE id_ IN
|
|
|
- <foreach collection="sysExamSongAccompaniment" item="item" open="(" close=")" separator=",">
|
|
|
+ <foreach collection="delExamSongAccompanimentIds" item="item" open="(" close=")" separator=",">
|
|
|
#{item}
|
|
|
</foreach>
|
|
|
|
|
@@ -142,4 +145,47 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
+ <select id="queryAccPage" resultMap="SysExamSongAccompaniment">
|
|
|
+ SELECT sesa.*,ses.name_,ses.type_,ses.url_ FROM sys_exam_song_accompaniment sesa
|
|
|
+ LEFT JOIN sys_exam_song ses ON ses.id_ = sesa.exam_song_id_
|
|
|
+ <include refid="queryPageSql"/>
|
|
|
+ <include refid="global.limit"/>
|
|
|
+ </select>
|
|
|
+ <select id="findAccCount" resultType="java.lang.Integer">
|
|
|
+ SELECT COUNT(DISTINCT sesa.id_) FROM sys_exam_song_accompaniment sesa
|
|
|
+ LEFT JOIN sys_exam_song ses ON ses.id_ = sesa.exam_song_id_
|
|
|
+ <include refid="queryPageSql"/>
|
|
|
+ </select>
|
|
|
+ <sql id="queryPageSql">
|
|
|
+ <where>
|
|
|
+ sesa.del_flag_ = 0
|
|
|
+ <if test="search != null and search != ''">
|
|
|
+ AND (sesa.id_ = #{search} OR ses.name_ LIKE CONCAT('%',#{search},'%'))
|
|
|
+ </if>
|
|
|
+ <if test="subjectId != null">
|
|
|
+ AND sesa.subject_id_ = #{subjectId}
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type == 'COMMON'">
|
|
|
+ AND ses.type_ = #{type}
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type == 'ALL'">
|
|
|
+ <if test="createUserId != null">
|
|
|
+ AND (ses.type_ = 'COMMON' OR (ses.create_user_id_ = #{createUserId} AND ses.type_ = 'PERSON'))
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="type != null and type == 'PERSON'">
|
|
|
+ <if test="createUserId != null">
|
|
|
+ AND ses.type_ = #{type} AND ses.create_user_id_ = #{createUserId}
|
|
|
+ </if>
|
|
|
+ <if test="createUserId == null">
|
|
|
+ AND ses.type_ = #{type}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ <if test="type == null or type == ''">
|
|
|
+ <if test="createUserId != null">
|
|
|
+ AND ses.create_user_id_ = #{createUserId}
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </sql>
|
|
|
</mapper>
|