From 0ec22dcf4fd9c4496e6f681e7fab89f56c6e4e8a Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期四, 02 四月 2020 14:45:20 +0800
Subject: [PATCH] vip 消息

---
 fanli/src/main/java/com/yeshi/fanli/service/inter/msg/UserOtherMsgNotificationService.java    |   11 +-
 fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java           |   29 -------
 fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java        |    4 -
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java      |   48 +++++++----
 fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java                    |   25 +-----
 fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserOtherMsgNotificationServiceImpl.java |   14 ++-
 fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPInfoServiceImpl.java         |   18 +++-
 fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java             |    3 
 fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOtherDetail.java                        |   42 ++++++----
 fanli/src/main/java/com/yeshi/fanli/vo/msg/ClientTextStyleVO.java                             |    5 +
 10 files changed, 97 insertions(+), 102 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
index a831870..2763715 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/client/v2/DynamicControllerV2.java
@@ -1006,7 +1006,8 @@
 		}
 
 		String newText = text; // 闈為�氱敤鍒搁渶瑕侀獙璇�
-		if (comment != null && comment.getTypeEnum() != CommentInfoEnum.currencyCoupon) {
+		if ((comment != null && comment.getTypeEnum() != CommentInfoEnum.currencyCoupon)
+				|| goodsEvaluate.getType() == EvaluateEnum.activity) {
 			try {
 				newText = convertLinkManager.convertLinkFromText(text, uid, true);
 			} catch (ConvertLinkExceptionException e) {
diff --git a/fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOtherDetail.java b/fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOtherDetail.java
index ca0d2f8..83a4c1f 100644
--- a/fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOtherDetail.java
+++ b/fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgOtherDetail.java
@@ -20,33 +20,39 @@
 @Table("yeshi_ec_msg_other")
 public class MsgOtherDetail {
 	public enum MsgTypeOtherTypeEnum {
-		couponMianDan("鍏嶅崟鍒�"),
-		couponWelfareMianDan("绂忓埄鍏嶅崟鍒�"),
-		freeCouponBuy("鑷喘鍏嶅崟鍒�"),
-		freeCouponGive("璧犻�佸厤鍗曞埜"),
-		couponReward("濂栧姳鍒�"),
-		taoLiJin("鎺ㄥ箍绾㈠寘"),
-		taoLiJinExchange("鎺ㄥ箍绾㈠寘鍏戞崲閲戝竵"),
-		give("璧犻��"),
-		exchange("閲戝竵鍏戞崲"),
-		couponActivate("鍏嶅崟鍒告縺娲�"),
-		firstOrderReward("绮変笣棣栧崟濂栧姳閭�璇蜂汉閲戝竵"),
-		systemGive("绯荤粺璧犻��"),
-		passVIPApply("瓒呯骇浼氬憳"),
-		rejectVIPApply("瓒呯骇浼氬憳"),
-		teamVIPCallBoss ("娓╅Θ鎻愰啋"),
-		teamSplitCallBoss ("閭�璇疯劚绂�"),
-		vipUpgradeReward("vip鍗囩骇濂栧姳");
+		couponMianDan("鍏嶅崟鍒�",""),
+		couponWelfareMianDan("绂忓埄鍏嶅崟鍒�",""),
+		freeCouponBuy("鑷喘鍏嶅崟鍒�",""),
+		freeCouponGive("璧犻�佸厤鍗曞埜",""),
+		couponReward("濂栧姳鍒�",""),
+		taoLiJin("鎺ㄥ箍绾㈠寘",""),
+		taoLiJinExchange("鎺ㄥ箍绾㈠寘鍏戞崲閲戝竵",""),
+		give("璧犻��",""),
+		exchange("閲戝竵鍏戞崲",""),
+		couponActivate("鍏嶅崟鍒告縺娲�",""),
+		firstOrderReward("绮変笣棣栧崟濂栧姳閭�璇蜂汉閲戝竵",""),
+		systemGive("绯荤粺璧犻��",""),
+		passVIPApply("瓒呯骇浼氬憳",""),
+		rejectVIPApply("瓒呯骇浼氬憳",""),
+		teamVIPCallBoss ("娓╅Θ鎻愰啋",""),
+		teamSplitCallBoss ("閭�璇疯劚绂�",""),
+		vipUpgradeReward("绯荤粺璧犻��","http://img.flqapp.com/resource/msg/icon_msg_vip.png");
 
 		private final String desc;
+		private final String icon;
 
-		private MsgTypeOtherTypeEnum(String desc) {
+		private MsgTypeOtherTypeEnum(String desc, String icon) {
 			this.desc = desc;
+			this.icon = icon;
 		}
 
 		public String getDesc() {
 			return desc;
 		}
+		
+		public String getIcon() {
+			return icon;
+		}
 	}
 
 	@Column(name = "mo_id")
diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
index 6d928e1..45a984c 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/dynamic/GoodsEvaluateServiceImpl.java
@@ -1570,10 +1570,6 @@
 			
 			// 鎸夌収鍙戝竷鏄剧ず鏃堕棿娈佃捣濮嬫椂闂翠负鍑嗐��
 			goodsEvaluate.setPublishTime(goodsEvaluate.getStartTime());
-			
-
-			// 鎸夌収鍙戝竷鏄剧ず鏃堕棿娈佃捣濮嬫椂闂翠负鍑嗐��
-			goodsEvaluate.setPublishTime(goodsEvaluate.getStartTime());
 						
 			List<CommentInfo> comments = evaluateNew.getComments();
 			if (comments != null && comments.size() > 0) {
diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java
index 4e63e56..a22c6fe 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/MsgOtherDetailServiceImpl.java
@@ -37,34 +37,7 @@
 				detail.setCreateTime(new Date());
 			msgOtherDetailMapper.insertSelective(detail);
 			userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
-		} else if (detail.getType() == MsgTypeOtherTypeEnum.taoLiJin) {
-			msgOtherDetailMapper.insertSelective(detail);
-			userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
-		} else if (detail.getType() == MsgTypeOtherTypeEnum.give) {
-			msgOtherDetailMapper.insertSelective(detail);
-			userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
-		} else if (detail.getType() == MsgTypeOtherTypeEnum.exchange) {
-			msgOtherDetailMapper.insertSelective(detail);
-			userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
-		} else if (detail.getType() == MsgTypeOtherTypeEnum.couponActivate) {
-			msgOtherDetailMapper.insertSelective(detail);
-			userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
-		} else if (detail.getType() == MsgTypeOtherTypeEnum.firstOrderReward) {
-			msgOtherDetailMapper.insertSelective(detail);
-			userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
-		}else if (detail.getType() == MsgTypeOtherTypeEnum.systemGive) {
-			msgOtherDetailMapper.insertSelective(detail);
-			userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
-		} else if (detail.getType() == MsgTypeOtherTypeEnum.taoLiJinExchange) {
-			msgOtherDetailMapper.insertSelective(detail);
-			userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
-		} else if (detail.getType() == MsgTypeOtherTypeEnum.passVIPApply 
-				|| detail.getType() == MsgTypeOtherTypeEnum.rejectVIPApply 
-				|| detail.getType() == MsgTypeOtherTypeEnum.teamVIPCallBoss
-				|| detail.getType() == MsgTypeOtherTypeEnum.teamSplitCallBoss) {
-			msgOtherDetailMapper.insertSelective(detail);
-			userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
-		}else if (detail.getType() == MsgTypeOtherTypeEnum.vipUpgradeReward) {
+		} else {
 			msgOtherDetailMapper.insertSelective(detail);
 			userMsgReadStateService.addOtherMsgUnReadCount(detail.getUser().getId(), 1);
 		}
diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserOtherMsgNotificationServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserOtherMsgNotificationServiceImpl.java
index 7d5bf5a..850210b 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserOtherMsgNotificationServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserOtherMsgNotificationServiceImpl.java
@@ -2,6 +2,7 @@
 
 import java.math.BigDecimal;
 import java.util.Date;
+import java.util.List;
 
 import javax.annotation.Resource;
 
@@ -26,6 +27,7 @@
 import com.yeshi.fanli.util.TimeUtil;
 import com.yeshi.fanli.util.factory.msg.MsgOtherCouponContentDTOFactory;
 import com.yeshi.fanli.util.factory.msg.MsgOtherDetailFactory;
+import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
 
 @Service
 public class UserOtherMsgNotificationServiceImpl implements UserOtherMsgNotificationService {
@@ -538,15 +540,17 @@
 	
 	
 	@Override
-	public void vipUpgradeReward(Long uid, String beiZhu, MsgOtherSystemGiveDTO dto) {
+	public void createMsgOtherDetail(Long uid, List<CommonMsgItemVO> listMsg, MsgTypeOtherTypeEnum type) {
 		try {
+			if (listMsg == null || listMsg.size() == 0) {
+				return;
+			}
 			MsgOtherDetail detail = new MsgOtherDetail();
-			detail.setBeiZhu(beiZhu);
-			detail.setCreateTime(new Date());
 			detail.setRead(false);
+			detail.setType(type);
 			detail.setUser(new UserInfo(uid));
-			detail.setContent(new Gson().toJson(dto));
-			detail.setType(MsgTypeOtherTypeEnum.vipUpgradeReward);
+			detail.setContent(new Gson().toJson(listMsg));
+			detail.setCreateTime(new Date());
 			msgOtherDetailService.addMsgOtherDetail(detail);
 		} catch (MsgOtherDetailException e) {
 			e.printStackTrace();
diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPInfoServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPInfoServiceImpl.java
index 60bc449..4423789 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPInfoServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPInfoServiceImpl.java
@@ -1,5 +1,6 @@
 package com.yeshi.fanli.service.impl.user.vip;
 
+import java.util.ArrayList;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -16,6 +17,7 @@
 import com.yeshi.fanli.dto.msg.MsgOtherSystemGiveDTO;
 import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail;
 import com.yeshi.fanli.entity.bus.msg.MsgAccountDetail.MsgTypeAccountTypeEnum;
+import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail.MsgTypeOtherTypeEnum;
 import com.yeshi.fanli.entity.bus.user.HongBaoV2;
 import com.yeshi.fanli.entity.bus.user.UserInfo;
 import com.yeshi.fanli.entity.bus.user.UserInfoExtra;
@@ -43,6 +45,9 @@
 import com.yeshi.fanli.service.inter.user.vip.UserVipConfigService;
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.StringUtil;
+import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
+import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
+import com.yeshi.fanli.vo.msg.CommonMsgItemVOFactory;
 
 @Service
 public class UserVIPInfoServiceImpl implements UserVIPInfoService {
@@ -251,11 +256,14 @@
 				}
 				
 				// 娑堟伅
-				MsgOtherSystemGiveDTO dto = new MsgOtherSystemGiveDTO();
-				dto.setName("绯荤粺璧犻�� ");
-				dto.setReason("鎭枩浣狅紒鎴愬姛鍗囩骇涓鸿秴绾т細鍛�");
-				dto.setDesc("鑾峰緱璧犻�佸厤鍗曞埜" + num +"寮�");
-				userOtherMsgNotificationService.vipUpgradeReward(uid, "璇︽儏鏌ョ湅锛屽搴斾細鍛樻潈鐩�", dto);
+				List<CommonMsgItemVO> listMsg = new ArrayList<>();
+				listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鐘�        鎬�", ClientTextStyleVO.COLOR_TITLE),
+						new ClientTextStyleVO("鎭枩浣狅紒鎴愬姛鍗囩骇涓鸿秴绾т細鍛�", ClientTextStyleVO.COLOR_CONTENT)));
+				listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("濂�        鍔�", ClientTextStyleVO.COLOR_TITLE),
+						new ClientTextStyleVO("鑾峰緱璧犻�佸厤鍗曞埜" + num +"寮�", ClientTextStyleVO.COLOR_CONTENT)));
+				listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("澶�        娉�", ClientTextStyleVO.COLOR_TITLE),
+						new ClientTextStyleVO("璇︽儏鏌ョ湅锛屽搴斾細鍛樻潈鐩�", ClientTextStyleVO.COLOR_CONTENT)));
+				userOtherMsgNotificationService.createMsgOtherDetail(uid, listMsg, MsgTypeOtherTypeEnum.vipUpgradeReward);
 			}
 		} catch (Exception e) {
 			throw new UserVIPInfoException(1, "鍒歌禒閫佸け璐�");
diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java
index 37b5f01..d8006e2 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/user/vip/UserVIPPreInfoServiceImpl.java
@@ -1,6 +1,7 @@
 package com.yeshi.fanli.service.impl.user.vip;
 
 import java.math.BigDecimal;
+import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
 import java.util.Date;
@@ -14,7 +15,7 @@
 
 import com.yeshi.fanli.dao.mybatis.user.vip.UserVIPPreInfoMapper;
 import com.yeshi.fanli.dto.msg.MsgAccountVipDTO;
-import com.yeshi.fanli.dto.msg.MsgOtherSystemGiveDTO;
+import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail.MsgTypeOtherTypeEnum;
 import com.yeshi.fanli.entity.bus.user.HongBaoV2;
 import com.yeshi.fanli.entity.bus.user.ThreeSale;
 import com.yeshi.fanli.entity.bus.user.UserInfo;
@@ -42,6 +43,9 @@
 import com.yeshi.fanli.util.Constant;
 import com.yeshi.fanli.util.StringUtil;
 import com.yeshi.fanli.util.annotation.RequestSerializableByKeyService;
+import com.yeshi.fanli.vo.msg.ClientTextStyleVO;
+import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
+import com.yeshi.fanli.vo.msg.CommonMsgItemVOFactory;
 
 @Service
 public class UserVIPPreInfoServiceImpl implements UserVIPPreInfoService {
@@ -219,6 +223,11 @@
 	 */
 	@Transactional(rollbackFor = Exception.class)
 	private boolean oneProcess(Long uid, long countZiGou, long countShare, long firstTeam, long secondTeam) {
+		UserVIPPreInfo oldInfo = userVIPPreInfoMapper.selectByUidAndProcess(uid, UserVIPPreInfo.PROCESS_1);
+		if (oldInfo != null) {
+			return true;
+		}
+					
 		boolean process = false;
 		String msg = "";
 		
@@ -291,11 +300,14 @@
 					userInfoExtraService.addGoldCoinByUid(uid, Integer.parseInt(goldcoin));
 					
 					// 娑堟伅
-					MsgOtherSystemGiveDTO dto = new MsgOtherSystemGiveDTO();
-					dto.setName("绯荤粺璧犻�� ");
-					dto.setReason("鎭枩浣狅紒鎴愬姛鍗囩骇涓烘櫘閫氫細鍛�");
-					dto.setDesc("鑾峰緱閲戝竵" + goldcoinNum+"鏋�");
-					userOtherMsgNotificationService.vipUpgradeReward(uid, "璇︽儏鏌ョ湅锛屽搴斾細鍛樻潈鐩�", dto);
+					List<CommonMsgItemVO> listMsg = new ArrayList<>();
+					listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鐘�        鎬�", ClientTextStyleVO.COLOR_TITLE),
+							new ClientTextStyleVO("鎭枩浣狅紒鎴愬姛鍗囩骇涓烘櫘閫氫細鍛�", ClientTextStyleVO.COLOR_CONTENT)));
+					listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("濂�        鍔�", ClientTextStyleVO.COLOR_TITLE),
+							new ClientTextStyleVO("鑾峰緱閲戝竵" + goldcoinNum+"鏋�", ClientTextStyleVO.COLOR_CONTENT)));
+					listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("澶�        娉�", ClientTextStyleVO.COLOR_TITLE),
+							new ClientTextStyleVO("璇︽儏鏌ョ湅锛屽搴斾細鍛樻潈鐩�", ClientTextStyleVO.COLOR_CONTENT)));
+					userOtherMsgNotificationService.createMsgOtherDetail(uid, listMsg, MsgTypeOtherTypeEnum.vipUpgradeReward);
 				}
 				
 				// 鏄惁瀛樺湪涓嬬骇鑴辩鏈熼檺 -鏇存柊涓嶈劚绂�
