zxhxx 3 years ago
parent
commit
1655aff16c
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/models/store/Package.php

+ 2 - 1
app/models/store/Package.php

@@ -219,7 +219,7 @@ class Package extends BaseModel
     }
     }
     public static function take_out($id)
     public static function take_out($id)
     {
     {
-        $info = self::where('pay_time','<',strtotime("-".sys_config('order_whole_time')." hour"))->where('id',$id)->find();
+        $info = self::where('submit_time','<',strtotime("-".sys_config('order_whole_time')." hour"))->where('id',$id)->find();
         if($info)
         if($info)
         {
         {
             $data['status'] = 2;
             $data['status'] = 2;
@@ -235,6 +235,7 @@ class Package extends BaseModel
                     User::where('uid', $info['to_uid'])->update(['gold'=>0]);
                     User::where('uid', $info['to_uid'])->update(['gold'=>0]);
                 }
                 }
                 if ($info['last_id'] > 0) self::edit(['status' => 4], $info['last_id']);
                 if ($info['last_id'] > 0) self::edit(['status' => 4], $info['last_id']);
+                self::edit($data,$id);
                 self::commitTrans();
                 self::commitTrans();
             }
             }
             catch (Exception $e)
             catch (Exception $e)