成为主播增加主播设备指纹校验:后台,邀请,成为代理
This commit is contained in:
parent
a7eb054c03
commit
bf9dcb1848
@ -13,6 +13,7 @@ import com.red.circle.other.app.dto.clientobject.team.BdInviteMessageCO;
|
||||
import com.red.circle.other.app.dto.cmd.team.*;
|
||||
import com.red.circle.other.app.util.OfficialNoticeUtils;
|
||||
import com.red.circle.other.domain.gateway.user.UserProfileGateway;
|
||||
import com.red.circle.other.domain.gateway.user.ability.RegisterDeviceGateway;
|
||||
import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheService;
|
||||
import com.red.circle.other.infra.database.mongo.entity.team.bd.BdInviteAgentMessage;
|
||||
import com.red.circle.other.infra.database.mongo.entity.team.bd.MessageInviteGroup;
|
||||
@ -51,7 +52,7 @@ public class AgentInviteHostExe {
|
||||
private final TeamMemberService teamMemberService;
|
||||
private final TeamProfileService teamProfileService;
|
||||
private final OfficialNoticeClient officialNoticeClient;
|
||||
private final EnumConfigCacheService enumConfigCacheService;
|
||||
private final RegisterDeviceGateway registerDeviceGateway;
|
||||
private final UserProfileAppConvertor userProfileAppConvertor;
|
||||
private final BdInviteAgentMessageService bdInviteAgentMessageService;
|
||||
|
||||
@ -165,6 +166,11 @@ public class AgentInviteHostExe {
|
||||
cmd.getStatus(), MessageInviteGroup.AGENT_INVITE_HOST.name()));
|
||||
|
||||
if (Objects.equals(cmd.getStatus(), 1)) {
|
||||
// 主播设备指纹校验
|
||||
Boolean hasAnchorWithSameDevice = registerDeviceGateway.checkDeviceFingerprintHasAnchor(
|
||||
message.getInviteUserId());
|
||||
ResponseAssert.isFalse(TeamErrorCode.DEVICE_FINGERPRINT_USED_BY_ANCHOR, hasAnchorWithSameDevice);
|
||||
|
||||
teamMemberService.addMember(new TeamMember()
|
||||
.setSortId(IdWorkerUtils.getId())
|
||||
.setSysOrigin(cmd.requireReqSysOrigin())
|
||||
|
||||
@ -15,6 +15,7 @@ import com.red.circle.mq.business.model.event.team.TeamSalaryCountEvent;
|
||||
import com.red.circle.mq.rocket.business.streams.TeamSalaryCountSink;
|
||||
import com.red.circle.other.app.inner.service.team.TeamProfileClientService;
|
||||
import com.red.circle.other.domain.gateway.user.UserProfileGateway;
|
||||
import com.red.circle.other.domain.gateway.user.ability.RegisterDeviceGateway;
|
||||
import com.red.circle.other.domain.model.user.UserProfile;
|
||||
import com.red.circle.other.infra.convertor.team.TeamInfraConvertor;
|
||||
import com.red.circle.other.infra.database.mongo.dto.team.TeamBillSettleResult;
|
||||
@ -117,6 +118,7 @@ public class TeamProfileClientServiceImpl implements TeamProfileClientService {
|
||||
private final TeamApplicationProcessApprovalService teamApplicationProcessApprovalService;
|
||||
private final BillDiamondBalanceService billDiamondBalanceService;
|
||||
private final BillDiamondBalanceDetailsService billDiamondBalanceDetailsService;
|
||||
private final RegisterDeviceGateway registerDeviceGateway;
|
||||
|
||||
@Override
|
||||
public List<TeamProfileDTO> listByIds(Set<Long> ids) {
|
||||
@ -213,6 +215,11 @@ public class TeamProfileClientServiceImpl implements TeamProfileClientService {
|
||||
businessDevelopmentBaseInfoService.checkBD(cmd.getBdUserId()));
|
||||
}
|
||||
|
||||
// 主播设备指纹校验
|
||||
Boolean hasAnchorWithSameDevice = registerDeviceGateway.checkDeviceFingerprintHasAnchor(
|
||||
userProfile.getId());
|
||||
ResponseAssert.isFalse(TeamErrorCode.DEVICE_FINGERPRINT_USED_BY_ANCHOR, hasAnchorWithSameDevice);
|
||||
|
||||
String key = "CreateTeam:" + userProfile.getId();
|
||||
ResponseAssert.isTrue(CommonErrorCode.OPERATION_CONFLICT, redisService.lock(key, 60));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user