master:系统优化,去掉prodName;
parent
535ef3c80b
commit
e3d5e14c2a
|
|
@ -92,8 +92,6 @@ public class StoreHomeProdResVO {
|
|||
public static class StoreProdInfoVO {
|
||||
@ApiModelProperty("档口商品ID")
|
||||
private Long storeProdId;
|
||||
@ApiModelProperty("档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "商品货号")
|
||||
private String prodArtNum;
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ public class StoreProdAppResVO {
|
|||
private Long storeProdId;
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "商品货号")
|
||||
private String prodArtNum;
|
||||
@ApiModelProperty(value = "商品标题")
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ import java.util.List;
|
|||
|
||||
public class StoreProdCreateVO {
|
||||
|
||||
@ApiModelProperty(value = "档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "档口ID", required = true)
|
||||
@NotNull(message = "档口ID不能为空!")
|
||||
private Long storeId;
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ public class StoreProdResVO {
|
|||
private Long storeProdId;
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "商品分类ID")
|
||||
private Long prodCateId;
|
||||
@ApiModelProperty(value = "工厂货号")
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ import java.util.List;
|
|||
|
||||
public class StoreProdUpdateVO {
|
||||
|
||||
@ApiModelProperty(value = "档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "档口ID", required = true)
|
||||
@NotNull(message = "档口ID不能为空!")
|
||||
private Long storeId;
|
||||
|
|
|
|||
|
|
@ -26,8 +26,6 @@ import java.util.List;
|
|||
|
||||
public class StoreProdVO {
|
||||
|
||||
@ApiModelProperty(value = "档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "档口ID", required = true)
|
||||
@NotNull(message = "档口ID不能为空!")
|
||||
private Long storeId;
|
||||
|
|
|
|||
|
|
@ -89,8 +89,6 @@ public class StoreHomeProdResDTO {
|
|||
public static class StoreProdInfoDTO {
|
||||
@ApiModelProperty("档口商品ID")
|
||||
private Long storeProdId;
|
||||
@ApiModelProperty("档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "商品货号")
|
||||
private String prodArtNum;
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
|
|
|
|||
|
|
@ -29,8 +29,6 @@ public class StoreProdAppResDTO {
|
|||
private Long storeId;
|
||||
@ApiModelProperty(value = "档口名称")
|
||||
private String storeName;
|
||||
@ApiModelProperty(value = "档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "商品货号")
|
||||
private String prodArtNum;
|
||||
@ApiModelProperty(value = "商品标题")
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ import java.util.List;
|
|||
@Accessors(chain = true)
|
||||
public class StoreProdDTO {
|
||||
|
||||
@ApiModelProperty(value = "档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty(value = "商品分类ID")
|
||||
|
|
|
|||
|
|
@ -32,8 +32,6 @@ public class StoreProdResDTO {
|
|||
private Long storeProdId;
|
||||
@ApiModelProperty("档口ID")
|
||||
private Long storeId;
|
||||
@ApiModelProperty("档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "商品分类ID")
|
||||
private Long prodCateId;
|
||||
@ApiModelProperty(value = "工厂货号")
|
||||
|
|
|
|||
|
|
@ -28,8 +28,6 @@ import java.util.List;
|
|||
|
||||
public class StoreProdUpdateDTO {
|
||||
|
||||
@ApiModelProperty(value = "档口商品名称")
|
||||
private String prodName;
|
||||
@ApiModelProperty(value = "档口ID", required = true)
|
||||
@NotNull(message = "档口ID不能为空!")
|
||||
private Long storeId;
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
.forEach(color -> color.setDelFlag(Constants.DELETED));
|
||||
// 新增的颜色。分为两种情况:1. 完全新增的颜色 2. 已存在,新加到商品中
|
||||
final List<String> updateProdColorNameList = updateDTO.getSizeList().stream().map(StoreProdDTO.SPCSizeDTO::getColorName).distinct().collect(Collectors.toList());
|
||||
for (int i = 1; i <= updateProdColorNameList.size(); i++) {
|
||||
for (int i = 0; i < updateProdColorNameList.size(); i++) {
|
||||
final Long updateProdColorId = storeColorMap.get(updateProdColorNameList.get(i));
|
||||
// 已存在的颜色则不新增
|
||||
if (exitProdColorIdList.contains(updateProdColorId)) {
|
||||
|
|
@ -352,7 +352,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
}
|
||||
// 新增的商品颜色
|
||||
dbProdColorList.add(new StoreProductColor().setStoreColorId(updateProdColorId).setStoreProdId(storeProdId).setStoreId(storeId)
|
||||
.setColorName(updateProdColorNameList.get(i)).setOrderNum(i).setProdStatus(EProductStatus.ON_SALE.getValue()));
|
||||
.setColorName(updateProdColorNameList.get(i)).setOrderNum(i+1).setProdStatus(EProductStatus.ON_SALE.getValue()));
|
||||
}
|
||||
// 更新商品颜色或新增商品颜色
|
||||
this.storeProdColorMapper.insertOrUpdate(dbProdColorList);
|
||||
|
|
@ -454,9 +454,9 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
// 新增档口颜色尺码与价格
|
||||
List<StoreProductColor> prodColorList = new ArrayList<>();
|
||||
final List<String> prodColorNameList = createDTO.getSizeList().stream().map(StoreProdDTO.SPCSizeDTO::getColorName).distinct().collect(Collectors.toList());
|
||||
for (int i = 1; i <= prodColorNameList.size(); i++) {
|
||||
for (int i = 0; i < prodColorNameList.size(); i++) {
|
||||
prodColorList.add(new StoreProductColor().setStoreColorId(storeColorMap.get(prodColorNameList.get(i))).setStoreProdId(storeProdId)
|
||||
.setStoreId(storeId).setColorName(prodColorNameList.get(i)).setOrderNum(i).setProdStatus(EProductStatus.ON_SALE.getValue()));
|
||||
.setStoreId(storeId).setColorName(prodColorNameList.get(i)).setOrderNum(i+1).setProdStatus(EProductStatus.ON_SALE.getValue()));
|
||||
}
|
||||
this.storeProdColorMapper.insert(prodColorList);
|
||||
// 新增档口颜色尺码对应价格
|
||||
|
|
|
|||
Loading…
Reference in New Issue