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 c60d2ae9..5d508384 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 @@ -5,7 +5,9 @@ import com.red.circle.external.inner.model.cmd.message.notice.official.NoticeExt import com.red.circle.external.inner.model.enums.message.OfficialNoticeTypeEnum; import com.red.circle.framework.dto.ResultResponse; import com.red.circle.other.app.inner.service.material.props.PropsBackpackClientService; +import com.red.circle.other.infra.database.rds.entity.badge.BadgePictureConfig; import com.red.circle.other.infra.database.rds.entity.props.PropsSourceRecord; +import com.red.circle.other.infra.database.rds.service.badge.BadgePictureConfigService; import com.red.circle.other.infra.database.rds.service.props.PropsSourceRecordService; import com.red.circle.other.infra.utils.I18nUtils; import com.red.circle.other.domain.gateway.user.UserProfileGateway; @@ -20,10 +22,9 @@ import com.red.circle.other.inner.model.cmd.material.PropsBackpackQry; import com.red.circle.other.inner.model.cmd.material.ReduceDaysAndUnUseCmd; import com.red.circle.other.inner.model.dto.material.PropsBackpackDTO; import com.red.circle.other.inner.model.dto.material.UsePropsDTO; -import java.util.List; -import java.util.Map; -import java.util.Objects; -import java.util.Set; + +import java.util.*; + import lombok.RequiredArgsConstructor; import org.springframework.http.MediaType; import org.springframework.validation.annotation.Validated; @@ -46,6 +47,7 @@ public class PropsBackpackClientEndpoint implements PropsBackpackClientApi { private final UserProfileGateway userProfileGateway; private final UserRegionGateway userRegionGateway; private final PropsSourceRecordService propsSourceRecordService; + private final BadgePictureConfigService badgePictureConfigService; @Override public ResultResponse switchUseProps(Long userId, Long propsId) { @@ -91,6 +93,11 @@ public class PropsBackpackClientEndpoint implements PropsBackpackClientApi { } if (!Objects.isNull(user)) { + if (Arrays.asList("ACTIVITY", "ADMINISTRATOR").contains(type)) { + BadgePictureConfig badgePictureConfig = badgePictureConfigService.getByBadgeId(user.getOriginSys(), propsId); + url = badgePictureConfig != null ? badgePictureConfig.getSelectUrl() : ""; + } + RegionConfig region = userRegionGateway.getRegionConfigByUserId(userId); officialNoticeClient.send( NoticeExtTemplateCustomizeCmd.builder().toAccount(userId)