hrjy 2 年之前
父節點
當前提交
cb6bb8574d

+ 6 - 0
app/admin/controller/auction/AuctionOrder.php

@@ -71,6 +71,12 @@ class AuctionOrder extends AuthController
         $data = model::list($where);
         foreach ($data['data'] as $key => $val){
             if ($data['data'][$key]['uid'] == 0) $data['data'][$key]['nickname'] = '管理';
+            if ($data['data'][$key]['voucher_time'] == 0) {
+                $data['data'][$key]['voucher_time'] = '未上传';
+            }else{
+                $data['data'][$key]['voucher_time'] = date('Y-m-d H:i:s', $data['data'][$key]['voucher_time']);
+            }
+
         }
 
 

+ 1 - 0
app/admin/view/auction/auction_order/index.php

@@ -256,6 +256,7 @@
             {field: 'status', title: '状态', templet: '#status', align: 'center'},
             {field: 'appeal', title: '申诉状态', templet: '#appeal', align: 'center'},
             {field: 'is_gs', title: '挂售状态', templet: '#is_gs', align: 'center'},
+            {field: 'voucher_time', title: '上传时间', templet: '#voucher_time', align: 'center'},
             {field: 'create_time', title: '购买时间', templet: '#date', align: 'center'},
             {field: 'right', title: '操作', align: 'center', toolbar: '#act'},
         ];

+ 15 - 15
app/models/auction/AuctionOrder.php

@@ -224,23 +224,23 @@ class AuctionOrder extends BaseModel
 
 
         $user = $userModel->find($data['uid']);
-        if ($user['is_new'] == 1) {
+        // if ($user['is_new'] == 1) {
 
-            if ($user['spread_uid']) {
-                $spread = $userModel->where('uid', $user['spread_uid'])->find();
-                if ($spread['green_time'] != strtotime(date('Y-m-d', strtotime('+1 day')))) {
-                    $spread['green_time'] = strtotime(date('Y-m-d', strtotime('+1 day'))); // 开启明天的绿色通道
-                    $spread->save();
-                }
+        //     if ($user['spread_uid']) {
+        //         $spread = $userModel->where('uid', $user['spread_uid'])->find();
+        //         if ($spread['green_time'] != strtotime(date('Y-m-d', strtotime('+1 day')))) {
+        //             $spread['green_time'] = strtotime(date('Y-m-d', strtotime('+1 day'))); // 开启明天的绿色通道
+        //             $spread->save();
+        //         }
 
-            }
-            $orderCount = AuctionOrder::where([['uid', '=', $user['uid']], ['status', '=', 3]])->count();
-            if ($orderCount >= 5) {
-                $user['is_new'] = 0;
-            }
+        //     }
+        //     $orderCount = AuctionOrder::where([['uid', '=', $user['uid']], ['status', '=', 3]])->count();
+        //     if ($orderCount >= 5) {
+        //         $user['is_new'] = 0;
+        //     }
 
 
-        }
+        // }
         $product = $productModel->where('id', $data['product_id'])->find();
         $auction = $auctionModel->where('id', $product['auction_id'])->find();
 
@@ -317,7 +317,7 @@ class AuctionOrder extends BaseModel
                         UserBill::expend('超时扣除', $v['uid'], 'anticipate', 'dec_anticipate', $dedu, $v['uid'], 0, '超时付款,扣除订单'.$v['order_id'].'冻结' . $dedu . '易趣卷');
                         $fz->save();
 
-                        AuctionOrder::where('create_time', '<', $hour)->where('status', '=', 1)->update(['status' => 0]); // 修改为已过期订单
+                        AuctionOrder::where('id', $v['id'])->where('status', '=', 1)->update(['status' => 0]); // 修改为已过期订单
                     }
 
                 } else {
@@ -350,7 +350,7 @@ class AuctionOrder extends BaseModel
                             UserBill::expend('超时扣除', $v['uid'], 'anticipate', 'dec_anticipate', $dedu, $v['uid'], 0, '超时付款,扣除预约冻结' . $dedu . '易趣卷');
                             $booking->save();
 
-                            AuctionOrder::where('create_time', '<', $hour)->where('status', '=', 1)->update(['status' => 0]); // 修改为已过期订单
+                            AuctionOrder::where('id', $v['id'])->where('status', '=', 1)->update(['status' => 0]); // 修改为已过期订单
                         }
                     }
                 }