init
This commit is contained in:
17
ruoyi-cai/src/main/resources/mapper/cai/UserGreetMapper.xml
Normal file
17
ruoyi-cai/src/main/resources/mapper/cai/UserGreetMapper.xml
Normal file
@@ -0,0 +1,17 @@
|
||||
<?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.UserGreetMapper">
|
||||
|
||||
<resultMap type="com.ruoyi.cai.domain.UserGreet" id="UserGreetResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="title" column="title"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -40,6 +40,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="query.gender != null">
|
||||
and t1.gender = #{query.gender}
|
||||
</if>
|
||||
order by t2.last_live_time desc
|
||||
</select>
|
||||
<select id="greetPageApp" resultType="com.ruoyi.cai.dto.app.vo.user.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.city != null and query.city != ''">
|
||||
and t1.city = #{query.city}
|
||||
</if>
|
||||
order by t2.last_live_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user