This commit is contained in:
张良(004796)
2024-03-13 14:56:59 +08:00
parent 9559658dda
commit e79d7d8c5c
18 changed files with 494 additions and 41 deletions

View File

@@ -0,0 +1,19 @@
<?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.UserInviteMapper">
<resultMap type="com.ruoyi.xq.domain.UserInvite" id="UserInviteResult">
<result property="id" column="id"/>
<result property="userId" column="user_id"/>
<result property="usercode" column="usercode"/>
<result property="inviteId" column="invite_id"/>
<result property="inviteCode" column="invite_code"/>
<result property="cashbackTotal" column="cashback_total"/>
<result property="createTime" column="create_time"/>
<result property="updateTime" column="update_time"/>
</resultMap>
</mapper>

View File

@@ -3,6 +3,21 @@
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
from xq_user t1
left join xq_user t2 on t1.invite_id = t2.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>
</mapper>