master:推广营销接口新增入参;

pull/1121/head
liujiang 2025-08-18 23:45:45 +08:00
parent 2b51c37be6
commit af8759f0ef
3 changed files with 13 additions and 0 deletions

View File

@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
/**
@ -33,5 +34,11 @@ public class AdRoundLatestVO {
private Integer showType;
@ApiModelProperty(value = "位置 A B C D E")
private String position;
@NotBlank(message = "对象锁符号不能为空!")
@ApiModelProperty(value = "对象锁符号")
private String symbol;
@NotNull(message = "当前播放状态不能为空!")
@ApiModelProperty(value = "当前播放状态")
private Integer launchStatus;
}

View File

@ -27,5 +27,9 @@ public class AdRoundLatestDTO {
private Integer showType;
@ApiModelProperty(value = "位置 A B C D E")
private String position;
@ApiModelProperty(value = "对象锁符号")
private String symbol;
@ApiModelProperty(value = "当前播放状态")
private Integer launchStatus;
}

View File

@ -838,12 +838,14 @@ public class AdvertRoundServiceImpl implements IAdvertRoundService {
if (Objects.equals(latestDTO.getShowType(), AdShowType.TIME_RANGE.getValue())) {
advertRound = this.advertRoundMapper.selectOne(new LambdaQueryWrapper<AdvertRound>()
.eq(AdvertRound::getAdvertId, latestDTO.getAdvertId()).eq(AdvertRound::getRoundId, latestDTO.getRoundId())
.eq(AdvertRound::getLaunchStatus, latestDTO.getLaunchStatus()).eq(AdvertRound::getSymbol, latestDTO.getSymbol())
.eq(AdvertRound::getDelFlag, Constants.UNDELETED).orderByDesc(AdvertRound::getPayPrice, AdvertRound::getCreateTime)
.last("LIMIT 1"));
} else {
Optional.ofNullable(latestDTO.getPosition()).orElseThrow(() -> new ServiceException("位置枚举类型position必传", HttpStatus.ERROR));
advertRound = Optional.ofNullable(this.advertRoundMapper.selectOne(new LambdaQueryWrapper<AdvertRound>()
.eq(AdvertRound::getAdvertId, latestDTO.getAdvertId()).eq(AdvertRound::getRoundId, latestDTO.getRoundId())
.eq(AdvertRound::getLaunchStatus, latestDTO.getLaunchStatus()).eq(AdvertRound::getSymbol, latestDTO.getSymbol())
.eq(AdvertRound::getPosition, latestDTO.getPosition()).eq(AdvertRound::getDelFlag, Constants.UNDELETED)))
.orElseThrow(() -> new ServiceException("推广位不存在!", HttpStatus.ERROR));
}