|
|
|
@ -121,6 +121,7 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
}
|
|
|
|
|
private function getJoinPromoteData($map,$istimeselect,$type="spend")
|
|
|
|
|
{
|
|
|
|
|
setPowerPromoteIds($map,"s.promote_id");
|
|
|
|
|
if ($_REQUEST['promote_id'] != '') {
|
|
|
|
|
if ($_REQUEST['promote_id'] == 0) {
|
|
|
|
|
$map['s.promote_id'] = 0;
|
|
|
|
@ -276,6 +277,7 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
}
|
|
|
|
|
private function promoteUserData($map,$istimeselect,$type="spend")
|
|
|
|
|
{
|
|
|
|
|
setPowerPromoteIds($map,"s.promote_id");
|
|
|
|
|
if ($_REQUEST['promote_id'] != '') {
|
|
|
|
|
if ($_REQUEST['promote_id'] == 0) {
|
|
|
|
|
$map['s.promote_id'] = 0;
|
|
|
|
@ -436,14 +438,8 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
$map['pay_order_number'] = $_REQUEST['pay_order_number'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty(I('partner_id'))) {
|
|
|
|
|
$wherePartner = I('partner_id');
|
|
|
|
|
$gameId = M("game","tab_")->field("id")->where("partner_id={$wherePartner}")->select();
|
|
|
|
|
$gameId = implode(',',array_column($gameId,'id'));
|
|
|
|
|
$map['game_id'] = ['in',$gameId];
|
|
|
|
|
}
|
|
|
|
|
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) {
|
|
|
|
|
$map["game_id"] = array("in",implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
|
|
|
|
|
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type']) || isset($_REQUEST['partner_id'])) {
|
|
|
|
|
$map["game_id"] = array("in",implode(',', array_column(getGameidByPartnerNameType($_REQUEST['partner_id'],$_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
|
|
|
@ -595,18 +591,21 @@ class FinancePromoteController extends AdminController
|
|
|
|
|
$map['pay_order_number'] = $_REQUEST['pay_order_number'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty(I('partner_id'))&&empty(I("game_id"))) {
|
|
|
|
|
$wherePartner = I('partner_id');
|
|
|
|
|
$gameId = M("game","tab_")->field("id")->where("partner_id={$wherePartner}")->select();
|
|
|
|
|
$gameId = implode(',',array_column($gameId,'id'));
|
|
|
|
|
$map['tab_spend.game_id'] = ['in',$gameId];
|
|
|
|
|
}
|
|
|
|
|
// if (!empty(I('partner_id'))&&empty(I("game_id"))) {
|
|
|
|
|
// $wherePartner = I('partner_id');
|
|
|
|
|
// $gameId = M("game","tab_")->field("id")->where("partner_id={$wherePartner}")->select();
|
|
|
|
|
// $gameId = implode(',',array_column($gameId,'id'));
|
|
|
|
|
// $map['tab_spend.game_id'] = ['in',$gameId];
|
|
|
|
|
// }
|
|
|
|
|
if (!empty(I("game_id"))) {
|
|
|
|
|
$map['tab_spend.game_id'] = I("game_id");
|
|
|
|
|
}
|
|
|
|
|
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) {
|
|
|
|
|
$map["tab_spend.game_id"] = array("in",implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
|
|
|
|
|
if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type']) || isset($_REQUEST['partner_id'])) {
|
|
|
|
|
$map["tab_spend.game_id"] = array("in",implode(',', array_column(getGameidByPartnerNameType($_REQUEST['partner_id'],$_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
|
|
|
|
|
}
|
|
|
|
|
// if (isset($_REQUEST['game_name']) || isset($_REQUEST['game_type'])) {
|
|
|
|
|
// $map["tab_spend.game_id"] = array("in",implode(',', array_column(getGameByName($_REQUEST['game_name'], $_REQUEST['game_type']), 'id')) );
|
|
|
|
|
// }
|
|
|
|
|
|
|
|
|
|
if (isset($_REQUEST['time_start']) && isset($_REQUEST['time_end'])) {
|
|
|
|
|
$map['pay_time'] = ['between', [strtotime($_REQUEST['time_start']), strtotime($_REQUEST['time_end']) + 86399]];
|
|
|
|
|