| | |
| | | } 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;
|
| | | }
|
| | |
| | | vo.setRead(false);
|
| | | else
|
| | | vo.setRead(true);
|
| | |
|
| | | if (kefuState.getLatestContentTime() != null)
|
| | | vo.setTime(kefuState.getLatestContentTime());
|
| | |
|
| | | } else
|
| | | vo.setRead(true);
|
| | |
|
| | | if (StringUtil.isNullOrEmpty(vo.getLatestMsg()))
|
| | | vo.setLatestMsg("[点击打开人工客服]");
|
| | |
|
| | | return vo;
|
| | | }
|
| | |
| | | out.print(JsonUtil.loadTrueResult(""));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 上传最近的客服消息
|
| | | * |
| | | * @param acceptData
|
| | | * @param content
|
| | | * @param time
|
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "uploadLatestKeFuMsg", method = RequestMethod.POST)
|
| | | public void uploadLatestKeFuMsg(AcceptData acceptData, String content, Long datetime, PrintWriter out) {
|
| | |
|
| | | 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(datetime));
|
| | | out.print(JsonUtil.loadTrueResult(""));
|
| | | }
|
| | |
|
| | | }
|