diff --git a/cash-service/market-service/src/main/resources/mapper/MkDistributionUserMapper.xml b/cash-service/market-service/src/main/resources/mapper/MkDistributionUserMapper.xml index ae4565528..62ec684cf 100644 --- a/cash-service/market-service/src/main/resources/mapper/MkDistributionUserMapper.xml +++ b/cash-service/market-service/src/main/resources/mapper/MkDistributionUserMapper.xml @@ -44,8 +44,8 @@ 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 = #{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' + LEFT JOIN tb_order_info ord ON shop.id = ord.shop_id AND ord.user_id = #{userId} AND ord.STATUS = 'done' + where du.id IS NULL GROUP BY shop.id