|
@@ -488,6 +488,11 @@ class Teacher extends Api |
|
@@ -488,6 +488,11 @@ class Teacher extends Api |
488
|
$this->error($validate->getError());
|
488
|
$this->error($validate->getError());
|
489
|
}
|
489
|
}
|
490
|
$param['updatetime'] = time();
|
490
|
$param['updatetime'] = time();
|
|
|
491
|
+
|
|
|
492
|
+ $res = Db::name('territory')
|
|
|
493
|
+ ->where('id',$param['id'])
|
|
|
494
|
+ ->find();
|
|
|
495
|
+ if($res['is_check'] == 1){
|
491
|
$info = Db::name('territory')
|
496
|
$info = Db::name('territory')
|
492
|
->where('id',$param['id'])
|
497
|
->where('id',$param['id'])
|
493
|
->update($param);
|
498
|
->update($param);
|
|
@@ -498,6 +503,16 @@ class Teacher extends Api |
|
@@ -498,6 +503,16 @@ class Teacher extends Api |
498
|
Db::name('teacher')->where('user_id',$a['user_id'])->update(['status'=>0]);
|
503
|
Db::name('teacher')->where('user_id',$a['user_id'])->update(['status'=>0]);
|
499
|
$this->success('SUCCESS');
|
504
|
$this->success('SUCCESS');
|
500
|
}
|
505
|
}
|
|
|
506
|
+ }else{
|
|
|
507
|
+ $info = Db::name('territory')
|
|
|
508
|
+ ->where('id',$param['id'])
|
|
|
509
|
+ ->update($param);
|
|
|
510
|
+ if(empty($info)){
|
|
|
511
|
+ $this->error('sql执行错误');
|
|
|
512
|
+ }else{
|
|
|
513
|
+ $this->success('SUCCESS');
|
|
|
514
|
+ }
|
|
|
515
|
+ }
|
501
|
}
|
516
|
}
|
502
|
|
517
|
|
503
|
/**
|
518
|
/**
|