From 971b384033c27bf7fb5adf63362e41e008a4ee0e Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Sun, 23 Nov 2025 15:05:41 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=80=E8=AF=B7BD=20=E4=BB=A3=E7=90=86=20?= =?UTF-8?q?=E4=B8=BB=E6=92=AD=E8=8D=A3=E8=AA=89=E5=BE=BD=E7=AB=A0=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../team/BdInviteMessageProcessExe.java | 6 ++++ .../team/BdLeaderInviteMessageProcessExe.java | 6 ++++ .../command/team/TeamHandleUserApplyExe.java | 6 ++++ ...ActivityRewardConfigClientServiceImpl.java | 30 ++++++++++++------- 4 files changed, 37 insertions(+), 11 deletions(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/BdInviteMessageProcessExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/BdInviteMessageProcessExe.java index cef452c6..d6677b3c 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/BdInviteMessageProcessExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/BdInviteMessageProcessExe.java @@ -7,6 +7,8 @@ import com.red.circle.external.inner.model.enums.message.OfficialNoticeTypeEnum; import com.red.circle.framework.core.asserts.ResponseAssert; import com.red.circle.framework.core.response.CommonErrorCode; import com.red.circle.framework.core.response.ResponseErrorCode; +import com.red.circle.mq.business.model.event.BadgeOperateEvent; +import com.red.circle.mq.rocket.business.producer.UserMqMessageService; import com.red.circle.other.app.convertor.user.UserProfileAppConvertor; import com.red.circle.other.app.dto.cmd.team.DbInviteMessageProcessCmd; import com.red.circle.other.app.util.OfficialNoticeUtils; @@ -26,6 +28,7 @@ import com.red.circle.other.infra.database.rds.service.team.BusinessDevelopmentB import com.red.circle.other.infra.database.rds.service.team.BusinessDevelopmentTeamService; import com.red.circle.other.infra.database.rds.service.team.UserHistoryIdentityService; import com.red.circle.other.inner.asserts.user.UserErrorCode; +import com.red.circle.other.inner.enums.material.BadgeKeyEnum; import com.red.circle.other.inner.model.dto.user.UserProfileDTO; import com.red.circle.other.inner.asserts.team.TeamErrorCode; import com.red.circle.other.inner.model.cmd.team.TeamBillCmd; @@ -68,6 +71,7 @@ public class BdInviteMessageProcessExe { private final BdInviteAgentMessageService bdInviteAgentMessageService; private final BusinessDevelopmentTeamService businessDevelopmentTeamService; private final BusinessDevelopmentBaseInfoService businessDevelopmentBaseInfoService; + private final UserMqMessageService userMqMessageService; public void execute(DbInviteMessageProcessCmd cmd) { @@ -111,6 +115,8 @@ public class BdInviteMessageProcessExe { businessDevelopmentBaseInfoService.incrMemberCount(Set.of(message.getUserId())); + userMqMessageService.sendBadgeOperateEvent(message.getInviteUserId(), BadgeKeyEnum.AGENCY.name(), BadgeOperateEvent.OperationType.WEAR.name()); + sendMessage(message, OfficialNoticeTypeEnum.AGREE_BD_INVITE_AGENT); return; } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/BdLeaderInviteMessageProcessExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/BdLeaderInviteMessageProcessExe.java index fb6523f6..e9129d31 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/BdLeaderInviteMessageProcessExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/BdLeaderInviteMessageProcessExe.java @@ -6,6 +6,8 @@ import com.red.circle.external.inner.model.enums.message.OfficialNoticeTypeEnum; import com.red.circle.framework.core.asserts.ResponseAssert; import com.red.circle.framework.core.response.CommonErrorCode; import com.red.circle.framework.core.response.ResponseErrorCode; +import com.red.circle.mq.business.model.event.BadgeOperateEvent; +import com.red.circle.mq.rocket.business.producer.UserMqMessageService; import com.red.circle.other.app.convertor.user.UserProfileAppConvertor; import com.red.circle.other.app.dto.cmd.team.DbInviteMessageProcessCmd; import com.red.circle.other.domain.gateway.user.UserProfileGateway; @@ -20,6 +22,7 @@ import com.red.circle.other.infra.database.rds.service.team.BusinessDevelopmentB import com.red.circle.other.infra.database.rds.service.team.RoomBdLeadService; import com.red.circle.other.infra.database.rds.service.team.UserHistoryIdentityService; import com.red.circle.other.inner.asserts.user.UserErrorCode; +import com.red.circle.other.inner.enums.material.BadgeKeyEnum; import com.red.circle.other.inner.model.dto.user.UserProfileDTO; import com.red.circle.other.inner.asserts.team.TeamErrorCode; import com.red.circle.other.inner.enums.team.TeamAppProcessApprovalReason; @@ -51,6 +54,7 @@ public class BdLeaderInviteMessageProcessExe { private final BdInviteAgentMessageService bdInviteAgentMessageService; private final BusinessDevelopmentBaseInfoService businessDevelopmentBaseInfoService; private final TeamApplicationProcessApprovalService teamApplicationProcessApprovalService; + private final UserMqMessageService userMqMessageService; public void execute(DbInviteMessageProcessCmd cmd) { ResponseAssert.isTrue(ResponseErrorCode.REQUEST_PARAMETER_ERROR, cmd.getStatus() > 0); @@ -101,6 +105,8 @@ public class BdLeaderInviteMessageProcessExe { ); userHistoryIdentityService.saveBd(cmd.requiredReqUserId()); + + userMqMessageService.sendBadgeOperateEvent(cmd.requiredReqUserId(), BadgeKeyEnum.BD.name(), BadgeOperateEvent.OperationType.WEAR.name()); } } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/TeamHandleUserApplyExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/TeamHandleUserApplyExe.java index 0b41a4a8..ba4235c5 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/TeamHandleUserApplyExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/team/TeamHandleUserApplyExe.java @@ -4,7 +4,9 @@ package com.red.circle.other.app.command.team; import com.red.circle.common.business.enums.OperationUserOrigin; import com.red.circle.framework.core.asserts.ResponseAssert; import com.red.circle.framework.core.response.CommonErrorCode; +import com.red.circle.mq.business.model.event.BadgeOperateEvent; import com.red.circle.mq.rocket.business.producer.TeamSalaryMqMessage; +import com.red.circle.mq.rocket.business.producer.UserMqMessageService; import com.red.circle.other.app.dto.cmd.team.TeamHandleUserApplyCmd; import com.red.circle.other.domain.gateway.user.ability.UserRegionGateway; import com.red.circle.other.infra.database.mongo.entity.team.team.TeamApplicationProcess; @@ -22,6 +24,7 @@ import com.red.circle.other.infra.database.rds.service.team.BillDiamondBalanceDe import com.red.circle.other.infra.database.rds.service.team.BillDiamondBalanceService; import com.red.circle.other.inner.asserts.DynamicErrorCode; import com.red.circle.other.inner.asserts.team.TeamErrorCode; +import com.red.circle.other.inner.enums.material.BadgeKeyEnum; import com.red.circle.other.inner.model.cmd.team.TeamApplicationProcessChangeCmd; import com.red.circle.other.inner.enums.team.TeamAppProcessApprovalReason; import com.red.circle.other.inner.enums.team.TeamAppProcessReason; @@ -61,6 +64,7 @@ public class TeamHandleUserApplyExe { private final TeamApplicationProcessApprovalService teamApplicationProcessApprovalService; private final BillDiamondBalanceService billDiamondBalanceService; private final BillDiamondBalanceDetailsService billDiamondBalanceDetailsService; + private final UserMqMessageService userMqMessageService; public String execute(TeamHandleUserApplyCmd cmd) { @@ -153,6 +157,8 @@ public class TeamHandleUserApplyExe { .setUpdateUserOrigin(OperationUserOrigin.APP.getValue()) ); teamProfileService.incrCounterMember(process.getAssociateId()); + + userMqMessageService.sendBadgeOperateEvent(process.getCreateUser(), BadgeKeyEnum.HOST.name(), BadgeOperateEvent.OperationType.WEAR.name()); } return Objects.toString(processApproval.getId()); diff --git a/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/material/props/impl/PropsActivityRewardConfigClientServiceImpl.java b/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/material/props/impl/PropsActivityRewardConfigClientServiceImpl.java index a6b9b952..2123bc73 100644 --- a/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/material/props/impl/PropsActivityRewardConfigClientServiceImpl.java +++ b/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/service/material/props/impl/PropsActivityRewardConfigClientServiceImpl.java @@ -132,26 +132,32 @@ public class PropsActivityRewardConfigClientServiceImpl implements if (Objects.equals(config.getType(), PropsActivityRewardEnum.PROPS.name()) || Objects.equals(config.getType(), PropsActivityRewardEnum.PROP_COUPON.name())) { PropsSourceRecord sourceRecord = sourceRecordMap .get(Long.valueOf(config.getContent())); - propsActivity.setCover(sourceRecord.getCover()); - propsActivity.setName(sourceRecord.getName()); - propsActivity.setSourceUrl(sourceRecord.getSourceUrl()); - propsActivity.setAmount(sourceRecord.getAmount()); + if (sourceRecord != null) { + propsActivity.setCover(sourceRecord.getCover()); + propsActivity.setName(sourceRecord.getName()); + propsActivity.setSourceUrl(sourceRecord.getSourceUrl()); + propsActivity.setAmount(sourceRecord.getAmount()); + } } if (Objects.equals(config.getType(), PropsActivityRewardEnum.FRAGMENTS.name())) { PropsSourceRecord sourceRecord = fragmentsSourceMap .get(Long.valueOf(config.getContent())); - propsActivity.setCover(sourceRecord.getCover()); - propsActivity.setSourceUrl(sourceRecord.getSourceUrl()); - propsActivity.setAmount(sourceRecord.getAmount()); + if (sourceRecord != null) { + propsActivity.setCover(sourceRecord.getCover()); + propsActivity.setSourceUrl(sourceRecord.getSourceUrl()); + propsActivity.setAmount(sourceRecord.getAmount()); + } } if (Objects.equals(config.getType(), PropsActivityRewardEnum.CUSTOMIZE.name())) { PropsSourceRecord sourceRecord = customizeSourceMap .get(Long.valueOf(config.getContent())); - propsActivity.setCover(sourceRecord.getCover()); - propsActivity.setSourceUrl(sourceRecord.getSourceUrl()); - propsActivity.setRemark(config.getRemark()); + if (sourceRecord != null) { + propsActivity.setCover(sourceRecord.getCover()); + propsActivity.setSourceUrl(sourceRecord.getSourceUrl()); + propsActivity.setRemark(config.getRemark()); + } } if (Objects.equals(config.getType(), PropsActivityRewardEnum.EMOJI.name())) { @@ -167,7 +173,9 @@ public class PropsActivityRewardConfigClientServiceImpl implements if (Objects.equals(config.getType(), PropsActivityRewardEnum.BADGE.name())) { BadgeConfig sysBadgeConfig = sysBadgeConfigMap .get(DataTypeUtils.toLong(config.getContent())); - propsActivity.setBadgeName(sysBadgeConfig.getBadgeName()); + if (sysBadgeConfig != null) { + propsActivity.setBadgeName(sysBadgeConfig.getBadgeName()); + } } if (!Objects.equals(config.getType(), PropsActivityRewardEnum.SPECIAL_ID.name())) {