赠送道具,购买道具,管理员赠送道具 消息增加道具类型
This commit is contained in:
parent
11c7269ee0
commit
980fc94205
@ -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.WalletReceiptDTO;
|
||||||
import com.red.circle.wallet.inner.model.dto.WalletReceiptResDTO;
|
import com.red.circle.wallet.inner.model.dto.WalletReceiptResDTO;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
@ -191,11 +192,14 @@ public class PropsPurchasingCmdExe {
|
|||||||
UserProfileDTO userProfileDTO = userProfileAppConvertor.toUserProfileDTO(userProfileGateway.getByUserId(cmd.requiredReqUserId()));
|
UserProfileDTO userProfileDTO = userProfileAppConvertor.toUserProfileDTO(userProfileGateway.getByUserId(cmd.requiredReqUserId()));
|
||||||
RegionConfig region = userRegionGateway.getRegionConfigByUserId(userProfileDTO.getId());
|
RegionConfig region = userRegionGateway.getRegionConfigByUserId(userProfileDTO.getId());
|
||||||
|
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("propType", cmd.getType());
|
||||||
String sourceUrl = commodity.getPropsResources().getCover();
|
String sourceUrl = commodity.getPropsResources().getCover();
|
||||||
officialNoticeClient.send(NoticeExtTemplateCustomizeCmd.builder()
|
officialNoticeClient.send(NoticeExtTemplateCustomizeCmd.builder()
|
||||||
.toAccount(cmd.getAcceptUserId())
|
.toAccount(cmd.getAcceptUserId())
|
||||||
.noticeType(OfficialNoticeTypeEnum.GIVE_AWAY_PROPS)
|
.noticeType(OfficialNoticeTypeEnum.GIVE_AWAY_PROPS)
|
||||||
.content(I18nUtils.getPropsRewardContent(cmd.getType(), cmd.getDays(), I18nUtils.getLanguageByRegion(region.getRegionName())))
|
.content(I18nUtils.getPropsRewardContent(cmd.getType(), cmd.getDays(), I18nUtils.getLanguageByRegion(region.getRegionName())))
|
||||||
|
.title(JSON.toJSONString(map))
|
||||||
.expand(sourceUrl)
|
.expand(sourceUrl)
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,10 +62,7 @@ import org.jetbrains.annotations.NotNull;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.*;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -415,10 +412,13 @@ public class ManagerAuthServiceImpl implements ManagerAuthService {
|
|||||||
url = props.getCover();
|
url = props.getCover();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("propType", sourceType);
|
||||||
officialNoticeClient.send(
|
officialNoticeClient.send(
|
||||||
NoticeExtTemplateCustomizeCmd.builder().toAccount(cmd.getAcceptUserId())
|
NoticeExtTemplateCustomizeCmd.builder().toAccount(cmd.getAcceptUserId())
|
||||||
.noticeType(OfficialNoticeTypeEnum.GIVE_AWAY_PROPS)
|
.noticeType(OfficialNoticeTypeEnum.GIVE_AWAY_PROPS)
|
||||||
.content(I18nUtils.getPropsRewardContent(sourceType, days, I18nUtils.getLanguageByRegion(region.getRegionName())))
|
.content(I18nUtils.getPropsRewardContent(sourceType, days, I18nUtils.getLanguageByRegion(region.getRegionName())))
|
||||||
|
.title(JSON.toJSONString(map))
|
||||||
.expand(url)
|
.expand(url)
|
||||||
.build());
|
.build());
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
package com.red.circle.other.app.inner.endpoint.material.props;
|
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.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.NoticeExtTemplateCustomizeCmd;
|
||||||
import com.red.circle.external.inner.model.enums.message.OfficialNoticeTypeEnum;
|
import com.red.circle.external.inner.model.enums.message.OfficialNoticeTypeEnum;
|
||||||
@ -92,16 +93,20 @@ public class PropsBackpackClientEndpoint implements PropsBackpackClientApi {
|
|||||||
url = props.getCover();
|
url = props.getCover();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Map<String, Object> map = new HashMap<>();
|
||||||
|
map.put("propType", type);
|
||||||
if (!Objects.isNull(user)) {
|
if (!Objects.isNull(user)) {
|
||||||
if (Arrays.asList("ACTIVITY", "ADMINISTRATOR").contains(type)) {
|
if (Arrays.asList("ACTIVITY", "ADMINISTRATOR").contains(type)) {
|
||||||
BadgePictureConfig badgePictureConfig = badgePictureConfigService.getByBadgeId(user.getOriginSys(), propsId);
|
BadgePictureConfig badgePictureConfig = badgePictureConfigService.getByBadgeId(user.getOriginSys(), propsId);
|
||||||
url = badgePictureConfig != null ? badgePictureConfig.getSelectUrl() : "";
|
url = badgePictureConfig != null ? badgePictureConfig.getSelectUrl() : "";
|
||||||
|
map.put("propType", "BADGE");
|
||||||
}
|
}
|
||||||
|
|
||||||
RegionConfig region = userRegionGateway.getRegionConfigByUserId(userId);
|
RegionConfig region = userRegionGateway.getRegionConfigByUserId(userId);
|
||||||
officialNoticeClient.send(
|
officialNoticeClient.send(
|
||||||
NoticeExtTemplateCustomizeCmd.builder().toAccount(userId)
|
NoticeExtTemplateCustomizeCmd.builder().toAccount(userId)
|
||||||
.noticeType(OfficialNoticeTypeEnum.GIVE_AWAY_PROPS)
|
.noticeType(OfficialNoticeTypeEnum.GIVE_AWAY_PROPS)
|
||||||
|
.title(JSON.toJSONString(map))
|
||||||
.content(I18nUtils.getPropsRewardContent(type, days, I18nUtils.getLanguageByRegion(region.getRegionName())))
|
.content(I18nUtils.getPropsRewardContent(type, days, I18nUtils.getLanguageByRegion(region.getRegionName())))
|
||||||
.expand(url)
|
.expand(url)
|
||||||
.build());
|
.build());
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user