Przeglądaj źródła

订单列表未传用户ID

mac 2 lat temu
rodzic
commit
4bef63b586

+ 3 - 0
kxs-product/kxs-product-biz/src/main/java/com/kxs/product/biz/service/impl/KxsShopOrderServiceImpl.java

@@ -157,6 +157,9 @@ public class KxsShopOrderServiceImpl extends ServiceImpl<KxsShopOrderMapper, Kxs
 
     @Override
     public IPage<ShopOrderListVO> getByPage(Page<ShopOrderListVO> page, KxsShopOrder param) {
+
+        Long userId = SecurityUtils.getUser().getId();
+        param.setUserId(userId);
         //自定义分页
         long start = (page.getCurrent() - 1) * page.getSize();
         start = start < 0 ? 0L : start;

+ 1 - 1
kxs-product/kxs-product-biz/src/main/resources/mapper/KxsShopOrderMapper.xml

@@ -66,7 +66,7 @@
              ) a
         LEFT JOIN kxs_shop_order_info t  ON a.id = t.order_id
         <where>
-
+            a.user_id = #{query.userId}
         </where>
     </select>
     <select id="getDateBetweenOrders" resultType="com.kxs.product.api.vo.kxsapp.shop.ShopOrderGoodsUserVO">