init
This commit is contained in:
@@ -9,6 +9,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
set income_coin = income_coin - #{price}
|
||||
where income_coin - #{price} > 0 and user_id = #{userId}
|
||||
</update>
|
||||
<update id="incrIncome">
|
||||
update xq_user_extend
|
||||
set income_coin = income_coin + #{price}
|
||||
where income_coin + #{price} > 0 and user_id = #{userId}
|
||||
</update>
|
||||
<select id="pageAdmin" resultType="com.ruoyi.xq.dto.admin.user.UserExtendAdminVo">
|
||||
select t1.*, t2.nickname,t2.mobile,t2.avatar
|
||||
from xq_user_extend t1
|
||||
|
||||
@@ -4,16 +4,36 @@ 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>
|
||||
<select id="pageAdmin" resultType="com.ruoyi.xq.dto.admin.user.UserInviteAdminVo">
|
||||
select
|
||||
t1.*,
|
||||
t2.nickname, t2.mobile, t2.avatar,
|
||||
t3.nickname as invite_nickname, t3.mobile as invite_mobile, t3.avatar as invite_avatar
|
||||
from xq_user_invite t1
|
||||
left join xq_user t2 on t1.user_id = t2.id
|
||||
left join xq_user t3 on t1.invite_id = t3.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 t2.nickname like concat('%',#{bo.nickname},'%')
|
||||
</if>
|
||||
<if test="bo.mobile != null and bo.mobile != ''">
|
||||
and t2.mobile = #{bo.mobile}
|
||||
</if>
|
||||
<if test="bo.inviteCode != null and bo.inviteCode != ''">
|
||||
and t1.usercode = #{bo.inviteCode}
|
||||
</if>
|
||||
<if test="bo.inviteNickname != null and bo.inviteNickname != ''">
|
||||
and t3.nickname like concat('%',#{bo.inviteNickname},'%')
|
||||
</if>
|
||||
<if test="bo.inviteMobile != null and bo.inviteMobile != ''">
|
||||
and t3.mobile = #{bo.inviteMobile}
|
||||
</if>
|
||||
</where>
|
||||
order by t1.create_time
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user