yujian
2019-06-25 b7b8f2a4fe9059ef7b5470a68bb1b34787bc92b2
fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java
@@ -295,6 +295,12 @@
         } catch (UserCustomSettingsException e) {
         }
         if (VersionUtil.greaterThan_1_5_50(acceptData.getPlatform(), acceptData.getVersion())) {
            int totalCount = msgDeviceReadStateService.getUnReadCount(acceptData.getDevice(),
                  "android".equalsIgnoreCase(acceptData.getPlatform()) ? 1 : 2, MsgDeviceReadState.TYPE_KEFU);
            data.put("totalCount", totalCount);
         }
         out.print(JsonUtil.loadTrueResult(data));
         return;
      }
@@ -604,6 +610,9 @@
      } else
         vo.setRead(true);
      if (StringUtil.isNullOrEmpty(vo.getLatestMsg()))
         vo.setLatestMsg("[点击打开人工客服]");
      return vo;
   }
@@ -973,14 +982,14 @@
    * @param out
    */
   @RequestMapping(value = "uploadLatestKeFuMsg", method = RequestMethod.POST)
   public void uploadLatestKeFuMsg(AcceptData acceptData, String content, Long time, PrintWriter out) {
   public void uploadLatestKeFuMsg(AcceptData acceptData, String content, Long datetime, PrintWriter out) {
      if (StringUtil.isNullOrEmpty(content) || time == null) {
      if (StringUtil.isNullOrEmpty(content) || datetime == null) {
         out.print(JsonUtil.loadFalseResult("参数不完整"));
         return;
      }
      msgDeviceReadStateService.addUnreadDeviceMsg(MsgDeviceReadState.TYPE_KEFU, acceptData.getDevice(),
            "android".equalsIgnoreCase(acceptData.getPlatform()) ? 1 : 2, 0, content, new Date(time));
            "android".equalsIgnoreCase(acceptData.getPlatform()) ? 1 : 2, 0, content, new Date(datetime));
      out.print(JsonUtil.loadTrueResult(""));
   }