From 5727572e0d7bb01036f5cd5aafc2bb3e1861b345 Mon Sep 17 00:00:00 2001 From: mkm <727897186@qq.com> Date: Tue, 24 Dec 2024 09:07:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(queue):=20=E4=BC=98=E5=8C=96=E5=B0=8F?= =?UTF-8?q?=E7=A5=A8=E6=89=93=E5=8D=B0=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 增加了 DictData 模型的引用 - 使用商店 ID 查询打印机配置,并在存在时使用该配置进行打印 --- app/queue/redis/OrderXprinterPushSend.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/queue/redis/OrderXprinterPushSend.php b/app/queue/redis/OrderXprinterPushSend.php index ec6682c17..7518e2d92 100644 --- a/app/queue/redis/OrderXprinterPushSend.php +++ b/app/queue/redis/OrderXprinterPushSend.php @@ -3,6 +3,7 @@ namespace app\queue\redis; use app\common\enum\PayEnum; +use app\common\model\dict\DictData; use app\common\model\store_order_cart_info\StoreOrderCartInfo; use app\common\model\store_product\StoreProduct; use app\common\model\system_store\SystemStore; @@ -61,7 +62,10 @@ class OrderXprinterPushSend implements Consumer 'pay_type_name' => $pay_type, 'product_arr' => $product_arr ]; - $res = ($api->printFontAlign('74AMP5N6DP21148', $order)); + $value=DictData::where('name','xprinter_'.$order['store_id'])->value('value'); + if($value){ + $res = ($api->printFontAlign($value, $order)); + } } // 消费失败时 public function onConsumeFailure(\Throwable $exception, $package)