master:商品分类属性调整;
parent
13b4f0a7e2
commit
71728560c2
|
|
@ -41,8 +41,8 @@ public class StoreProdAppResVO {
|
|||
private List<String> tagList;
|
||||
@ApiModelProperty(value = "档口文件列表")
|
||||
private List<StoreProdFileVO> fileList;
|
||||
@ApiModelProperty(value = "档口类目属性列表")
|
||||
private List<StoreProdCateAttrVO> cateAttrList;
|
||||
@ApiModelProperty(value = "档口类目属性")
|
||||
private StoreProdCateAttrVO cateAttr;
|
||||
@ApiModelProperty(value = "档口服务承诺")
|
||||
private StoreProdSvcVO svc;
|
||||
@ApiModelProperty(value = "详情内容")
|
||||
|
|
@ -66,10 +66,48 @@ public class StoreProdAppResVO {
|
|||
@Data
|
||||
@ApiModel(value = "档口商品类目属性")
|
||||
public static class StoreProdCateAttrVO {
|
||||
@ApiModelProperty(value = "系统设置类目")
|
||||
private String dictType;
|
||||
@ApiModelProperty(value = "系统设置类目值")
|
||||
private String dictValue;
|
||||
@ApiModelProperty(value = "帮面材质")
|
||||
private String upperMaterial;
|
||||
@ApiModelProperty(value = "内里材质")
|
||||
private String liningMaterial;
|
||||
@ApiModelProperty(value = "鞋垫材质")
|
||||
private String insoleMaterial;
|
||||
@ApiModelProperty(value = "上市季节年份")
|
||||
private String releaseYearSeason;
|
||||
@ApiModelProperty(value = "后跟高")
|
||||
private String heelHeight;
|
||||
@ApiModelProperty(value = "跟底款式")
|
||||
private String heelType;
|
||||
@ApiModelProperty(value = "鞋头款式")
|
||||
private String toeStyle;
|
||||
@ApiModelProperty(value = "适合季节")
|
||||
private String suitableSeason;
|
||||
@ApiModelProperty(value = "开口深度")
|
||||
private String collarDepth;
|
||||
@ApiModelProperty(value = "鞋底材质")
|
||||
private String outsoleMaterial;
|
||||
@ApiModelProperty(value = "风格")
|
||||
private String style;
|
||||
@ApiModelProperty(value = "款式")
|
||||
private String design;
|
||||
@ApiModelProperty(value = "皮质特征")
|
||||
private String leatherFeatures;
|
||||
@ApiModelProperty(value = "制作工艺")
|
||||
private String manufacturingProcess;
|
||||
@ApiModelProperty(value = "图案")
|
||||
private String pattern;
|
||||
@ApiModelProperty(value = "闭合方式")
|
||||
private String closureType;
|
||||
@ApiModelProperty(value = "适用场景")
|
||||
private String occasion;
|
||||
@ApiModelProperty(value = "适用年龄")
|
||||
private String suitableAge;
|
||||
@ApiModelProperty(value = "厚薄")
|
||||
private String thickness;
|
||||
@ApiModelProperty(value = "流行元素")
|
||||
private String fashionElements;
|
||||
@ApiModelProperty(value = "适用对象")
|
||||
private String suitablePerson;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModel;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
@ -48,8 +49,8 @@ public class StoreProdResVO {
|
|||
private Date listingWaySchedule;
|
||||
@ApiModelProperty(value = "档口文件列表")
|
||||
private List<StoreProdFileVO> fileList;
|
||||
@ApiModelProperty(value = "档口类目属性列表")
|
||||
private List<StoreProdCateAttrVO> cateAttrList;
|
||||
@ApiModelProperty(value = "档口类目属性")
|
||||
private StoreProdCateAttrVO cateAttr;
|
||||
@ApiModelProperty(value = "档口所有颜色列表")
|
||||
private List<StoreColorVO> allColorList;
|
||||
@ApiModelProperty(value = "商品颜色列表")
|
||||
|
|
@ -82,10 +83,48 @@ public class StoreProdResVO {
|
|||
@Data
|
||||
@ApiModel(value = "档口商品类目属性")
|
||||
public static class StoreProdCateAttrVO {
|
||||
@ApiModelProperty(value = "系统设置类目")
|
||||
private String dictType;
|
||||
@ApiModelProperty(value = "系统设置类目值")
|
||||
private String dictValue;
|
||||
@ApiModelProperty(value = "帮面材质", required = true)
|
||||
private String upperMaterial;
|
||||
@ApiModelProperty(value = "内里材质", required = true)
|
||||
private String liningMaterial;
|
||||
@ApiModelProperty(value = "鞋垫材质", required = true)
|
||||
private String insoleMaterial;
|
||||
@ApiModelProperty(value = "上市季节年份")
|
||||
private String releaseYearSeason;
|
||||
@ApiModelProperty(value = "后跟高")
|
||||
private String heelHeight;
|
||||
@ApiModelProperty(value = "跟底款式")
|
||||
private String heelType;
|
||||
@ApiModelProperty(value = "鞋头款式")
|
||||
private String toeStyle;
|
||||
@ApiModelProperty(value = "适合季节")
|
||||
private String suitableSeason;
|
||||
@ApiModelProperty(value = "开口深度")
|
||||
private String collarDepth;
|
||||
@ApiModelProperty(value = "鞋底材质")
|
||||
private String outsoleMaterial;
|
||||
@ApiModelProperty(value = "风格")
|
||||
private String style;
|
||||
@ApiModelProperty(value = "款式")
|
||||
private String design;
|
||||
@ApiModelProperty(value = "皮质特征")
|
||||
private String leatherFeatures;
|
||||
@ApiModelProperty(value = "制作工艺")
|
||||
private String manufacturingProcess;
|
||||
@ApiModelProperty(value = "图案")
|
||||
private String pattern;
|
||||
@ApiModelProperty(value = "闭合方式")
|
||||
private String closureType;
|
||||
@ApiModelProperty(value = "适用场景")
|
||||
private String occasion;
|
||||
@ApiModelProperty(value = "适用年龄")
|
||||
private String suitableAge;
|
||||
@ApiModelProperty(value = "厚薄")
|
||||
private String thickness;
|
||||
@ApiModelProperty(value = "流行元素")
|
||||
private String fashionElements;
|
||||
@ApiModelProperty(value = "适用对象")
|
||||
private String suitablePerson;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -71,10 +71,10 @@ public class StoreProdVO {
|
|||
@NotNull(message = "档口文件不能为空!")
|
||||
@Valid
|
||||
private List<StoreProdFileVO> fileList;
|
||||
@NotNull(message = "档口类目属性列表不能为空!")
|
||||
@NotNull(message = "档口类目属性不能为空!")
|
||||
@Valid
|
||||
@ApiModelProperty(value = "档口类目属性列表", required = true)
|
||||
private List<StoreProdCateAttrVO> cateAttrList;
|
||||
@ApiModelProperty(value = "档口类目属性", required = true)
|
||||
private StoreProdCateAttrVO cateAttr;
|
||||
@NotNull(message = "档口所有颜色列表不能为空!")
|
||||
@ApiModelProperty(value = "档口所有颜色列表", required = true)
|
||||
private List<StoreColorVO> allColorList;
|
||||
|
|
@ -122,10 +122,51 @@ public class StoreProdVO {
|
|||
@Data
|
||||
@ApiModel(value = "档口类目属性列表")
|
||||
public static class StoreProdCateAttrVO {
|
||||
@ApiModelProperty(value = "系统设置类目")
|
||||
private String dictType;
|
||||
@ApiModelProperty(value = "系统设置类目值")
|
||||
private String dictValue;
|
||||
@NotBlank(message = "帮面材质不可为空!")
|
||||
@ApiModelProperty(value = "帮面材质", required = true)
|
||||
private String upperMaterial;
|
||||
@NotBlank(message = "内里材质不可为空!")
|
||||
@ApiModelProperty(value = "内里材质", required = true)
|
||||
private String liningMaterial;
|
||||
@NotBlank(message = "鞋垫材质不可为空!")
|
||||
@ApiModelProperty(value = "鞋垫材质", required = true)
|
||||
private String insoleMaterial;
|
||||
@ApiModelProperty(value = "上市季节年份")
|
||||
private String releaseYearSeason;
|
||||
@ApiModelProperty(value = "后跟高")
|
||||
private String heelHeight;
|
||||
@ApiModelProperty(value = "跟底款式")
|
||||
private String heelType;
|
||||
@ApiModelProperty(value = "鞋头款式")
|
||||
private String toeStyle;
|
||||
@ApiModelProperty(value = "适合季节")
|
||||
private String suitableSeason;
|
||||
@ApiModelProperty(value = "开口深度")
|
||||
private String collarDepth;
|
||||
@ApiModelProperty(value = "鞋底材质")
|
||||
private String outsoleMaterial;
|
||||
@ApiModelProperty(value = "风格")
|
||||
private String style;
|
||||
@ApiModelProperty(value = "款式")
|
||||
private String design;
|
||||
@ApiModelProperty(value = "皮质特征")
|
||||
private String leatherFeatures;
|
||||
@ApiModelProperty(value = "制作工艺")
|
||||
private String manufacturingProcess;
|
||||
@ApiModelProperty(value = "图案")
|
||||
private String pattern;
|
||||
@ApiModelProperty(value = "闭合方式")
|
||||
private String closureType;
|
||||
@ApiModelProperty(value = "适用场景")
|
||||
private String occasion;
|
||||
@ApiModelProperty(value = "适用年龄")
|
||||
private String suitableAge;
|
||||
@ApiModelProperty(value = "厚薄")
|
||||
private String thickness;
|
||||
@ApiModelProperty(value = "流行元素")
|
||||
private String fashionElements;
|
||||
@ApiModelProperty(value = "适用对象")
|
||||
private String suitablePerson;
|
||||
}
|
||||
|
||||
@Data
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ import com.ruoyi.xkt.service.IAdvertRoundService;
|
|||
import lombok.RequiredArgsConstructor;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -447,18 +448,14 @@ public class XktTask {
|
|||
*/
|
||||
private void tagStyle(Date yesterday, List<DailyProdTag> tagList) {
|
||||
List<StoreProductCategoryAttribute> cateAttrList = this.cateAttrMapper.selectList(new LambdaQueryWrapper<StoreProductCategoryAttribute>()
|
||||
.eq(StoreProductCategoryAttribute::getDelFlag, Constants.UNDELETED).eq(StoreProductCategoryAttribute::getDictType, "style"));
|
||||
// 查询条件加上
|
||||
.eq(StoreProductCategoryAttribute::getDelFlag, Constants.UNDELETED));
|
||||
if (CollectionUtils.isEmpty(cateAttrList)) {
|
||||
return;
|
||||
}
|
||||
// 根据storeProdId找到storeId
|
||||
List<StoreProduct> storeProdList = this.storeProdMapper.selectList(new LambdaQueryWrapper<StoreProduct>()
|
||||
.eq(StoreProduct::getDelFlag, Constants.UNDELETED).in(StoreProduct::getId, cateAttrList.stream()
|
||||
.map(StoreProductCategoryAttribute::getStoreProdId).collect(Collectors.toList())));
|
||||
Map<Long, Long> prodStoreIdMap = storeProdList.stream().collect(Collectors.toMap(StoreProduct::getId, StoreProduct::getStoreId));
|
||||
tagList.addAll(cateAttrList.stream().map(x -> DailyProdTag.builder().storeId(prodStoreIdMap.get(x.getStoreProdId())).storeProdId(x.getStoreProdId())
|
||||
.tag(x.getDictValue()).type(ProdTagType.STYLE.getValue()).voucherDate(yesterday).build()).collect(Collectors.toList()));
|
||||
tagList.addAll(cateAttrList.stream().filter(x -> StringUtils.isNotBlank(x.getStyle()))
|
||||
.map(x -> DailyProdTag.builder().storeId(x.getStoreId()).storeProdId(x.getStoreProdId())
|
||||
.tag(x.getStyle()).type(ProdTagType.STYLE.getValue()).voucherDate(yesterday).build())
|
||||
.collect(Collectors.toList()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
package com.ruoyi.xkt.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.XktBaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* 档口商品类目信息对象 store_product_category_attribute
|
||||
|
|
@ -19,6 +16,7 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
|||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class StoreProductCategoryAttribute extends XktBaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
|
|
@ -26,35 +24,97 @@ public class StoreProductCategoryAttribute extends XktBaseEntity {
|
|||
*/
|
||||
@TableId
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 档口ID
|
||||
*/
|
||||
private Long storeId;
|
||||
/**
|
||||
* 档口商品ID
|
||||
*/
|
||||
@Excel(name = "档口商品ID")
|
||||
private Long storeProdId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 系统设置类目ID
|
||||
* 帮面材质
|
||||
*/
|
||||
@Excel(name = "系统设置类目")
|
||||
private String dictType;
|
||||
|
||||
private String upperMaterial;
|
||||
/**
|
||||
* 系统设置类目ID
|
||||
* 内里材质
|
||||
*/
|
||||
@Excel(name = "系统设置类目值")
|
||||
private String dictValue;
|
||||
|
||||
private String liningMaterial;
|
||||
/**
|
||||
* 鞋垫材质
|
||||
*/
|
||||
private String insoleMaterial;
|
||||
/**
|
||||
* 上市季节年份
|
||||
*/
|
||||
private String releaseYearSeason;
|
||||
/**
|
||||
* 后跟高
|
||||
*/
|
||||
private String heelHeight;
|
||||
/**
|
||||
* 跟底款式
|
||||
*/
|
||||
private String heelType;
|
||||
/**
|
||||
* 鞋头款式
|
||||
*/
|
||||
private String toeStyle;
|
||||
/**
|
||||
* 适合季节
|
||||
*/
|
||||
private String suitableSeason;
|
||||
/**
|
||||
* 开口深度
|
||||
*/
|
||||
private String collarDepth;
|
||||
/**
|
||||
* 鞋底材质
|
||||
*/
|
||||
private String outsoleMaterial;
|
||||
/**
|
||||
* 风格
|
||||
*/
|
||||
private String style;
|
||||
/**
|
||||
* 款式
|
||||
*/
|
||||
private String design;
|
||||
/**
|
||||
* 皮质特征
|
||||
*/
|
||||
private String leatherFeatures;
|
||||
/**
|
||||
* 制作工艺
|
||||
*/
|
||||
private String manufacturingProcess;
|
||||
/**
|
||||
* 图案
|
||||
*/
|
||||
private String pattern;
|
||||
/**
|
||||
* 闭合方式
|
||||
*/
|
||||
private String closureType;
|
||||
/**
|
||||
* 适用场景
|
||||
*/
|
||||
private String occasion;
|
||||
/**
|
||||
* 适用年龄
|
||||
*/
|
||||
private String suitableAge;
|
||||
/**
|
||||
* 厚薄
|
||||
*/
|
||||
private String thickness;
|
||||
/**
|
||||
* 流行元素
|
||||
*/
|
||||
private String fashionElements;
|
||||
/**
|
||||
* 适用对象
|
||||
*/
|
||||
private String suitablePerson;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -15,9 +16,47 @@ import java.util.List;
|
|||
@Data
|
||||
public class StoreProdCateAttrDTO {
|
||||
|
||||
@ApiModelProperty(value = "系统设置类目")
|
||||
private String dictType;
|
||||
@ApiModelProperty(value = "系统设置类目值")
|
||||
private String dictValue;
|
||||
@ApiModelProperty(value = "帮面材质")
|
||||
private String upperMaterial;
|
||||
@ApiModelProperty(value = "内里材质")
|
||||
private String liningMaterial;
|
||||
@ApiModelProperty(value = "鞋垫材质")
|
||||
private String insoleMaterial;
|
||||
@ApiModelProperty(value = "上市季节年份")
|
||||
private String releaseYearSeason;
|
||||
@ApiModelProperty(value = "后跟高")
|
||||
private String heelHeight;
|
||||
@ApiModelProperty(value = "跟底款式")
|
||||
private String heelType;
|
||||
@ApiModelProperty(value = "鞋头款式")
|
||||
private String toeStyle;
|
||||
@ApiModelProperty(value = "适合季节")
|
||||
private String suitableSeason;
|
||||
@ApiModelProperty(value = "开口深度")
|
||||
private String collarDepth;
|
||||
@ApiModelProperty(value = "鞋底材质")
|
||||
private String outsoleMaterial;
|
||||
@ApiModelProperty(value = "风格")
|
||||
private String style;
|
||||
@ApiModelProperty(value = "款式")
|
||||
private String design;
|
||||
@ApiModelProperty(value = "皮质特征")
|
||||
private String leatherFeatures;
|
||||
@ApiModelProperty(value = "制作工艺")
|
||||
private String manufacturingProcess;
|
||||
@ApiModelProperty(value = "图案")
|
||||
private String pattern;
|
||||
@ApiModelProperty(value = "闭合方式")
|
||||
private String closureType;
|
||||
@ApiModelProperty(value = "适用场景")
|
||||
private String occasion;
|
||||
@ApiModelProperty(value = "适用年龄")
|
||||
private String suitableAge;
|
||||
@ApiModelProperty(value = "厚薄")
|
||||
private String thickness;
|
||||
@ApiModelProperty(value = "流行元素")
|
||||
private String fashionElements;
|
||||
@ApiModelProperty(value = "适用对象")
|
||||
private String suitablePerson;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ public class StoreProdAppResDTO {
|
|||
private List<String> tagList;
|
||||
@ApiModelProperty(value = "档口文件列表")
|
||||
private List<StoreProdFileResDTO> fileList;
|
||||
@ApiModelProperty(value = "档口类目属性列表")
|
||||
private List<StoreProdCateAttrDTO> cateAttrList;
|
||||
@ApiModelProperty(value = "档口类目属性")
|
||||
private StoreProdCateAttrDTO cateAttr;
|
||||
@ApiModelProperty(value = "档口服务承诺")
|
||||
private StoreProdSvcDTO svc;
|
||||
@ApiModelProperty(value = "详情内容")
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ public class StoreProdDTO {
|
|||
@ApiModelProperty(value = "档口文件列表")
|
||||
private List<StoreProdFileDTO> fileList;
|
||||
@ApiModelProperty(value = "档口类目属性列表")
|
||||
private List<StoreProdCateAttrDTO> cateAttrList;
|
||||
private StoreProdCateAttrDTO cateAttr;
|
||||
@NotNull(message = "档口所有颜色列表不能为空!")
|
||||
@ApiModelProperty(value = "档口所有颜色列表")
|
||||
private List<StoreColorDTO> allColorList;
|
||||
|
|
|
|||
|
|
@ -58,8 +58,8 @@ public class StoreProdResDTO {
|
|||
private Date listingWaySchedule;
|
||||
@ApiModelProperty(value = "档口文件列表")
|
||||
private List<StoreProdFileResDTO> fileList;
|
||||
@ApiModelProperty(value = "档口类目属性列表")
|
||||
private List<StoreProdCateAttrDTO> cateAttrList;
|
||||
@ApiModelProperty(value = "档口类目属性")
|
||||
private StoreProdCateAttrDTO cateAttr;
|
||||
@ApiModelProperty(value = "档口所有颜色列表")
|
||||
private List<StoreColorDTO> allColorList;
|
||||
@ApiModelProperty(value = "档口颜色列表")
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public interface StoreProductCategoryAttributeMapper extends BaseMapper<StorePro
|
|||
* @param id 档口商品类目信息主键
|
||||
* @return 档口商品类目信息
|
||||
*/
|
||||
public StoreProductCategoryAttribute selectStoreProductCategoryAttributeByStoreProdAttrId(Long id);
|
||||
StoreProductCategoryAttribute selectStoreProductCategoryAttributeByStoreProdAttrId(Long id);
|
||||
|
||||
/**
|
||||
* 查询档口商品类目信息列表
|
||||
|
|
@ -27,7 +27,7 @@ public interface StoreProductCategoryAttributeMapper extends BaseMapper<StorePro
|
|||
* @param storeProductCategoryAttribute 档口商品类目信息
|
||||
* @return 档口商品类目信息集合
|
||||
*/
|
||||
public List<StoreProductCategoryAttribute> selectStoreProductCategoryAttributeList(StoreProductCategoryAttribute storeProductCategoryAttribute);
|
||||
List<StoreProductCategoryAttribute> selectStoreProductCategoryAttributeList(StoreProductCategoryAttribute storeProductCategoryAttribute);
|
||||
|
||||
/**
|
||||
* 新增档口商品类目信息
|
||||
|
|
@ -35,7 +35,7 @@ public interface StoreProductCategoryAttributeMapper extends BaseMapper<StorePro
|
|||
* @param storeProductCategoryAttribute 档口商品类目信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertStoreProductCategoryAttribute(StoreProductCategoryAttribute storeProductCategoryAttribute);
|
||||
int insertStoreProductCategoryAttribute(StoreProductCategoryAttribute storeProductCategoryAttribute);
|
||||
|
||||
/**
|
||||
* 修改档口商品类目信息
|
||||
|
|
@ -43,7 +43,7 @@ public interface StoreProductCategoryAttributeMapper extends BaseMapper<StorePro
|
|||
* @param storeProductCategoryAttribute 档口商品类目信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateStoreProductCategoryAttribute(StoreProductCategoryAttribute storeProductCategoryAttribute);
|
||||
int updateStoreProductCategoryAttribute(StoreProductCategoryAttribute storeProductCategoryAttribute);
|
||||
|
||||
/**
|
||||
* 删除档口商品类目信息
|
||||
|
|
@ -51,7 +51,7 @@ public interface StoreProductCategoryAttributeMapper extends BaseMapper<StorePro
|
|||
* @param id 档口商品类目信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreProductCategoryAttributeByStoreProdAttrId(Long id);
|
||||
int deleteStoreProductCategoryAttributeByStoreProdAttrId(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除档口商品类目信息
|
||||
|
|
@ -59,9 +59,9 @@ public interface StoreProductCategoryAttributeMapper extends BaseMapper<StorePro
|
|||
* @param storeProdAttrIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteStoreProductCategoryAttributeByStoreProdAttrIds(Long[] storeProdAttrIds);
|
||||
int deleteStoreProductCategoryAttributeByStoreProdAttrIds(Long[] storeProdAttrIds);
|
||||
|
||||
void updateDelFlagByStoreProdId(Long storeProdId);
|
||||
|
||||
List<StoreProdCateAttrDTO> selectListByStoreProdId(Long storeProdId);
|
||||
StoreProductCategoryAttribute selectByStoreProdId(Long storeProdId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
// 档口文件(商品主图、主图视频、下载的商品详情)
|
||||
List<StoreProdFileResDTO> fileResList = this.storeProdFileMapper.selectListByStoreProdId(storeProdId);
|
||||
// 档口类目属性列表
|
||||
List<StoreProdCateAttrDTO> cateAttrList = this.storeProdCateAttrMapper.selectListByStoreProdId(storeProdId);
|
||||
StoreProductCategoryAttribute cateAttr = this.storeProdCateAttrMapper.selectByStoreProdId(storeProdId);
|
||||
// 档口所有颜色列表
|
||||
List<StoreColorDTO> allColorList = this.storeColorMapper.selectListByStoreProdId(storeProd.getStoreId());
|
||||
// 档口当前商品颜色列表
|
||||
|
|
@ -112,11 +112,12 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
StoreProductService storeProductSvc = this.storeProdSvcMapper.selectByStoreProdId(storeProdId);
|
||||
// 档口生产工艺信息
|
||||
StoreProductProcess prodProcess = this.storeProdProcMapper.selectByStoreProdId(storeProdId);
|
||||
return storeProdResDTO.setFileList(fileResList).setCateAttrList(cateAttrList).setAllColorList(allColorList)
|
||||
return storeProdResDTO.setFileList(fileResList).setAllColorList(allColorList)
|
||||
.setColorList(colorList).setPriceList(priceList).setSizeList(sizeList)
|
||||
.setDetail(ObjectUtils.isEmpty(prodDetail) ? null : BeanUtil.toBean(prodDetail, StoreProdDetailDTO.class))
|
||||
.setSvc(ObjectUtils.isEmpty(storeProductSvc) ? null : BeanUtil.toBean(storeProductSvc, StoreProdSvcDTO.class))
|
||||
.setProcess(ObjectUtils.isEmpty(prodProcess) ? null : BeanUtil.toBean(prodProcess, StoreProdProcessDTO.class));
|
||||
.setCateAttr(BeanUtil.toBean(cateAttr, StoreProdCateAttrDTO.class))
|
||||
.setDetail(BeanUtil.toBean(prodDetail, StoreProdDetailDTO.class))
|
||||
.setSvc(BeanUtil.toBean(storeProductSvc, StoreProdSvcDTO.class))
|
||||
.setProcess(BeanUtil.toBean(prodProcess, StoreProdProcessDTO.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -490,8 +491,8 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
StoreProdAppResDTO appResDTO = BeanUtil.toBean(storeProd, StoreProdAppResDTO.class).setStoreProdId(storeProd.getId());
|
||||
// 档口文件(商品主图、主图视频、下载的商品详情)
|
||||
List<StoreProdFileResDTO> fileResList = this.storeProdFileMapper.selectListByStoreProdId(storeProdId);
|
||||
// 档口类目属性列表
|
||||
List<StoreProdCateAttrDTO> cateAttrList = this.storeProdCateAttrMapper.selectListByStoreProdId(storeProdId);
|
||||
// 档口类目属性
|
||||
StoreProductCategoryAttribute cateAttr = this.storeProdCateAttrMapper.selectByStoreProdId(storeProdId);
|
||||
// 档口当前商品颜色列表
|
||||
List<StoreProdColorDTO> colorList = this.storeProdColorMapper.selectListByStoreProdId(storeProdId);
|
||||
// 档口商品颜色尺码列表
|
||||
|
|
@ -510,14 +511,14 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
List<DailyProdTag> tagList = this.prodTagMapper.selectList(new LambdaQueryWrapper<DailyProdTag>()
|
||||
.eq(DailyProdTag::getDelFlag, Constants.UNDELETED).eq(DailyProdTag::getStoreProdId, storeProdId)
|
||||
.orderByAsc(DailyProdTag::getType));
|
||||
return appResDTO.setFileList(fileResList).setCateAttrList(cateAttrList)
|
||||
return appResDTO.setFileList(fileResList).setCateAttr(BeanUtil.toBean(cateAttr, StoreProdCateAttrDTO.class))
|
||||
.setTagList(CollectionUtils.isNotEmpty(tagList) ? tagList.stream().map(DailyProdTag::getTag).distinct().collect(Collectors.toList()) : null)
|
||||
.setCollectProd(ObjectUtils.isNotEmpty(favorite) ? Boolean.TRUE : Boolean.FALSE)
|
||||
.setSpecification(colorList.size() + "色" + sizeList.stream().filter(x -> Objects.equals(x.getStandard(), ProductSizeStatus.STANDARD.getValue())).count() + "码")
|
||||
.setMinPrice(priceList.stream().min(Comparator.comparing(StoreProdColorPriceSimpleDTO::getPrice))
|
||||
.orElseThrow(() -> new ServiceException("获取商品价格失败,请联系客服!", HttpStatus.ERROR)).getPrice())
|
||||
.setDetail(ObjectUtils.isEmpty(prodDetail) ? null : prodDetail.getDetail())
|
||||
.setSvc(ObjectUtils.isEmpty(storeProductSvc) ? null : BeanUtil.toBean(storeProductSvc, StoreProdSvcDTO.class));
|
||||
.setSvc(BeanUtil.toBean(storeProductSvc, StoreProdSvcDTO.class));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -600,36 +601,27 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
// 将文件名称和文件ID映射到Map中
|
||||
Map<String, Long> fileMap = fileList.stream().collect(Collectors.toMap(SysFile::getFileName, SysFile::getId));
|
||||
// 档口文件(商品主图、主图视频、下载的商品详情)
|
||||
List<StoreProductFile> prodFileList = fileDTOList.stream()
|
||||
.map(x -> BeanUtil.toBean(x, StoreProductFile.class).setFileId(fileMap.get(x.getFileName()))
|
||||
.setStoreProdId(storeProd.getId()).setStoreId(storeProdDTO.getStoreId()))
|
||||
List<StoreProductFile> prodFileList = fileDTOList.stream().map(x -> BeanUtil.toBean(x, StoreProductFile.class)
|
||||
.setFileId(fileMap.get(x.getFileName())).setStoreProdId(storeProd.getId()).setStoreId(storeProdDTO.getStoreId()))
|
||||
.collect(Collectors.toList());
|
||||
this.storeProdFileMapper.insert(prodFileList);
|
||||
// 档口类目属性列表
|
||||
List<StoreProductCategoryAttribute> cateAttrList = storeProdDTO.getCateAttrList().stream()
|
||||
.map(x -> BeanUtil.toBean(x, StoreProductCategoryAttribute.class)
|
||||
.setStoreProdId(storeProd.getId()))
|
||||
.collect(Collectors.toList());
|
||||
this.storeProdCateAttrMapper.insert(cateAttrList);
|
||||
// 档口类目属性
|
||||
this.storeProdCateAttrMapper.insert(BeanUtil.toBean(storeProdDTO.getCateAttr(), StoreProductCategoryAttribute.class)
|
||||
.setStoreProdId(storeProd.getId()).setStoreId(storeProd.getStoreId()));
|
||||
// 档口颜色价格列表
|
||||
List<StoreProductColorPrice> priceList = storeProdDTO.getPriceList().stream()
|
||||
.map(x -> BeanUtil.toBean(x, StoreProductColorPrice.class)
|
||||
.setStoreProdId(storeProd.getId()))
|
||||
.collect(Collectors.toList());
|
||||
List<StoreProductColorPrice> priceList = storeProdDTO.getPriceList().stream().map(x -> BeanUtil.toBean(x, StoreProductColorPrice.class)
|
||||
.setStoreProdId(storeProd.getId())).collect(Collectors.toList());
|
||||
this.storeProdColorPriceMapper.insert(priceList);
|
||||
// 档口详情内容
|
||||
StoreProductDetail storeProdDetail = BeanUtil.toBean(storeProdDTO.getDetail(), StoreProductDetail.class)
|
||||
.setStoreProdId(storeProd.getId());
|
||||
StoreProductDetail storeProdDetail = BeanUtil.toBean(storeProdDTO.getDetail(), StoreProductDetail.class).setStoreProdId(storeProd.getId());
|
||||
this.storeProdDetailMapper.insert(storeProdDetail);
|
||||
// 档口服务承诺
|
||||
if (ObjectUtils.isNotEmpty(storeProdDTO.getSvc())) {
|
||||
this.storeProdSvcMapper.insert(BeanUtil.toBean(storeProdDTO.getSvc(), StoreProductService.class)
|
||||
.setStoreProdId(storeProd.getId()));
|
||||
this.storeProdSvcMapper.insert(BeanUtil.toBean(storeProdDTO.getSvc(), StoreProductService.class).setStoreProdId(storeProd.getId()));
|
||||
}
|
||||
// 档口生产工艺信息
|
||||
if (ObjectUtils.isNotEmpty(storeProdDTO.getProcess())) {
|
||||
this.storeProdProcMapper.insert(BeanUtil.toBean(storeProdDTO.getProcess(), StoreProductProcess.class)
|
||||
.setStoreProdId(storeProd.getId()));
|
||||
this.storeProdProcMapper.insert(BeanUtil.toBean(storeProdDTO.getProcess(), StoreProductProcess.class).setStoreProdId(storeProd.getId()));
|
||||
}
|
||||
// 处理档口所有颜色列表
|
||||
List<StoreColor> storeColorList = this.storeColorMapper.selectList(new LambdaQueryWrapper<StoreColor>()
|
||||
|
|
@ -690,11 +682,9 @@ public class StoreProductServiceImpl implements IStoreProductService {
|
|||
BigDecimal minPrice = storeProdDTO.getPriceList().stream().min(Comparator.comparing(StoreProdColorPriceSimpleDTO::getPrice))
|
||||
.map(StoreProdColorPriceSimpleDTO::getPrice).orElseThrow(() -> new ServiceException("商品价格不存在!", HttpStatus.ERROR));
|
||||
// 获取使用季节
|
||||
String season = storeProdDTO.getCateAttrList().stream().filter(x -> Objects.equals(x.getDictType(), "suitable_season"))
|
||||
.map(StoreProdCateAttrDTO::getDictValue).findAny().orElse("");
|
||||
String season = storeProdDTO.getCateAttr().getSuitableSeason();
|
||||
// 获取风格
|
||||
String style = storeProdDTO.getCateAttrList().stream().filter(x -> Objects.equals(x.getDictType(), "style"))
|
||||
.map(StoreProdCateAttrDTO::getDictValue).findAny().orElse("");
|
||||
String style = storeProdDTO.getCateAttr().getStyle();
|
||||
return BeanUtil.toBean(storeProd, ESProductDTO.class)
|
||||
.setProdCateName(storeProdDTO.getProdCateName()).setSaleWeight("0").setRecommendWeight("0").setPopularityWeight("0")
|
||||
.setCreateTime(DateUtils.getTime()).setStoreName(storeProdDTO.getStoreName()).setMainPic(firstMainPic)
|
||||
|
|
|
|||
|
|
@ -88,10 +88,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
UPDATE store_product_category_attribute SET del_flag = 2 WHERE store_prod_id = #{storeProdId}
|
||||
</update>
|
||||
|
||||
<select id="selectListByStoreProdId" parameterType="Long" resultType="com.ruoyi.xkt.dto.storeProdCateAttr.StoreProdCateAttrDTO">
|
||||
<select id="selectByStoreProdId" parameterType="Long" resultType="com.ruoyi.xkt.domain.StoreProductCategoryAttribute">
|
||||
SELECT
|
||||
dict_type AS dictType,
|
||||
dict_value AS dictValue
|
||||
*
|
||||
FROM
|
||||
store_product_category_attribute
|
||||
WHERE del_flag = 0 AND store_prod_id = #{storeProdId}
|
||||
|
|
|
|||
Loading…
Reference in New Issue