109 lines
5.0 KiB
XML
109 lines
5.0 KiB
XML
<?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.xq.mapper.UserMapper">
|
|
<select id="pageAdmin" resultType="com.ruoyi.xq.dto.admin.user.UserAdminVo">
|
|
select t1.*, t2.id as invite_id, t2.nickname as invite_nickname, t2.usercode as invite_usercode,
|
|
t3.last_login_ip, t3.last_login_time,t3.reg_time
|
|
from xq_user t1
|
|
left join xq_user t2 on t1.invite_id = t2.id
|
|
left join xq_user_login t3 on t1.id = t3.user_id
|
|
<where>
|
|
<if test="bo.usercode != null and bo.usercode != ''">
|
|
and t1.usercode = #{bo.usercode}
|
|
</if>
|
|
<if test="bo.nickname != null and bo.nickname != ''">
|
|
and t1.nickname like concat('%',#{bo.nickname},'%')
|
|
</if>
|
|
<if test="bo.mobile != null and bo.mobile != ''">
|
|
and t1.mobile = #{bo.mobile}
|
|
</if>
|
|
</where>
|
|
order by t1.id desc
|
|
</select>
|
|
<select id="homePageApp" resultType="com.ruoyi.xq.dto.app.user.vo.HomeUserListVo">
|
|
select t1.id as user_id, t1.avatar, t1.gender, t1.nickname, t1.birthday, t1.residence_city_name,t1.open_vip,t1.vip_type,
|
|
t1.education, t1.profession, if(t2.card_num_auth = 1, 1, 0) as card_num_auth_bool,t4.show_avatar
|
|
from xq_user t1
|
|
join xq_user_auth t2 on t1.id = t2.user_id
|
|
join xq_user_info t3 on t1.id = t3.user_id
|
|
join xq_user_status t4 on t1.id = t4.user_id
|
|
where t1.type = 0 and t1.status = 0 and t1.finish_base_status = 1 and t4.personals_status = 1
|
|
<if test="params.usercode != null and params.usercode != ''">
|
|
and t1.usercode = #{params.usercode}
|
|
</if>
|
|
<if test="params.birthdayBegin != null">
|
|
and t1.birthday >= #{params.birthdayBegin}
|
|
</if>
|
|
<if test="params.birthdayEnd != null">
|
|
and t1.birthday <= #{params.birthdayEnd}
|
|
</if>
|
|
<if test="params.heightBegin != null">
|
|
and t1.height >= #{params.heightBegin}
|
|
</if>
|
|
<if test="params.heightEnd != null">
|
|
and t1.height <= #{params.heightEnd}
|
|
</if>
|
|
<if test="params.weightBegin != null">
|
|
and t1.weight >= #{params.weightBegin}
|
|
</if>
|
|
<if test="params.weightEnd != null">
|
|
and t1.weight <= #{params.weightEnd}
|
|
</if>
|
|
<if test="params.gender != null">
|
|
and t1.gender = #{params.gender}
|
|
</if>
|
|
<if test="params.marriage != null">
|
|
and t1.marriage = #{params.marriage}
|
|
</if>
|
|
<if test="params.education != null">
|
|
and t1.education = #{params.education}
|
|
</if>
|
|
<if test="params.residenceCityCode != null and params.residenceCityCode != ''">
|
|
and t1.residence_city_code = #{params.residenceCityCode}
|
|
</if>
|
|
<if test="params.vipQuery != null">
|
|
<if test="params.vipQuery.profession != null and params.vipQuery.profession != ''">
|
|
and t1.profession = #{params.vipQuery.profession}
|
|
</if>
|
|
<if test="params.vipQuery.annualIncome != null">
|
|
and t1.annual_income = #{params.vipQuery.annualIncome}
|
|
</if>
|
|
<if test="params.vipQuery.zodiac != null">
|
|
and t1.zodiac = #{params.vipQuery.zodiac}
|
|
</if>
|
|
<if test="params.vipQuery.sign != null">
|
|
and t1.sign = #{params.vipQuery.sign}
|
|
</if>
|
|
<if test="params.vipQuery.childStatus != null">
|
|
and t3.child_status = #{params.vipQuery.childStatus}
|
|
</if>
|
|
<if test="params.vipQuery.housingStatus != null">
|
|
and t3.housing_status = #{params.vipQuery.housingStatus}
|
|
</if>
|
|
<if test="params.vipQuery.carStatus != null">
|
|
and t3.car_status = #{params.vipQuery.carStatus}
|
|
</if>
|
|
<if test="params.vipQuery.addressCode != null">
|
|
and t1.address_code like concat(#{params.vipQuery.addressCode},'%')
|
|
</if>
|
|
</if>
|
|
</select>
|
|
<select id="vipHomePage" resultType="com.ruoyi.xq.dto.app.user.vo.HomeUserListVo">
|
|
select t1.id as user_id, t1.avatar, t1.gender, t1.nickname, t1.birthday, t1.residence_city_name,
|
|
t1.education, t1.profession, if(t2.card_num_auth = 1, 1, 0) as cardNumAuthBool
|
|
from xq_user t1
|
|
join xq_user_auth t2 on t1.id = t2.user_id
|
|
join xq_user_status t3 on t1.id = t3.user_id
|
|
join xq_user_login t4 on t1.id = t4.user_id
|
|
where t1.type = 0 and t1.status = 0 and t1.finish_base_status = 1 and t1.open_vip = 1 and t3.push_vip = 1
|
|
order by t4.last_login_time desc
|
|
</select>
|
|
<select id="getMinUserById" resultType="com.ruoyi.xq.dto.common.user.MinUser">
|
|
select t1.id,t1.usercode
|
|
from xq_user t1
|
|
where t1.id = #{userId}
|
|
</select>
|
|
</mapper>
|