admin
2019-04-26 8e30aa7c1f0384f09278699318b4902b815b42a7
fanli/src/main/java/com/yeshi/fanli/controller/client/UserMsgController.java
@@ -126,7 +126,6 @@
   @Resource
   private SpecialService specialService;
   
   // 消息的类型
   final static String MSG_TYPE_ORDER = "order";
   final static String MSG_TYPE_MONEY = "money";
@@ -398,7 +397,8 @@
    */
   @RequestMapping(value = "getHomeMsgList", method = RequestMethod.POST)
   public void getHomeMsgList(AcceptData acceptData, Long uid, int page, HttpSession session, PrintWriter out) {
      if (uid != null && uid == 0)
         uid = null;
      String device = acceptData.getDevice();
      if (device == null || device.trim().length() == 0) {
         out.print(JsonUtil.loadFalseResult("设备号不能为空"));
@@ -523,7 +523,6 @@
      out.print(JsonUtil.loadTrueResult(root));
   }
   
   /**
    * 获取消息列表
    * 
@@ -535,6 +534,8 @@
    */
   @RequestMapping(value = "getHomeMsgListNew", method = RequestMethod.POST)
   public void getHomeMsgListNew(AcceptData acceptData, Long uid, PrintWriter out) {
      if (uid != null && uid == 0)
         uid = null;
      
      List<UserMsgCenter> listCenter = new ArrayList<>();
      
@@ -646,8 +647,11 @@
         UserMsgUnReadNum num = userMsgReadStateService.getReadStateByUid(uid);
         UserSystemMsg usm = userSystemMsgService.getLatestUserSystemMsg(uid);
         if (usm != null) {
            root.put("systemMsg", new UserSystemMsgVO(usm.getId(), usm.getType().name(), usm.getSolved(), "系统消息", usm.getTitle(),
               usm.getTimeTag() == 1 ? "http://img.flqapp.com/resource/msg/icon_emergent.png" : "", "http://img.flqapp.com/resource/msg/icon_msg_system.png",getTimeDesc(new Date(), usm.getCreateTime()), num.getTypeSystem()));
            root.put("systemMsg",
                  new UserSystemMsgVO(usm.getId(), usm.getType().name(), usm.getSolved(), "系统消息", usm.getTitle(),
                        usm.getTimeTag() == 1 ? "http://img.flqapp.com/resource/msg/icon_emergent.png" : "",
                        "http://img.flqapp.com/resource/msg/icon_msg_system.png",
                        getTimeDesc(new Date(), usm.getCreateTime()), num.getTypeSystem()));
         }
      }
      
@@ -655,7 +659,6 @@
      root.put("count", listCenter.size());
      out.print(JsonUtil.loadTrueResult(root));
   }
   public static void listSort(List<UserMsgVO> list) {
      Collections.sort(list, new Comparator<UserMsgVO>() {
@@ -671,7 +674,6 @@
         }
      });
   }
   
   /**
    * 获取系统消息列表