feat(withdraw): 提现金额限制100的整数倍,完善全部提现取整与分红规则文案规范
这个提交包含在:
@@ -676,10 +676,16 @@ class Withdraw
|
||||
throw new ShoproException('暂不支持该提现方式');
|
||||
}
|
||||
|
||||
if ($money <= 0) {
|
||||
if (!is_numeric($money) || floatval($money) <= 0) {
|
||||
throw new ShoproException('请输入正确的提现金额');
|
||||
}
|
||||
|
||||
$floatMoney = floatval($money);
|
||||
// 提现金额必须为整数且为 100 的整数倍(如 100、200、1200 等)
|
||||
if (floor($floatMoney) != $floatMoney || (intval($floatMoney) % 100 !== 0)) {
|
||||
throw new ShoproException('提现金额必须为100的整数倍');
|
||||
}
|
||||
|
||||
// 检查最小提现金额
|
||||
if ($this->config['min_amount'] > 0 && $money < $this->config['min_amount']) {
|
||||
throw new ShoproException('提现金额不能少于 ' . $this->config['min_amount'] . '元');
|
||||
|
||||
在新工单中引用
屏蔽一个用户