|
@@ -493,16 +493,17 @@ class Teacher extends Api |
|
@@ -493,16 +493,17 @@ class Teacher extends Api |
493
|
->where('id',$param['id'])
|
493
|
->where('id',$param['id'])
|
494
|
->find();
|
494
|
->find();
|
495
|
if($res['is_check'] == 1){
|
495
|
if($res['is_check'] == 1){
|
496
|
- $info = Db::name('territory')
|
|
|
497
|
- ->where('id',$param['id'])
|
|
|
498
|
- ->update($param);
|
|
|
499
|
- if(empty($info)){
|
|
|
500
|
- $this->error('sql执行错误');
|
|
|
501
|
- }else{
|
|
|
502
|
- $a = Db::name('territory')->where('id',$param['id'])->find();
|
|
|
503
|
- Db::name('teacher')->where('user_id',$a['user_id'])->update(['status'=>0]);
|
|
|
504
|
- $this->success('SUCCESS');
|
|
|
505
|
- }
|
496
|
+ $this->error('请先取消点亮再编辑');
|
|
|
497
|
+// $info = Db::name('territory')
|
|
|
498
|
+// ->where('id',$param['id'])
|
|
|
499
|
+// ->update($param);
|
|
|
500
|
+// if(empty($info)){
|
|
|
501
|
+// $this->error('sql执行错误');
|
|
|
502
|
+// }else{
|
|
|
503
|
+// $a = Db::name('territory')->where('id',$param['id'])->find();
|
|
|
504
|
+// Db::name('teacher')->where('user_id',$a['user_id'])->update(['status'=>0]);
|
|
|
505
|
+// $this->success('SUCCESS');
|
|
|
506
|
+// }
|
506
|
}else{
|
507
|
}else{
|
507
|
$info = Db::name('territory')
|
508
|
$info = Db::name('territory')
|
508
|
->where('id',$param['id'])
|
509
|
->where('id',$param['id'])
|