管理后台->游戏编辑--更新推广充值CPS比例时同步未提现订单的分成比例

推广平台->数据管理->每日概况|数据汇总--检索日期间隔调整为31天
推广平台->财务管理->结算中心->提现--权限更新
master
chenxiaojun 5 years ago
parent b2df7e0fe3
commit 773ffb5160

@ -184,14 +184,14 @@ class GameController extends ThinkController
} else {
$_POST['display_site'] = '';
}
$content = $_POST['content'];
if(!empty($content)) {
if (!empty($content)) {
$_POST['detail_content'] = $content;
} else {
$_POST['detail_content'] = '';
}
$pinyin = new \Think\Pinyin();
$num = mb_strlen($_POST['game_name'], 'UTF8');
@ -301,6 +301,7 @@ class GameController extends ThinkController
$_POST['display_site'] = '';
}
$content = $_POST['content'];
$gameRatio = M('Game', 'tab_')->where(array('id' => I('post.id', 0)))->getField('ratio');//游戏推广分成比例
$game = D(self::model_name);//M('$this->$model_name','tab_');
$_POST['discount'] == '' ? $_POST['discount'] = 10 : $_POST['discount'];
$_POST['detail_content'] = $content;
@ -348,7 +349,17 @@ class GameController extends ThinkController
$this->error($game->getError());
} else {
\Think\Log::actionLog('Game/edit', 'Game', 1);
$this->success($res['id'] ? '更新成功' : '新增成功', U('lists', array('type' => I('post.type'), 'p' => I('request.p'))));
$thisGameRatio = I('post.ratio', 0);
if ($gameRatio != $thisGameRatio) {
$spendRes = M('Spend', 'tab_')->where(array('game_id' => $id, 'pay_status' => 1, 'selle_status' => 0))->save(array('selle_ratio' => $thisGameRatio));
if ($spendRes === false) {
$this->error('更新成功,推广充值分成比例同步失败');
} else {
$this->success($res['id'] ? '更新成功' : '新增成功', U('lists', array('type' => I('post.type'), 'p' => I('request.p'))));
}
} else {
$this->success($res['id'] ? '更新成功' : '新增成功', U('lists', array('type' => I('post.type'), 'p' => I('request.p'))));
}
}
} else {
@ -369,15 +380,15 @@ class GameController extends ThinkController
}
if (!empty($data['screenshot'])) {
$data['screenshot_data'] = explode(',', $data['screenshot']);
}
if (!empty($data['cover'])) {
$data['cover_data'] = explode(',', $data['cover']);
}
if (!empty($data['icon'])) {
if (!empty($data['icon'])) {
$data['icon_data'] = explode(',', $data['icon']);
}
$data['introduction'] = str_replace("~~", "\r\n", $data['introduction']);

@ -257,6 +257,12 @@ class FinanceController extends BaseController
$this->ajaxReturn($data);
}
if ($this->loginPromote['ver_status'] != 1) {
$data['status'] = 0;
$data['msg'] = '未通过资质认证审核,暂时无法提现';
$this->ajaxReturn($data);
}
$spendModel = M('spend', 'tab_');
$thisDay = strtotime(date('Y-m-d'));

@ -1088,7 +1088,7 @@ class QueryController extends BaseController
$params['dayList'] = $dayList;
$records = [];
if (intval($endTime - $begTime) / (24 * 3600) <= 30) {
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
$userRepository = new UserRepository();
$spendRepository = new SpendRepository();
$roleNumList = $userRepository->getCreateRoleCountByDay($params);//创角数
@ -1282,7 +1282,7 @@ class QueryController extends BaseController
$allData['spend_discount'] = 0;
$allData['spend_voucher'] = 0;
if (!empty($data)) {
if (intval($endTime - $begTime) / (24 * 3600) <= 30) {
if (intval($endTime - $begTime) / (24 * 3600) <= 31) {
$gameIds = [];
foreach ($data as $list) {
$gameIds[] = $list['game_id'];

@ -539,8 +539,8 @@
return false;
}
if ((edate - sdate) > 2505600) {
layer.msg('时间间隔不能超过30天,请重新选择日期');
if ((edate - sdate) > 2592000) {
layer.msg('时间间隔不能超过31天,请重新选择日期');
return false;
}

@ -312,8 +312,8 @@
layer.msg('开始时间必须小于等于结束时间');
return false;
}
if ((edate - sdate) > 2505600) {
layer.msg('时间间隔不能超过30天,请重新选择日期');
if ((edate - sdate) > 2592000) {
layer.msg('时间间隔不能超过31天,请重新选择日期');
return false;
}

Loading…
Cancel
Save