admin
2019-11-12 0cf8c0bf5649b0b7269f78f6eae7c09cffea75cd
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/RedPackControllerV2.java
@@ -34,6 +34,7 @@
import com.yeshi.fanli.entity.redpack.RedPackExchange;
import com.yeshi.fanli.entity.redpack.RedPackWinInvite;
import com.yeshi.fanli.entity.redpack.RedPackWinInvite.RedPackWinInviteTypeEnum;
import com.yeshi.fanli.exception.redpack.RedPackBalanceException;
import com.yeshi.fanli.exception.redpack.RedPackExchangeException;
import com.yeshi.fanli.exception.redpack.RedPackGiveRecordException;
import com.yeshi.fanli.service.inter.common.JumpDetailV2Service;
@@ -117,7 +118,14 @@
      BigDecimal yesterdayUse = zero;
      BigDecimal thisMonthUse = zero;
      BigDecimal lastMonthUse = zero;
      BigDecimal balance = redPackBalanceService.getBalance(uid);
      BigDecimal balance = null;
      try {
         balance = redPackBalanceService.getBalance(uid);
      } catch (RedPackBalanceException e) {
         out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
         return;
      }
      if (balance == null) {
         balance = zero;
      } else {
@@ -383,7 +391,12 @@
      }
      JSONObject data = new JSONObject();
      data.put("balance", redPackBalanceService.getBalance(uid));
      try {
         data.put("balance", redPackBalanceService.getBalance(uid));
      } catch (RedPackBalanceException e) {
         out.print(JsonUtil.loadFalseResult(1, e.getMsg()));
         return;
      }
      data.put("ruleLink", redPackConfigService.getValueByKey("invite_reward_rule_link"));
      data.put("shareLink", UserInviteUtil.getShareUrl(uid));