购买道具消息类型修改
This commit is contained in:
parent
977e37a039
commit
eb5ab98da4
@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.red.circle.common.business.core.enums.ReceiptType;
|
||||
import com.red.circle.common.business.core.enums.SysOriginPlatformEnum;
|
||||
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.cmd.message.notice.official.NoticeExtTemplateTypeCmd;
|
||||
import com.red.circle.external.inner.model.enums.message.OfficialNoticeTypeEnum;
|
||||
import com.red.circle.framework.core.asserts.ResponseAssert;
|
||||
@ -16,11 +17,14 @@ import com.red.circle.other.app.dto.cmd.material.PropsPurchasingCmd;
|
||||
import com.red.circle.other.app.util.OfficialNoticeUtils;
|
||||
import com.red.circle.other.domain.gateway.props.PropsStoreGateway;
|
||||
import com.red.circle.other.domain.gateway.user.UserProfileGateway;
|
||||
import com.red.circle.other.domain.gateway.user.ability.UserRegionGateway;
|
||||
import com.red.circle.other.domain.model.user.UserProfile;
|
||||
import com.red.circle.other.domain.model.user.ability.RegionConfig;
|
||||
import com.red.circle.other.infra.database.cache.service.other.EnumConfigCacheService;
|
||||
import com.red.circle.other.infra.database.mongo.entity.live.RoomSetting;
|
||||
import com.red.circle.other.infra.database.mongo.service.live.RoomProfileManagerService;
|
||||
import com.red.circle.other.infra.database.rds.service.props.PropsVipActualEquityService;
|
||||
import com.red.circle.other.infra.utils.I18nUtils;
|
||||
import com.red.circle.other.inner.asserts.PropsErrorCode;
|
||||
import com.red.circle.other.inner.endpoint.material.props.PropsNobleVipClient;
|
||||
import com.red.circle.other.inner.enums.material.NobleVipEnum;
|
||||
@ -69,6 +73,7 @@ public class PropsPurchasingCmdExe {
|
||||
private final TaskMqMessage taskMqMessage;
|
||||
private final PropsNobleVipClient propsNobleVipClient;
|
||||
private final UserProfileAppConvertor userProfileAppConvertor;
|
||||
private final UserRegionGateway userRegionGateway;
|
||||
|
||||
public BigDecimal execute(PropsPurchasingCmd cmd) {
|
||||
if (cmd.getDays() <= 0) {
|
||||
@ -184,12 +189,13 @@ public class PropsPurchasingCmdExe {
|
||||
|
||||
private void sendGiveAwayNotice(PropsPurchasingCmd cmd, PropsStoreCommodity commodity) {
|
||||
UserProfileDTO userProfileDTO = userProfileAppConvertor.toUserProfileDTO(userProfileGateway.getByUserId(cmd.requiredReqUserId()));
|
||||
RegionConfig region = userRegionGateway.getRegionConfigByUserId(userProfileDTO.getId());
|
||||
|
||||
String sourceUrl = commodity.getPropsResources().getSourceUrl();
|
||||
officialNoticeClient.send(NoticeExtTemplateTypeCmd.builder()
|
||||
officialNoticeClient.send(NoticeExtTemplateCustomizeCmd.builder()
|
||||
.toAccount(cmd.getAcceptUserId())
|
||||
.noticeType(OfficialNoticeTypeEnum.GIVE_AWAY_PROPS)
|
||||
.templateParam(OfficialNoticeUtils.buildUserProfile(userProfileDTO))
|
||||
.content(I18nUtils.getPropsRewardContent(cmd.getType(), cmd.getDays(), I18nUtils.getLanguageByRegion(region.getRegionName())))
|
||||
.expand(sourceUrl)
|
||||
.build());
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user