mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 22:50:44 +00:00
!269 下载商品bug
Merge pull request !269 from 杨建炊/fix-release-1.0.0/yjc-migrate
This commit is contained in:
commit
855da74a9a
@ -94,7 +94,7 @@ class BusinessGoodsSkusController extends Controller
|
|||||||
$this->setValidatorFailResponse('未找到对应的商品,请核实后再次同步或删除此平台商品');
|
$this->setValidatorFailResponse('未找到对应的商品,请核实后再次同步或删除此平台商品');
|
||||||
} else {
|
} else {
|
||||||
$shop = $businessGoodsSku->shop;
|
$shop = $businessGoodsSku->shop;
|
||||||
BusinessFactory::init()->make($shop['plat_id'])->setShopWithId($shop['id'])->incrQuantity($businessGoodsSku, 0, false);
|
BusinessFactory::init()->make($shop['plat_id'])->setShopWithId($shop['id'])->incrQuantity($businessGoodsSku, $sku->sale_stock, false);
|
||||||
$this->res['message'] = '库存同步请求发送成功,具体结果查看日志';
|
$this->res['message'] = '库存同步请求发送成功,具体结果查看日志';
|
||||||
}
|
}
|
||||||
return response($this->res, $this->res['httpCode']);
|
return response($this->res, $this->res['httpCode']);
|
||||||
|
|||||||
@ -4,6 +4,7 @@ namespace App\Services\Business\KuaiTuanTuan;
|
|||||||
|
|
||||||
use App\Events\BusinessOrdersUpdate;
|
use App\Events\BusinessOrdersUpdate;
|
||||||
use App\Models\BusinessGoodsSku;
|
use App\Models\BusinessGoodsSku;
|
||||||
|
use App\Services\Business\BusinessFactory;
|
||||||
|
|
||||||
class Goods
|
class Goods
|
||||||
{
|
{
|
||||||
@ -42,9 +43,6 @@ class Goods
|
|||||||
);
|
);
|
||||||
if (empty($businessGoodSku->id)) {
|
if (empty($businessGoodSku->id)) {
|
||||||
$businessGoodSku->save();
|
$businessGoodSku->save();
|
||||||
if (!empty($businessGoodSku->external_sku_id)) {
|
|
||||||
event(new BusinessOrdersUpdate($businessGoodSku, 0));
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
$businessGoodSku->update($data);
|
$businessGoodSku->update($data);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user