|
|
@ -30,6 +30,7 @@ class search extends CI_Controller{
|
|
|
|
//调用查询模块
|
|
|
|
//调用查询模块
|
|
|
|
$search_return = $this->Searchtrain($train_date,$fromStation,$toStation);
|
|
|
|
$search_return = $this->Searchtrain($train_date,$fromStation,$toStation);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//调用数据处理模块
|
|
|
|
//调用数据处理模块
|
|
|
|
$returnJson = $this->dataOperate($search_return,$fromStation,$toStation);
|
|
|
|
$returnJson = $this->dataOperate($search_return,$fromStation,$toStation);
|
|
|
|
|
|
|
|
|
|
|
@ -70,17 +71,20 @@ class search extends CI_Controller{
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
$cache_train_info = $this->BIZ_train_model->get_train_info($fromStation,$toStation);
|
|
|
|
$cache_train_info = $this->BIZ_train_model->get_train_info($fromStation,$toStation);
|
|
|
|
if(empty($cache_train_info)){
|
|
|
|
if(empty($cache_train_info)){
|
|
|
|
$operate_data = null;
|
|
|
|
log_message('error','TRAIN 查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|缓存为空');
|
|
|
|
|
|
|
|
$operate_data = NULL;
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
$cache_time = $cache_train_info->tpc_datetime;
|
|
|
|
$cache_time = $cache_train_info->tpc_datetime;
|
|
|
|
$now_time = time();
|
|
|
|
$now_time = time();
|
|
|
|
$differ_time = ($now_time - strtotime($cache_time)) / 86400;
|
|
|
|
$differ_time = ($now_time - strtotime($cache_time)) / 86400;
|
|
|
|
if($differ_time >= 3){
|
|
|
|
if($differ_time >= 3){
|
|
|
|
$this->delete_traincache($fromStation,$toStation);
|
|
|
|
$this->BIZ_train_model->delete_traincache($fromStation,$toStation);
|
|
|
|
|
|
|
|
log_message('error','TRAIN 查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|缓存超时,已经删除');
|
|
|
|
|
|
|
|
$operate_data = NULL;
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
$this->cache = 'yes';
|
|
|
|
$this->cache = 'yes';
|
|
|
|
$operate_data = $cache_train_info->tpc_content;
|
|
|
|
$operate_data = $cache_train_info->tpc_content;
|
|
|
|
log_message('error','查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|调用缓存号:'.$cache_train_info->tpc_sn.'|缓存生成的时间:'.$cache_train_info->tpc_datetime);
|
|
|
|
log_message('error','TRAIN 查询为空的链接:'.$this->url.'|出错的原因:'.$this->reason.'|调用缓存号:'.$cache_train_info->tpc_sn.'|缓存生成的时间:'.$cache_train_info->tpc_datetime);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|