赠送勋章增加图片
This commit is contained in:
parent
11996109d2
commit
3343943965
@ -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.external.inner.model.enums.message.OfficialNoticeTypeEnum;
|
||||||
import com.red.circle.framework.dto.ResultResponse;
|
import com.red.circle.framework.dto.ResultResponse;
|
||||||
import com.red.circle.other.app.inner.service.material.props.PropsBackpackClientService;
|
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.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.database.rds.service.props.PropsSourceRecordService;
|
||||||
import com.red.circle.other.infra.utils.I18nUtils;
|
import com.red.circle.other.infra.utils.I18nUtils;
|
||||||
import com.red.circle.other.domain.gateway.user.UserProfileGateway;
|
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.cmd.material.ReduceDaysAndUnUseCmd;
|
||||||
import com.red.circle.other.inner.model.dto.material.PropsBackpackDTO;
|
import com.red.circle.other.inner.model.dto.material.PropsBackpackDTO;
|
||||||
import com.red.circle.other.inner.model.dto.material.UsePropsDTO;
|
import com.red.circle.other.inner.model.dto.material.UsePropsDTO;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
import java.util.*;
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Set;
|
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.http.MediaType;
|
import org.springframework.http.MediaType;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -46,6 +47,7 @@ public class PropsBackpackClientEndpoint implements PropsBackpackClientApi {
|
|||||||
private final UserProfileGateway userProfileGateway;
|
private final UserProfileGateway userProfileGateway;
|
||||||
private final UserRegionGateway userRegionGateway;
|
private final UserRegionGateway userRegionGateway;
|
||||||
private final PropsSourceRecordService propsSourceRecordService;
|
private final PropsSourceRecordService propsSourceRecordService;
|
||||||
|
private final BadgePictureConfigService badgePictureConfigService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ResultResponse<UsePropsDTO> switchUseProps(Long userId, Long propsId) {
|
public ResultResponse<UsePropsDTO> switchUseProps(Long userId, Long propsId) {
|
||||||
@ -91,6 +93,11 @@ public class PropsBackpackClientEndpoint implements PropsBackpackClientApi {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!Objects.isNull(user)) {
|
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);
|
RegionConfig region = userRegionGateway.getRegionConfigByUserId(userId);
|
||||||
officialNoticeClient.send(
|
officialNoticeClient.send(
|
||||||
NoticeExtTemplateCustomizeCmd.builder().toAccount(userId)
|
NoticeExtTemplateCustomizeCmd.builder().toAccount(userId)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user