未开通 已开通
This commit is contained in:
parent
848d23148f
commit
9794dbaa05
|
|
@ -19,15 +19,15 @@
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectMyDistributionShops" resultType="com.czg.market.vo.DistributionCenterShopVO">
|
<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.cover_img as coverImg,
|
||||||
shop.shop_name as shopName,
|
shop.shop_name as shopName,
|
||||||
shop.address as shopAddress,
|
shop.address as shopAddress,
|
||||||
user.total_income as income
|
user.total_income as income
|
||||||
from mk_distribution_user user
|
from mk_distribution_user user
|
||||||
left join tb_shop_info shop on user.shop_id = shop.id
|
left join tb_shop_info shop on user.shop_id = shop.id
|
||||||
where user.user_id = #{userId}
|
where user.user_id = #{userId}
|
||||||
and user.status = 1
|
and user.status > 0
|
||||||
and user.is_del = 0
|
and user.is_del = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="selectUnDistributionShops" resultType="com.czg.market.vo.DistributionCenterShopVO">
|
<select id="selectUnDistributionShops" resultType="com.czg.market.vo.DistributionCenterShopVO">
|
||||||
|
|
@ -43,9 +43,12 @@
|
||||||
FROM tb_shop_info shop
|
FROM tb_shop_info shop
|
||||||
inner JOIN mk_distribution_config config ON shop.id = config.shop_id
|
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 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_shop_user shu
|
||||||
LEFT JOIN tb_order_info ord ON shop.id = ord.shop_id AND ord.user_id = #{userId} AND ord.STATUS = 'done'
|
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
|
where du.id IS NULL
|
||||||
|
OR du.status = 0
|
||||||
GROUP BY shop.id
|
GROUP BY shop.id
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue