lqmac 8 months ago
parent 7991936f4a
commit c9911a16ec
  1. 3
      app/admin/controller/Goods.php
  2. 2
      app/api/model/Order.php
  3. 2
      app/api/service/Goods.php
  4. 5
      app/job/service/goods/GoodsUpdateImport.php
  5. 12
      app/store/model/goods/Import.php

@ -127,6 +127,9 @@ class Goods extends Controller
{ {
// 商品详情 // 商品详情
$model = GoodsModel::detail($goodsId); $model = GoodsModel::detail($goodsId);
echo "<pre>";
print_r($this->postForm());
exit();
// 更新记录 // 更新记录
if ($model->edit($this->postForm(), $model)) { if ($model->edit($this->postForm(), $model)) {
return $this->renderSuccess('更新成功'); return $this->renderSuccess('更新成功');

@ -155,7 +155,7 @@ class Order extends OrderModel
public function orderfast() public function orderfast()
{ {
//催货 这边暂时没有逻辑 //催货 这边暂时没有逻辑
return 0; return true;
} }
/** /**

@ -343,7 +343,7 @@ class Goods extends GoodsService
$price = \app\common\model\PriceSet::membershipPrice($price, $cost_price, $catIds); $price = \app\common\model\PriceSet::membershipPrice($price, $cost_price, $catIds);
} elseif (UserService::isDealerMember()) { } elseif (UserService::isDealerMember()) {
$priceArr = \app\common\model\PriceSet::distributionPrice($price, $cost_price, $catIds); $priceArr = \app\common\model\PriceSet::distributionPrice($price, $cost_price, $catIds);
$price = $priceArr['goods_price_min_dealer']; $price = $priceArr['distributionPrice'];
} }
return $price; return $price;
} }

@ -76,7 +76,10 @@ class GoodsUpdateImport extends BaseService
if (!isset($item[6]) || !$item[6]) { if (!isset($item[6]) || !$item[6]) {
continue; continue;
} }
$service->updateGoods($item[6], $data, $storeId); $ret = $service->updateGoods($item[6], $data, $storeId);
if ($ret == false) {
continue;
}
// 记录导入成功 // 记录导入成功
$this->successCount++; $this->successCount++;
} }

@ -72,6 +72,8 @@ class Import extends ImportModel
{ {
// 读取excel文件内容 // 读取excel文件内容
$execlData = $this->readExecl(); $execlData = $this->readExecl();
// var_dump($execlData);
// exit();
// 验证导入的商品数量是否合法 // 验证导入的商品数量是否合法
$this->checkLimit($execlData); $this->checkLimit($execlData);
@ -331,11 +333,11 @@ class Import extends ImportModel
// 去除标题数据 // 去除标题数据
unset($original[1]); unset($original[1]);
// 过滤空行和无效的内容 // 过滤空行和无效的内容
foreach ($original as $key => $row) { // foreach ($original as $key => $row) {
if (!is_numeric($row['A']) || empty($row['A'])) { // if (!is_numeric($row['A']) || empty($row['A'])) {
unset($original[$key]); // unset($original[$key]);
} // }
} // }
return $original; return $original;
} }

Loading…
Cancel
Save