This commit is contained in:
wangw 2025-10-27 21:26:24 +08:00
parent 9881299f64
commit 618374564e
2 changed files with 6 additions and 6 deletions

View File

@ -18,11 +18,11 @@ public interface MkDistributionUserMapper extends BaseMapper<MkDistributionUser>
/**
* 查询我的分销店铺列表 已开通
*/
List<DistributionCenterShopVO> selectMyDistributionShops(Long shopUserId);
List<DistributionCenterShopVO> selectMyDistributionShops(Long userId);
/**
* 查询我的分销店铺列表 未开通
*/
List<DistributionCenterShopVO> selectUnDistributionShops(Long shopUserId);
List<DistributionCenterShopVO> selectUnDistributionShops(Long userId);
boolean updateIncome(BigDecimal pendingIncome, BigDecimal receivedIncome, BigDecimal withdrawIncome, Long id);
}

View File

@ -20,7 +20,7 @@
user.total_income as income
from mk_distribution_user user
left join tb_shop_info shop on user.shop_id = shop.id
where user.shop_user_id = #{shopUserId}
where user.user_id = #{userId}
and user.status = 1
and user.is_del = 0
</select>
@ -36,9 +36,9 @@
CASE WHEN COUNT(shu.id) > 0 THEN 1 ELSE 0 END AS shopUser
FROM tb_shop_info shop
inner JOIN mk_distribution_config config ON shop.id = config.shop_id
LEFT JOIN mk_distribution_user du ON shop.id = du.shop_id AND du.user_id = #{user_id} AND du.is_del = 0
LEFT JOIN tb_shop_user shu ON shop.id IN (shu.main_shop_id, shu.source_shop_id) AND shu.user_id = #{user_id}
LEFT JOIN tb_order_info ord ON shop.id = ord.shop_id AND ord.user_id = #{user_id}
LEFT JOIN mk_distribution_user du ON shop.id = du.shop_id AND du.user_id = #{userId} AND du.is_del = 0
LEFT JOIN tb_shop_user shu ON shop.id IN (shu.main_shop_id, shu.source_shop_id) AND shu.user_id = #{userId}
LEFT JOIN tb_order_info ord ON shop.id = ord.shop_id AND ord.user_id = #{userId}
AND ord.STATUS = 'done'
GROUP BY shop.id