yujian
2020-05-26 52d4fbddfd46b0dd684d99e5c0849b022606c8e2
邀请成功消息延迟
1个文件已修改
11 ■■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/ThreeSaleSerivceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/invite/ThreeSaleSerivceImpl.java
@@ -433,10 +433,14 @@
     */
    @Transactional
    private void inviteSuccess(Long workerId, Long bossId) {
        // 同步粉丝消息
        teamFansInfoService.addFansInfo(workerId, bossId, new Date());
        if (!Constant.IS_TEST) {
            UserInviteMQMsg msg = new UserInviteMQMsg(bossId, workerId, null, new Date(),
                    UserInviteMQMsg.STATE_SUCCESS);
            Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_USER, UserTopicTagEnum.inviteSuccess, msg);
            message.setStartDeliverTime(java.lang.System.currentTimeMillis() + 5000);
            producer.send(message);
        }
@@ -445,13 +449,6 @@
            public void run() {
                try { // 邀请金币
                    integralGetService.addInviteLevelOne(bossId, workerId);
                } catch (Exception e) {
                    LogHelper.error(e);
                }
                // 同步粉丝消息
                try {
                    teamFansInfoService.addFansInfo(workerId, bossId, new Date());
                } catch (Exception e) {
                    LogHelper.error(e);
                }