hexiaohui
2019-01-28 d6ce66cdef982dfe6f1af7d6d69aa1154b4fa454
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,14 +406,21 @@
         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) {
         // 添加欢迎语
         UserHomeMsgVO vo = new UserHomeMsgVO();
         vo.setContent("恭喜你,成为返利券的用户\n独家优惠券帮你省钱;\n参与奖金活动帮你赚钱;\n让返利券成为你的省钱助手吧!");
         vo.setTitle("新人欢迎");
         vo.setCreateTime(getTimeDesc(now, new Date(userInfoService.getUserById(uid).getCreatetime())));
         vo.setType(UserHomeMsgVO.TYPE_WELCOME);
         volist.add(vo);
         // 创建时间在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(time)));
            vo.setType(UserHomeMsgVO.TYPE_WELCOME);
            volist.add(vo);
         }
      }
      JSONObject root = new JSONObject();