input('order_id')); if(!$order){ throw new AppException("未找到该订单".request()->input('order_id')); } if(request()->has('remark')){ $remark = $order->hasOneOrderRemark; if (!$remark) { $remark = new Remark([ 'order_id' => request()->input('order_id'), 'remark' => request()->input('remark') ]); } $remark->remark=request()->input('remark'); if(!$remark->save()){ return $this->errorJson(); } } //(new \app\common\services\operation\OrderLog($remark, 'special')); $order->invoice = request()->input('invoice'); $order->save(); echo json_encode(["data" => '', "result" => 1]); } }