Explorar o código

小程序app-商贸区-检测问题

xupuyuan hai 8 meses
pai
achega
c522c42d6d
Modificáronse 1 ficheiros con 20 adicións e 19 borrados
  1. 20 19
      app/controller/api/store/merchant/Merchant.php

+ 20 - 19
app/controller/api/store/merchant/Merchant.php

@@ -233,25 +233,26 @@ class Merchant extends BaseController
233
             $query->whereIn('mer_id', $hasProductMerIdList);
233
             $query->whereIn('mer_id', $hasProductMerIdList);
234
         }
234
         }
235
         $mer_list = $query->page($page)->limit($limit)->select();
235
         $mer_list = $query->page($page)->limit($limit)->select();
236
-        $where['is_gift_bag'] = 0;
237
-        $where['is_used'] = 1;
238
-        $where['product_type'] = 0;
239
-        $where['is_hide'] = 0;
240
-        $return_list = [];
241
-        if($mer_list) {
242
-            $mer_list = $mer_list->toArray();
243
-            foreach ($mer_list as $mer) {
244
-                if(in_array($mer['mer_id'],$mer_id_unset)) continue;
245
-                $goods = $this->repository->productList($mer['mer_id'],$where, 1, 3,$this->userInfo,false,$is_commercetrade);
246
-                if(empty($goods['list'])) continue;
247
-                $mer['goods_list'] = $goods['list'];
248
-                if (mb_strlen($mer['mer_name']) > 8) {
249
-                    $mer['mer_name'] = mb_substr($mer['mer_name'], 0, 8) . '...';
250
-                }
251
-                $return_list[] = $mer;
252
-            }
253
-        }
254
-        return app('json')->success(['list'=>$return_list]);
236
+        return app('json')->success(['list'=>$mer_list]);
237
+//        $where['is_gift_bag'] = 0;
238
+//        $where['is_used'] = 1;
239
+//        $where['product_type'] = 0;
240
+//        $where['is_hide'] = 0;
241
+//        $return_list = [];
242
+//        if($mer_list) {
243
+//            $mer_list = $mer_list->toArray();
244
+//            foreach ($mer_list as $mer) {
245
+//                if(in_array($mer['mer_id'],$mer_id_unset)) continue;
246
+//                $goods = $this->repository->productList($mer['mer_id'],$where, 1, 3,$this->userInfo,false,$is_commercetrade);
247
+//                if(empty($goods['list'])) continue;
248
+//                $mer['goods_list'] = $goods['list'];
249
+//                if (mb_strlen($mer['mer_name']) > 8) {
250
+//                    $mer['mer_name'] = mb_substr($mer['mer_name'], 0, 8) . '...';
251
+//                }
252
+//                $return_list[] = $mer;
253
+//            }
254
+//        }
255
+//        return app('json')->success(['list'=>$return_list]);
255
 
256
 
256
     }
257
     }
257
 
258