accountOper checker修改,允许消费、提现、退款退还值为0
This commit is contained in:
parent
8635a95791
commit
0ed2b94d65
|
|
@ -57,15 +57,15 @@ const checkers = [
|
|||
case 'refund':
|
||||
case 'withdraw': {
|
||||
if (totalPlus >= 0 || availPlus >= 0 || totalPlus !== availPlus) {
|
||||
throw new types_1.OakInputIllegalException('accountOper', ['availPlus'], `accountOper为${type}时,其totalPlus和availPlus必须为不相等的负数`);
|
||||
throw new types_1.OakInputIllegalException('accountOper', ['availPlus'], `accountOper为${type}时,其totalPlus和availPlus必须为相等的负数`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'refundFailure':
|
||||
case 'withdrawBack':
|
||||
case 'consumeBack': {
|
||||
if (totalPlus <= 0 || availPlus <= 0 || totalPlus !== availPlus) {
|
||||
throw new types_1.OakInputIllegalException('accountOper', ['availPlus'], `accountOper为${type}时,其totalPlus和availPlus必须为不相等的正数`);
|
||||
if (totalPlus < 0 || availPlus < 0 || totalPlus !== availPlus) {
|
||||
throw new types_1.OakInputIllegalException('accountOper', ['availPlus'], `accountOper为${type}时,其totalPlus和availPlus必须为相等的非负数数`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -58,15 +58,15 @@ const checkers: Checker<EntityDict, 'accountOper', RuntimeCxt>[] = [
|
|||
case 'refund':
|
||||
case 'withdraw': {
|
||||
if (totalPlus >= 0 || availPlus >= 0 || totalPlus !== availPlus) {
|
||||
throw new OakInputIllegalException('accountOper', ['availPlus'], `accountOper为${type}时,其totalPlus和availPlus必须为不相等的负数`);
|
||||
throw new OakInputIllegalException('accountOper', ['availPlus'], `accountOper为${type}时,其totalPlus和availPlus必须为相等的负数`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'refundFailure':
|
||||
case 'withdrawBack':
|
||||
case 'consumeBack': {
|
||||
if (totalPlus <= 0 || availPlus <= 0 || totalPlus !== availPlus) {
|
||||
throw new OakInputIllegalException('accountOper', ['availPlus'], `accountOper为${type}时,其totalPlus和availPlus必须为不相等的正数`);
|
||||
if (totalPlus < 0 || availPlus < 0 || totalPlus !== availPlus) {
|
||||
throw new OakInputIllegalException('accountOper', ['availPlus'], `accountOper为${type}时,其totalPlus和availPlus必须为相等的非负数数`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue