This commit is contained in:
张良(004796)
2024-03-28 16:16:44 +08:00
parent 1a46596494
commit e955c21991
10 changed files with 281 additions and 0 deletions

View File

@@ -45,6 +45,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="query.cityId != null and query.cityId != ''">
and t1.city_id = #{query.cityId}
</if>
<if test="query.onlineStatus != null">
and t3.status = #{query.onlineStatus}
</if>
<if test="query.type != null">
<if test="query.type == 0">
order by t2.recommend_status desc

View File

@@ -0,0 +1,33 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.cai.mapper.AnchorTopMapper">
<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
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
left join cai_user_online t4 on t1.user_id = t4.user_id
<where>
<if test="bo.usercode != null and bo.usercode != ''">
and t3.usercode = #{bo.usercode}
</if>
<if test="bo.nickname != null and bo.nickname != ''">
and t3.nickname = #{bo.nickname}
</if>
<if test="bo.mobile != null and bo.mobile != ''">
and t3.mobile = #{bo.mobile}
</if>
<if test="bo.onlineStatus != null">
and t4.status = #{bo.onlineStatus}
</if>
</where>
order by t1.sort_by desc
</select>
</mapper>