正在显示
1 个修改的文件
包含
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]); |
-
请 注册 或 登录 后发表评论