From b9b613a285ebe0da27ca7dd2c3434c8c917abb74 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期四, 02 四月 2020 11:19:03 +0800 Subject: [PATCH] 订单修改 --- fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java | 27 ++++++++++++++++++++++++++- 1 files changed, 26 insertions(+), 1 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java index f4c89e6..a08e1f9 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java @@ -126,6 +126,25 @@ update.setStateDesc(detail.getStateDesc()); msgMoneyDetailMapper.updateByPrimaryKeySelective(update); } + } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackGiveOff + || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackReceiveOff + || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackGiveBack + || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackExchangePass + || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackExchangeReject + || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackOneStageReward + || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackTwoStageReward + || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackThreeStageReward + || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackUseFail + || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackUseSuccess + || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackDeduct + || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackForbidRemove + || detail.getMsgType() == MsgTypeMoneyTypeEnum.redPackForbid) { + if (detail.getUser() == null) + throw new MsgMoneyDetailException(2, "娑堟伅淇℃伅涓嶅叏"); + detail.setCreateTime(new Date()); + detail.setUpdateTime(new Date()); + detail.setRead(false); + msgMoneyDetailMapper.insertSelective(detail); } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.subSidy) { if (detail.getMoney() == null || detail.getUser() == null) throw new MsgMoneyDetailException(2, "娑堟伅淇℃伅涓嶅叏"); @@ -133,8 +152,14 @@ detail.setUpdateTime(new Date()); detail.setRead(false); msgMoneyDetailMapper.insertSelective(detail); + } else if (detail.getMsgType() == MsgTypeMoneyTypeEnum.orderTeamReward) { + if (detail.getMoney() == null || detail.getUser() == null) + throw new MsgMoneyDetailException(2, "娑堟伅淇℃伅涓嶅叏"); + detail.setCreateTime(new Date()); + detail.setUpdateTime(new Date()); + detail.setRead(false); + msgMoneyDetailMapper.insertSelective(detail); } - userMsgReadStateService.addMoneyMsgUnReadCount(detail.getUser().getId(), 1); } -- Gitblit v1.8.0