From fb5a8918a7983bbdf83586f773884d3961bb3c6d Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期五, 16 八月 2019 17:50:56 +0800 Subject: [PATCH] 口令领取+消息 --- fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserOtherMsgNotificationServiceImpl.java | 18 +++++++++++++++++- 1 files changed, 17 insertions(+), 1 deletions(-) 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 21bc604..e2b28ff 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 @@ -1,7 +1,6 @@ package com.yeshi.fanli.service.impl.msg; import java.math.BigDecimal; -import java.text.SimpleDateFormat; import java.util.Date; import javax.annotation.Resource; @@ -10,6 +9,7 @@ import com.google.gson.Gson; import com.yeshi.fanli.dto.msg.MsgOtherCouponContentDTO; +import com.yeshi.fanli.dto.msg.MsgOtherGiveContentDTO; import com.yeshi.fanli.dto.msg.MsgOtherTaoLiJinContentDTO; import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail; import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail.MsgTypeOtherTypeEnum; @@ -302,4 +302,20 @@ } } + + @Override + public void tokenGiveMsg(Long uid, String beiZhu, MsgOtherGiveContentDTO content) { + try { + MsgOtherDetail detail = new MsgOtherDetail(); + detail.setBeiZhu(beiZhu); + detail.setCreateTime(new Date()); + detail.setRead(false); + detail.setUser(new UserInfo(uid)); + detail.setContent(new Gson().toJson(content)); + detail.setType(MsgTypeOtherTypeEnum.give); + msgOtherDetailService.addMsgOtherDetail(detail); + } catch (MsgOtherDetailException e) { + e.printStackTrace(); + } + } } -- Gitblit v1.8.0