作者 何书鹏

测试队列

@@ -658,7 +658,7 @@ class Order extends Api @@ -658,7 +658,7 @@ class Order extends Api
658 $order = $model->where('id',$order_id)->find(); 658 $order = $model->where('id',$order_id)->find();
659 empty($order) && $this->error('订单不存在'); 659 empty($order) && $this->error('订单不存在');
660 660
661 - $res = $this->cancelOrderAction($order); 661 + $res = self::cancelOrderAction($order);
662 $res['code'] == 0 && $this->error($res['msg']); 662 $res['code'] == 0 && $this->error($res['msg']);
663 663
664 $this->success('取消成功'); 664 $this->success('取消成功');
@@ -668,7 +668,7 @@ class Order extends Api @@ -668,7 +668,7 @@ class Order extends Api
668 * 取消订单操作 668 * 取消订单操作
669 * @ApiInternal 669 * @ApiInternal
670 */ 670 */
671 - public function cancelOrderAction($order) 671 + public static function cancelOrderAction($order)
672 { 672 {
673 \think\Log::write('订单数据:'.json_encode($order)); 673 \think\Log::write('订单数据:'.json_encode($order));
674 if($order['freight_status'] == '20'){ 674 if($order['freight_status'] == '20'){
@@ -691,7 +691,7 @@ class Order extends Api @@ -691,7 +691,7 @@ class Order extends Api
691 if($order['pay_status'] == '20'){ 691 if($order['pay_status'] == '20'){
692 $config = Service::getConfig('wechat'); 692 $config = Service::getConfig('wechat');
693 $config['app_id'] = $config['miniapp_id']; 693 $config['app_id'] = $config['miniapp_id'];
694 - $config['notify_url'] = $this->request->domain().'api/notify/refund/type/wechat'; 694 + $config['notify_url'] = request()->domain().'api/notify/refund/type/wechat';
695 $config['return_url'] = ''; 695 $config['return_url'] = '';
696 $wechat = Pay::wechat($config); 696 $wechat = Pay::wechat($config);
697 $refund_no = 'LQ-'.time().mt_rand(10000,99999); 697 $refund_no = 'LQ-'.time().mt_rand(10000,99999);
@@ -19,7 +19,7 @@ class OrderAutoOper extends BaseJob @@ -19,7 +19,7 @@ class OrderAutoOper extends BaseJob
19 $order = \app\api\model\Order::get($order_id); 19 $order = \app\api\model\Order::get($order_id);
20 if ($order && $order['pay_status'] == '10' && $order['order_status'] == '10') { 20 if ($order && $order['pay_status'] == '10' && $order['order_status'] == '10') {
21 \think\Db::transaction(function () use ($order) { 21 \think\Db::transaction(function () use ($order) {
22 - (new \app\api\controller\Order)->cancelOrderAction($order); 22 + \app\api\controller\Order::cancelOrderAction($order);
23 }); 23 });
24 } 24 }
25 25