2022-08-06 15:25:13 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Services\Business\MiaoXuan;
|
|
|
|
|
|
2022-08-16 21:02:31 +08:00
|
|
|
use App\Models\BusinessGoodsSku;
|
2022-08-06 15:25:13 +08:00
|
|
|
use App\Services\Business\BusinessClient;
|
|
|
|
|
|
|
|
|
|
class MiaoXuan extends BusinessClient
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
public function auth()
|
|
|
|
|
{
|
|
|
|
|
// TODO: Implement auth() method.
|
|
|
|
|
}
|
|
|
|
|
|
2022-08-09 16:56:52 +08:00
|
|
|
public function downloadGoodsListAndBind()
|
2022-08-06 15:25:13 +08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2022-08-06 16:38:04 +08:00
|
|
|
public function bindGoods($goods)
|
|
|
|
|
{
|
|
|
|
|
Goods::bindGoods($goods, $this->shop->id);
|
|
|
|
|
}
|
|
|
|
|
|
2022-08-16 21:02:31 +08:00
|
|
|
public function incrQuantity($businessGoodsSku, $num, $incremental)
|
2022-08-06 15:25:13 +08:00
|
|
|
{
|
2022-08-16 21:02:31 +08:00
|
|
|
$appendParams = Goods::incrQuantity($this->shop->id, $num, $businessGoodsSku);
|
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-06 15:25:13 +08:00
|
|
|
}
|
|
|
|
|
|
2022-08-11 02:13:19 +08:00
|
|
|
public function downloadOrdersAndSave($beginTime, $endTime, $downloadType = 'default', $page = 1)
|
2022-08-06 15:25:13 +08:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2022-11-04 15:01:55 +08:00
|
|
|
public function batchIncrQuantity($businessGoodsSkus, $num, $incremental)
|
|
|
|
|
{
|
2022-11-04 15:11:43 +08:00
|
|
|
$batchAppendParams = [];
|
|
|
|
|
foreach ($businessGoodsSkus as $businessGoodsSku) {
|
|
|
|
|
$appendParams = Goods::incrQuantity($this->shop->id, $num, $businessGoodsSku);
|
|
|
|
|
$batchAppendParams[] = $appendParams;
|
|
|
|
|
}
|
|
|
|
|
$this->batchAsyncPostRequest('http://shop.chutang66.com/miaoxuan/stock', $batchAppendParams);
|
2022-11-04 15:01:55 +08:00
|
|
|
}
|
|
|
|
|
|
2022-08-08 18:53:38 +08:00
|
|
|
public function downloadGoods($skuId)
|
|
|
|
|
{
|
|
|
|
|
// TODO: Implement downloadGoods() method.
|
|
|
|
|
}
|
2022-08-06 15:25:13 +08:00
|
|
|
}
|