From 616608ec1005bff373bc380ecc3bf02a1063497c Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 19 八月 2019 17:42:07 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserOtherMsgNotificationServiceImpl.java | 36 +++++++++++++++++++++++++++++++++++- 1 files changed, 35 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..61e3ad6 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,8 @@ import com.google.gson.Gson; import com.yeshi.fanli.dto.msg.MsgOtherCouponContentDTO; +import com.yeshi.fanli.dto.msg.MsgOtherExchangeContentDTO; +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 +303,37 @@ } } + + @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(); + } + } + + + @Override + public void exchangeMsg(Long uid, String beiZhu, MsgOtherExchangeContentDTO 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.exchange); + msgOtherDetailService.addMsgOtherDetail(detail); + } catch (MsgOtherDetailException e) { + e.printStackTrace(); + } + } } -- Gitblit v1.8.0