修改创客升级逻辑

This commit is contained in:
韩鹏辉 2023-07-31 15:30:04 +08:00
parent 90ab73da23
commit 83c984dcfd
1 changed files with 10 additions and 2 deletions

View File

@ -708,7 +708,6 @@
</update>
<select id="selectByUserId" resultType="com.chaozhanggui.dao.system.model.TaskOrderSum">
SELECT
d.user_id AS userId,
IFNULL( sum( b.consumeFee ), 0 ) AS consumeFee
@ -719,8 +718,17 @@
FROM
tb_pluss_user_promotion p
WHERE
p.parent_user_id IN ( SELECT user_id FROM tb_pluss_user_promotion WHERE (is_extend = 4 or is_extend=1))) d
p.parent_user_id IN (
SELECT
user_id
FROM
tb_pluss_user_promotion )
and (p.is_extend =4 or p.is_extend=1)
and p.type_code='MC'
) d
LEFT JOIN view_base_order b ON d.user_id = b.userId
left join tb_pluss_merchant_base_info i on d.user_id=i.userId
where i.merchantType=1
GROUP BY
d.user_id
</select>