From 4114e871bcb3dce771b6aed64a1027d0bbb95ca6 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 16 五月 2019 15:28:37 +0800
Subject: [PATCH] 增加动态用户

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/UserMsgController.java |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/UserMsgController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/UserMsgController.java
index 737caff..72f63cb 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/UserMsgController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/UserMsgController.java
@@ -253,8 +253,6 @@
 	 */
 	@RequestMapping(value = "getUnReadMsgCount", method = RequestMethod.POST)
 	public void getUnReadMsgCount(AcceptData acceptData, Long uid, PrintWriter out) {
-		int deviceCount = msgDeviceReadStateService.getUnReadCount(acceptData.getDevice(),
-				"android".equalsIgnoreCase(acceptData.getPlatform()) ? 1 : 2);
 		GsonBuilder androidBuilder = new GsonBuilder().registerTypeAdapter(Integer.class,
 				new JsonSerializer<Integer>() {
 					@Override
@@ -286,7 +284,7 @@
 			} else {
 				data = JSONObject.fromObject(JsonUtil.getApiCommonGson().toJson(num));
 			}
-			data.put("totalCount", deviceCount);
+			data.put("totalCount", 0);
 
 			try {
 				UserSettingsVO vo = userCustomSettingsService.getMySettings(uid);
@@ -303,7 +301,7 @@
 		UserMsgUnReadNum num = userMsgReadStateService.getReadStateByUid(uid);
 
 		int totalCount = num.getTypeAccount() + num.getTypeInvite() + num.getTypeMoney() + num.getTypeOrder()
-				+ num.getTypeScore() + num.getTypeSystem() + num.getTypeOther() + deviceCount;
+				+ num.getTypeScore() + num.getTypeSystem() + num.getTypeOther();
 
 		JSONObject data = null;
 		if ("android".equalsIgnoreCase(acceptData.getPlatform())) {
@@ -655,7 +653,7 @@
 			List<PushGoods> list = pushGoodsService.listHistoryByPushTime(0, 1, uid, createTime);
 			if (list != null && list.size() > 0) {
 				MsgDeviceReadState state = msgDeviceReadStateService.getByDeviceAndPlatformAndType(
-						UserCommonMsgVO.TYPE_ZHUSHOU, acceptData.getDevice(),
+						UserCommonMsgVO.TYPE_RECOMMEND, acceptData.getDevice(),
 						acceptData.getPlatform().equalsIgnoreCase("android") ? 1 : 2);
 				boolean read = false;
 				if (state != null && state.getReadTime() != null
@@ -876,6 +874,8 @@
 
 	@RequestMapping(value = "setAllMsgRead", method = RequestMethod.POST)
 	public void setAllMsgRead(AcceptData acceptData, Long uid, PrintWriter out) {
+		msgDeviceReadStateService.setAllMsgRead(acceptData.getDevice(),
+				"android".equalsIgnoreCase(acceptData.getPlatform()) ? 1 : 2);
 		if (uid == null) {
 			out.print(JsonUtil.loadFalseResult(1, "鐢ㄦ埛鏈櫥褰�"));
 			return;
@@ -929,7 +929,7 @@
 			msgDeviceReadStateService.setDeviceMsgRead(UserCommonMsgVO.TYPE_RECOMMEND, acceptData.getDevice(),
 					(acceptData.getPlatform().equalsIgnoreCase("android") ? 1 : 2));
 		} else if (type.equalsIgnoreCase(UserCommonMsgVO.TYPE_ZHUSHOU)) {
-			msgDeviceReadStateService.setDeviceMsgRead(UserCommonMsgVO.TYPE_RECOMMEND, acceptData.getDevice(),
+			msgDeviceReadStateService.setDeviceMsgRead(UserCommonMsgVO.TYPE_ZHUSHOU, acceptData.getDevice(),
 					(acceptData.getPlatform().equalsIgnoreCase("android") ? 1 : 2));
 		}
 		out.print(JsonUtil.loadTrueResult(""));

--
Gitblit v1.8.0