123
This commit is contained in:
@@ -50,7 +50,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
<if test="query.type != null">
|
||||
<if test="query.type == 0">
|
||||
order by t2.recommend_status desc
|
||||
order by t2.recommend_status desc,t2.update_time desc
|
||||
</if>
|
||||
<if test="query.type == 1">
|
||||
order by t3.last_live_time desc,t2.recommend_status desc
|
||||
@@ -59,7 +59,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
order by t1.create_time desc, t2.recommend_status desc
|
||||
</if>
|
||||
</if>
|
||||
order by t2.update_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
@@ -3,11 +3,16 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.cai.mapper.AnchorTopMapper">
|
||||
|
||||
<!--// 1-生效 2-过期 3-待生效-->
|
||||
<select id="pageAdmin" resultType="com.ruoyi.cai.dto.admin.vo.AnchorTopAdminVo">
|
||||
select t1.*,
|
||||
t3.usercode,t3.nickname,t3.mobile,t3.avatar,t3.gender,t3.age,t3.status,
|
||||
t4.status as online_status
|
||||
t4.status as online_status,
|
||||
<![CDATA[
|
||||
case when t1.begin_time > now() then 3
|
||||
when t1.end_time < now() then 2
|
||||
else 1 end as top_status
|
||||
]]>
|
||||
from cai_anchor_top t1
|
||||
left join cai_anchor t2 on t1.user_id = t2.user_id
|
||||
left join cai_user t3 on t1.user_id = t3.id
|
||||
@@ -25,9 +30,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="bo.onlineStatus != null">
|
||||
and t4.status = #{bo.onlineStatus}
|
||||
</if>
|
||||
<if test="bo.topStatus != null">
|
||||
<if test="bo.topStatus == 1">
|
||||
<![CDATA[
|
||||
and t1.begin_time <= now() and t1.end_time >= now()
|
||||
]]>
|
||||
</if>
|
||||
<if test="bo.topStatus == 2">
|
||||
<![CDATA[
|
||||
and t1.end_time < now()
|
||||
]]>
|
||||
</if>
|
||||
<if test="bo.topStatus == 3">
|
||||
<![CDATA[
|
||||
and t1.begin_time > now()
|
||||
]]>
|
||||
</if>
|
||||
</if>
|
||||
</where>
|
||||
order by t1.sort_by desc
|
||||
</select>
|
||||
<select id="anchorTop" resultType="com.ruoyi.cai.dto.app.vo.AnchorListVo">
|
||||
select
|
||||
t1.id as user_id,t1.avatar,t1.gender,t1.city,t1.nickname,t1.usercode,
|
||||
t1.city_id,t1.city,
|
||||
t2.give_score,t2.price,t3.status as online
|
||||
from cai_user t1
|
||||
join cai_anchor t2 on t1.id = t2.user_id
|
||||
join cai_user_online t3 on t1.id = t3.user_id
|
||||
join cai_anchor_top t4 on t1.id = t4.user_id
|
||||
where t1.status = 0 and t1.is_anchor = 1 and t2.index_display = 1 and t1.usercode > 100
|
||||
and t3.status = 1
|
||||
<![CDATA[
|
||||
and t4.begin_time <= now() and t4.end_time >= now()
|
||||
]]>
|
||||
order by t4.sort_by desc
|
||||
limit #{limit}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user