|
@@ -1076,27 +1076,27 @@ class merchantControl extends SystemControl
|
|
showMessage('机构信息有误');
|
|
showMessage('机构信息有误');
|
|
}
|
|
}
|
|
if (chksubmit()) {
|
|
if (chksubmit()) {
|
|
- $merchant_intercept['is_transfer'] = $_POST['is_transfer'];
|
|
|
|
|
|
+ $intercept_cfg['is_transfer'] = $_POST['is_transfer'];
|
|
if (!empty($_POST['card_states'])) {
|
|
if (!empty($_POST['card_states'])) {
|
|
- $merchant_intercept['card_states'] = $_POST['card_states'];
|
|
|
|
|
|
+ $intercept_cfg['card_states'] = $_POST['card_states'];
|
|
}
|
|
}
|
|
- $merchant_intercept = serialize($merchant_intercept);
|
|
|
|
- $resp = $model_merchant->editMerchant(['merchant_intercept' => $merchant_intercept], ['mchid' => $mchid]);
|
|
|
|
|
|
+ $intercept_cfg = serialize($intercept_cfg);
|
|
|
|
+ $resp = $model_merchant->editMerchant(['intercept_cfg' => $intercept_cfg], ['mchid' => $mchid]);
|
|
if ($resp) {
|
|
if ($resp) {
|
|
showMessage('操作成功', 'index.php?act=merchant&op=merchant');
|
|
showMessage('操作成功', 'index.php?act=merchant&op=merchant');
|
|
} else {
|
|
} else {
|
|
showMessage('操作失败');
|
|
showMessage('操作失败');
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- $merchant_intercept = $merchant['merchant_intercept'];
|
|
|
|
- if (empty($merchant_intercept)) {
|
|
|
|
- $merchant_intercept = ['card_states' => [], 'is_transfer' => 0];
|
|
|
|
|
|
+ $intercept_cfg = $merchant['intercept_cfg'];
|
|
|
|
+ if (empty($intercept_cfg)) {
|
|
|
|
+ $intercept_cfg = ['card_states' => [], 'is_transfer' => 0];
|
|
} else {
|
|
} else {
|
|
- $merchant_intercept = unserialize($merchant_intercept);
|
|
|
|
|
|
+ $intercept_cfg = unserialize($intercept_cfg);
|
|
}
|
|
}
|
|
Tpl::output('merchant', $merchant);
|
|
Tpl::output('merchant', $merchant);
|
|
Tpl::output('card_state', mtopcard\CardState);
|
|
Tpl::output('card_state', mtopcard\CardState);
|
|
- Tpl::output('merchant_intercept', $merchant_intercept);
|
|
|
|
|
|
+ Tpl::output('intercept', $intercept_cfg);
|
|
Tpl::showpage('merchant.intercept');
|
|
Tpl::showpage('merchant.intercept');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1115,7 +1115,7 @@ class merchantControl extends SystemControl
|
|
\refill\Quality::SlowSeventyTwo,\refill\Quality::Fastest
|
|
\refill\Quality::SlowSeventyTwo,\refill\Quality::Fastest
|
|
];
|
|
];
|
|
if (chksubmit()) {
|
|
if (chksubmit()) {
|
|
- $qualities = $merchant_retry_times = [];
|
|
|
|
|
|
+ $qualities = $retry_times_cfg = [];
|
|
foreach ($qualitys as $quality) {
|
|
foreach ($qualitys as $quality) {
|
|
$secs_key = "{$quality}-secs";
|
|
$secs_key = "{$quality}-secs";
|
|
$times_key = "{$quality}-times";
|
|
$times_key = "{$quality}-times";
|
|
@@ -1123,14 +1123,14 @@ class merchantControl extends SystemControl
|
|
$qualities[$quality] = ['secs' => $_POST[$secs_key], 'times' => $_POST[$times_key]];
|
|
$qualities[$quality] = ['secs' => $_POST[$secs_key], 'times' => $_POST[$times_key]];
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- $merchant_retry_times['qualities'] = $qualities;
|
|
|
|
|
|
+ $retry_times_cfg['qualities'] = $qualities;
|
|
$ratio = $_POST['ratio'] ?? 0;
|
|
$ratio = $_POST['ratio'] ?? 0;
|
|
$period = $_POST['period'] ?? 0;
|
|
$period = $_POST['period'] ?? 0;
|
|
- $merchant_retry_times['lower_ratio'] = ['ratio' => $ratio, 'period' => $period];
|
|
|
|
- $merchant_retry_times['opened'] = $_POST['opened'];
|
|
|
|
|
|
+ $retry_times_cfg['lower_ratio'] = ['ratio' => $ratio, 'period' => $period];
|
|
|
|
+ $retry_times_cfg['opened'] = $_POST['opened'];
|
|
|
|
|
|
- $merchant_retry_times = serialize($merchant_retry_times);
|
|
|
|
- $resp = $model_merchant->editMerchant(['merchant_retry_times' => $merchant_retry_times], ['mchid' => $mchid]);
|
|
|
|
|
|
+ $retry_times_cfg = serialize($retry_times_cfg);
|
|
|
|
+ $resp = $model_merchant->editMerchant(['retry_times_cfg' => $retry_times_cfg], ['mchid' => $mchid]);
|
|
if ($resp) {
|
|
if ($resp) {
|
|
showMessage('操作成功', 'index.php?act=merchant&op=merchant');
|
|
showMessage('操作成功', 'index.php?act=merchant&op=merchant');
|
|
} else {
|
|
} else {
|
|
@@ -1140,16 +1140,16 @@ class merchantControl extends SystemControl
|
|
foreach ($qualitys as $value) {
|
|
foreach ($qualitys as $value) {
|
|
$quality[$value] = $this->quality_format($value,mtopcard\ChinaMobileCard);
|
|
$quality[$value] = $this->quality_format($value,mtopcard\ChinaMobileCard);
|
|
}
|
|
}
|
|
- $merchant_retry_times = $merchant['merchant_retry_times'];
|
|
|
|
- if (empty($merchant_retry_times)) {
|
|
|
|
- $merchant_retry_times = [];
|
|
|
|
|
|
+ $retry_times_cfg = $merchant['retry_times_cfg'];
|
|
|
|
+ if (empty($retry_times_cfg)) {
|
|
|
|
+ $retry_times_cfg = [];
|
|
} else {
|
|
} else {
|
|
- $merchant_retry_times = unserialize($merchant_retry_times);
|
|
|
|
|
|
+ $retry_times_cfg = unserialize($retry_times_cfg);
|
|
}
|
|
}
|
|
|
|
|
|
Tpl::output('merchant', $merchant);
|
|
Tpl::output('merchant', $merchant);
|
|
Tpl::output('quality', $quality);
|
|
Tpl::output('quality', $quality);
|
|
- Tpl::output('merchant_retry_times', $merchant_retry_times);
|
|
|
|
|
|
+ Tpl::output('retry_times', $retry_times_cfg);
|
|
Tpl::showpage('merchant.retry.times');
|
|
Tpl::showpage('merchant.retry.times');
|
|
}
|
|
}
|
|
}
|
|
}
|