feat(PushPlatformPrintSend.php): 修改打印队列信息获取逻辑

This commit is contained in:
mkm 2024-06-11 13:53:56 +08:00
parent 25ad3924a1
commit a919878667

View File

@ -51,10 +51,12 @@ class PushPlatformPrintSend implements Consumer
$find['staff_phone'] = $mer_user_info['phone'];
$find['nickname'] = $user['nickname']??'';
$find['user_mobile'] = $user['mobile']??'';
$find['info'] = StoreOrderCartInfo::where('oid', $find['id'])->field('store_id,product_id,cart_num,price,total_price')->select()->each(function ($item) {
$find['info'] = StoreOrderCartInfo::where('oid', 36)->field('store_id,product_id,cart_num,cart_info')->select()->each(function ($item) {
$goods = StoreBranchProduct::where(['store_id'=>$item['store_id'],'product_id'=>$item['product_id']])->field('store_name,unit')->find();
$item['unit_name'] = StoreProductUnit::where('id', $goods['unit'])->value('name');
$item['store_name'] = $goods['store_name'];
$item['total_price'] = $item['cart_info']['total_price'];
$item['price'] = $item['cart_info']['price'];
return $item;
});
PushService::push('store_merchant_'.$find['store_id'], 1, ['type'=>'platform_print','msg'=>'打印队列','data'=>$find]);