This commit is contained in:
lxy 2024-11-19 13:44:42 +08:00
parent a11ef1d7e5
commit 32d9761f89
2 changed files with 4 additions and 4 deletions

View File

@ -24,8 +24,8 @@ const checkers = [
action: 'create',
checker(data) {
const { entity, entityId, price, orderId, depositId } = data;
if (price <= 0) {
throw new OakInputIllegalException('pay', ['price'], '支付金额必须大于0');
if (price < 0) {
throw new OakInputIllegalException('pay', ['price'], '支付金额必须不小于零');
}
if (!orderId) {
// 充值类订单

View File

@ -27,8 +27,8 @@ const checkers = [
action: 'create',
checker(data) {
const { entity, entityId, price, orderId, depositId } = data;
if (price <= 0) {
throw new types_1.OakInputIllegalException('pay', ['price'], '支付金额必须大于0');
if (price < 0) {
throw new types_1.OakInputIllegalException('pay', ['price'], '支付金额必须不小于零');
}
if (!orderId) {
// 充值类订单