|
|
|
@ -227,6 +227,8 @@ class PromoteGameRatioController extends ThinkController
|
|
|
|
|
$this->error('参数异常');
|
|
|
|
|
}
|
|
|
|
|
if ($promoteGameRatio['status'] == -1 || $save['begin_time'] != $promoteGameRatio['begin_time'] || $save['end_time'] != $promoteGameRatio['end_time'] || $save['ratio'] != $promoteGameRatio['ratio'] || $save['remark'] != $promoteGameRatio['remark'] || $save['turnover_ratio'] != $promoteGameRatio['turnover_ratio']) {
|
|
|
|
|
$this->isWithdraw($promoteGameRatio['promote_id'], $save['begin_time']);
|
|
|
|
|
|
|
|
|
|
if ($promoteGameRatio['status'] == 1) {
|
|
|
|
|
$save['last_turnover_ratio'] = $promoteGameRatio['turnover_ratio'];
|
|
|
|
|
$save['last_ratio'] = $promoteGameRatio['ratio'];
|
|
|
|
@ -252,6 +254,8 @@ class PromoteGameRatioController extends ThinkController
|
|
|
|
|
$this->error('参数异常');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$this->isWithdraw($promoteId, $save['begin_time']);
|
|
|
|
|
|
|
|
|
|
$map['promote_id'] = $promoteId;
|
|
|
|
|
$map['game_id'] = $gameId;
|
|
|
|
|
$promoteGameRatio = D(self::MODEL_NAME)->where($map)->find();
|
|
|
|
@ -315,11 +319,11 @@ class PromoteGameRatioController extends ThinkController
|
|
|
|
|
|
|
|
|
|
$withdrawMap['promote_id'] = $promoteId;
|
|
|
|
|
$withdrawMap['status'] = ['neq', -2];
|
|
|
|
|
$withdrawMap['settlement_end_time'] = ['egt', $beginTime];
|
|
|
|
|
$withdrawMap['settlement_begin_time'] = ['egt', $beginTime];
|
|
|
|
|
$withdraw = M('withdraw', 'tab_')->where($withdrawMap)->order('create_time desc')->find();
|
|
|
|
|
if (!empty($withdraw) && $withdraw['status'] != -2) {
|
|
|
|
|
$time = date('Y-m-d', $withdraw['create_time']);
|
|
|
|
|
$this->error("{$time}之前的订单已经申请提现, 无法变更分成比例,请重新选择开始时间");
|
|
|
|
|
$time = date('Y-m', $beginTime);
|
|
|
|
|
$this->error("{$time}月已有订单申请提现, 无法变更分成比例,请重新选择开始时间");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|