From bd331a582851cffcce54316e677e23760de4f384 Mon Sep 17 00:00:00 2001 From: yujian <yujian@123.com> Date: 星期一, 24 六月 2019 11:36:49 +0800 Subject: [PATCH] 冲突文件 --- fanli/src/main/java/com/yeshi/fanli/service/impl/msg/UserOtherMsgNotificationServiceImpl.java | 32 +++++++++++++++++++------------- 1 files changed, 19 insertions(+), 13 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 459bb5d..21bc604 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,13 +1,16 @@ package com.yeshi.fanli.service.impl.msg; import java.math.BigDecimal; +import java.text.SimpleDateFormat; import java.util.Date; import javax.annotation.Resource; import org.springframework.stereotype.Service; +import com.google.gson.Gson; import com.yeshi.fanli.dto.msg.MsgOtherCouponContentDTO; +import com.yeshi.fanli.dto.msg.MsgOtherTaoLiJinContentDTO; import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail; import com.yeshi.fanli.entity.bus.msg.MsgOtherDetail.MsgTypeOtherTypeEnum; import com.yeshi.fanli.entity.bus.user.UserInfo; @@ -282,18 +285,21 @@ } } -// @Override -// public void taoLiJinGet(UserSystemCoupon coupon, int percent) { -// if (coupon == null || coupon.getUid() == null) -// return; -// MsgOtherCouponContentDTO dto = MsgOtherCouponContentDTOFactory.createRewardCouponGet(getLeftDay(coupon), -// coupon.getSource(), coupon.getStartTime(), coupon.getEndTime()); -// try { -// msgOtherDetailService.addMsgOtherDetail(MsgOtherDetailFactory.createCouponMsg(coupon.getUid(), -// coupon.getId(), dto, MsgTypeOtherTypeEnum.couponReward, "杩斿埄宸插埌璐﹀悗鍐嶅鍔辫繑鍒╃殑" + percent + "%")); -// } catch (MsgOtherDetailException e) { -// e.printStackTrace(); -// } -// } + + @Override + public void taoLiJinMsg(Long uid, String beiZhu, MsgOtherTaoLiJinContentDTO 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.taoLiJin); + msgOtherDetailService.addMsgOtherDetail(detail); + } catch (MsgOtherDetailException e) { + e.printStackTrace(); + } + } } -- Gitblit v1.8.0