Jelajahi Sumber

接口优化

wufeng 2 tahun lalu
induk
melakukan
0352436da6

+ 1 - 1
app/abutment/controller/Good.php

@@ -1518,7 +1518,7 @@ class Good extends BaseController
         $this->post = $this->request->filter('trim')->post();
         $page = isset($this->post['page']) && $this->post['page'] !== "" ? intval($this->post['page']) : "1";
         $size = isset($this->post['size']) && $this->post['size'] !== "" ? intval($this->post['size']) : "10";
-        $where = [["is_del", "=", 0]];
+        $where = [["is_del", "=", 0],['level',"=",3]];
         $cat_name = isset($this->post['cat_name']) && $this->post['cat_name'] !== "" ? trim($this->post['cat_name']) : "";
         if ($cat_name !== "") {
             $where[] = ['cat_name', "like", "%$cat_name%"];

+ 1 - 9
app/abutment/controller/Index.php

@@ -78,15 +78,7 @@ class Index extends BaseController
         if ($end !== "") {
             $where[] = ['b.addtime', "<", date('Y-m-d H:i:s', strtotime($end) + 24 * 3600)];
         }
-        $supplierNo = isset($this->post['supplierNo']) && $this->post['supplierNo'] != "" ? trim($this->post['supplierNo']) : "";
-        if ($supplierNo != "") {
-            $gyscode = Db::name("supplier")->where(["code" => $supplierNo])->find();
-            if (empty($gyscode)) {
-                return json_show(1004, "未找到供应商信息");
-            }
-            $wsmcode = Db::name("brand_book")->where(["gyscode" => $supplierNo, "is_del" => 0])->column("brand_id");
-            $where[] = ['b.id', "in", $wsmcode];
-        }
+
         $company_name = isset($this->post['company_name']) && $this->post['company_name'] !== "" ? trim($this->post['company_name']) : "";
         if ($company_name !== "") $where[] = ["b.createrid", 'in', get_company_item_user_by_name($company_name)];
 

+ 1 - 1
app/admin/controller/Report.php

@@ -245,7 +245,7 @@ class Report extends Base
             ->leftJoin('company_item cii', 'cii.id=b.depart')
             ->where($where)
             ->group('addtime,b.depart')
-            ->order('addtime')
+            ->order('addtime', 'desc')
             ->page($param['page'], $param['size'])
             ->select()
             ->toArray();