| | |
| | |
|
| | | import java.math.BigDecimal;
|
| | | import java.util.Date;
|
| | | import java.util.List;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | |
| | | import com.yeshi.fanli.util.TimeUtil;
|
| | | import com.yeshi.fanli.util.factory.msg.MsgOtherCouponContentDTOFactory;
|
| | | import com.yeshi.fanli.util.factory.msg.MsgOtherDetailFactory;
|
| | | import com.yeshi.fanli.vo.msg.CommonMsgItemVO;
|
| | |
|
| | | @Service
|
| | | public class UserOtherMsgNotificationServiceImpl implements UserOtherMsgNotificationService {
|
| | |
| | |
|
| | |
|
| | | @Override
|
| | | public void vipUpgradeReward(Long uid, String beiZhu, MsgOtherSystemGiveDTO dto) {
|
| | | public void createMsgOtherDetail(Long uid, List<CommonMsgItemVO> listMsg, MsgTypeOtherTypeEnum type) {
|
| | | try {
|
| | | if (listMsg == null || listMsg.size() == 0) {
|
| | | return;
|
| | | }
|
| | | MsgOtherDetail detail = new MsgOtherDetail();
|
| | | detail.setBeiZhu(beiZhu);
|
| | | detail.setCreateTime(new Date());
|
| | | detail.setRead(false);
|
| | | detail.setType(type);
|
| | | detail.setUser(new UserInfo(uid));
|
| | | detail.setContent(new Gson().toJson(dto));
|
| | | detail.setType(MsgTypeOtherTypeEnum.vipUpgradeReward);
|
| | | detail.setContent(new Gson().toJson(listMsg));
|
| | | detail.setCreateTime(new Date());
|
| | | msgOtherDetailService.addMsgOtherDetail(detail);
|
| | | } catch (MsgOtherDetailException e) {
|
| | | e.printStackTrace();
|