第三次课程提交 声音系统的管理和提交1
This commit is contained in:
parent
bd01733db6
commit
aabcd49dfd
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -3,7 +3,34 @@
|
|||
|
||||
|
||||
<mapper namespace="com.atguigu.tingshu.album.mapper.TrackInfoMapper">
|
||||
|
||||
<select id="findUserTrackPage" resultType="com.atguigu.tingshu.vo.album.TrackListVo">
|
||||
select
|
||||
ti.id track_id,
|
||||
ti.track_title,
|
||||
ti.cover_url,
|
||||
ti.media_duration,
|
||||
ti.status,
|
||||
max(if(stat_type = '0701', stat_num, 0)) playStatNum,
|
||||
max(if(stat_type = '0702', stat_num, 0)) collectStatNum,
|
||||
max(if(stat_type = '0703', stat_num, 0)) praiseStatNum,
|
||||
max(if(stat_type = '0704', stat_num, 0)) commentStatNum
|
||||
from track_info ti inner join track_stat stat
|
||||
on stat.track_id = ti.id and stat.is_deleted = 0
|
||||
<where>
|
||||
<if test="vo.userId != null">
|
||||
and ti.user_id = #{vo.userId}
|
||||
</if>
|
||||
<if test="vo.status != null and vo.status != ''">
|
||||
and status = #{vo.status}
|
||||
</if>
|
||||
<if test="vo.trackTitle != null and vo.trackTitle != ''">
|
||||
and track_title like concat('%', #{vo.trackTitle}, '%')
|
||||
</if>
|
||||
and ti.is_deleted = 0
|
||||
</where>
|
||||
group by ti.id
|
||||
order by ti.id desc
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
|
|
Loading…
Reference in New Issue