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