diff --git a/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/SendFreightShipCmdExe.java b/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/SendFreightShipCmdExe.java index 0771bed9..e5362cea 100644 --- a/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/SendFreightShipCmdExe.java +++ b/rc-service/rc-service-wallet/wallet-application/src/main/java/com/red/circle/wallet/app/command/freight/SendFreightShipCmdExe.java @@ -105,8 +105,8 @@ public class SendFreightShipCmdExe { FreightBalance freightBalance = freightBalanceService.getById(cmd.getReqUserId()); ResponseAssert.notNull(FreightErrorCode.NOT_FREIGHT, freightBalance); - Long result = 0L; - ResponseAssert.isTrue(FreightErrorCode.NOT_THRESHOLD, result > Optional.ofNullable(freightBalance.getDeliveryThreshold()).orElse(0)); + long result = cmd.getQuantity().divide(new BigDecimal(10000), RoundingMode.DOWN).setScale(0, RoundingMode.DOWN).longValue(); + ResponseAssert.isTrue(FreightErrorCode.NOT_THRESHOLD, result >= Optional.ofNullable(freightBalance.getDeliveryThreshold()).orElse(0)); // 支付密码效验 checkPayPassword(cmd);