This commit is contained in:
dute7liang
2024-01-02 02:01:53 +08:00
parent 59341aa956
commit 3569bad84e
7 changed files with 106 additions and 5 deletions

View File

@@ -22,6 +22,34 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
join cai_user t2 on t1.user_id = t2.id
where t1.user_id = #{userId}
</select>
<select id="pageAdmin" resultType="com.ruoyi.cai.dto.admin.vo.UserInviteAdminVo">
select t1.*,
t2.usercode,t2.mobile,
t3.usercode as invite_usercode,t3.mobile as invite_mobile,t3.is_union as invite_is_union,
t5.name as union_name
from cai_user_invite t1
left join cai_user t2 on t1.user_id = t2.id
left join cai_user t3 on t1.invite_id = t3.id
left join cai_union_user t4 on t1.user_id = t4.user_id
left join cai_union t5 on t4.union_id = t5.id
<where>
<if test="bo.mobile != null and bo.mobile != ''">
and t2.mobile = #{bo.mobile}
</if>
<if test="bo.usercode != null and bo.usercode != ''">
and t2.usercode = #{bo.usercode}
</if>
<if test="bo.inviteMobile != null and bo.inviteMobile != ''">
and t3.mobile = #{bo.inviteMobile}
</if>
<if test="bo.inviteUsercode != null and bo.inviteUsercode != ''">
and t3.usercode = #{bo.inviteUsercode}
</if>
<if test="bo.unionName != null and bo.unionName != ''">
and t5.name like concat('%',#{bo.unionName},'%')
</if>
</where>
</select>
</mapper>