123
This commit is contained in:
33
ruoyi-cai/src/main/resources/mapper/cai/AnchorTopMapper.xml
Normal file
33
ruoyi-cai/src/main/resources/mapper/cai/AnchorTopMapper.xml
Normal 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>
|
||||
Reference in New Issue
Block a user