未开通 已开通

This commit is contained in:
wangw 2025-10-29 16:15:42 +08:00
parent 848d23148f
commit 9794dbaa05
1 changed files with 9 additions and 6 deletions

View File

@ -19,15 +19,15 @@
</update>
<select id="selectMyDistributionShops" resultType="com.czg.market.vo.DistributionCenterShopVO">
select shop.id as shopId,
select shop.id as shopId,
shop.cover_img as coverImg,
shop.shop_name as shopName,
shop.address as shopAddress,
user.total_income as income
shop.address as shopAddress,
user.total_income as income
from mk_distribution_user user
left join tb_shop_info shop on user.shop_id = shop.id
where user.user_id = #{userId}
and user.status = 1
and user.status > 0
and user.is_del = 0
</select>
<select id="selectUnDistributionShops" resultType="com.czg.market.vo.DistributionCenterShopVO">
@ -43,9 +43,12 @@
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 = #{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_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'
where du.id IS NULL
OR du.status = 0
GROUP BY shop.id
</select>