50 lines
1.2 KiB
PHP
Raw Normal View History

<?php
namespace App\Services\Business\MiaoXuan;
use App\Models\BusinessGoodsSku;
use App\Models\GoodsSku;
use App\Models\Log;
use App\Services\Business\BusinessClient;
class MiaoXuan extends BusinessClient
{
public function auth()
{
// TODO: Implement auth() method.
}
public function downloadGoodsList()
{
}
2022-08-06 16:38:04 +08:00
public function bindGoods($goods)
{
Goods::bindGoods($goods, $this->shop->id);
}
public function incrQuantity($skuId)
{
$goodsSku = GoodsSku::query()->find($skuId);
$business = BusinessGoodsSku::query()->where('shop_id', $this->shop->id)->where('self_sku_id', $skuId)->first(['goods_id', 'sku_id', 'external_sku_id'])->toArray();
$appendParams = Goods::incrQuantity($this->shop->id, $goodsSku->stock, $business);
2022-08-08 15:05:17 +08:00
$url = 'http://shop.chutang66.com/miaoxuan/stock';
2022-08-06 16:38:04 +08:00
$this->formDataPostRequest($url, $appendParams);
}
2022-08-09 10:34:36 +08:00
public function downloadOrders($beginTime, $endTime, $activityNo = '', $downloadType = 'default')
{
}
2022-08-06 16:38:04 +08:00
public function saveOrders($orders)
{
2022-08-06 16:38:04 +08:00
Order::saveOrders($orders, $this->shop->id);
}
public function downloadGoods($skuId)
{
// TODO: Implement downloadGoods() method.
}
}