优化推广后台显示的开服公告

master
chenzhi 5 years ago
parent c4eca18b4e
commit 3abfc47677

@ -100,7 +100,7 @@ class PromoteController extends BaseController
$today_start = mktime(0, 0, 0, date('m'), date('d'), date('Y'));
$today_end = mktime(0, 0, 0, date('m'), date('d') + 1, date('Y')) - 1;
$today_open_server_list = M("server as sv", "tab_")
$today_open_server_list = M("ServerNotice as sv", "tab_")
->where(
array("sv.start_time" => array("BETWEEN", array($today_start, $today_end)),
"sv.show_status" => 1))
@ -110,7 +110,7 @@ class PromoteController extends BaseController
->page(1, 20)
->select();
$count = M("server", "tab_")
$count = M("ServerNotice", "tab_")
->where(
array("start_time" => array("BETWEEN", array($today_start, $today_end)),
"show_status" => 1))
@ -442,7 +442,7 @@ class PromoteController extends BaseController
$map['sv.show_status'] = 1;
$count_map['show_status'] = 1;
$open_server_list = M("server as sv", "tab_")
$open_server_list = M("ServerNotice as sv", "tab_")
->where($map)
->join("left join tab_game gm on gm.id=sv.game_id")
->field('sv.*,gm.icon')
@ -450,7 +450,7 @@ class PromoteController extends BaseController
->page($pg, 20)
->select();
$count = M("server", "tab_")
$count = M("ServerNotice", "tab_")
->where($count_map)
->count();
//var_dump($count);

Loading…
Cancel
Save