wupengfei 2 years ago
parent
commit
3bdf57968e

+ 3 - 1
.idea/workspace.xml

@@ -2,7 +2,9 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/application/common/model/SupplierGoods.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Supplier.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Supplier.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -209,7 +211,7 @@
       <workItem from="1663374115380" duration="19161000" />
       <workItem from="1663548946176" duration="17651000" />
       <workItem from="1663721089544" duration="18248000" />
-      <workItem from="1663807609347" duration="12737000" />
+      <workItem from="1663807609347" duration="14180000" />
     </task>
     <servers />
   </component>

+ 3 - 12
application/api/controller/Supplier.php

@@ -4,6 +4,7 @@ use app\common\model\PlatformLike;
 use app\common\model\SupplierCate;
 use app\common\model\UserCollect;
 use app\common\model\UserSearch;
+use app\common\model\SupplierGoods;
 use library\tools\Data;
 /**
  * @title 供应商
@@ -143,7 +144,6 @@ class Supplier extends Base
      * @url /api/Supplier/getSupplierGoodsList
      * @header name:Authorization require:1 desc:Token
      * @param  name:supplier_id type:int default:-- desc:供应商记录id
-     * @param  name:name type:string default:-- desc:商品名称
      * @param  name:page type:int default:0 desc:页数
      * @param  name:page_num type:int default:20 desc:每页数
      * @param  name:sort_type type:int default:1 desc:1默认2时间升序3时间降序
@@ -156,11 +156,8 @@ class Supplier extends Base
      */
     public function getSupplierGoodsList()
     {
-        $title = input('get.title');
         $supplier_id = input('get.supplier_id');
         $sort_type = input('get.sort_type',1);
-        $first_classify = input('get.first_classify');
-        $second_classify = input('get.second_classify');
         switch ($sort_type) {
             case 1:
                 $order =  ['sort'=>'desc','id'=>'desc'];
@@ -176,16 +173,10 @@ class Supplier extends Base
         $sel_where[] = ['is_deleted','=',0];
         $sel_where[] = ['status','=',1];
         $sel_where[] = ['supplier_id','=',$supplier_id];
-        if($first_classify)  $sel_where[]  = ['first_classify','=',$first_classify];
-        if($second_classify)  $sel_where[]  = ['second_classify','=',$second_classify];
-        if($title && $this->user_id) UserSearch::saveSearchTitle($this->user_id,$title,9);
-        $list = \app\common\model\Supplier::where($sel_where)
-            ->when($title,function ($query)use($title){
-                if($title) $query->where('title','like','%'.$title.'%');
-            })->order($order)->limit($this->off_set,$this->page_num)->select()->toArray();
+        $list = SupplierGoods::where($sel_where)
+            ->order($order)->limit($this->off_set,$this->page_num)->select()->toArray();
         foreach ($list as &$v) {
             $v['label_name'] =$v['label'] ?  explode(',',trim($v['label'],',')):null;
-            $v['business_arr'] = $v['business'] ? explode(',',trim($v['business'],',')) : null;
         }
         $this->success('ok',['list'=>$list]);
     }

+ 8 - 0
application/common/model/SupplierGoods.php

@@ -0,0 +1,8 @@
+<?php
+namespace app\common\model;
+use think\Model;
+// 供应商产品
+class SupplierGoods extends Model
+{
+
+}