Explorar el Código

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

xupuyuan hace 8 meses
padre
commit
34673b2b51
Se han modificado 1 ficheros con 23 adiciones y 24 borrados
  1. 23 24
      app/controller/api/store/merchant/Merchant.php

+ 23 - 24
app/controller/api/store/merchant/Merchant.php

@@ -204,7 +204,6 @@ class Merchant extends BaseController
204 204
         }else{
205 205
             array_push($mer_id_unset, 497);
206 206
         }
207
-
208 207
         $is_commercetrade = 1;
209 208
         [$page, $limit] = $this->getPage();
210 209
         if($params['pageNum']!=''){
@@ -229,30 +228,30 @@ class Merchant extends BaseController
229 228
             $hasProductMerIdList = array_column($hasProductMerIdList->toArray(), 'mer_id');
230 229
         }
231 230
         $query = Db::name('merchant')->where($where);
232
-        if (!empty($hasProductMerIdList) && is_array($hasProductMerIdList)) {
233
-            $query->whereIn('mer_id', $hasProductMerIdList);
234
-        }
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
-        return app('json')->success(['list'=>$mer_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
-//            }
231
+        return app('json')->success(['list'=>$query]);
232
+//        if (!empty($hasProductMerIdList) && is_array($hasProductMerIdList)) {
233
+//            $query->whereIn('mer_id', $hasProductMerIdList);
254 234
 //        }
255
-//        return app('json')->success(['list'=>$return_list]);
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]);
256 255
 
257 256
     }
258 257