master
elf 2 years ago
parent cc854b7f6a
commit 547be56d16

@ -1337,11 +1337,17 @@ class MarketPercentageController extends ThinkController
$map = ['_string' => '1=1']; $map = ['_string' => '1=1'];
$groupIds = $this->MarketEvent->getMarketGroupId(); $groupIds = $this->MarketEvent->getMarketGroupId();
$conditions = [];
if (empty($groupIds)) {
$conditions['_string'] = '1=0';
} else {
$conditions['group_id'] = ['in', $groupIds];
}
$admin_data = M("member") $admin_data = M("member")
->field("access.uid admin_id") ->field("access.uid admin_id")
->join("left join sys_auth_group_access access on sys_member.uid = access.uid") ->join("left join sys_auth_group_access access on sys_member.uid = access.uid")
->join("left join sys_auth_group auth on access.group_id=auth.id") ->join("left join sys_auth_group auth on access.group_id=auth.id")
->where(['group_id' => ['in', $groupIds]]) ->where($conditions)
->select(); ->select();
if ($admin_data) { if ($admin_data) {
$map['tab_market_altogether.admin_id'] = ['in', array_column($admin_data, 'admin_id')]; $map['tab_market_altogether.admin_id'] = ['in', array_column($admin_data, 'admin_id')];

@ -100,12 +100,20 @@ class PayChannelController extends ThinkController
$handleCoinData[$value['game_id']] = $value['platform_coin']; $handleCoinData[$value['game_id']] = $value['platform_coin'];
} }
//测试白名单 //测试白名单
$testList = implode(",",M("test_white_list","tab_")->getField("user_id",true)); $testList = M("test_white_list","tab_")->getField("user_id",true);
$conditions = [];
if (empty($testList)) {
$conditions['_string'] = '1=0';
} else {
$conditions['user_id'] = ['in', $testList];
}
//测试数据汇总计算 //测试数据汇总计算
$testData = M('spend','tab_') $testData = M('spend','tab_')
->field("sum(pay_amount) as test_coin,game_name,game_id") ->field("sum(pay_amount) as test_coin,game_name,game_id")
->where($map) ->where($map)
->where("user_id in ({$testList})") ->where($conditions)
->group('game_id') ->group('game_id')
->select(); ->select();

@ -1095,7 +1095,7 @@ class PromoteCompanyController extends ThinkController
} }
$list = M('service_agreement', 'tab_') $list = M('service_agreement', 'tab_')
->field("tab_service_agreement.*, group_concat(distinct(tab_promote_company.company_name)) as company_name") ->field("tab_service_agreement.*, group_concat(distinct(tab_promote_company.company_name)) as company_name")
->join('tab_promote_company on tab_promote_company.service_agreement_show = tab_service_agreement.id', 'LEFT')->where($map)->group('tab_service_agreement.id asc')->page($p, $row)->order("status desc")->select(); ->join('tab_promote_company on tab_promote_company.service_agreement_show = tab_service_agreement.id', 'LEFT')->where($map)->group('tab_service_agreement.id')->page($p, $row)->order("status desc")->select();
$count = M('service_agreement', 'tab_')->where($map)->count(); $count = M('service_agreement', 'tab_')->where($map)->count();
$page = set_pagination($count, $row); $page = set_pagination($count, $row);
if ($page) { if ($page) {

@ -897,9 +897,12 @@ class SpendModel extends Model
*/ */
public function gameStatistics($map,$gameIds, $row = 0, $page = 1) public function gameStatistics($map,$gameIds, $row = 0, $page = 1)
{ {
$gameMap = [ $gameMap = [];
"g.id"=>["in",$gameIds] if (empty($gameIds)) {
]; $gameMap['_string'] = '1=0';
} else {
$gameMap['g.id'] = ['in', $gameIds];
}
$gameQuery = M('game', 'tab_') $gameQuery = M('game', 'tab_')
->alias('g') ->alias('g')
->field(['g.id game_id', 'g.relation_game_name game_name', 'g.unique_code', 'g.game_type_name', 'g.sdk_version','IFNULL(p.partner,"无") as partner_name']) ->field(['g.id game_id', 'g.relation_game_name game_name', 'g.unique_code', 'g.game_type_name', 'g.sdk_version','IFNULL(p.partner,"无") as partner_name'])

Loading…
Cancel
Save