admin
2019-01-28 127ab9cfe99f1f655219c7511842408c078e9445
fanli/src/main/java/com/yeshi/fanli/controller/client/UserMsgController.java
@@ -363,7 +363,7 @@
      List<UserHomeMsgVO> volist = new ArrayList<>();
      List<RecommendUserGoods> list = recommendUserGoodsService.listRecommend(uid, page, Constant.PAGE_SIZE);
      long count = recommendUserGoodsService.countRecommend(uid) + 1;// 计算欢迎语的数量
      long count = recommendUserGoodsService.countRecommend(uid);//
      Date now = new Date();
      for (RecommendUserGoods goods : list) {
@@ -406,15 +406,22 @@
         volist.add(vo);
      }
      Long time = userInfoService.getUserById(uid).getCreatetime();
      if (time > TimeUtil.convertToTimeTemp("2019-01-28", "yyyy-MM-dd"))
         count++;// 计算欢迎语的数量
      if (volist.size() > 0 && volist.size() < Constant.PAGE_SIZE) {
         // 添加欢迎语
         // 创建时间在28号后的才有新人欢迎
         if (time > TimeUtil.convertToTimeTemp("2019-01-28", "yyyy-MM-dd")) {
         UserHomeMsgVO vo = new UserHomeMsgVO();
         vo.setContent("恭喜你,成为返利券的用户\n独家优惠券帮你省钱;\n参与奖金活动帮你赚钱;\n让返利券成为你的省钱助手吧!");
         vo.setTitle("新人欢迎");
         vo.setCreateTime(getTimeDesc(now, new Date(userInfoService.getUserById(uid).getCreatetime())));
            vo.setCreateTime(getTimeDesc(now, new Date(time)));
         vo.setType(UserHomeMsgVO.TYPE_WELCOME);
         volist.add(vo);
      }
      }
      JSONObject root = new JSONObject();
      root.put("msgList", new Gson().toJson(volist));