邀请问题
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
and amount - #{money} >= 0
|
||||
</update>
|
||||
<update id="updateOneOrTwoAmount">
|
||||
update tb_shop_user_invite
|
||||
update tb_shop_user
|
||||
<set>
|
||||
<if test="isOne != null and isOne == 1">
|
||||
one_income = one_income + #{amount}
|
||||
@@ -27,8 +27,7 @@
|
||||
two_income = two_income + #{amount}
|
||||
</if>
|
||||
</set>
|
||||
where shop_user_id = #{shopUserId}
|
||||
and shop_id = #{shopId}
|
||||
where id = #{shopUserId}
|
||||
</update>
|
||||
|
||||
|
||||
@@ -257,10 +256,10 @@
|
||||
</select>
|
||||
<select id="getInviteUser" resultType="com.czg.market.vo.InviteUserVO">
|
||||
SELECT
|
||||
u.id AS shopUserId,
|
||||
u.head_img AS headImg,
|
||||
u.nick_name AS shopUserName,
|
||||
u.phone AS shopUserPhone,
|
||||
invite.id AS shopUserId,
|
||||
invite.head_img AS headImg,
|
||||
invite.nick_name AS shopUserName,
|
||||
invite.phone AS shopUserPhone,
|
||||
invite.one_income AS oneIncome,
|
||||
invite.invite_time AS inviteTime,
|
||||
dist.total_income AS totalIncome,
|
||||
@@ -270,13 +269,12 @@
|
||||
dist.status AS status,
|
||||
dist.distribution_level_id AS levelId,
|
||||
dist.distribution_level_name AS levelName,
|
||||
u.distribution_shops AS distributionShops
|
||||
FROM tb_shop_user_invite invite
|
||||
left join tb_shop_user u on invite.shop_user_id = u.id
|
||||
invite.distribution_shops AS distributionShops
|
||||
FROM tb_shop_user invite
|
||||
left join mk_distribution_user dist on u.id = dist.id and dist.shop_id = #{shopId}
|
||||
WHERE invite.`distribution_user_id` = #{distributionUserId} and invite.shop_id = #{shopId}
|
||||
WHERE invite.`parent_user_id` = #{distributionUserId}
|
||||
<if test="distributionLevelId != null">and dist.distribution_level_id = #{distributionLevelId}</if>
|
||||
<if test="shopUserId != null">and invite.shop_user_id = #{shopUserId}</if>
|
||||
<if test="shopUserId != null">and invite.id = #{shopUserId}</if>
|
||||
ORDER BY invite.`invite_time` DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user