From 28cf328a098334b51a3e9d2d56f983fb8c862211 Mon Sep 17 00:00:00 2001 From: yujian <yujian@163.com> Date: 星期六, 23 五月 2020 09:54:38 +0800 Subject: [PATCH] 足迹、收藏订单兼容新需求 --- fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackGiveRecordServiceImpl.java | 30 ++++++++++++++++++------------ 1 files changed, 18 insertions(+), 12 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackGiveRecordServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackGiveRecordServiceImpl.java index 3e79d3b..45ab717 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackGiveRecordServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/redpack/RedPackGiveRecordServiceImpl.java @@ -26,7 +26,9 @@ import com.yeshi.fanli.entity.redpack.RedPackDetail; import com.yeshi.fanli.entity.redpack.RedPackDetail.RedPackDetailTypeEnum; import com.yeshi.fanli.entity.redpack.RedPackGiveRecord; +import com.yeshi.fanli.entity.system.ConfigKeyEnum; import com.yeshi.fanli.exception.redpack.RedPackGiveRecordException; +import com.yeshi.fanli.log.LogHelper; import com.yeshi.fanli.service.inter.money.msg.UserMoneyMsgNotificationService; import com.yeshi.fanli.service.inter.redpack.RedPackBalanceService; import com.yeshi.fanli.service.inter.redpack.RedPackConfigService; @@ -179,21 +181,25 @@ try { redPackBalanceService.subRedPack(uid, amount, RedPackDetailFactory.createGiveOthers(giveRecord)); } catch (Exception e) { + LogHelper.errorDetailInfo(e); throw new RedPackGiveRecordException(1, "绾㈠寘鍒涘缓澶辫触"); } - - UserRedPackGiftMQMsg msg = new UserRedPackGiftMQMsg(); - msg.setId(giveRecord.getId()); - msg.setUid(uid); - Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.redPackGiftDrawback, - msg); - // 寤惰繜涓�鍒嗛挓 - message.setStartDeliverTime(endTime.getTime() + 1000 * 60); - try { - producer.send(message); - } catch (Exception e) { - throw new RedPackGiveRecordException(1, "绾㈠寘鍒涘缓澶辫触"); + + // 鍙戦�佹秷鎭�(闈炴祴璇曚笅) + if (!Constant.IS_TEST) { + UserRedPackGiftMQMsg msg = new UserRedPackGiftMQMsg(); + msg.setId(giveRecord.getId()); + msg.setUid(uid); + Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.redPackGiftDrawback, msg); + message.setStartDeliverTime(endTime.getTime() + 1000 * 60); // 寤惰繜涓�鍒嗛挓 + try { + producer.send(message); + } catch (Exception e) { + LogHelper.errorDetailInfo(e); + throw new RedPackGiveRecordException(1, "绾㈠寘鍒涘缓澶辫触"); + } } + return tips; } -- Gitblit v1.8.0