|
@@ -26,8 +26,9 @@ class ParseapiController extends CController
|
|
}
|
|
}
|
|
|
|
|
|
// 连接业务库
|
|
// 连接业务库
|
|
- $busDsn = 'mysql:host=' . Yii::app()->params["default_server"]['addr'] . ';dbname=' . Yii::app()->params["default_db"]['name'] . ';';
|
|
|
|
- $busDbh = new PDO($busDsn, Yii::app()->params["default_server"]['username'], Yii::app()->params["default_server"]['password'], array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES "utf8";'));
|
|
|
|
|
|
+// $busDsn = 'mysql:host=' . Yii::app()->params["businessDb"]['addr'] . ';dbname=' . Yii::app()->params["default_db"]['name'] . ';';
|
|
|
|
+// $busDbh = new PDO($busDsn, Yii::app()->params["default_server"]['username'], Yii::app()->params["default_server"]['password'], array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES "utf8";'));
|
|
|
|
+ $busDbh = Yii::app()->businessDb;
|
|
$getDataBase = $busDbh->query('SELECT * FROM `database` WHERE `school_id`=' . $schoolId);
|
|
$getDataBase = $busDbh->query('SELECT * FROM `database` WHERE `school_id`=' . $schoolId);
|
|
$dataBaseInfo = $getDataBase->fetch(PDO::FETCH_ASSOC);
|
|
$dataBaseInfo = $getDataBase->fetch(PDO::FETCH_ASSOC);
|
|
if (empty($dataBaseInfo)) {
|
|
if (empty($dataBaseInfo)) {
|
|
@@ -370,7 +371,7 @@ class ParseapiController extends CController
|
|
}
|
|
}
|
|
|
|
|
|
// 如果是全学科题库标注任务推送给题库
|
|
// 如果是全学科题库标注任务推送给题库
|
|
- $zsyapiParam = Yii::app()->params['api'][3];
|
|
|
|
|
|
+ $zsyapiParam = Yii::app()->params['api'][1];
|
|
$zsyapiParam['prefix'] .= 'task_exam/check_topic';
|
|
$zsyapiParam['prefix'] .= 'task_exam/check_topic';
|
|
self::getApiData($zsyapiParam, 2, json_encode(array('examGroupId' => $word['exam_group_id'], 'topics' => $taskCheckTopics)), 5);
|
|
self::getApiData($zsyapiParam, 2, json_encode(array('examGroupId' => $word['exam_group_id'], 'topics' => $taskCheckTopics)), 5);
|
|
|
|
|
|
@@ -575,7 +576,7 @@ class ParseapiController extends CController
|
|
|
|
|
|
//全学科试题调用java检索缓存接口
|
|
//全学科试题调用java检索缓存接口
|
|
public function searchTopics($topicIds = array(),$schoolId = 0){
|
|
public function searchTopics($topicIds = array(),$schoolId = 0){
|
|
- $apiParam = Yii::app()->params['api'][4];
|
|
|
|
|
|
+ $apiParam = Yii::app()->params['api'][3];
|
|
if($apiParam && $topicIds && $schoolId){
|
|
if($apiParam && $topicIds && $schoolId){
|
|
$url = $apiParam['prefix'].'cgi/teacher/schtk/qxk/school-topic-flush/'.$schoolId;
|
|
$url = $apiParam['prefix'].'cgi/teacher/schtk/qxk/school-topic-flush/'.$schoolId;
|
|
self::getApiData(array(
|
|
self::getApiData(array(
|