用户信息为空的问题

This commit is contained in:
2025-12-19 14:29:27 +08:00
parent 8d7d408031
commit 1e322c5c8d
4 changed files with 13 additions and 21 deletions

View File

@@ -46,7 +46,7 @@
FROM
`gb_order_detail` detail
LEFT JOIN gb_order `order` on detail.group_order_no = `order`.group_order_no and `order`.shop_id = #{shopId}
left join tb_shop_user `user` on `user`.main_shop_id = #{mainShopId} and `user`.user_id = detail.user_id
left join tb_user_info `user` on `user`.id = detail.user_id
LEFT JOIN tb_shop_info shop on detail.shop_id = shop.id
WHERE
detail.shop_id = #{shopId}
@@ -92,7 +92,7 @@
FROM
`gb_order_detail` detail
LEFT JOIN gb_order `order` on detail.group_order_no = `order`.group_order_no and `order`.shop_id = #{shopId}
left join tb_shop_user `user` on `user`.main_shop_id = #{mainShopId} and `user`.user_id = detail.user_id
left join tb_user_info `user` on `user`.id = detail.user_id
LEFT JOIN tb_shop_info shop on detail.shop_id = shop.id
WHERE
detail.shop_id = #{shopId} and detail.id=#{detailId} and detail.is_del = 0
@@ -108,7 +108,7 @@
FROM
gb_order `order`
LEFT JOIN gb_order_detail detail on detail.group_order_no = `order`.group_order_no and `detail`.shop_id = #{shopId} and `detail`.user_id = #{userId} and `detail`.is_del = 0
LEFT JOIN tb_shop_user `user` on `user`.main_shop_id = #{mainShopId} and `user`.user_id = detail.user_id
LEFT JOIN tb_user_info `user` on `user`.id = detail.user_id
LEFT JOIN tb_shop_info shop on `order`.shop_id = shop.id
WHERE
`order`.group_order_no = #{groupOrderNo}
@@ -117,8 +117,7 @@
<select id="getGbOrderDetailUsers" resultType="com.czg.order.vo.GbOrderUserVO">
select `user`.nick_name as userName, `user`.phone as userPhone, `user`.head_img as userAvatar
from gb_order_detail detail
left join tb_shop_user `user`
on `user`.main_shop_id = #{mainShopId} and `user`.user_id = detail.user_id
left join tb_user_info `user` on `user`.id = detail.user_id
where detail.shop_id = #{shopId}
and detail.group_order_no = #{groupOrderNo}
and (detail.status = '待成团' or detail.status = '待核销' or detail.status = '退款中')