|
|
|
|
@ -245,14 +245,14 @@ class infofix extends CI_Controller
|
|
|
|
|
* 转化旧版构建工具数据(上线前的准备)
|
|
|
|
|
* @param mixed $ic_id
|
|
|
|
|
*/
|
|
|
|
|
public function migrate_hb($ic_id, $dev = 'prod')
|
|
|
|
|
public function migrate_hb($dev = 'prod')
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
$ic_id = $this->input->get('ic_id');
|
|
|
|
|
// 本地测试参数
|
|
|
|
|
$api = 'https://hmk.arachina.com/beta/3733/server_render2';
|
|
|
|
|
if ($dev == 'dev') {
|
|
|
|
|
$api = 'http://127.0.0.1:3733/server_render2';
|
|
|
|
|
sleep(1);
|
|
|
|
|
// sleep(1);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 请求api
|
|
|
|
|
@ -271,10 +271,12 @@ class infofix extends CI_Controller
|
|
|
|
|
$curl_rs = curl_exec($ch);
|
|
|
|
|
$httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
|
|
|
|
|
if ($curl_rs && ($httpCode == 200 || $httpCode == 201)) {
|
|
|
|
|
// 先备份
|
|
|
|
|
$is = $this->infoContents_model->get_isid_by_icid($ic_id);
|
|
|
|
|
$ic = $this->infoContents_model->get_ic_contents2($ic_id);
|
|
|
|
|
$this->logs_model->backup($is->is_id, $ic->ic_content);
|
|
|
|
|
// 先备份 - 测试时不备份
|
|
|
|
|
if ($dev != 'dev') {
|
|
|
|
|
$is = $this->infoContents_model->get_isid_by_icid($ic_id);
|
|
|
|
|
$ic = $this->infoContents_model->get_ic_contents2($ic_id);
|
|
|
|
|
$this->logs_model->backup($is->is_id, $ic->ic_content);
|
|
|
|
|
}
|
|
|
|
|
// 移除外部包裹标签
|
|
|
|
|
$curl_rs = str_replace(array('<my_lmr_tpl>', '</my_lmr_tpl>'), '', $curl_rs);
|
|
|
|
|
// 强制更新信息内容
|
|
|
|
|
|