diff --git a/app/common/service/wechat/WeChatMnpService.php b/app/common/service/wechat/WeChatMnpService.php index 6711cce72..a0a44bcf9 100644 --- a/app/common/service/wechat/WeChatMnpService.php +++ b/app/common/service/wechat/WeChatMnpService.php @@ -108,6 +108,11 @@ class WeChatMnpService } $dateTime = new DateTime(date('Y-m-d H:i:s')); $formattedDateTime = $dateTime->format('Y-m-d\TH:i:s.uP'); + if(is_array($logistics_type,[1,2,4])){ + $item_desc='商品'; + }else{ + $item_desc='充值'; + } return $this->app->getClient()->postJson("wxa/sec/order/upload_shipping_info?access_token=$token", [ 'order_key' =>[ 'order_number_type'=>1, @@ -117,7 +122,7 @@ class WeChatMnpService 'logistics_type'=>$logistics_type,//1、快递物流 2、同城配送 3、虚拟商品,例如话费充值,点卡等4、用户自提 'delivery_mode'=>'UNIFIED_DELIVERY', 'shipping_list'=>[ - ['item_desc'=>'商品'] + ['item_desc'=>$item_desc] ], 'upload_time'=>$formattedDateTime, 'payer'=>[ diff --git a/app/queue/redis/PushPlatformPrintSend.php b/app/queue/redis/PushPlatformPrintSend.php index 43b28e447..4b8c7583b 100644 --- a/app/queue/redis/PushPlatformPrintSend.php +++ b/app/queue/redis/PushPlatformPrintSend.php @@ -53,7 +53,7 @@ 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', 36)->field('store_id,product_id,cart_num,cart_info')->select()->each(function ($item) { + $find['info'] = StoreOrderCartInfo::where('oid', $find['id'])->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'];