This commit is contained in:
dute7liang
2023-12-31 16:09:56 +08:00
parent d1a59f2d4a
commit 0c1fc3cada
230 changed files with 662 additions and 580 deletions

View File

@@ -0,0 +1,46 @@
<?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.UserMapper">
<select id="pageAdmin" resultType="com.ruoyi.cai.dto.admin.vo.UserAdminVo">
select t1.*,t2.last_login_ip,t2.last_login_time,t2.reg_ip,t2.reg_time
from cai_user t1
left join cai_user_info t2 on t1.id = t2.user_id
<where>
<if test="query.isAnchor != null">
and t1.is_anchor = #{query.isAnchor}
</if>
<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 like concat('%',#{query.usercode},'%')
</if>
<if test="query.gender != null">
and t1.gender = #{query.gender}
</if>
<if test="query.city != null">
and t1.city = #{query.city}
</if>
</where>
</select>
<select id="pageApp" 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.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>