Explorar el Código

新增自定义字段接口

chenxiqiang hace 6 años
padre
commit
ecb83eca5c
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5
    2
      manage-server/app/Http/Controllers/CommonController.php

+ 5
- 2
manage-server/app/Http/Controllers/CommonController.php Ver fichero

@@ -374,11 +374,14 @@ class CommonController extends Controller
374 374
         $order_type = $request->route("order_type");
375 375
         if ($id && $order_type) {
376 376
             $record = $this->getRecord($order_type, $id);
377
+            $comment = Comment::where("order_type", $order_type)->where("order_id", $id)->first();
377 378
             if ($record) {
378
-                return Response()->json([
379
+                $ret = [
379 380
                     "status" => 0,
380 381
                     "data" => $record
381
-                ]);
382
+                ];
383
+                $ret["data"]["comment"] = $comment->content;
384
+                return Response()->json($ret);
382 385
             }
383 386
             return Response()->json([
384 387
                 "status" => -2,

Loading…
Cancelar
Guardar