|
@@ -194,7 +194,7 @@ class SchoolManager extends Model{
|
|
|
$account = array();
|
|
|
|
|
|
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;
|
|
@@ -206,14 +206,14 @@ class SchoolManager extends Model{
|
|
|
|
|
|
$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){
|
|
|
if(!$pageSize)
|
|
|
return 0;
|
|
|
|
|
|
- $rs = $this->conn->createCommand("select count(*) from teacher")->queryRow();
|
|
|
+ $rs = $this->conn->createCommand("select count(*) from xb_teacher")->queryRow();
|
|
|
$rs = current($rs);
|
|
|
|
|
|
return ceil($rs / $pageSize);
|
|
@@ -1703,7 +1703,7 @@ select t.*,tr.class_id from teacher as t LEFT JOIN teacher_class_relation tr on
|
|
|
if(!$teacherId)
|
|
|
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);
|
|
|
|
|
|
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();
|
|
|
$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->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();
|
|
|
|
|
|
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_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){
|
|
|
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);
|
|
|
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'];
|
|
|
$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();
|
|
|
if($teacher_data){
|
|
|
$rs['rs'][$k]['phone_number'] = $teacher_data['phone_number'];
|