This commit is contained in:
777
2025-09-25 01:20:29 +08:00
parent 633b5fd187
commit afd018f79f
11 changed files with 77 additions and 14 deletions

View File

@@ -88,17 +88,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</if>
</select>
<select id="pageAppV2" 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
select t1.id as user_id,t1.avatar,t1.gender,t1.nickname,t1.usercode,t2.service_time,
<if test="query.type != null and query.type == 6">
<if test="query.cityId != null and query.cityId != ''">
if(t1.city_id = #{query.cityId},'0',t1.city_id) as city_desc,
</if>
</if>
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
where t1.status = 0 and t1.is_anchor = 1 and t2.index_display = 1 and t1.usercode > 100
<if test="query.cityId != null and query.cityId != ''">
and t1.city_id = #{query.cityId}
<if test="query.type != null and query.type == 3">
<if test="query.cityId != null and query.cityId != ''">
and t1.city_id = #{query.cityId}
</if>
</if>
<if test="query.cityId != null and query.cityId != ''">
and t1.city_id = #{query.cityId}
<if test="query.price != null and query.price != 0">
and t2.price = #{query.price}
</if>
<if test="query.onlineStatus != null">
and t3.status = #{query.onlineStatus}
@@ -122,6 +130,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.type == 3">
order by t2.top_show_rank desc
</if>
<if test="query.type == 4">
order by t2.service_time desc
</if>
<if test="query.type == 5">
order by t2.anchor_total_coin desc
</if>
<if test="query.type == 6">
<if test="query.cityId != null and query.cityId != ''">
order by city_desc
</if>
<if test="query.cityId == null or query.cityId == ''">
order by t2.top_show_rank desc
</if>
</if>
</if>
</select>
<select id="anchorStatus" resultType="com.ruoyi.cai.dto.app.vo.anchor.AnchorStatusDTO">
@@ -141,5 +163,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</select>
<update id="incsTotalIcon">
update cai_anchor
set anchor_total_coin = anchor_total_coin + #{amount}
where user_id = #{userId}
</update>
</mapper>