| | |
| | | import com.yeshi.fanli.util.RedisManager;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.VersionUtil;
|
| | | import com.yeshi.fanli.util.factory.CommonGoodsFactory;
|
| | | import com.yeshi.fanli.util.factory.msg.UserMsgVOFactory;
|
| | | import com.yeshi.fanli.util.taobao.TaoKeApiUtil;
|
| | |
| | | data.put("totalCount", 0);
|
| | | }
|
| | | } catch (UserCustomSettingsException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | out.print(JsonUtil.loadTrueResult(data));
|
| | |
| | |
|
| | | int totalCount = num.getTypeAccount() + num.getTypeInvite() + num.getTypeMoney() + num.getTypeOrder()
|
| | | + num.getTypeScore() + num.getTypeSystem() + num.getTypeOther();
|
| | |
|
| | | // 1.5.50及以后的版本需要添加设备未读消息
|
| | | if (VersionUtil.greaterThan_1_5_50(acceptData.getPlatform(), acceptData.getVersion())) {
|
| | | totalCount += msgDeviceReadStateService.getUnReadCount(acceptData.getDevice(),
|
| | | "android".equalsIgnoreCase(acceptData.getPlatform()) ? 1 : 2, MsgDeviceReadState.TYPE_KEFU);
|
| | | }
|
| | |
|
| | | JSONObject data = null;
|
| | | if ("android".equalsIgnoreCase(acceptData.getPlatform())) {
|
| | |
| | | vo.setRead(false);
|
| | | else
|
| | | vo.setRead(true);
|
| | | }
|
| | |
|
| | | if (kefuState.getLatestContentTime() != null)
|
| | | vo.setTime(kefuState.getLatestContentTime());
|
| | |
|
| | | } else
|
| | | vo.setRead(true);
|
| | |
|
| | | 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(""));
|
| | | }
|
| | |
|
| | | }
|