From b5cf0267dfc95bf56dceb76ca44e849347a7b85f Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期一, 18 十一月 2019 13:55:49 +0800
Subject: [PATCH] 1.饿了么订单定时爬取 2.相似商品推荐修改
---
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/MsgInviteDetailFactory.java | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 60 insertions(+), 0 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..bfc6dae 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,35 @@
return detail;
}
+ /**
+ * 閭�璇锋垚鍔�
+ *
+ * @param threeSale
+ * @param uid
+ * @return
+ */
+ public static MsgInviteDetail createInviteSuccess2_0_2(Long uid, ThreeSale threeSale) {
+ if (threeSale == null || uid == null)
+ return null;
+ MsgInviteContentDTO content = new MsgInviteContentDTO();
+ content.setMode("蹇呰鏉′欢+閫夋嫨鏉′欢锛堜笁閫変竴锛� ");
+ content.setCode("闃熷憳缁戝畾鐢佃瘽鍙风爜+鎺堟潈娣樺疂 ");
+ content.setState("鎴愬姛閭�璇蜂竴涓槦鍛橈紝闃熷憳鐔熺粌浣跨敤App杩樺彲鑾峰緱绾㈠寘 ");
+ content.setInviter("1.浜х敓绱鈮�200閲戝竵/2.浠绘剰璁㈠崟/3.鎴愬姛閭�璇蜂竴涓槦鍛�");
+
+ MsgInviteDetail detail = new MsgInviteDetail();
+ detail.setBeiZhu("婊¤冻鑾峰緱绾㈠寘鏉′欢鍚庣郴缁熷皢鑷姩涓嬪彂鍒扳�滄垜鐨�-绾㈠寘鈥濅腑");
+ detail.setInviteUser(threeSale);
+ detail.setCreateTime(new Date());
+ detail.setUpdateTime(new Date());
+ detail.setDesc(new Gson().toJson(content));
+ detail.setMsgType(MsgTypeInviteTypeEnum.inviteNew);
+ detail.setRead(false);
+ detail.setUser(new UserInfo(uid));
+ return detail;
+ }
+
/**
* 鎵弿閭�璇蜂簩缁寸爜鎴愬姛锛屼絾鏄湭鐧诲綍
*
@@ -60,6 +90,9 @@
detail.setUser(new UserInfo(uid));
return detail;
}
+
+
+
/**
* 閭�璇峰け璐�
@@ -85,4 +118,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