init
This commit is contained in:
@@ -29,6 +29,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from cai_anchor t1
|
||||
left join cai_user t2 on t1.user_id = t2.id
|
||||
</select>
|
||||
<select id="pageApp" resultType="com.ruoyi.cai.dto.app.vo.AnchorListVo">
|
||||
select t1.avatar,t1.gender,t1.city,t1.nickname,t1.usercode,t2.give_score
|
||||
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
|
||||
<if test="query.city != null and query.city != ''">
|
||||
and t1.city = #{query.city}
|
||||
</if>
|
||||
<if test="query.type != null">
|
||||
<if test="query.type == 1">
|
||||
order by t3.last_live_time desc
|
||||
</if>
|
||||
<if test="query.type == 1">
|
||||
order by t1.create_time desc
|
||||
</if>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -47,6 +47,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
from cai_user t1
|
||||
left join cai_user_info t2 on t1.id = t2.user_id
|
||||
</select>
|
||||
<select id="pageApp" resultType="com.ruoyi.cai.dto.app.vo.UserListVo">
|
||||
select t1.avatar,t1.gender,t1.city,t1.nickname,t1.usercode,t1.age,t2.last_live_time
|
||||
from cai_user t1
|
||||
join cai_user_online t2 on t1.id = t2.user_id
|
||||
where t1.status = 0
|
||||
<if test="query.nickname != null and query.nickname != ''">
|
||||
and t1.nickname like concat('%',#{query.nickname},'%')
|
||||
</if>
|
||||
<if test="query.usercode != null and query.usercode != ''">
|
||||
and t1.usercode = #{query.usercode}
|
||||
</if>
|
||||
<if test="query.gender != null">
|
||||
and t1.gender = #{query.gender}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
<?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.CaiUserOnlineMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.cai.domain.CaiUserOnline" id="CaiUserOnlineResult">
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="receiveTime" column="receive_time"/>
|
||||
<result property="lastLiveTime" column="last_live_time"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user