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 a47ffa2b..4db0e5b5 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 @@ -46,6 +46,7 @@ import com.red.circle.wallet.inner.model.cmd.GoldReceiptCmd; import com.red.circle.wallet.inner.model.dto.WalletReceiptDTO; import com.red.circle.wallet.inner.model.dto.WalletReceiptResDTO; import java.math.BigDecimal; +import java.util.HashMap; import java.util.Map; import java.util.Objects; import lombok.RequiredArgsConstructor; @@ -191,11 +192,14 @@ public class PropsPurchasingCmdExe { UserProfileDTO userProfileDTO = userProfileAppConvertor.toUserProfileDTO(userProfileGateway.getByUserId(cmd.requiredReqUserId())); RegionConfig region = userRegionGateway.getRegionConfigByUserId(userProfileDTO.getId()); + Map map = new HashMap<>(); + map.put("propType", cmd.getType()); String sourceUrl = commodity.getPropsResources().getCover(); officialNoticeClient.send(NoticeExtTemplateCustomizeCmd.builder() .toAccount(cmd.getAcceptUserId()) .noticeType(OfficialNoticeTypeEnum.GIVE_AWAY_PROPS) .content(I18nUtils.getPropsRewardContent(cmd.getType(), cmd.getDays(), I18nUtils.getLanguageByRegion(region.getRegionName()))) + .title(JSON.toJSONString(map)) .expand(sourceUrl) .build()); } diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/ManagerAuthServiceImpl.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/ManagerAuthServiceImpl.java index 6759bfac..38a45c86 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/ManagerAuthServiceImpl.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/service/user/ManagerAuthServiceImpl.java @@ -62,10 +62,7 @@ import org.jetbrains.annotations.NotNull; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; +import java.util.*; import java.util.stream.Collectors; /** @@ -415,10 +412,13 @@ public class ManagerAuthServiceImpl implements ManagerAuthService { url = props.getCover(); } + Map map = new HashMap<>(); + map.put("propType", sourceType); officialNoticeClient.send( NoticeExtTemplateCustomizeCmd.builder().toAccount(cmd.getAcceptUserId()) .noticeType(OfficialNoticeTypeEnum.GIVE_AWAY_PROPS) .content(I18nUtils.getPropsRewardContent(sourceType, days, I18nUtils.getLanguageByRegion(region.getRegionName()))) + .title(JSON.toJSONString(map)) .expand(url) .build()); } diff --git a/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/endpoint/material/props/PropsBackpackClientEndpoint.java b/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/endpoint/material/props/PropsBackpackClientEndpoint.java index 5d508384..7ab2d79c 100644 --- a/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/endpoint/material/props/PropsBackpackClientEndpoint.java +++ b/rc-service/rc-service-other/other-inner-endpoint/src/main/java/com/red/circle/other/app/inner/endpoint/material/props/PropsBackpackClientEndpoint.java @@ -1,5 +1,6 @@ package com.red.circle.other.app.inner.endpoint.material.props; +import com.alibaba.fastjson.JSON; 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; @@ -92,16 +93,20 @@ public class PropsBackpackClientEndpoint implements PropsBackpackClientApi { url = props.getCover(); } + Map map = new HashMap<>(); + map.put("propType", type); if (!Objects.isNull(user)) { if (Arrays.asList("ACTIVITY", "ADMINISTRATOR").contains(type)) { BadgePictureConfig badgePictureConfig = badgePictureConfigService.getByBadgeId(user.getOriginSys(), propsId); url = badgePictureConfig != null ? badgePictureConfig.getSelectUrl() : ""; + map.put("propType", "BADGE"); } RegionConfig region = userRegionGateway.getRegionConfigByUserId(userId); officialNoticeClient.send( NoticeExtTemplateCustomizeCmd.builder().toAccount(userId) .noticeType(OfficialNoticeTypeEnum.GIVE_AWAY_PROPS) + .title(JSON.toJSONString(map)) .content(I18nUtils.getPropsRewardContent(type, days, I18nUtils.getLanguageByRegion(region.getRegionName()))) .expand(url) .build());