admin
2019-07-31 784af16411d97c3e14f81dd4ebf1380c8b9effb0
fanli/src/main/java/com/yeshi/fanli/controller/client/v2/TaoLiJinControllerV2.java
@@ -212,8 +212,8 @@
         return;
      }
      // 过期
      userTaoLiJinOriginService.overdueHongBao(uid);
      // 过期 -取消收回
      // userTaoLiJinOriginService.overdueHongBao(uid);
      // 我的淘礼金
      BigDecimal tlj = null;
@@ -233,11 +233,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");
@@ -409,6 +424,7 @@
      }
      // 登录用户
      boolean isReceive = false;
      JSONObject data = new JSONObject();
      data.put("icon", configTaoLiJinService.getValueByKey("taolijin_system_icon"));
@@ -443,6 +459,7 @@
         UserTaoLiJinOrigin userTaoLiJin = userTaoLiJinOriginService.getRankByThisMonth(uid, type);
         if (userTaoLiJin != null) { // 已领取
            isRank = true;
            isReceive = true;
            hasMoney = userTaoLiJin.getMoney();
         } else {
            isRank = false;
@@ -479,7 +496,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"));
@@ -559,13 +580,12 @@
         array.add(gson.toJson(extra));
      }
      executor.execute(new Runnable() {
         @Override
         public void run() {
            // 过期
            userTaoLiJinOriginService.overdueHongBao(uid);
         }
      });
      /*// 过期 -取消收回
       * executor.execute(new Runnable() {
       *
       * @Override public void run() {
       * userTaoLiJinOriginService.overdueHongBao(uid); } });
       */
      JSONObject data = new JSONObject();
      data.put("count", array.size());
@@ -740,6 +760,7 @@
      out.print(JsonUtil.loadTrueResult(data));
   }
   
   /**
    * 分享爆款商品-限于淘礼金
    * 
@@ -775,11 +796,12 @@
            continue;
         }
         GoodsDetailVO detailVO = GoodsDetailVOFactory.convertTaoBao(taoBaoGoodsBrief, null, proportion, proportion);
         // 去掉标签
         detailVO.setLabels(null);
         
         MoneyInfoVO moneyInfo = detailVO.getMoneyInfo();
         moneyInfo.setMoneyType(2);
         detailVO.setMoneyInfo(moneyInfo);
@@ -787,14 +809,16 @@
         String hongBao = spreadMoney.toString();
         ReduceHongBao vo = new ReduceHongBao();
         vo.setLeft(hotGoods.getLeftHongBaoCount());
         vo.setMoney(hongBao);
         vo.setName("付款立减  ¥" + hongBao);
         vo.setMoney(" ¥" + hongBao);
         vo.setName("付款立减 ");
         vo.setTip("");
         vo.setTotal(hotGoods.getTotalHongBaoCount());
         
         OtherInfo otherInfo = new OtherInfo();
         otherInfo.setReduceHongBao(vo);
         detailVO.setOtherInfo(otherInfo);
         array.add(gson.toJson(detailVO));
      }
      if (page > 1)