From df4441322e9801c102299451da41d7c40b4502e9 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 24 六月 2021 18:53:13 +0800
Subject: [PATCH] zookeeper地址修改,Maven采用私服

---
 service-daylucky/src/main/java/com/ks/daylucky/util/factory/vo/UserMsgVOFactory.java |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/service-daylucky/src/main/java/com/ks/daylucky/util/factory/vo/UserMsgVOFactory.java b/service-daylucky/src/main/java/com/ks/daylucky/util/factory/vo/UserMsgVOFactory.java
index 7235e9c..69368cf 100644
--- a/service-daylucky/src/main/java/com/ks/daylucky/util/factory/vo/UserMsgVOFactory.java
+++ b/service-daylucky/src/main/java/com/ks/daylucky/util/factory/vo/UserMsgVOFactory.java
@@ -4,6 +4,8 @@
 import com.ks.daylucky.pojo.DTO.msg.LuckyMsgContent;
 import com.ks.daylucky.pojo.VO.UserMsgContentVO;
 import com.ks.daylucky.pojo.VO.UserMsgVO;
+import com.ks.daylucky.pojo.VO.common.JumpDetailVO;
+import net.sf.json.JSONObject;
 
 import java.util.ArrayList;
 import java.util.List;
@@ -12,7 +14,8 @@
 
     public static UserMsgVO create(UserMsg msg) {
         UserMsgVO vo = new UserMsgVO();
-        vo.setIcon("");
+        vo.setId(msg.getId());
+        vo.setIcon(msg.getMsgType().getIcon());
         vo.setName(msg.getMsgType().getName());
         vo.setTime(msg.getCreateTime());
         if (msg.getMsgType() == UserMsg.UserMsgType.lucky) {
@@ -23,7 +26,7 @@
 
     private static String getDateNumber(String dateNumber) {
         StringBuilder builder = new StringBuilder();
-        builder.append("  <div style=\"display: flex;justify-content: space-between;\">");
+        builder.append("<div style=\"display: flex;justify-content: space-between;\">");
         builder.append("<span>" + dateNumber + "</span>");
         builder.append("<a style='color:#theme'>鏌ョ湅璇︽儏</a>");
         builder.append("</div>");
@@ -33,7 +36,9 @@
     private static List<UserMsgContentVO> create(LuckyMsgContent luckyMsgContent) {
         LuckyMsgContent.LuckyMsgType luckyMsgType = luckyMsgContent.getLuckyMsgType();
         List<UserMsgContentVO> voList = new ArrayList<>();
-        voList.add(new UserMsgContentVO("娲诲姩鏈熷彿", getDateNumber(luckyMsgContent.getDateNumber())));
+        JSONObject params = new JSONObject();
+        params.put("url", "/pages/activity-detail/activity-detail?id=" + luckyMsgContent.getActivityId());
+        voList.add(new UserMsgContentVO("娲诲姩鏈熷彿", getDateNumber(luckyMsgContent.getDateNumber()), new JumpDetailVO(JumpDetailVO.JumpType.page, null, params)));
 
         if (luckyMsgType == LuckyMsgContent.LuckyMsgType.joinSuccess) {
             voList.add(new UserMsgContentVO("鐘舵��", "鍙備笌鎴愬姛"));
@@ -41,10 +46,10 @@
             voList.add(new UserMsgContentVO("棰嗗彇鐘舵��", luckyMsgContent.getReceiveState()));
             voList.add(new UserMsgContentVO("濂栧搧鏉冪泭", luckyMsgContent.getOutDateAwardState()));
         } else if (luckyMsgType == LuckyMsgContent.LuckyMsgType.assistAndJoin) {
-            voList.add(new UserMsgContentVO("鍔╁姏鐘舵��", "鍔╁姏濂藉弸<img src='" + luckyMsgContent.getAssistUser().getPortrait() + "'>鎴愬姛鍙備笌浜嗘娊濂�"));
+            voList.add(new UserMsgContentVO("鍔╁姏鐘舵��", "<div style='display:flex; align-items: center;'>鍔╁姏濂藉弸<img style='width: 48rpx;height: 48rpx;border-radius: 50%;' src='" + luckyMsgContent.getAssistUser().getPortrait() + "' />鎴愬姛鍙備笌浜嗘娊濂�</div>"));
             voList.add(new UserMsgContentVO("骞歌繍鍒告暟", String.format("+%s寮�", luckyMsgContent.getWeight())));
         } else if (luckyMsgType == LuckyMsgContent.LuckyMsgType.assist) {
-            voList.add(new UserMsgContentVO("鍔╁姏鐘舵��", "濂藉弸<img src='" + luckyMsgContent.getAssistUser().getPortrait() + "'>鍔╁姏鎴愬姛"));
+            voList.add(new UserMsgContentVO("鍔╁姏鐘舵��", "<div style='display:flex; align-items: center;'>濂藉弸<img style='width: 48rpx;height: 48rpx;border-radius: 50%;' src='" + luckyMsgContent.getAssistUser().getPortrait() + "' />鍔╁姏鎴愬姛</div>"));
             voList.add(new UserMsgContentVO("骞歌繍鍒告暟", String.format("+%s寮�", luckyMsgContent.getWeight())));
         } else if (luckyMsgType == LuckyMsgContent.LuckyMsgType.openFail) {
             voList.add(new UserMsgContentVO("寮�濂栫姸鎬�", luckyMsgContent.getOpenState()));

--
Gitblit v1.8.0