From d46dea27b6ec3e0fb32ec7d137699e9fc7d609b0 Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期四, 12 十二月 2019 14:18:11 +0800
Subject: [PATCH] 订单补贴消息修改

---
 fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgInviteDetailFactory.java |   55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 54 insertions(+), 1 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgInviteDetailFactory.java b/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgInviteDetailFactory.java
index b8e5dd8..5228650 100644
--- a/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgInviteDetailFactory.java
+++ b/fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgInviteDetailFactory.java
@@ -2,6 +2,8 @@
 
 import java.util.Date;
 
+import com.google.gson.Gson;
+import com.yeshi.fanli.dto.msg.MsgInviteContentDTO;
 import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail;
 import com.yeshi.fanli.entity.bus.msg.MsgInviteDetail.MsgTypeInviteTypeEnum;
 import com.yeshi.fanli.entity.bus.user.ThreeSale;
@@ -35,7 +37,28 @@
 
 		return detail;
 	}
-
+	/**
+	 *   閭�璇锋垚鍔�
+	 * 
+	 * @param threeSale
+	 * @param uid
+	 * @return
+	 */
+	public static MsgInviteDetail createInviteSuccess2_1(Long uid, ThreeSale threeSale) {
+		if (threeSale == null || uid == null)
+			return null;
+		MsgInviteDetail detail = new MsgInviteDetail();
+		detail.setRead(false);
+		detail.setUser(new UserInfo(uid));
+		detail.setInviteUser(threeSale);
+		detail.setMsgType(MsgTypeInviteTypeEnum.inviteSucceed);
+		detail.setDesc("闃熷憳锛堝ソ鍙嬶級鐔熺粌浣跨敤App鍙幏寰楃孩鍖�");
+		detail.setBeiZhu("婊¤冻鑾峰緱绾㈠寘鏉′欢鍚庣郴缁熷皢鑷姩涓嬪彂鍒扳�滄垜鐨�-绾㈠寘鈥濅腑");
+		detail.setCreateTime(new Date());
+		detail.setUpdateTime(new Date());
+		return detail;
+	}
+	
 	/**
 	 * 鎵弿閭�璇蜂簩缁寸爜鎴愬姛锛屼絾鏄湭鐧诲綍
 	 * 
@@ -60,6 +83,9 @@
 		detail.setUser(new UserInfo(uid));
 		return detail;
 	}
+	
+	
+	
 
 	/**
 	 * 閭�璇峰け璐�
@@ -85,4 +111,31 @@
 		detail.setUser(new UserInfo(uid));
 		return detail;
 	}
+	
+	
+	/**
+	 *  棰嗗彇淇℃伅婵�娲婚個璇峰叧绯�
+	 * 
+	 * @param threeSale
+	 * @param uid
+	 * @return
+	 */
+	public static MsgInviteDetail receiveGift(Long uid, String beiZhu, MsgInviteContentDTO content) {
+		if (content == null || uid == null)
+			return null;
+
+		MsgInviteDetail detail = new MsgInviteDetail();
+		if (StringUtil.isNullOrEmpty(beiZhu))
+			detail.setBeiZhu("鏃�");
+		else
+			detail.setBeiZhu(beiZhu);
+		
+		detail.setCreateTime(new Date());
+		detail.setUpdateTime(new Date());
+		detail.setDesc(new Gson().toJson(content));
+		detail.setMsgType(MsgTypeInviteTypeEnum.receiveGift);
+		detail.setRead(false);
+		detail.setUser(new UserInfo(uid));
+		return detail;
+	}
 }

--
Gitblit v1.8.0