|
@@ -194,7 +194,7 @@ class SchoolManager extends Model{
|
|
$account = array();
|
|
$account = array();
|
|
|
|
|
|
if($teacherId){
|
|
if($teacherId){
|
|
- $account = $this->conn->createCommand("select * from teacher where teacher_id = '{$teacherId}'")->queryRow();
|
|
|
|
|
|
+ $account = $this->conn->createCommand("select * from xb_teacher where teacher_id = '{$teacherId}'")->queryRow();
|
|
}
|
|
}
|
|
|
|
|
|
return $account;
|
|
return $account;
|
|
@@ -206,7 +206,7 @@ class SchoolManager extends Model{
|
|
|
|
|
|
$teachersIds = "'".implode("','", $teachersIds)."'";
|
|
$teachersIds = "'".implode("','", $teachersIds)."'";
|
|
|
|
|
|
- return $this->conn->createCommand("select * from teacher where teacher_id in({$teachersIds})")->queryAll();
|
|
|
|
|
|
+ return $this->conn->createCommand("select * from xb_teacher where teacher_id in({$teachersIds})")->queryAll();
|
|
}
|
|
}
|
|
|
|
|
|
public function countTeachersAccountsPages($pageSize){
|
|
public function countTeachersAccountsPages($pageSize){
|
|
@@ -1703,7 +1703,7 @@ select t.*,tr.class_id from teacher as t LEFT JOIN teacher_class_relation tr on
|
|
if(!$teacherId)
|
|
if(!$teacherId)
|
|
return false;
|
|
return false;
|
|
|
|
|
|
- $rs = $this->conn->createCommand("select exists(select * from teacher where teacher_id = '{$teacherId}')")->queryRow();
|
|
|
|
|
|
+ $rs = $this->conn->createCommand("select exists(select * from xb_teacher where teacher_id = '{$teacherId}')")->queryRow();
|
|
$rs = current($rs);
|
|
$rs = current($rs);
|
|
|
|
|
|
return $rs ? true : false;
|
|
return $rs ? true : false;
|
|
@@ -1729,7 +1729,7 @@ select t.*,tr.class_id from teacher as t LEFT JOIN teacher_class_relation tr on
|
|
$trans1 = $this->sConn->beginTransaction();
|
|
$trans1 = $this->sConn->beginTransaction();
|
|
$trans2 = $this->conn->beginTransaction();
|
|
$trans2 = $this->conn->beginTransaction();
|
|
|
|
|
|
- $this->conn->createCommand("update teacher set status = '2' where teacher_id = '{$teacherId}'")->execute();
|
|
|
|
|
|
+ $this->conn->createCommand("update xb_teacher set status = '2' where teacher_id = '{$teacherId}'")->execute();
|
|
$this->sConn->createCommand("update teacher set status = '2' where teacher_id = '{$teacherId}'")->execute();
|
|
$this->sConn->createCommand("update teacher set status = '2' where teacher_id = '{$teacherId}'")->execute();
|
|
$this->kickTeacher($teacherId);
|
|
$this->kickTeacher($teacherId);
|
|
|
|
|
|
@@ -1778,7 +1778,7 @@ select t.*,tr.class_id from teacher as t LEFT JOIN teacher_class_relation tr on
|
|
$trans2 = $this->conn->beginTransaction();
|
|
$trans2 = $this->conn->beginTransaction();
|
|
|
|
|
|
if($teacherAccountExists){
|
|
if($teacherAccountExists){
|
|
- $this->conn->createCommand("delete from teacher where teacher_id = '{$teacherId}'")->execute();
|
|
|
|
|
|
+ $this->conn->createCommand("delete from xb_teacher where teacher_id = '{$teacherId}'")->execute();
|
|
}
|
|
}
|
|
$this->sConn->createCommand("delete from teacher where teacher_id = '{$teacherId}'")->execute();
|
|
$this->sConn->createCommand("delete from teacher where teacher_id = '{$teacherId}'")->execute();
|
|
$this->sConn->createCommand("delete from teacher_class_relation where teacher_id = '{$teacherId}'")->execute();
|
|
$this->sConn->createCommand("delete from teacher_class_relation where teacher_id = '{$teacherId}'")->execute();
|
|
@@ -2792,7 +2792,7 @@ select t.*,tr.class_id from teacher as t LEFT JOIN teacher_class_relation tr on
|
|
|
|
|
|
public function teacherPhoneNumberExists($phoneNumber){
|
|
public function teacherPhoneNumberExists($phoneNumber){
|
|
if($phoneNumber){
|
|
if($phoneNumber){
|
|
- $count = $this->conn->createCommand("select exists(select * from teacher where phone_number = '{$phoneNumber}')")->queryRow();
|
|
|
|
|
|
+ $count = $this->conn->createCommand("select exists(select * from xb_teacher where phone_number = '{$phoneNumber}')")->queryRow();
|
|
$count = current($count);
|
|
$count = current($count);
|
|
return $count ? true : false;
|
|
return $count ? true : false;
|
|
}
|
|
}
|
|
@@ -7877,7 +7877,7 @@ select t.*,tr.class_id from teacher as t LEFT JOIN teacher_class_relation tr on
|
|
$report_id = $v['report_id'];
|
|
$report_id = $v['report_id'];
|
|
$semester_id = $v['semester_id'];
|
|
$semester_id = $v['semester_id'];
|
|
//获取教师登陆账号
|
|
//获取教师登陆账号
|
|
- $sql = "select phone_number from teacher where teacher_id = '{$teacher_id}'";
|
|
|
|
|
|
+ $sql = "select phone_number from xb_teacher where teacher_id = '{$teacher_id}'";
|
|
$teacher_data = $this->conn->createCommand($sql)->queryRow();
|
|
$teacher_data = $this->conn->createCommand($sql)->queryRow();
|
|
if($teacher_data){
|
|
if($teacher_data){
|
|
$rs['rs'][$k]['phone_number'] = $teacher_data['phone_number'];
|
|
$rs['rs'][$k]['phone_number'] = $teacher_data['phone_number'];
|