dto.getAmount() 是long类型,需要先转成BigDecimal 再计算
BigDecimal amount = dto.getAmount()!=null? new BigDecimal(dto.getAmount()).divide(new BigDecimal(1000),2,RoundingMode.HALF_UP):new BigDecimal(0);
Powered by: 博客园 Copyright © 2024 小凡156 Powered by .NET 8.0 on Kubernetes