zxhxx 3 years ago
parent
commit
673c5ef335
2 changed files with 2 additions and 2 deletions
  1. 1 1
      app/api/controller/activity/WholeController.php
  2. 1 1
      app/models/store/Package.php

+ 1 - 1
app/api/controller/activity/WholeController.php

@@ -132,7 +132,7 @@ class WholeController
         if($time_id==0) return app('json')->fail('时间段不能为空');
         if($price==0) return app('json')->fail('价格不能为0');
         if($to_uid==0) $first_price = $price;
-        if($last_id>0 && !Package::be(['id'=>$last_id,'uid'=>$to_uid])) return app('json')->fail('非法数据');
+
         $rs = Package::reserve($request->uid(),$whole_id,$time_id,$to_uid,$price,$first_price,$last_id);
         if($rs)
         {

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

@@ -39,7 +39,7 @@ class Package extends BaseModel
         if($last_id>0 && self::where('last_id',$last_id)->where('uid',$uid)->find())
         {
             return self::setErrorInfo('你已报名,无需重复报名');
-        }elseif($last_id>0 && self::where('last_id',$last_id)->find())
+        }elseif($last_id>0 && self::where('last_id',$last_id)->where('status','>',-1)->find())
         {
             return self::setErrorInfo('该订单已有预约');
         }