From 988fe2f703a3657da5657f16f0f6855549715838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B5=B5=E4=B8=96=E7=95=8C?= <642747453@qq.com> Date: Mon, 24 Oct 2022 14:29:58 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20#100000=20=E5=AD=97=E6=AE=B5=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Listeners/GroupQueryListener.php | 2 +- app/Services/Business/KuaiTuanTuan/Groups.php | 6 +++--- app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/Listeners/GroupQueryListener.php b/app/Listeners/GroupQueryListener.php index db48314..58a86d3 100644 --- a/app/Listeners/GroupQueryListener.php +++ b/app/Listeners/GroupQueryListener.php @@ -29,7 +29,7 @@ class GroupQueryListener { $shopId = Groups::query()->where('id', $event->groupId)->value('shop_id'); $shop = Shop::query()->find($shopId); - $client = BusinessFactory::init()->make($shop['plat_id'])->setShopWithId($shop['id']); + $client = BusinessFactory::init()->make($shop['plat_id'])->setShop($shop); $client->createGroup($event->groupId); sleep(1); $client->queryGroupStatus($event->groupId); diff --git a/app/Services/Business/KuaiTuanTuan/Groups.php b/app/Services/Business/KuaiTuanTuan/Groups.php index e09d5e8..3e1698d 100644 --- a/app/Services/Business/KuaiTuanTuan/Groups.php +++ b/app/Services/Business/KuaiTuanTuan/Groups.php @@ -19,7 +19,7 @@ class Groups foreach ($groupGoods as $item) { $goodsSkus[] = [ 'category_name' => $item['category_name'], - 'goods_desc' => $item['goods_desc'], + 'goods_desc' => $item['goods_desc'] ?: $group['title'], 'goods_name' => $item['goods_name'], 'limit_buy' => $item['limit_buy'], 'market_price' => $item['market_price'], @@ -33,10 +33,10 @@ class Groups ]; } $appendParams = [ - 'end_time' => $group['end_time'] * 1000, + 'end_time' => (int)$group['end_time'], 'goods_list' => json_encode([$goodsSkus]), 'is_save_preview' => $group['is_save_preview'], - 'start_time' => $group['start_time'] * 1000, + 'start_time' => (int)$group['start_time'], 'title' => $group['title'], ]; diff --git a/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php b/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php index 4b71ba0..a9ea4c8 100644 --- a/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php +++ b/app/Services/Business/KuaiTuanTuan/KuaiTuanTuan.php @@ -7,6 +7,7 @@ use App\Models\GoodsSku; use App\Models\GroupGoods; use App\Services\Business\BusinessClient; use App\Models\Groups as GroupsModel; +use Illuminate\Support\Facades\Log; class KuaiTuanTuan extends BusinessClient { @@ -128,6 +129,7 @@ class KuaiTuanTuan extends BusinessClient } else { // throw new \RuntimeException($res['error_response']['error_msg'] . ':' . $res['error_response']['error_msg']); } + Log::info(json_encode($res,256)); } return $res;