道具赠送-新增使用最大VIP逻辑哦
This commit is contained in:
parent
fe55265b08
commit
d4f8f442c1
@ -7,9 +7,6 @@ import com.red.circle.common.business.enums.PropsActivityRewardEnum;
|
|||||||
import com.red.circle.common.business.enums.SendPropsOrigin;
|
import com.red.circle.common.business.enums.SendPropsOrigin;
|
||||||
import com.red.circle.console.app.dto.cmd.app.props.PropsGiveUserCmd;
|
import com.red.circle.console.app.dto.cmd.app.props.PropsGiveUserCmd;
|
||||||
import com.red.circle.console.inner.error.ConsoleErrorCode;
|
import com.red.circle.console.inner.error.ConsoleErrorCode;
|
||||||
import com.red.circle.external.inner.endpoint.message.OfficialNoticeClient;
|
|
||||||
import com.red.circle.external.inner.model.cmd.message.notice.official.NoticeExtTemplateCustomizeCmd;
|
|
||||||
import com.red.circle.external.inner.model.enums.message.OfficialNoticeTypeEnum;
|
|
||||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||||
import com.red.circle.other.inner.endpoint.live.RoomManagerClient;
|
import com.red.circle.other.inner.endpoint.live.RoomManagerClient;
|
||||||
import com.red.circle.other.inner.endpoint.material.props.BadgeBackpackClient;
|
import com.red.circle.other.inner.endpoint.material.props.BadgeBackpackClient;
|
||||||
@ -134,6 +131,8 @@ public class PropsGiveServiceImpl implements PropsGiveService {
|
|||||||
ResponseAssert.isFalse(ConsoleErrorCode.DATE_INCOMPLETE_ERROR,
|
ResponseAssert.isFalse(ConsoleErrorCode.DATE_INCOMPLETE_ERROR,
|
||||||
StringUtils.isBlank(cmd.getVipOrigin()));
|
StringUtils.isBlank(cmd.getVipOrigin()));
|
||||||
handleNobleVip(cmd, sysOrigin);
|
handleNobleVip(cmd, sysOrigin);
|
||||||
|
// 使用最大等级的VIP
|
||||||
|
useMaxNobleVip(cmd.getReceiverId());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (Objects.equals(cmd.getSecondaryType(), ConsolePropsTypeEnum.THEME.getName())) {
|
if (Objects.equals(cmd.getSecondaryType(), ConsolePropsTypeEnum.THEME.getName())) {
|
||||||
@ -282,6 +281,17 @@ public class PropsGiveServiceImpl implements PropsGiveService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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());
|
||||||
|
}
|
||||||
|
|
||||||
private PropsNobleVipAbilityDTO getVipAbilityBySysOriginSourceId(PropsGiveUserCmd cmd,
|
private PropsNobleVipAbilityDTO getVipAbilityBySysOriginSourceId(PropsGiveUserCmd cmd,
|
||||||
String sysOrigin) {
|
String sysOrigin) {
|
||||||
PropsCommodityStoreDTO commodityStore = ResponseAssert.requiredSuccess(
|
PropsCommodityStoreDTO commodityStore = ResponseAssert.requiredSuccess(
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user