From b19d2e730b0ea707b500b307f58c46ba0cef695f Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期三, 18 九月 2019 18:41:21 +0800
Subject: [PATCH] 抖音广告监测修改

---
 fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java |   51 +++++++++++++++++++++++++++++----------------------
 1 files changed, 29 insertions(+), 22 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java
index 615e14f..8b48a9d 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserMsgController.java
@@ -594,7 +594,9 @@
 			// 鍒涘缓鏃堕棿鍦�28鍙峰悗鐨勬墠鏈夋柊浜烘杩�
 			if ((time > TimeUtil.convertToTimeTemp("2019-01-28", "yyyy-MM-dd") || uid == null)) {
 				UserHomeMsgVO vo = new UserHomeMsgVO();
-				vo.setContent(String.format("鎭枩浣狅紝鎴愪负%s鐨勭敤鎴穃n鐙浼樻儬鍒稿府浣犵渷閽憋紱\n鍙備笌濂栭噾娲诲姩甯綘璧氶挶锛沑n璁�%s鎴愪负浣犵殑鐪侀挶鍔╂墜鍚э紒",Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion()),Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion())));
+				vo.setContent(String.format("鎭枩浣狅紝鎴愪负%s鐨勭敤鎴穃n鐙浼樻儬鍒稿府浣犵渷閽憋紱\n鍙備笌濂栭噾娲诲姩甯綘璧氶挶锛沑n璁�%s鎴愪负浣犵殑鐪侀挶鍔╂墜鍚э紒",
+						Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion()),
+						Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion())));
 				vo.setTitle("鏂颁汉娆㈣繋");
 				vo.setCreateTime(getTimeDesc(now, new Date(time)));
 				vo.setType(UserHomeMsgVO.TYPE_WELCOME);
@@ -745,8 +747,9 @@
 
 		// 1銆佹椿鍔ㄥ尯鍩�
 		int platformCode = Constant.getPlatformCode(acceptData.getPlatform());
-		
-		List<Special> listSpecial = specialService.listByPlaceKey("msg_activities", platformCode, Integer.parseInt(acceptData.getVersion()));
+
+		List<Special> listSpecial = specialService.listByPlaceKey("msg_activities", platformCode,
+				Integer.parseInt(acceptData.getVersion()));
 		if (listSpecial != null && listSpecial.size() > 0) {
 			for (Special special : listSpecial) {
 
@@ -844,7 +847,10 @@
 		if ((time > TimeUtil.convertToTimeTemp("2019-01-28", "yyyy-MM-dd") || uid == null)) {
 			Map<String, Object> map = new HashMap<String, Object>();
 			map.put("title", "鏂颁汉娆㈣繋");
-			map.put("content",String.format("鎭枩浣狅紝鎴愪负%s鐨勭敤鎴穃n鐙浼樻儬鍒稿府浣犵渷閽憋紱\n鍙備笌濂栭噾娲诲姩甯綘璧氶挶锛沑n璁�%s鎴愪负浣犵殑鐪侀挶鍔╂墜鍚э紒",Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion()),Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion())));
+			map.put("content",
+					String.format("鎭枩浣狅紝鎴愪负%s鐨勭敤鎴穃n鐙浼樻儬鍒稿府浣犵渷閽憋紱\n鍙備笌濂栭噾娲诲姩甯綘璧氶挶锛沑n璁�%s鎴愪负浣犵殑鐪侀挶鍔╂墜鍚э紒",
+							Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion()),
+							Constant.getAppName(acceptData.getPlatform(), acceptData.getVersion())));
 			map.put("createTime", new Date(time));
 			UserMsgCenter msgCenternre = new UserMsgCenter();
 			msgCenternre.setWelcomeMsg(map);
@@ -873,26 +879,27 @@
 		/**
 		 * 鎻愰啋澶у浘
 		 */
-		MsgCommonDTO notify = msgConfigService.getNotifyMsg();
+		if (!"douyin".equalsIgnoreCase(acceptData.getChannel())) {
+			MsgCommonDTO notify = msgConfigService.getNotifyMsg();
 
-		if (notify != null && notify.getShow() == true) {
-			boolean read = false;
-			MsgDeviceReadState state = msgDeviceReadStateService.getByDeviceAndPlatformAndType(
-					UserCommonMsgVO.TYPE_NOTIFY, acceptData.getDevice(),
-					acceptData.getPlatform().equalsIgnoreCase("android") ? 1 : 2);
-			if (state != null && state.getReadTime() != null
-					&& zhuShouMsg.getUpdateTime().getTime() < state.getReadTime().getTime())
-				read = true;
-			if (notify.getJumpDetail() == null)
-				read = true;
-			// 鏌ヨ鏄惁宸茶
-			UserCommonMsgVO vo = new UserCommonMsgVO(notify.getIcon(), notify.getTitle(), notify.getUpdateTime(),
-					UserCommonMsgVO.TYPE_NOTIFY, notify.getContent(), read, notify.getJumpDetail(), notify.getParams(),
-					0);
-			vo.setPicture(notify.getPicture());
-			root.put("notifyMsg", builder.create().toJson(vo));
+			if (notify != null && notify.getShow() == true) {
+				boolean read = false;
+				MsgDeviceReadState state = msgDeviceReadStateService.getByDeviceAndPlatformAndType(
+						UserCommonMsgVO.TYPE_NOTIFY, acceptData.getDevice(),
+						acceptData.getPlatform().equalsIgnoreCase("android") ? 1 : 2);
+				if (state != null && state.getReadTime() != null
+						&& zhuShouMsg.getUpdateTime().getTime() < state.getReadTime().getTime())
+					read = true;
+				if (notify.getJumpDetail() == null)
+					read = true;
+				// 鏌ヨ鏄惁宸茶
+				UserCommonMsgVO vo = new UserCommonMsgVO(notify.getIcon(), notify.getTitle(), notify.getUpdateTime(),
+						UserCommonMsgVO.TYPE_NOTIFY, notify.getContent(), read, notify.getJumpDetail(),
+						notify.getParams(), 0);
+				vo.setPicture(notify.getPicture());
+				root.put("notifyMsg", builder.create().toJson(vo));
+			}
 		}
-
 		root.put("list", builder.create().toJson(listCenter));
 		root.put("commonList", builder.create().toJson(commonMsgList));
 		root.put("count", listCenter.size());

--
Gitblit v1.8.0