diff --git a/application/controllers/info_amp.php b/application/controllers/info_amp.php index 0b7a04e2..bf6541ec 100644 --- a/application/controllers/info_amp.php +++ b/application/controllers/info_amp.php @@ -511,5 +511,33 @@ class Info_amp extends CI_Controller ))); } } + + public function save_history() { + $json = $this->input->get_post('json'); + $icid = $this->input->get_post('icid'); + if ($json && $icid) { + echo json_encode($this->Logs_model->backup_meta($icid, $json, 'AMP_HISTORY')); + } else { + echo 'error'; + } + } + + public function list_history() { + $icid = $this->input->get_post('icid'); + if ($icid) { + echo json_encode($this->Logs_model->backup_meta($icid, 'AMP_HISTORY')); + } else { + echo 'error'; + } + } + + public function pick_history() { + $log_id = $this->input->get_post('log_id'); + if ($log_id) { + echo json_encode($this->Logs_model->backup_meta($log_id)); + } else { + echo 'error'; + } + } } diff --git a/application/models/logs_model.php b/application/models/logs_model.php index 4f6eb9f1..5225343f 100644 --- a/application/models/logs_model.php +++ b/application/models/logs_model.php @@ -154,6 +154,21 @@ class Logs_model extends CI_Model { function backup_meta($is_id, $log_content, $meta_code) { return $this->write('backup_meta_'.$meta_code, $is_id, $log_content); } + //列表信息meta内容,lmr - 2020/03/23 + function list_backup_meta($is_id, $meta_code) { + $this->init(); + $this->top_num = 50; + $this->log_res_id = $this->HT->escape($is_id); + $this->log_action = 'backup_meta_'.$meta_code; + return $this->get_list(); + } + //制定读取信息meta内容,lmr - 2020/03/23 + function pick_backup_meta($log_id) { + $this->init(); + $this->top_num = 1; + $this->log_id = $this->HT->escape($is_id); + return $this->get_list(); + } //备份信息简介 function backup_summary($is_id, $log_content) {