Sfoglia il codice sorgente

添加产品首页接口

chenxiqiang 6 anni fa
parent
commit
b448f10ba0
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2
    2
      manage-server/app/Http/Controllers/CommonController.php

+ 2
- 2
manage-server/app/Http/Controllers/CommonController.php Vedi File

@@ -141,7 +141,7 @@ class CommonController extends Controller
141 141
         $order_id = $request->route("order_id");
142 142
         $order_type = $request->route("order_type");
143 143
         if ($order_id && $order_type) {
144
-            return Comment::where("order_id", $order_id)->where("type", $order_type)->paginate(20);
144
+            return Comment::where("order_id", $order_id)->where("order_type", $order_type)->orderBy('id', 'desc')->paginate(20);
145 145
         }
146 146
     }
147 147
 
@@ -154,7 +154,7 @@ class CommonController extends Controller
154 154
     {
155 155
         $order_type = $request->route("order_type");
156 156
         if ($order_type) {
157
-            return Comment::where("type", $order_type)->orderBy('type', 'desc')->paginate(20);
157
+            return Comment::where("order_type", $order_type)->orderBy('id', 'desc')->paginate(20);
158 158
         }
159 159
     }
160 160
 

Loading…
Annulla
Salva