Kaynağa Gözat

订单导入详情接口优化

wufeng 2 yıl önce
ebeveyn
işleme
75e0f68914
1 değiştirilmiş dosya ile 2 ekleme ve 1 silme
  1. 2 1
      app/admin/controller/OrderImport.php

+ 2 - 1
app/admin/controller/OrderImport.php

@@ -107,7 +107,8 @@ class OrderImport extends Base
             ->leftJoin('supplier s', 's.code=ce.supplierNo AND s.is_del=0')
             ->leftJoin('activity_info a', 'a.id=ce.activity_id AND a.is_del=0')
             ->where('c.id', $id)
-            ->find();
+            ->findOrEmpty()
+            ->toArray();//因为这里用的是模型,查询结果是一个对象
 
         if (!empty($info)) {
             $info['platform_names'] = Db::name('platform')