作者 潘浩文
1 个管道 的构建 失败 耗费 1 秒

测试

@@ -147,7 +147,7 @@ class CoachPlanController extends RestBaseController @@ -147,7 +147,7 @@ class CoachPlanController extends RestBaseController
147 public function cancel(){ 147 public function cancel(){
148 $this->getUserId(); 148 $this->getUserId();
149 $param=$this->request->param(); 149 $param=$this->request->param();
150 - if (Db::name('coach_class')->where('id',$param['coach_class_id'])->find(['end_time'])<time()){ 150 + if (Db::name('coach_class')->where('id',$param['coach_class_id'])->find()['end_time']<time()){
151 $this->error(['code'=>'400001','msg'=>'已结束课程不能取消']); 151 $this->error(['code'=>'400001','msg'=>'已结束课程不能取消']);
152 } 152 }
153 $re=Db::name('coach_class')->where('id',$param['coach_class_id'])->update(['status'=>1]); 153 $re=Db::name('coach_class')->where('id',$param['coach_class_id'])->update(['status'=>1]);