feat(haichao): 新增聚水潭ERP集成功能
- 新增聚水潭回调接口及事件处理机制 - 添加聚水潭商品、订单、售后同步任务 - 实现聚水潭订单推送及售后状态同步 - 新增手动同步聚水潭商品功能 - 在各路由组添加聚水潭中间件支持
This commit is contained in:
23
app/haichao/task/JstSyncStorkTask.php
Normal file
23
app/haichao/task/JstSyncStorkTask.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace app\haichao\task;
|
||||
|
||||
use app\haichao\HaichaoJstServices;
|
||||
use crmeb\interfaces\ListenerInterface;
|
||||
use crmeb\utils\Cron;
|
||||
use think\facade\Log;
|
||||
|
||||
class JstSyncStorkTask extends Cron implements ListenerInterface
|
||||
{
|
||||
public function handle($event): void
|
||||
{
|
||||
// 停用库存同步流程
|
||||
// return;
|
||||
|
||||
$this->tick(150000, function () {
|
||||
Log::info('jst.task.stork.tick');
|
||||
HaichaoJstServices::getServices()->getSyncStork()->syncStorkFromInneropenErp();
|
||||
Log::info('jst.task.stork.tick.done');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user