@@ -351,11 +363,11 @@
 		boolean process = false;
 		String msg = "";
 		
-		long limitZiGou = 0;
-		String zigou = userVipConfigService.getValueByKey("vip_pre_7_zigou_order_count");
-		if (!StringUtil.isNullOrEmpty(zigou)) {
-			limitZiGou = Long.parseLong(zigou);
-		}
+		long limitZiGou = 10;
+//		String zigou = userVipConfigService.getValueByKey("vip_pre_7_zigou_order_count");
+//		if (!StringUtil.isNullOrEmpty(zigou)) {
+//			limitZiGou = Long.parseLong(zigou);
+//		}
 		
 		long limitShare = 0;
 		String share = userVipConfigService.getValueByKey("vip_pre_7_share_order_count");
@@ -411,12 +423,14 @@
 								UserSystemCoupon.SOURCE_SYSTEM_PUSH, percent, false);
 					}
 					
-					// 娑堟伅
-					MsgOtherSystemGiveDTO dto = new MsgOtherSystemGiveDTO();
-					dto.setName("绯荤粺璧犻�� ");
-					dto.setReason("鎭枩浣狅紒鎴愬姛鍗囩骇涓洪珮绾т細鍛�");
-					dto.setDesc("鑾峰緱杩斿埄濂栧姳鍒�" + num +"寮�");
-					userOtherMsgNotificationService.vipUpgradeReward(uid, "璇︽儏鏌ョ湅锛屽搴斾細鍛樻潈鐩�", dto);
+					List<CommonMsgItemVO> listMsg = new ArrayList<>();
+					listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("鐘�        鎬�", ClientTextStyleVO.COLOR_TITLE),
+							new ClientTextStyleVO("鎭枩浣狅紒鎴愬姛鍗囩骇涓洪珮绾т細鍛�", ClientTextStyleVO.COLOR_CONTENT)));
+					listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("濂�        鍔�", ClientTextStyleVO.COLOR_TITLE),
+							new ClientTextStyleVO("鑾峰緱杩斿埄濂栧姳鍒�" + num +"寮�", ClientTextStyleVO.COLOR_CONTENT)));
+					listMsg.add(CommonMsgItemVOFactory.createMsgItemVO(new ClientTextStyleVO("澶�        娉�", ClientTextStyleVO.COLOR_TITLE),
+							new ClientTextStyleVO("璇︽儏鏌ョ湅锛屽搴斾細鍛樻潈鐩�", ClientTextStyleVO.COLOR_CONTENT)));
+					userOtherMsgNotificationService.createMsgOtherDetail(uid, listMsg, MsgTypeOtherTypeEnum.vipUpgradeReward);
 				}
 			} catch (Exception e) {
 				e.printStackTrace();
diff --git a/fanli/src/main/java/com/yeshi/fanli/service/inter/msg/UserOtherMsgNotificationService.java b/fanli/src/main/java/com/yeshi/fanli/service/inter/msg/UserOtherMsgNotificationService.java
index c6cbe82..41adc85 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/inter/msg/UserOtherMsgNotificationService.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/inter/msg/UserOtherMsgNotificationService.java
@@ -1,6 +1,7 @@
 package com.yeshi.fanli.service.inter.msg;
 
 import java.math.BigDecimal;
+import java.util.List;
 
 import com.yeshi.fanli.dto.msg.MsgOtherCouponActivateDTO;
 import com.yeshi.fanli.dto.msg.MsgOtherExchangeContentDTO;
@@ -12,6 +13,7 @@
 import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail.MsgTypeOtherTypeEnum;
 import com.yeshi.fanli.entity.bus.user.UserInfo;
 import com.yeshi.fanli.entity.bus.user.UserSystemCoupon;
+import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
 
 /**
  * 鐢ㄦ埛璁㈠崟娑堟伅閫氱煡
@@ -301,12 +303,13 @@
 	 */
 	public void teamSplitCallBoss(Long uid, String beiZhu, MsgOtherVIPDTO dto);
 
+
 	/**
-	 * vip鍗囩骇濂栧姳
+	 * 鍒涘缓娑堟伅鏄庣粏
 	 * @param uid
-	 * @param beiZhu
-	 * @param dto
+	 * @param type
+	 * @param listMsg
 	 */
-	public void vipUpgradeReward(Long uid, String beiZhu, MsgOtherSystemGiveDTO dto);
+	public void createMsgOtherDetail(Long uid, List<CommonMsgItemVO> listMsg, MsgTypeOtherTypeEnum type);
 
 }
