APPLE 3 лет назад
Родитель
Сommit
07ca3df890
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      app/Services/Common/GoodsService.php

+ 2 - 2
app/Services/Common/GoodsService.php

@@ -90,13 +90,13 @@ class GoodsService extends BaseService
             ->where(function($query) use ($params){
                 $time = isset($params['time'])? $params['time'] : '';
                 if($time){
-                    $query->where('last_sell_time','<=', $time);
+                    $query->where('a.last_sell_time','<=', $time);
                 }
             })
             ->where(function($query) use ($params){
                 $notUserId = isset($params['not_user_id'])? $params['not_user_id'] : 0;
                 if($notUserId){
-                    $query->whereNotIn('user_id', [$notUserId]);
+                    $query->whereNotIn('a.user_id', [$notUserId]);
                 }
             })
             ->select(['a.*','b.nickname','b.code as user_code','b.mobile as mobile','c.name as shop_name','c.code as shop_code'])