|
@@ -200,8 +200,14 @@
|
|
|
<if test="param.state != null">
|
|
|
and t.state_ = #{param.state}
|
|
|
</if>
|
|
|
- <if test="param.auditStatus != null">
|
|
|
- and t.audit_status_ = #{param.auditStatus}
|
|
|
+ <if test="param.authStatus != null">
|
|
|
+ and msar.audit_state_ = #{param.authStatus}
|
|
|
+ <if test="param.authStatus == 'PASS'">
|
|
|
+ AND t.state_ = 1
|
|
|
+ </if>
|
|
|
+ <if test="param.authStatus == 'OUT_SALE'">
|
|
|
+ AND t.state_ = 0
|
|
|
+ </if>
|
|
|
</if>
|
|
|
<if test="param.createBy != null">
|
|
|
and t.create_by_ = #{param.createBy}
|
|
@@ -412,14 +418,24 @@
|
|
|
,su.avatar_ as addUserAvatar
|
|
|
from music_sheet t
|
|
|
left join sys_user su on t.create_by_ = su.id_
|
|
|
+ <if test="param.authStatus != null">
|
|
|
+ left join music_sheet_auth_record msar ON msar.music_sheet_id_ = t.id_
|
|
|
+ and msar.audit_state_ = #{param.authStatus}
|
|
|
+ <if test="param.authStatus == 'PASS'">
|
|
|
+ AND ms.state_ = 1
|
|
|
+ </if>
|
|
|
+ <if test="param.authStatus == 'OUT_SALE'">
|
|
|
+ AND ms.state_ = 0
|
|
|
+ </if>
|
|
|
+ </if>
|
|
|
<where>
|
|
|
<include refid="QueryInfo"/>
|
|
|
<if test="param.auditVersion != null ">
|
|
|
and #{param.auditVersion} = t.audit_version_
|
|
|
</if>
|
|
|
-
|
|
|
</where>
|
|
|
order by
|
|
|
+
|
|
|
<choose>
|
|
|
<when test="param.musicSortType != null and param.musicSortType.code == 'TOP'">
|
|
|
t.top_flag_ desc, t.sort_number_ desc,
|
|
@@ -436,7 +452,6 @@
|
|
|
</if>
|
|
|
</otherwise>
|
|
|
</choose>
|
|
|
-
|
|
|
t.id_ desc
|
|
|
</select>
|
|
|
|