lqmac 8 months ago
parent b922fc550e
commit 1ff6ec7e81
  1. 6
      app/job/service/goods/Collector.php

@ -207,10 +207,15 @@ class Collector extends BaseService
public function updateGoods(string $url, array $form, int $storeId): bool
{
$goods = GoodsModel::where('goods_id', $form['goods_id'])->find();
//商品不存在
if (!$goods || !$url) {
return false;
}
//新阙通信的抓取过了,就不抓取了
if ($goods['channel'] == 'xqtx' && $goods['content']) {
return true;
}
try {
// 采集第三方商品数据
@ -276,6 +281,7 @@ class Collector extends BaseService
if ($goods->channel == "xqtx") {
//goods
$data['stock_total'] = $form['stock_total'];
$data['goods_name'] = $original['goods_name'];
//设置当前商品价格
$data['profit'] = $original['goods_price'] - $original['cost_price'];

Loading…
Cancel
Save