fix(queue): 优化小票打印逻辑
- 增加了 DictData 模型的引用 - 使用商店 ID 查询打印机配置,并在存在时使用该配置进行打印
This commit is contained in:
parent
2be22adcb3
commit
5727572e0d
@ -3,6 +3,7 @@
|
|||||||
namespace app\queue\redis;
|
namespace app\queue\redis;
|
||||||
|
|
||||||
use app\common\enum\PayEnum;
|
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_order_cart_info\StoreOrderCartInfo;
|
||||||
use app\common\model\store_product\StoreProduct;
|
use app\common\model\store_product\StoreProduct;
|
||||||
use app\common\model\system_store\SystemStore;
|
use app\common\model\system_store\SystemStore;
|
||||||
@ -61,7 +62,10 @@ class OrderXprinterPushSend implements Consumer
|
|||||||
'pay_type_name' => $pay_type,
|
'pay_type_name' => $pay_type,
|
||||||
'product_arr' => $product_arr
|
'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)
|
public function onConsumeFailure(\Throwable $exception, $package)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user