diff --git a/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java b/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
index 222b9aa..b513dea 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
@@ -6,6 +6,7 @@
 import java.util.List;
 
 import com.google.gson.Gson;
+import com.google.gson.reflect.TypeToken;
 import com.yeshi.fanli.dto.msg.MsgAccountVipDTO;
 import com.yeshi.fanli.dto.msg.MsgInviteContentDTO;
 import com.yeshi.fanli.dto.msg.MsgOtherCouponActivateDTO;
@@ -1750,28 +1751,12 @@
 			if (StringUtil.isNullOrEmpty(msg.getContent()))
 				return null;
 
-			MsgOtherSystemGiveDTO dto = new Gson().fromJson(msg.getContent(), MsgOtherSystemGiveDTO.class);
-			if (dto == null)
-				return null;
-
-			List<ClientTextStyleVO> contentList = new ArrayList<>();
-
-			contentList = new ArrayList<>();
-			contentList.add(new ClientTextStyleVO(dto.getReason(), COLOR_CONTENT));
-			items.add(new CommonMsgItemVO(new ClientTextStyleVO("鐘�        鎬�", COLOR_TITLE), contentList));
-
-			contentList = new ArrayList<>();
-			contentList.add(new ClientTextStyleVO(dto.getDesc() + "", COLOR_CONTENT));
-			items.add(new CommonMsgItemVO(new ClientTextStyleVO("濂�        鍔�", COLOR_TITLE), contentList));
-
-			contentList = new ArrayList<>();
-			contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "鏃�" : msg.getBeiZhu(),
-					COLOR_CONTENT));
-			items.add(new CommonMsgItemVO(new ClientTextStyleVO("澶�        娉�", COLOR_TITLE), contentList));
+			Gson gson = new Gson();
+			items.addAll(gson.fromJson(msg.getContent(), new TypeToken<ArrayList<CommonMsgItemVO>>() {}.getType()));
 
 			UserMsgVO userMsgVO = new UserMsgVO();
