邀请BD 代理 主播荣誉徽章处理
This commit is contained in:
parent
aaac9ec514
commit
971b384033
@ -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;
|
||||
}
|
||||
|
||||
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -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());
|
||||
|
||||
@ -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())) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user