From 8981ab050bbc9937f13d2711bf0a20e2019e1283 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 03 四月 2019 14:29:20 +0800 Subject: [PATCH] 解决多一分钱的bug --- fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserMoneyServiceImpl.java | 10 +++++++--- 1 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserMoneyServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserMoneyServiceImpl.java index 3bcff14..027c612 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserMoneyServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserMoneyServiceImpl.java @@ -17,17 +17,21 @@ @Override public BigDecimal getMoneyToday(Long uid) { - return shareMapper.getMoneyToday(uid + ""); + BigDecimal money = shareMapper.getMoneyToday(uid + ""); + return money == null ? new BigDecimal(0) : money; } @Override public BigDecimal getMoneyMonth(Long uid) { - return shareMapper.getMoneyMonth(uid + ""); + BigDecimal money = shareMapper.getMoneyMonth(uid + ""); + return money == null ? new BigDecimal(0) : money; } @Override public BigDecimal getMoneyLastMonth(Long uid) { - return shareMapper.getMoneyLastMonth(uid + ""); + BigDecimal money = shareMapper.getMoneyLastMonth(uid + ""); + + return money == null ? new BigDecimal(0) : money; } } -- Gitblit v1.8.0