new files
This commit is contained in:
45
pro_v3.5.1/app/jobs/order/SpliteStoreOrderJob.php
Normal file
45
pro_v3.5.1/app/jobs/order/SpliteStoreOrderJob.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace app\jobs\order;
|
||||
|
||||
|
||||
use app\services\message\NoticeService;
|
||||
use app\services\order\StoreOrderCartInfoServices;use app\webscoket\SocketPush;
|
||||
use crmeb\basic\BaseJobs;
|
||||
use crmeb\traits\QueueTrait;
|
||||
use think\facade\Log;
|
||||
|
||||
/**
|
||||
* 门店分配订单
|
||||
* Class SpliteStoreOrderJob
|
||||
* @package app\jobs
|
||||
*/
|
||||
class SpliteStoreOrderJob extends BaseJobs
|
||||
{
|
||||
use QueueTrait;
|
||||
|
||||
/**
|
||||
* 订单分配完成后置方法
|
||||
* @param $orderInfo
|
||||
*/
|
||||
public function splitAfter($orderInfo, bool $only_print = false)
|
||||
{
|
||||
//分配好向用户设置标签
|
||||
OrderJob::dispatchDo('setUserLabel', [$orderInfo]);
|
||||
if ($only_print) {
|
||||
/** @var NoticeService $NoticeService */
|
||||
$NoticeService = app()->make(NoticeService::class);
|
||||
$NoticeService->orderPrint($orderInfo);
|
||||
} else {
|
||||
$orderInfoServices = app()->make(StoreOrderCartInfoServices::class);
|
||||
$storeName = $orderInfoServices->getCarIdByProductTitle((int)$orderInfo['id']);
|
||||
$orderInfo['storeName'] = substrUTf8($storeName, 20, 'UTF-8', '');
|
||||
$orderInfo['send_name'] = $orderInfo['real_name'];
|
||||
//分配完成用户推送消息事件(门店小票打印)
|
||||
event('notice.notice', [$orderInfo, 'order_pay_success']);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user