diff --git a/app/api/logic/order/OrderLogic.php b/app/api/logic/order/OrderLogic.php index ca2c98f4..6f854771 100644 --- a/app/api/logic/order/OrderLogic.php +++ b/app/api/logic/order/OrderLogic.php @@ -210,8 +210,8 @@ class OrderLogic extends BaseLogic $_order['user_phone'] = $address['phone']; $_order['user_address'] = $address['detail']; } - } else { - //没有地址时,默认为门店自提 + } + if($params['shipping_type'] == 2){ $_order['status'] = 1; } diff --git a/app/api/logic/user/UserLogic.php b/app/api/logic/user/UserLogic.php index d76341db..0428c03a 100644 --- a/app/api/logic/user/UserLogic.php +++ b/app/api/logic/user/UserLogic.php @@ -66,7 +66,7 @@ class UserLogic extends BaseLogic public static function info($uid) { $data = User::with(['userShip'])->where('id',$uid) - ->field('avatar,real_name,nickname,account,mobile,sex,login_ip,now_money,total_recharge_amount,user_ship') + ->field('id,avatar,real_name,nickname,account,mobile,sex,login_ip,now_money,total_recharge_amount,user_ship') ->find(); //判断是不是员工 if($data){ diff --git a/app/common/logic/PayNotifyLogic.php b/app/common/logic/PayNotifyLogic.php index 439fa8e1..acbcbfeb 100644 --- a/app/common/logic/PayNotifyLogic.php +++ b/app/common/logic/PayNotifyLogic.php @@ -126,7 +126,7 @@ class PayNotifyLogic extends BaseLogic Redis::send('push-platform-print', ['id' => $order['id']], 60); // Db::name('order_middle')->insert(['c_order_id' => $order['id']]); } - if (!empty($extra['payer']['openid']) && $order->pay_type != 9) { + if (!empty($extra['payer']['openid']) && $order->pay_type == 7) { Redis::send('push-delivery', ['order_sn' => $order['order_id'], 'openid' => $extra['payer']['openid']], 5); } return true; diff --git a/app/queue/redis/PushDeliverySend.php b/app/queue/redis/PushDeliverySend.php new file mode 100644 index 00000000..92ac7301 --- /dev/null +++ b/app/queue/redis/PushDeliverySend.php @@ -0,0 +1,30 @@ +delivery($data['order_id'], $data['openid']); + + } + public function onConsumeFailure(\Throwable $e, $package) + { + $package['max_attempts']=0; + Log::error('推送小程序发货通知失败:'.$package['data']['order_id']); + return $package; + } +} \ No newline at end of file