From eb5ab98da43c2b943158d11abcd3316ad10c3ec6 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Thu, 16 Oct 2025 19:57:03 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E4=B9=B0=E9=81=93=E5=85=B7=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E7=B1=BB=E5=9E=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/command/material/PropsPurchasingCmdExe.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/material/PropsPurchasingCmdExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/material/PropsPurchasingCmdExe.java index 41f2011f..78ba2b96 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/material/PropsPurchasingCmdExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/material/PropsPurchasingCmdExe.java @@ -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()); }