Commit 477f238a authored by luhongguang's avatar luhongguang

update:拼单商品增加shopid

parent bb45b98e
...@@ -54,7 +54,22 @@ class MarketingPindanGoodsService ...@@ -54,7 +54,22 @@ class MarketingPindanGoodsService
//生活号信息 //生活号信息
$params["life_account_id"] = MarketingService::getPublicLifeAccountId(); $params["life_account_id"] = MarketingService::getPublicLifeAccountId();
$shopId = "00"; //生活号信息
$url = config('interface', 'merchant.lifeaccount.get_life_account_by_id');
if (empty($url)) {
throw new InterfaceException(['cus' => 0]);
}
$lifeAccountRes = HttpUtil::get($url, ["life_account_id" => $params["life_account_id"]]);
if (empty($lifeAccountRes["response"]["result"])) {
throw new GoodsException(['cus' => 29]);
}
$lifeAccount = [
"life_account_id" => $params["life_account_id"],
"merchant_id" => $lifeAccountRes["response"]["result"]["merchant_id"],
];
$shopId = GoodsService::addShop($lifeAccount);
$spuData = self::addGoodsSpu($shopId, $params); $spuData = self::addGoodsSpu($shopId, $params);
$skuId = self::addGoodsSku($spuData, $shopId, $params); $skuId = self::addGoodsSku($spuData, $shopId, $params);
//商品操作记录 //商品操作记录
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment