From c9911a16ec26e2ed03bd31b92a66c971f2ea81f9 Mon Sep 17 00:00:00 2001 From: lqmac Date: Fri, 22 Mar 2024 09:05:04 +0800 Subject: [PATCH] 1 --- app/admin/controller/Goods.php | 3 +++ app/api/model/Order.php | 2 +- app/api/service/Goods.php | 2 +- app/job/service/goods/GoodsUpdateImport.php | 5 ++++- app/store/model/goods/Import.php | 12 +++++++----- 5 files changed, 16 insertions(+), 8 deletions(-) diff --git a/app/admin/controller/Goods.php b/app/admin/controller/Goods.php index 80814c75..f6137045 100644 --- a/app/admin/controller/Goods.php +++ b/app/admin/controller/Goods.php @@ -127,6 +127,9 @@ class Goods extends Controller { // 商品详情 $model = GoodsModel::detail($goodsId); + echo "
";
+        print_r($this->postForm());
+        exit();
         // 更新记录
         if ($model->edit($this->postForm(), $model)) {
             return $this->renderSuccess('更新成功');
diff --git a/app/api/model/Order.php b/app/api/model/Order.php
index 47acd335..0a5ff1a8 100644
--- a/app/api/model/Order.php
+++ b/app/api/model/Order.php
@@ -155,7 +155,7 @@ class Order extends OrderModel
     public function orderfast()
     {
         //催货 这边暂时没有逻辑
-        return 0;
+        return true;
     }
 
     /**
diff --git a/app/api/service/Goods.php b/app/api/service/Goods.php
index 000fefd3..a75eac89 100644
--- a/app/api/service/Goods.php
+++ b/app/api/service/Goods.php
@@ -343,7 +343,7 @@ class Goods extends GoodsService
             $price = \app\common\model\PriceSet::membershipPrice($price, $cost_price, $catIds);
         } elseif (UserService::isDealerMember()) {
             $priceArr = \app\common\model\PriceSet::distributionPrice($price, $cost_price, $catIds);
-            $price = $priceArr['goods_price_min_dealer'];
+            $price = $priceArr['distributionPrice'];
         }
         return $price;
     }
diff --git a/app/job/service/goods/GoodsUpdateImport.php b/app/job/service/goods/GoodsUpdateImport.php
index 062ee655..3abe8a29 100644
--- a/app/job/service/goods/GoodsUpdateImport.php
+++ b/app/job/service/goods/GoodsUpdateImport.php
@@ -76,7 +76,10 @@ class GoodsUpdateImport extends BaseService
             if (!isset($item[6]) || !$item[6]) {
                 continue;
             }
-        	$service->updateGoods($item[6], $data, $storeId);
+        	$ret = $service->updateGoods($item[6], $data, $storeId);
+            if ($ret == false) {
+                continue;
+            }
             // 记录导入成功
             $this->successCount++;
         }
diff --git a/app/store/model/goods/Import.php b/app/store/model/goods/Import.php
index 857295dc..afeb9572 100644
--- a/app/store/model/goods/Import.php
+++ b/app/store/model/goods/Import.php
@@ -72,6 +72,8 @@ class Import extends ImportModel
     {
         // 读取excel文件内容
         $execlData = $this->readExecl();
+        // var_dump($execlData);
+        // exit();
         // 验证导入的商品数量是否合法
         $this->checkLimit($execlData);
         
@@ -331,11 +333,11 @@ class Import extends ImportModel
         // 去除标题数据
         unset($original[1]);
         // 过滤空行和无效的内容
-        foreach ($original as $key => $row) {
-            if (!is_numeric($row['A']) || empty($row['A'])) {
-                unset($original[$key]);
-            }
-        }
+        // foreach ($original as $key => $row) {
+        //     if (!is_numeric($row['A']) || empty($row['A'])) {
+        //         unset($original[$key]);
+        //     }
+        // }
         return $original;
     }