yujian
2019-12-10 82b11aa8190638990687b0b36b815a3b5c142bd4
红包解除封禁消息
4个文件已修改
40 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgMoneyDetail.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackForbidServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/msg/MsgMoneyDetail.java
@@ -43,6 +43,7 @@
        redPackUseSuccess("红包使用成功"),
        redPackUseFail("红包使用失败"),
        redPackForbid("红包封禁"),
        redPackForbidRemove("红包解封"),
        redPackDeduct("红包扣除");
        private final String desc;
fanli/src/main/java/com/yeshi/fanli/service/impl/money/msg/MsgMoneyDetailServiceImpl.java
@@ -137,6 +137,7 @@
                || 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, "消息信息不全");
fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackForbidServiceImpl.java
@@ -143,8 +143,15 @@
    @Override
    public void delete(List<Long> idsList) {
        if (idsList != null)
            for (Long id : idsList)
            for (Long id : idsList) {
                redPackForbidMapper.deleteByPrimaryKey(id);
                //消息
                MsgRedPackExchangeContentDTO dto = new MsgRedPackExchangeContentDTO();
                dto.setReason("封禁时间到期,自动解封");
                dto.setTime("已可以重新使用红包功能");
                dto.setHandle("已被清空");
                userMoneyMsgNotificationService.redPackMsg(id, MsgTypeMoneyTypeEnum.redPackForbidRemove, new Gson().toJson(dto), "封禁无法申诉,请按照规则使用红包功能  ");
            }
    }
    
fanli/src/main/java/com/yeshi/fanli/util/factory/msg/UserMsgVOFactory.java
@@ -772,6 +772,35 @@
            return new UserMsgVO("http://img.flqapp.com/img/tlj/icon_tlj.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackForbidRemove) { // 红包封禁解除消息
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;
            MsgRedPackExchangeContentDTO dto = new Gson().fromJson(msg.getContent(),
                    MsgRedPackExchangeContentDTO.class);
            if (dto == null)
                return null;
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getReason() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("原因", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getTime() + "", COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包状态", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(dto.getHandle(), COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("红包余额", COLOR_TITLE), contentList));
            contentList = new ArrayList<>();
            contentList.add(new ClientTextStyleVO(StringUtil.isNullOrEmpty(msg.getBeiZhu()) ? "无" : msg.getBeiZhu(),
                    COLOR_CONTENT));
            items.add(new CommonMsgItemVO(new ClientTextStyleVO("备注", COLOR_TITLE), contentList));
            return new UserMsgVO("http://img.flqapp.com/img/tlj/icon_tlj.png", msg.getMsgType().getDesc(),
                    msg.getUpdateTime() == null ? msg.getCreateTime() : msg.getUpdateTime(), items);
        } else if (msg.getMsgType() == MsgTypeMoneyTypeEnum.redPackDeduct) { // 红包扣除消息
            if (StringUtil.isNullOrEmpty(msg.getContent()))
                return null;