-			userMsgVO.setIcon("http://img.flqapp.com/resource/msg/icon_msg_vip.png");
-			userMsgVO.setTitle(dto.getName());
+			userMsgVO.setIcon(msg.getType().getIcon());
+			userMsgVO.setTitle(msg.getType().getDesc());
 			userMsgVO.setTime(msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime());
 			userMsgVO.setContentItems(items);
 			return userMsgVO;
diff --git a/fanli/src/main/java/com/yeshi/fanli/vo/msg/ClientTextStyleVO.java b/fanli/src/main/java/com/yeshi/fanli/vo/msg/ClientTextStyleVO.java
index bafdde4..3bc0f54 100644
--- a/fanli/src/main/java/com/yeshi/fanli/vo/msg/ClientTextStyleVO.java
+++ b/fanli/src/main/java/com/yeshi/fanli/vo/msg/ClientTextStyleVO.java
@@ -5,6 +5,11 @@
 import com.google.gson.annotations.Expose;
 
 public class ClientTextStyleVO implements Serializable{
+	
+	public final static String COLOR_TITLE = "#888888";
+	public final static String COLOR_CONTENT = "#000000";
+	public final static String COLOR_HIGHLIGHT_CONTENT = "#E5005C";
+	
 	/**
 	 * 
 	 */

--
Gitblit v1.8.0