mirror of
https://gitee.com/hzchunfen/erp.git
synced 2025-12-01 14:40:44 +00:00
commit
80dc93d138
@ -12,6 +12,7 @@ use App\Models\Log;
|
|||||||
use App\Models\Shop;
|
use App\Models\Shop;
|
||||||
use App\Models\TodayPrice;
|
use App\Models\TodayPrice;
|
||||||
use App\Services\Business\BusinessFactory;
|
use App\Services\Business\BusinessFactory;
|
||||||
|
use App\Services\Business\KuaiTuanTuan\FaceSheet;
|
||||||
use App\Utils\DateTimeUtils;
|
use App\Utils\DateTimeUtils;
|
||||||
use Illuminate\Console\Command;
|
use Illuminate\Console\Command;
|
||||||
use Illuminate\Support\Facades\DB;
|
use Illuminate\Support\Facades\DB;
|
||||||
|
|||||||
@ -155,17 +155,16 @@ class BusinessGoodsSkusController extends Controller
|
|||||||
if (!isset($res['ktt_group_query_list_response'])) {
|
if (!isset($res['ktt_group_query_list_response'])) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$activityNos = $activities = [];
|
$activities = [];
|
||||||
foreach ($res['ktt_group_query_list_response']['activity_list'] as $activity) {
|
foreach ($res['ktt_group_query_list_response']['activity_list'] as $activity) {
|
||||||
$title = str_replace(' ', '', $activity['title']);
|
$title = str_replace(' ', '', $activity['title']);
|
||||||
if (0 === $activity['is_help_sell'] && !in_array($title, $noActivityTitle, true)) {
|
if (0 === $activity['is_help_sell'] && !in_array($title, $noActivityTitle, true)) {
|
||||||
$activityNos[] = $activity['activity_no'];
|
|
||||||
$activities[$activity['activity_no']] = $activity['title'];
|
$activities[$activity['activity_no']] = $activity['title'];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$businessGoodsSkus = BusinessGoodsSku::query()
|
$businessGoodsSkus = BusinessGoodsSku::query()
|
||||||
->where('shop_id', $shop->id)
|
->where('shop_id', $shop->id)
|
||||||
->whereIn('activity_no', $activityNos)
|
->whereIn('activity_no', array_keys($activities))
|
||||||
->orderBy('activity_no')
|
->orderBy('activity_no')
|
||||||
->get(['shop_id', 'title', 'activity_no', 'goods_name', 'price_in_fen', 'external_sku_id']);
|
->get(['shop_id', 'title', 'activity_no', 'goods_name', 'price_in_fen', 'external_sku_id']);
|
||||||
if ($businessGoodsSkus->isEmpty()) {
|
if ($businessGoodsSkus->isEmpty()) {
|
||||||
|
|||||||
@ -164,7 +164,6 @@ abstract class BusinessClient
|
|||||||
|
|
||||||
public function batchAsyncPostRequest($url, $batchParams)
|
public function batchAsyncPostRequest($url, $batchParams)
|
||||||
{
|
{
|
||||||
LogFile::info(json_encode($batchParams, 256));
|
|
||||||
$client = new Client();
|
$client = new Client();
|
||||||
$promises = [];
|
$promises = [];
|
||||||
foreach ($batchParams as $param) {
|
foreach ($batchParams as $param) {
|
||||||
@ -174,9 +173,6 @@ abstract class BusinessClient
|
|||||||
];
|
];
|
||||||
$promises[] = $client->postAsync($url, $options);
|
$promises[] = $client->postAsync($url, $options);
|
||||||
}
|
}
|
||||||
$res = Promise\Utils::unwrap($promises);
|
Promise\Utils::unwrap($promises);
|
||||||
foreach ($res as $item) {
|
|
||||||
LogFile::info($item->getBody()->getContents());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
49
app/Services/Business/KuaiTuanTuan/FaceSheet.php
Normal file
49
app/Services/Business/KuaiTuanTuan/FaceSheet.php
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Services\Business\KuaiTuanTuan;
|
||||||
|
|
||||||
|
class FaceSheet extends KuaiTuanTuan
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 快递公司查看接口
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function getCompanies()
|
||||||
|
{
|
||||||
|
$type = 'pdd.logistics.companies.get';
|
||||||
|
$appendParams = [];
|
||||||
|
|
||||||
|
return $this->doRequest($type, $appendParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* searchWayBill
|
||||||
|
*
|
||||||
|
* @return mixed
|
||||||
|
*/
|
||||||
|
public function searchWayBill()
|
||||||
|
{
|
||||||
|
$type = 'pdd.waybill.search';
|
||||||
|
$appendParams = [];
|
||||||
|
|
||||||
|
return $this->doRequest($type, $appendParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getLogisticsOrderTrance()
|
||||||
|
{
|
||||||
|
$type = 'pdd.logistics.ordertrace.get';
|
||||||
|
$appendParams = [];
|
||||||
|
|
||||||
|
return $this->doRequest($type, $appendParams);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test()
|
||||||
|
{
|
||||||
|
$type = 'pdd.cloudprint.stdtemplates.get';
|
||||||
|
$appendParams = [];
|
||||||
|
|
||||||
|
return $this->doRequest($type, $appendParams);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Loading…
x
Reference in New Issue
Block a user