管理员道具赠送修复
This commit is contained in:
parent
55fe47dd13
commit
642acf033d
@ -44,6 +44,7 @@ import com.red.circle.other.infra.database.rds.service.team.BusinessDevelopmentT
|
|||||||
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
import com.red.circle.other.inner.asserts.user.UserErrorCode;
|
||||||
import com.red.circle.other.inner.endpoint.material.props.PropsBackpackClient;
|
import com.red.circle.other.inner.endpoint.material.props.PropsBackpackClient;
|
||||||
import com.red.circle.other.inner.endpoint.material.props.PropsNobleVipClient;
|
import com.red.circle.other.inner.endpoint.material.props.PropsNobleVipClient;
|
||||||
|
import com.red.circle.other.inner.endpoint.user.user.UserProfileClient;
|
||||||
import com.red.circle.other.inner.enums.material.ConsolePropsTypeEnum;
|
import com.red.circle.other.inner.enums.material.ConsolePropsTypeEnum;
|
||||||
import com.red.circle.other.inner.enums.material.PropsCommodityType;
|
import com.red.circle.other.inner.enums.material.PropsCommodityType;
|
||||||
import com.red.circle.other.inner.enums.team.TeamMemberRole;
|
import com.red.circle.other.inner.enums.team.TeamMemberRole;
|
||||||
@ -92,7 +93,7 @@ public class ManagerAuthServiceImpl implements ManagerAuthService {
|
|||||||
private final TeamProfileService teamProfileService;
|
private final TeamProfileService teamProfileService;
|
||||||
private final UserSpecialIdService userSpecialIdService;
|
private final UserSpecialIdService userSpecialIdService;
|
||||||
private final PropsNobleVipGateway propsNobleVipGateway;
|
private final PropsNobleVipGateway propsNobleVipGateway;
|
||||||
private final BusinessDevelopmentTeamService businessDevelopmentTeamService;
|
private final UserProfileClient userProfileClient;
|
||||||
private final OfficialNoticeClient officialNoticeClient;
|
private final OfficialNoticeClient officialNoticeClient;
|
||||||
private final AdministratorAuthService administratorAuthService;
|
private final AdministratorAuthService administratorAuthService;
|
||||||
private final PropsNobleVipClient propsNobleVipClient;
|
private final PropsNobleVipClient propsNobleVipClient;
|
||||||
@ -331,6 +332,9 @@ public class ManagerAuthServiceImpl implements ManagerAuthService {
|
|||||||
cmd.setPropsId(vipAbility.getDataCardId());
|
cmd.setPropsId(vipAbility.getDataCardId());
|
||||||
sendPropsRecord(cmd, ConsolePropsTypeEnum.DATA_CARD.getName(), 3);
|
sendPropsRecord(cmd, ConsolePropsTypeEnum.DATA_CARD.getName(), 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 使用最大等级的VIP
|
||||||
|
useMaxNobleVip(cmd.getAcceptUserId());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -364,6 +368,17 @@ public class ManagerAuthServiceImpl implements ManagerAuthService {
|
|||||||
return userManagerAuths;
|
return userManagerAuths;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void useMaxNobleVip(Long receiverId) {
|
||||||
|
PropsNobleVipAbilityDTO abilityDTO = propsNobleVipClient.getUserMaxAbilityDTO(receiverId).getBody();
|
||||||
|
if (Objects.isNull(abilityDTO)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
propsBackpackClient.switchUseProps(receiverId, abilityDTO.getId());
|
||||||
|
propsBackpackClient.switchUseProps(receiverId, abilityDTO.getAvatarFrameId());
|
||||||
|
propsBackpackClient.switchUseProps(receiverId, abilityDTO.getDataCardId());
|
||||||
|
propsBackpackClient.switchUseProps(receiverId, abilityDTO.getCarId());
|
||||||
|
userProfileClient.removeCacheAll(receiverId);
|
||||||
|
}
|
||||||
|
|
||||||
private void sendPropsRecord(PropsGiveAwayCmd cmd, String sourceType, Integer days) {
|
private void sendPropsRecord(PropsGiveAwayCmd cmd, String sourceType, Integer days) {
|
||||||
//开始赠送道具
|
//开始赠送道具
|
||||||
|
|||||||
@ -78,7 +78,6 @@ public class PropsBackpackClientServiceImpl implements PropsBackpackClientServic
|
|||||||
public void giveProps(GivePropsBackpackCmd cmd) {
|
public void giveProps(GivePropsBackpackCmd cmd) {
|
||||||
|
|
||||||
List<PropsBackpack> list = propsBackpackService.query()
|
List<PropsBackpack> list = propsBackpackService.query()
|
||||||
.select(PropsBackpack::getId)
|
|
||||||
.eq(PropsBackpack::getUserId, cmd.getAcceptUserId())
|
.eq(PropsBackpack::getUserId, cmd.getAcceptUserId())
|
||||||
.eq(PropsBackpack::getType, cmd.getType())
|
.eq(PropsBackpack::getType, cmd.getType())
|
||||||
.gt(PropsBackpack::getExpireTime, TimestampUtils.now())
|
.gt(PropsBackpack::getExpireTime, TimestampUtils.now())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user