瀏覽代碼

修复支付问题

chenxiqiang 6 年之前
父節點
當前提交
7cb59f3a5c
共有 1 個檔案被更改,包括 14 行新增9 行删除
  1. 14
    9
      manage-server/app/Http/Controllers/CommonController.php

+ 14
- 9
manage-server/app/Http/Controllers/CommonController.php 查看文件

158
         }
158
         }
159
         if($wechat_id) {
159
         if($wechat_id) {
160
             $os = array();
160
             $os = array();
161
-            $houseApplianceCleanOrder = HouseApplianceCleanOrder::where("wechat_id", $wechat_id)->get();
162
-            $houseCleanOrder = HouseCleanOrder::where("wechat_id", $wechat_id)->get();
163
-            $housekeeperOrder = HousekeeperOrder::where("wechat_id", $wechat_id)->get();
164
-            $maternityMatronOrder = MaternityMatronOrder::where("wechat_id", $wechat_id)->get();
165
-            $productOrder = ProductOrder::where("wechat_id", $wechat_id)->get();
161
+            $houseApplianceCleanOrder = HouseApplianceCleanOrder::where("wechat_id", $wechat_id)
162
+                ->orderBy('created_at', 'desc')->get();
163
+            $houseCleanOrder = HouseCleanOrder::where("wechat_id", $wechat_id)
164
+                ->orderBy('created_at', 'desc')->get();
165
+            $housekeeperOrder = HousekeeperOrder::where("wechat_id", $wechat_id)
166
+                ->orderBy('created_at', 'desc')->get();
167
+            $maternityMatronOrder = MaternityMatronOrder::where("wechat_id", $wechat_id)
168
+                ->orderBy('created_at', 'desc')->get();
169
+            $productOrder = ProductOrder::where("wechat_id", $wechat_id)
170
+                ->orderBy('created_at', 'desc')->get();
166
 
171
 
167
             array_push($os, $houseApplianceCleanOrder);
172
             array_push($os, $houseApplianceCleanOrder);
168
             array_push($os, $houseCleanOrder);
173
             array_push($os, $houseCleanOrder);
187
                         $data["comment"] = false;
192
                         $data["comment"] = false;
188
                     }
193
                     }
189
                     // 未支付订单3小时后过期
194
                     // 未支付订单3小时后过期
190
-                    if($order->status = 1) {
195
+                    /*if($order->status = 1) {
191
                         if(Carbon::now()->subHours(3)->gt($order->created_at)) {
196
                         if(Carbon::now()->subHours(3)->gt($order->created_at)) {
192
                             continue;
197
                             continue;
193
                         }
198
                         }
194
-                    }
199
+                    }*/
195
                     array_push($orders, $data);
200
                     array_push($orders, $data);
196
                 }
201
                 }
197
             }
202
             }
211
                     $data["comment"] = false;
216
                     $data["comment"] = false;
212
                 }
217
                 }
213
                 // 未支付订单3小时后过期
218
                 // 未支付订单3小时后过期
214
-                if($order->status = 1) {
219
+                /*if($order->status = 1) {
215
                     if(Carbon::now()->subHours(3)->gt($order->created_at)) {
220
                     if(Carbon::now()->subHours(3)->gt($order->created_at)) {
216
                         continue;
221
                         continue;
217
                     }
222
                     }
218
-                }
223
+                }*/
219
                 array_push($orders, $data);
224
                 array_push($orders, $data);
220
             }
225
             }
221
             return Response()->json([
226
             return Response()->json([

Loading…
取消
儲存