|
|
|
@ -412,7 +412,8 @@ class DownloadController extends BaseController {
|
|
|
|
|
$initEndTime = empty(I('endtime')) ? $initEndTime : I('endtime');
|
|
|
|
|
$begTime = strtotime($initBegTime);
|
|
|
|
|
$endTime = strtotime($initEndTime);
|
|
|
|
|
|
|
|
|
|
$gameId = intval(I('game_id', 0));
|
|
|
|
|
$status = intval(I('status', 0));
|
|
|
|
|
$map['chain'] = ['like', $this->loginPromote['chain'] . $this->loginPromote['id'] . '/%'];
|
|
|
|
|
$ids = M('promote', 'tab_')->where($map)->getField('id', true);
|
|
|
|
|
$ids[] = $this->loginPromote['id'];
|
|
|
|
@ -423,7 +424,9 @@ class DownloadController extends BaseController {
|
|
|
|
|
if (!empty($payOrderNumber)) {
|
|
|
|
|
$map['pay_order_number'] = $payOrderNumber;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!empty($gameId)) {
|
|
|
|
|
$map['game_id'] = $gameId;
|
|
|
|
|
}
|
|
|
|
|
if (!empty($begTime) && empty($endTime)) {
|
|
|
|
|
$map['pay_time'] = ['egt', $begTime];
|
|
|
|
|
} elseif (empty($begTime) && !empty($endTime)) {
|
|
|
|
@ -431,6 +434,22 @@ class DownloadController extends BaseController {
|
|
|
|
|
} elseif (!empty($begTime) && !empty($endTime)) {
|
|
|
|
|
$map['pay_time'] = ['between', [$begTime, $endTime + 86399]];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (isset($_GET['status'])) {
|
|
|
|
|
if ($status == -2) {
|
|
|
|
|
$map['selle_status'] = 0;
|
|
|
|
|
} else {
|
|
|
|
|
$withdrawMap['promote_id'] = $this->loginPromote['id'];
|
|
|
|
|
$withdrawMap['status'] = $status;
|
|
|
|
|
$withdrawIds = M('withdraw', 'tab_')->where($withdrawMap)->getField('id', true);
|
|
|
|
|
|
|
|
|
|
if (empty($withdrawIds)) {
|
|
|
|
|
$map = '1 = 2';
|
|
|
|
|
} else {
|
|
|
|
|
$map['withdraw_id'] = ['in', $withdrawIds];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
$conditions = json_encode($map,TRUE);
|
|
|
|
|
$addtime = time();
|
|
|
|
|
$data = [
|
|
|
|
|