From 183828d4a4bc0bb0c65d48437eefa0892d772150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A2=A8=E5=A4=A7=E5=8F=94?= <494979559@qq.com> Date: Tue, 20 Aug 2024 10:02:12 +0800 Subject: [PATCH] =?UTF-8?q?debug:=E4=B8=8B=E5=8D=95=E6=97=B6=E9=95=BF?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/TransactionBillValidatorImpl.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillValidatorImpl.java b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillValidatorImpl.java index ed7125e4..41faa517 100644 --- a/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillValidatorImpl.java +++ b/smart-switch-service/src/main/java/com/ruoyi/ss/transactionBill/service/impl/TransactionBillValidatorImpl.java @@ -129,8 +129,11 @@ public class TransactionBillValidatorImpl extends BaseValidator implements Trans } if (SuitFeeType.singleList().contains(suit.getFeeType())) { // 一次性收费需要配置时间/度数 - if (suit.getValue() == null || suit.getTimeUnit() == null) { - return error("当前套餐未配置时间/度数,请联系商户处理"); + if (suit.getValue() == null) { + return error("当前套餐未配置时间/电量,请联系商户处理"); + } + if (SuitFeeType.needConfigTimeUnit().contains(suit.getFeeType()) && suit.getTimeUnit() == null) { + return error("当前套餐未配置时长单位,请联系商户处理"); } } if (!Objects.equals(suit.getValue(), dto.getSuitTime())) {