|
@@ -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)
|