chore: 添加静态资源文件和版本配置文件
添加大量图片、字体、音频等静态资源文件,包括用户界面图片、模板文件和安装界面素材 添加系统版本配置文件(.version)和常量定义文件(.constant) 更新供应商依赖文件,包括Symfony VarDumper组件和相关许可证文件 添加验证码配置文件(captcha.php)和.gitignore规则
This commit is contained in:
69
app/jobs/order/SpliteOrderAfterJob.php
Normal file
69
app/jobs/order/SpliteOrderAfterJob.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\jobs\order;
|
||||
|
||||
|
||||
use app\services\order\StoreOrderStatusServices;
|
||||
use crmeb\basic\BaseJobs;
|
||||
use crmeb\traits\QueueTrait;
|
||||
|
||||
/**
|
||||
* 拆分订单后置队列
|
||||
* Class SpliteOrderAfterJob
|
||||
* @package app\jobs\order
|
||||
*/
|
||||
class SpliteOrderAfterJob extends BaseJobs
|
||||
{
|
||||
use QueueTrait;
|
||||
|
||||
/**
|
||||
* 门店分配订单
|
||||
* @param $orderInfo
|
||||
* @return bool
|
||||
*/
|
||||
public function doJob($oid, $orderData)
|
||||
{
|
||||
if (!$oid || !$orderData || count($orderData) != 2) {
|
||||
return true;
|
||||
}
|
||||
[$orderInfo, $otherOrder] = $orderData;
|
||||
try {
|
||||
/** @var StoreOrderStatusServices $statusService */
|
||||
$statusService = app()->make(StoreOrderStatusServices::class);
|
||||
$statusData = $statusService->getColumn(['oid' => $oid], '*');
|
||||
if (!$statusData) {
|
||||
return true;
|
||||
}
|
||||
$ids = [];
|
||||
if ($orderInfo['id'] != $oid) {
|
||||
$ids[] = $orderInfo['id'];
|
||||
}
|
||||
if ($otherOrder['id'] != $oid) {
|
||||
$ids[] = $otherOrder['id'];
|
||||
}
|
||||
if ($ids) {
|
||||
$allData = [];
|
||||
foreach ($ids as $id) {
|
||||
foreach ($statusData as $data) {
|
||||
$data['oid'] = $id;
|
||||
$allData[] = $data;
|
||||
}
|
||||
}
|
||||
if ($allData) {
|
||||
$statusService->saveAll($allData);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (\Throwable $e) {
|
||||
response_log_write([
|
||||
'message' => '处理拆分订单记录失败,原因:' . $e->getMessage(),
|
||||
'file' => $e->getFile(),
|
||||
'line' => $e->getLine()
|
||||
]);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user