wupengfei %!s(int64=2) %!d(string=hai) anos
pai
achega
5794668b4f
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      .idea/workspace.xml
  2. 1 1
      application/operate/controller/SupplierGoods.php

+ 1 - 1
.idea/workspace.xml

@@ -289,7 +289,7 @@
       <workItem from="1681174490906" duration="23334000" />
       <workItem from="1681260946292" duration="27381000" />
       <workItem from="1681348081818" duration="22448000" />
-      <workItem from="1681434523223" duration="18526000" />
+      <workItem from="1681434523223" duration="18556000" />
     </task>
     <servers />
   </component>

+ 1 - 1
application/operate/controller/SupplierGoods.php

@@ -38,7 +38,7 @@ class SupplierGoods extends Controller
         $where[] = ['a.is_deleted','=',0];
         if($supplier_id)$where[] = ['a.supplier_id','=',$supplier_id];
         if($company_id)$where[] = ['a.company_id','=',$company_id];
-        $query = $this->_query($this->table)->where($where)->like('a.name')->field('a.*,b.title supplier_name ,c.title company_name');
+        $query = $this->_query($this->table)->where($where)->like('a.name')->alias('a')->field('a.*,b.title supplier_name ,c.title company_name');
         $query->leftJoin('Supplier b','b.id = a.supplier_id')->leftJoin('Company c','c.id = a.company_id');
         $query->order(' a.sort desc , a.id desc')->page();
     }