@ -35,7 +35,7 @@ class GameRatioMouldController extends AdminController
}
$this->checkListOrCountAuthRestMap($where);
$gameres = M("game","tab_")->field("tab_game.relation_game_id,tab_game.relation_game_name,IF(tab_game.original_package_name='','未配置',tab_game.original_package_name) original_package_name,tab_game_type.type_name game_type_name")->where($gamewhere)->join("tab_game_type on tab_game.game_type_id = tab_game_type.id")->group("tab_game.relation_game_id")->select(false);
$dbres = $this->DBModel->alias('m')->join("LEFT JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")->where($where)->order('create_time desc, id desc');
$dbres = $this->DBModel->alias('m')->join("INNER JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")->where($where)->order('create_time desc, id desc');
if(isset($params['export'])){
$dbres = $dbres->select();
@ -79,7 +79,7 @@ class GameRatioMouldController extends AdminController
));
}
$count = $this->DBModel->alias('m')->field("count(id) count")->join("LEFT JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")->where($where)->find()['count'];
$count = $this->DBModel->alias('m')->field("count(id) count")->join("INNER JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")->where($where)->find()['count'];
$this->assign('data', $dbres);
$page = set_pagination($count, $row);
if($page) {
@ -149,7 +149,7 @@ class GameRatioMouldController extends AdminController
$id = intval($id);
$map['id'] = $id;
$gameres = M("game","tab_")->field("tab_game.relation_game_id,tab_game.relation_game_name,IF(tab_game.original_package_name='','未配置',tab_game.original_package_name) original_package_name,tab_game_type.type_name game_type_name")->join("tab_game_type on tab_game.game_type_id = tab_game_type.id")->group("tab_game.relation_game_id")->select(false);
$dbres = $this->DBModel->alias('m')->join("LEFT JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")->where($map)->find();
$dbres = $this->DBModel->alias('m')->join("INNER JOIN ({$gameres}) g ON m.relation_game_id = g.relation_game_id")->where($map)->find();