feat: #100000 字段错误修改

This commit is contained in:
赵世界 2022-10-24 14:29:58 +08:00
parent fc194f9af8
commit 988fe2f703
3 changed files with 6 additions and 4 deletions

View File

@ -29,7 +29,7 @@ class GroupQueryListener
{ {
$shopId = Groups::query()->where('id', $event->groupId)->value('shop_id'); $shopId = Groups::query()->where('id', $event->groupId)->value('shop_id');
$shop = Shop::query()->find($shopId); $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); $client->createGroup($event->groupId);
sleep(1); sleep(1);
$client->queryGroupStatus($event->groupId); $client->queryGroupStatus($event->groupId);

View File

@ -19,7 +19,7 @@ class Groups
foreach ($groupGoods as $item) { foreach ($groupGoods as $item) {
$goodsSkus[] = [ $goodsSkus[] = [
'category_name' => $item['category_name'], 'category_name' => $item['category_name'],
'goods_desc' => $item['goods_desc'], 'goods_desc' => $item['goods_desc'] ?: $group['title'],
'goods_name' => $item['goods_name'], 'goods_name' => $item['goods_name'],
'limit_buy' => $item['limit_buy'], 'limit_buy' => $item['limit_buy'],
'market_price' => $item['market_price'], 'market_price' => $item['market_price'],
@ -33,10 +33,10 @@ class Groups
]; ];
} }
$appendParams = [ $appendParams = [
'end_time' => $group['end_time'] * 1000, 'end_time' => (int)$group['end_time'],
'goods_list' => json_encode([$goodsSkus]), 'goods_list' => json_encode([$goodsSkus]),
'is_save_preview' => $group['is_save_preview'], 'is_save_preview' => $group['is_save_preview'],
'start_time' => $group['start_time'] * 1000, 'start_time' => (int)$group['start_time'],
'title' => $group['title'], 'title' => $group['title'],
]; ];

View File

@ -7,6 +7,7 @@ use App\Models\GoodsSku;
use App\Models\GroupGoods; use App\Models\GroupGoods;
use App\Services\Business\BusinessClient; use App\Services\Business\BusinessClient;
use App\Models\Groups as GroupsModel; use App\Models\Groups as GroupsModel;
use Illuminate\Support\Facades\Log;
class KuaiTuanTuan extends BusinessClient class KuaiTuanTuan extends BusinessClient
{ {
@ -128,6 +129,7 @@ class KuaiTuanTuan extends BusinessClient
} else { } else {
// throw new \RuntimeException($res['error_response']['error_msg'] . ':' . $res['error_response']['error_msg']); // throw new \RuntimeException($res['error_response']['error_msg'] . ':' . $res['error_response']['error_msg']);
} }
Log::info(json_encode($res,256));
} }
return $res; return $res;