diff --git a/Application/Admin/Controller/ConsoleController.class.php b/Application/Admin/Controller/ConsoleController.class.php index e0cd49d15..a92ad24fd 100644 --- a/Application/Admin/Controller/ConsoleController.class.php +++ b/Application/Admin/Controller/ConsoleController.class.php @@ -334,8 +334,8 @@ class ConsoleController extends Think { ->join('tab_partner p on pdw.partner_id = p.id') ->join('tab_game g on pdw.partner_id = g.partner_id') ->join('tab_cp_game_ratio cgr on cgr.game_id = g.id and begin_total_amount = 0 and is_del = 0') - ->join('tab_spend s on s.game_id = g.id') - ->where(['pdw.status'=>1, 's.pay_status'=>1]) + ->join('tab_game_data s on s.game_id = g.id') + ->where(['pdw.status'=>1]) ->group('pdw.id') ->select(); if (!$warns) return; diff --git a/Application/Admin/Controller/GameController.class.php b/Application/Admin/Controller/GameController.class.php index 3004b3d80..336f8b147 100644 --- a/Application/Admin/Controller/GameController.class.php +++ b/Application/Admin/Controller/GameController.class.php @@ -899,11 +899,12 @@ class GameController extends ThinkController ->join("tab_game g on pdw.partner_id = g.partner_id", 'left') ->where(array_merge($map)) ->group('pdw.id, p.partner') + ->order('create_time desc') ->page($p, $row)->select(); $count = M('partner_divide_warn', 'tab_')->alias('pdw')->join("tab_game g on pdw.partner_id = g.partner_id", 'left')->group('pdw.id')->where($map)->count(); if (!empty($list)) { foreach ($list as &$item) { - $item['total_amount'] = M('spend', 'tab_')->where(['pay_status'=>1, 'game_id'=>['in',explode(',', $item['game_id'])]])->sum('pay_amount'); + $item['total_amount'] = M('game_data', 'tab_')->where(['game_id'=>['in',explode(',', $item['game_id'])]])->sum('pay_amount'); } } $page = set_pagination($count, $row); @@ -957,7 +958,7 @@ class GameController extends ThinkController "key"=>$partner_name, "url"=>U("Game/devide_warn_list",array("partner_id"=>$_POST['partner_id'])) )); - return $upt ? $this->success("更新成功") : $this->error("更新失败"); + return $upt ? $this->success("更新成功", U('Game/devide_warn_list')) : $this->error("更新失败"); } else { if (M('partner_divide_warn', 'tab_')->where(['partner_id'=>$_POST['partner_id'], 'status'=>1])->find()) { return $this->error('已有当前合作伙伴的预警设置'); @@ -975,7 +976,7 @@ class GameController extends ThinkController "url"=>U("Game/devide_warn_list",array("partner_id"=>$_POST['partner_id'])), "menu"=>"游戏-游戏管理-预付款预警管理-新增" )); - return $ins ? $this->success("新增成功") : $this->error("新增失败"); + return $ins ? $this->success("新增成功", U('Game/devide_warn_list')) : $this->error("新增失败"); } } else { $partners = M('partner', 'tab_')->field("id, partner")->where(['status'=>1])->order('last_up_time desc')->select();