自动更新关键词增加只更新某个站点功能

hotfix/远程访问多媒体中心
尹诚诚 9 years ago
parent 6951aed701
commit ec97cd34c6

File diff suppressed because it is too large Load Diff

@ -64,7 +64,7 @@ class infoKeywords_model extends CI_Model
} }
//获取关键词列表用于抓取排名 //获取关键词列表用于抓取排名
public function get_keyworld_list($top=1,$engines='') public function get_keyworld_list($top=1,$engines='',$site_code=false)
{ {
$today = strtotime(date('Y-m-d')); $today = strtotime(date('Y-m-d'));
$mapsql=""; $mapsql="";
@ -79,6 +79,10 @@ class infoKeywords_model extends CI_Model
}elseif ($engines=='eu') { }elseif ($engines=='eu') {
$map.=" AND kw_sitecode in ('gm','vc','vac','ru','it','jp') "; $map.=" AND kw_sitecode in ('gm','vc','vac','ru','it','jp') ";
} }
//只查某个站点,原因是个事业部服务器分开,只需要查询本事业部站点即可
if(!empty($site_code)){
$map.=" AND kw_sitecode in ('$site_code') ";
}
$sql = "SELECT TOP $top kw_id, $sql = "SELECT TOP $top kw_id,
kw_keyworlds, kw_keyworlds,
kw_is_id, kw_is_id,
@ -90,6 +94,7 @@ class infoKeywords_model extends CI_Model
ORDER BY newid()"; ORDER BY newid()";
$query = $this->HT->query($sql); $query = $this->HT->query($sql);
//print_r($this->HT->queries);
$result = $query->result(); $result = $query->result();
return $result; return $result;
} }

Loading…
Cancel
Save