diff --git a/Application/Admin/Controller/PromoteGameRatioController.class.php b/Application/Admin/Controller/PromoteGameRatioController.class.php
index a0db7e13b..c55fb6c5a 100644
--- a/Application/Admin/Controller/PromoteGameRatioController.class.php
+++ b/Application/Admin/Controller/PromoteGameRatioController.class.php
@@ -117,7 +117,7 @@ class PromoteGameRatioController extends ThinkController
$thisRatioDtl = "默认:{$promoteGameRatio['ratio']}%";
if ($thisTurnoverRatios) {
foreach ($thisTurnoverRatios as $thisTurnoverRatio) {
- $thisIntervalClosedStatusText = isset($thisTurnoverRatio['interval_closed_status']) ? ($thisTurnoverRatio['interval_closed_status'] == 1 ? '≥' : '>') : '≥';
+ $thisIntervalClosedStatusText = isset($thisTurnoverRatio['instanceof']) ? ($thisTurnoverRatio['instanceof'] == 1 ? '≥' : '>') : '≥';
$thisRatioDtl .= "
月流水{$thisIntervalClosedStatusText}{$thisTurnoverRatio['turnover']},比例:{$thisTurnoverRatio['ratio']}%";
}
}
@@ -232,8 +232,8 @@ class PromoteGameRatioController extends ThinkController
$this->error('默认分成比例不能为空');
}
$save['turnover_ratio'] = [];
- if (!empty(array_filter($params['turnover'])) || !empty(array_filter($params['turnover_ratio'])) || !empty(array_filter($params['interval_closed_status']))) {
- if (is_array($params['turnover']) && is_array($params['turnover_ratio']) && is_array($params['interval_closed_status'])) {
+ if (!empty(array_filter($params['turnover'])) || !empty(array_filter($params['turnover_ratio'])) || !empty(array_filter($params['instanceof']))) {
+ if (is_array($params['turnover']) && is_array($params['turnover_ratio']) && is_array($params['instanceof'])) {
foreach ($params['turnover'] as $turnover) {
if (empty($turnover)) {
$this->error('月流水不能为空');
@@ -244,7 +244,7 @@ class PromoteGameRatioController extends ThinkController
$this->error('月流水分成比例不能为空');
}
}
- foreach ($params['interval_closed_status'] as $intervalClosedStatus) {
+ foreach ($params['instanceof'] as $intervalClosedStatus) {
if (!in_array($intervalClosedStatus, [1, 2])) {
$this->error('月流水分符号不能为空');
}
@@ -270,14 +270,13 @@ class PromoteGameRatioController extends ThinkController
$save['turnover_ratio'][] = [
'turnover' => bcdiv($turnover, 1, 2),
'ratio' => bcdiv($params['turnover_ratio'][$key], 1, 2),
- 'interval_closed_status' => (isset($params['interval_closed_status'][$key]) ? $params['interval_closed_status'][$key] : 1),
+ 'instanceof' => (isset($params['instanceof'][$key]) ? $params['instanceof'][$key] : 1),
];
}
$save['turnover_ratio'] = json_encode($save['turnover_ratio']);
}
}
- $save['interval_closed_status'] = ($params['interval_closed_status'] ? ($params['interval_closed_status'] == 1 ? 1 : 2) : 1);
$save['ratio'] = $params['ratio'] ?? 0;
$save['begin_time'] = strtotime($params['begin_time']);
$save['end_time'] = $params['end_time'] ? (strtotime('+1 month', strtotime($params['end_time'])) - 1) : 0;
@@ -290,7 +289,7 @@ class PromoteGameRatioController extends ThinkController
if (empty($promoteGameRatio)) {
$this->error('参数异常');
}
- if ($promoteGameRatio['status'] == -1 || $save['interval_closed_status'] != $promoteGameRatio['interval_closed_status'] || $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']) {
+ if ($promoteGameRatio['status'] == -1 || $save['instanceof'] != $promoteGameRatio['instanceof'] || $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'], $save['end_time']);
if ($promoteGameRatio['status'] == 1) {
diff --git a/Application/Admin/Model/WithdrawModel.class.php b/Application/Admin/Model/WithdrawModel.class.php
index e937a96a6..7db178856 100644
--- a/Application/Admin/Model/WithdrawModel.class.php
+++ b/Application/Admin/Model/WithdrawModel.class.php
@@ -279,7 +279,7 @@ class WithdrawModel extends Model{
->find()['sum_amount'];
$sumAmount = $sumAmount ?? 0;
foreach ($turnoverRatios as $turnoverRatio) {
- if (empty($turnoverRatio['interval_closed_status']) || $turnoverRatio['interval_closed_status'] == 1) {
+ if (empty($turnoverRatio['instanceof']) || $turnoverRatio['instanceof'] == 1) {
if ($sumAmount >= $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
@@ -407,7 +407,7 @@ class WithdrawModel extends Model{
$sumAmount = $sumAmount ?? 0;
$ratio = 0;
foreach ($turnoverRatios as $turnoverRatio) {
- if (empty($turnoverRatio['interval_closed_status']) || $turnoverRatio['interval_closed_status'] == 1) {
+ if (empty($turnoverRatio['instanceof']) || $turnoverRatio['instanceof'] == 1) {
if ($sumAmount >= $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
@@ -500,7 +500,7 @@ class WithdrawModel extends Model{
$sumAmount = $sumAmount ?? 0;
$ratio = 0;
foreach ($turnoverRatios as $turnoverRatio) {
- if (empty($turnoverRatio['interval_closed_status']) || $turnoverRatio['interval_closed_status'] == 1) {
+ if (empty($turnoverRatio['instanceof']) || $turnoverRatio['instanceof'] == 1) {
if ($sumAmount >= $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
@@ -564,7 +564,7 @@ class WithdrawModel extends Model{
->find()['sum_amount'];
$sumAmount = $sumAmount ?? 0;
foreach ($turnoverRatios as $turnoverRatio) {
- if (empty($turnoverRatio['interval_closed_status']) || $turnoverRatio['interval_closed_status'] == 1) {
+ if (empty($turnoverRatio['instanceof']) || $turnoverRatio['instanceof'] == 1) {
if ($sumAmount >= $turnoverRatio['turnover']) {
$ratio = $turnoverRatio['ratio'];
break;
diff --git a/Application/Admin/View/PromoteGameRatio/applyRatio.html b/Application/Admin/View/PromoteGameRatio/applyRatio.html
index ddb97a3c4..496e05523 100644
--- a/Application/Admin/View/PromoteGameRatio/applyRatio.html
+++ b/Application/Admin/View/PromoteGameRatio/applyRatio.html
@@ -157,8 +157,8 @@