作者 郭盛
1 个管道 的构建 通过 耗费 13 秒

修改编辑删除领域

@@ -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 /**
@@ -9695,7 +9695,7 @@ @@ -9695,7 +9695,7 @@
9695 9695
9696 <div class="row mt0 footer"> 9696 <div class="row mt0 footer">
9697 <div class="col-md-6" align="left"> 9697 <div class="col-md-6" align="left">
9698 - Generated on 2020-03-26 17:12:24 </div> 9698 + Generated on 2020-03-27 09:13:29 </div>
9699 <div class="col-md-6" align="right"> 9699 <div class="col-md-6" align="right">
9700 <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a> 9700 <a href="https://www.fastadmin.net" target="_blank">FastAdmin</a>
9701 </div> 9701 </div>