master:提交生产需求优化;
parent
849dc47a15
commit
17bbbf28c3
|
|
@ -7,6 +7,7 @@ import lombok.Data;
|
|||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.Size;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -24,6 +25,9 @@ public class StoreProdDemandVO {
|
|||
@NotNull(message = "档口工厂ID不能为空")
|
||||
@ApiModelProperty(value = "档口工厂ID", required = true)
|
||||
private Long storeFactoryId;
|
||||
@Size(min = 0, max = 100, message = "备注长度不能超过100个字符")
|
||||
@ApiModelProperty(value = "备注", required = true)
|
||||
private String remark;
|
||||
@NotNull(message = "需求列表不能为空")
|
||||
@Valid
|
||||
@ApiModelProperty(value = "新增需求列表", required = true)
|
||||
|
|
|
|||
|
|
@ -35,20 +35,18 @@ public enum AdType {
|
|||
PC_HOME_POP_MID(9, "首页人气榜中间图"),
|
||||
// 人气榜右侧图
|
||||
PC_HOME_POP_RIGHT(10, "首页人气榜右侧图"),
|
||||
|
||||
|
||||
// 首页档口横幅
|
||||
PC_HOME_SINGLE_BANNER(11, "首页档口横幅"),
|
||||
// 首页商品列表
|
||||
PC_HOME_PRODUCT_LIST(12, "首页商品列表"),
|
||||
|
||||
|
||||
// 首页两侧固定挂耳
|
||||
PC_HOME_FIXED_EAR(13, "首页两侧固定挂耳"),
|
||||
// 首页搜索框下名称
|
||||
PC_HOME_SEARCH_DOWN_NAME(14, "首页搜索框下档口名称"),
|
||||
// 首页搜索框中推荐商品
|
||||
PC_HOME_SEARCH_PRODUCT(15, "首页搜索框中推荐商品"),
|
||||
// 首页顶部通栏
|
||||
PC_HOME_TOPMOST_BANNER(16, "首页顶部通栏"),
|
||||
|
||||
|
||||
// 新品馆顶部横向大图
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ public class StoreProdDemandDTO {
|
|||
private Long storeId;
|
||||
@ApiModelProperty(value = "档口工厂ID")
|
||||
private Long storeFactoryId;
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
@ApiModelProperty(value = "需求列表")
|
||||
private List<DetailDTO> detailList;
|
||||
|
||||
|
|
|
|||
|
|
@ -249,9 +249,9 @@ public class AdminAdvertRoundServiceImpl implements IAdminAdvertRoundService {
|
|||
if (ObjectUtils.isNotEmpty(interceptDTO.getStoreProdIdList())) {
|
||||
advertRound.setProdIdStr(StringUtils.join(interceptDTO.getStoreProdIdList(), ","));
|
||||
}
|
||||
// 如果是位置枚举,则设置一个很高的价格(200 - 400)范围,有其它档口愿意出更高价格拿下就随他去
|
||||
// 如果是位置枚举,则设置一个很高的价格(100 - 200)范围,有其它档口愿意出更高价格拿下就随他去
|
||||
if (Objects.equals(advertRound.getShowType(), AdShowType.POSITION_ENUM.getValue())) {
|
||||
advertRound.setPayPrice(BigDecimal.valueOf(RandomUtils.nextLong(20, 40 + 1) * 10));
|
||||
advertRound.setPayPrice(BigDecimal.valueOf(RandomUtils.nextLong(10, 20 + 1) * 10));
|
||||
}
|
||||
return this.advertRoundMapper.updateById(advertRound);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -160,8 +160,10 @@ public class StoreProductDemandServiceImpl implements IStoreProductDemandService
|
|||
}
|
||||
StoreProductDemand demand = new StoreProductDemand();
|
||||
// 生成code
|
||||
demand.setCode(this.sequenceService.generateCode(demandDTO.getStoreId(), EVoucherSequenceType.DEMAND.getValue(), DateUtils.parseDateToStr(DateUtils.YYYYMMDD, new Date())))
|
||||
.setDemandStatus(1).setStoreId(demandDTO.getStoreId()).setStoreFactoryId(demandDTO.getStoreFactoryId()).setCreateBy(SecurityUtils.getUsername());
|
||||
demand.setCode(this.sequenceService.generateCode(demandDTO.getStoreId(), EVoucherSequenceType.DEMAND.getValue(),
|
||||
DateUtils.parseDateToStr(DateUtils.YYYYMMDD, new Date())))
|
||||
.setDemandStatus(1).setStoreId(demandDTO.getStoreId()).setStoreFactoryId(demandDTO.getStoreFactoryId())
|
||||
.setRemark(demandDTO.getRemark()).setCreateBy(SecurityUtils.getUsername());
|
||||
int count = this.storeProdDemandMapper.insert(demand);
|
||||
// 生产需求详情
|
||||
List<StoreProductDemandDetail> detailList = demandDTO.getDetailList().stream().map(x -> {
|
||||
|
|
|
|||
Loading…
Reference in New Issue