|
|
@@ -39,23 +39,18 @@ class CustomLevelController extends BaseController
|
|
|
if (isset($shopAdmin->super) == false || $shopAdmin->super != 1) {
|
|
|
util::fail('管理员才能操作');
|
|
|
}
|
|
|
-
|
|
|
$post = Yii::$app->request->post();
|
|
|
$info = CustomLevelClass::getByCondition(['shopId' => $this->shopId], true);
|
|
|
if (empty($info)) {
|
|
|
util::fail('出错了');
|
|
|
}
|
|
|
$id = $info->id ?? 0;
|
|
|
- $qtNum = $post['qtNum'] ?? 0;
|
|
|
- if (is_numeric($qtNum) == false || $qtNum <= 0) {
|
|
|
- util::fail('青铜等级的数量要大于0');
|
|
|
- }
|
|
|
- $byNum = $post['byNum'] ?? 0;
|
|
|
- if ($byNum <= $qtNum) {
|
|
|
- util::fail('白银等级的数量要大于青铜');
|
|
|
+ $num = $post['num'] ?? 0;
|
|
|
+ if (is_numeric($num) == false || $num <= 0) {
|
|
|
+ util::fail('标准会员的数量要大于0');
|
|
|
}
|
|
|
$hjNum = $post['hjNum'] ?? 0;
|
|
|
- if ($hjNum <= $byNum) {
|
|
|
+ if ($hjNum <= $num) {
|
|
|
util::fail('黄金等级的数量要大于白银');
|
|
|
}
|
|
|
$zsNum = $post['zsNum'] ?? 0;
|