admin
2019-07-23 496c2842240eae09bb56e98e1fae71540a85befa
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java
@@ -228,11 +228,26 @@
      BigDecimal thisMonthWin = userTaoLiJinOriginService.countMoneyByDate(uid, 3);
      BigDecimal lastMonthWin = userTaoLiJinOriginService.countMoneyByDate(uid, 4);
      BigDecimal zero = new BigDecimal(0);
      // 消耗
      BigDecimal todayUse = userTaoLiJinDetailService.countUseMoneyByDate(uid, 1);
      if (todayUse == null || todayUse.compareTo(zero) > 0) {
         todayUse = zero;
      }
      BigDecimal yesterdayUse = userTaoLiJinDetailService.countUseMoneyByDate(uid, 2);
      if (yesterdayUse == null || yesterdayUse.compareTo(zero) > 0) {
         yesterdayUse = zero;
      }
      BigDecimal thisMonthUse = userTaoLiJinDetailService.countUseMoneyByDate(uid, 3);
      if (thisMonthUse == null || thisMonthUse.compareTo(zero) > 0) {
         thisMonthUse = zero;
      }
      BigDecimal lastMonthUse = userTaoLiJinDetailService.countUseMoneyByDate(uid, 4);
      if (lastMonthUse == null || lastMonthUse.compareTo(zero) > 0) {
         lastMonthUse = zero;
      }
      // 问号链接
      String helpLink = configTaoLiJinService.getValueByKey("hongbao_help_link");
@@ -404,6 +419,7 @@
      }
      // 登录用户
      boolean isReceive = false;
      JSONObject data = new JSONObject();
      data.put("icon", configTaoLiJinService.getValueByKey("taolijin_system_icon"));
@@ -438,6 +454,7 @@
         UserTaoLiJinOrigin userTaoLiJin = userTaoLiJinOriginService.getRankByThisMonth(uid, type);
         if (userTaoLiJin != null) { // 已领取
            isRank = true;
            isReceive = true;
            hasMoney = userTaoLiJin.getMoney();
         } else {
            isRank = false;
@@ -474,7 +491,11 @@
            data.put("content", "推广红包,好友福利!");
            data.put("type", 1);
            data.put("money", hasMoney.setScale(2).toString());
            data.put("usage", "领取成功,已存入“我的-推广红包”");
            if (isReceive) {
               data.put("usage", "本月领取,已存入“我的-推广红包”");
            } else {
               data.put("usage", "领取成功,已存入“我的-推广红包”");
            }
            data.put("jumpName", "去使用");
            data.put("jumpDetail", jumpDetailV2Service.getByTypeCache("share_goods_hot"));
            data.put("tip", configTaoLiJinService.getValueByKey("hongbao_rank_tip"));