提交修改
This commit is contained in:
parent
d0c200a2e0
commit
9a914668ef
@ -7,10 +7,17 @@ package com.heyu.api.data.dao.vv;
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
*/
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.heyu.api.data.entity.vv.VvCategoryPropertyEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lz.mybatis.plugin.annotations.IF;
|
||||
import com.lz.mybatis.plugin.annotations.IN;
|
||||
import com.lz.mybatis.plugin.annotations.OrderBy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface VvCategoryPropertyDao extends BaseMapper<VvCategoryPropertyEntity> {
|
||||
|
||||
@ -18,6 +25,8 @@ public interface VvCategoryPropertyDao extends BaseMapper<VvCategoryPropertyEnti
|
||||
VvCategoryPropertyEntity selectVvCategoryPropertyById(@Param("id")Long id);
|
||||
|
||||
|
||||
|
||||
|
||||
Long insertVvCategoryProperty(VvCategoryPropertyEntity vvCategoryProperty);
|
||||
|
||||
|
||||
@ -30,7 +39,16 @@ public interface VvCategoryPropertyDao extends BaseMapper<VvCategoryPropertyEnti
|
||||
int updateCoverVvCategoryPropertyById(VvCategoryPropertyEntity vvCategoryProperty);
|
||||
|
||||
|
||||
int deleteVvCategoryPropertyById(@Param("id")Long id);
|
||||
int deleteVvCategoryPropertyById(@Param("id") Long id);
|
||||
|
||||
|
||||
List<VvCategoryPropertyEntity> selectVvProperByCondition(IPage page,
|
||||
@IF String propertyName,
|
||||
@IF String categoryName,
|
||||
@IF Long categoryId);
|
||||
|
||||
|
||||
|
||||
@OrderBy(VvCategoryPropertyEntity.default_sort)
|
||||
List<VvCategoryPropertyEntity> selectVvPropertyByIds(@IN List<Long> id);
|
||||
}
|
||||
@ -0,0 +1,46 @@
|
||||
package com.heyu.api.data.dao.vv;
|
||||
/**
|
||||
* <p>
|
||||
* 属性值表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-24
|
||||
*/
|
||||
import com.heyu.api.data.entity.vv.VvCategoryPropertyValueEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lz.mybatis.plugin.annotations.IN;
|
||||
import com.lz.mybatis.plugin.annotations.OrderBy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface VvCategoryPropertyValueDao extends BaseMapper<VvCategoryPropertyValueEntity> {
|
||||
|
||||
|
||||
VvCategoryPropertyValueEntity selectVvCategoryPropertyValueById(@Param("id")Long id);
|
||||
|
||||
|
||||
Long insertVvCategoryPropertyValue(VvCategoryPropertyValueEntity vvCategoryPropertyValue);
|
||||
|
||||
|
||||
Long insertOrUpdateVvCategoryPropertyValue(VvCategoryPropertyValueEntity vvCategoryPropertyValue);
|
||||
|
||||
|
||||
int updateVvCategoryPropertyValueById(VvCategoryPropertyValueEntity vvCategoryPropertyValue);
|
||||
|
||||
|
||||
int updateCoverVvCategoryPropertyValueById(VvCategoryPropertyValueEntity vvCategoryPropertyValue);
|
||||
|
||||
|
||||
int deleteVvCategoryPropertyValueById(@Param("id")Long id);
|
||||
|
||||
|
||||
List<VvCategoryPropertyValueEntity> selectVvPropertyValueByPropertyId(Long categoryPropertyId);
|
||||
|
||||
|
||||
@OrderBy(VvCategoryPropertyValueEntity.default_sort)
|
||||
List<VvCategoryPropertyValueEntity> selectVvPropertyValueByIds(@IN List<Long> id);
|
||||
}
|
||||
@ -40,7 +40,7 @@ public interface VvProductPropertyValueDao extends BaseMapper<VvProductPropertyV
|
||||
|
||||
|
||||
@OrderBy(VvProductPropertyValueEntity.defalut_sort)
|
||||
List<VvProductPropertyValueEntity> selectVvProductPropertyValueByProductIdPropertyId(Long productId, Long propertyId);
|
||||
List<VvProductPropertyValueEntity> selectVvProductPropertyValueByProductIdPropertyId(Long productPropertyId);
|
||||
|
||||
|
||||
int deleteVvProductPropertyValueRealById(Long id);
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
package com.heyu.api.data.dao.vv;
|
||||
/**
|
||||
* <p>
|
||||
* 属性表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
*/
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.heyu.api.data.entity.vv.VvPropertyEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lz.mybatis.plugin.annotations.IN;
|
||||
import com.lz.mybatis.plugin.annotations.LIKE;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface VvPropertyDao extends BaseMapper<VvPropertyEntity> {
|
||||
|
||||
|
||||
VvPropertyEntity selectVvPropertyById(@Param("id")Long id);
|
||||
|
||||
|
||||
Long insertVvProperty(VvPropertyEntity vvProperty);
|
||||
|
||||
|
||||
Long insertOrUpdateVvProperty(VvPropertyEntity vvProperty);
|
||||
|
||||
|
||||
int updateVvPropertyById(VvPropertyEntity vvProperty);
|
||||
|
||||
|
||||
int updateCoverVvPropertyById(VvPropertyEntity vvProperty);
|
||||
|
||||
|
||||
int deleteVvPropertyById(@Param("id")Long id);
|
||||
|
||||
|
||||
|
||||
List<VvPropertyEntity> selectVvProperByCondition(IPage page, @LIKE String propertyName,@LIKE String categoryName, Long categoryId);
|
||||
|
||||
List<VvPropertyEntity> selectVvPropertyByIds(@IN List<Long> id);
|
||||
}
|
||||
@ -1,48 +0,0 @@
|
||||
package com.heyu.api.data.dao.vv;
|
||||
/**
|
||||
* <p>
|
||||
* 属性值表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
*/
|
||||
import com.heyu.api.data.entity.vv.VvPropertyEntity;
|
||||
import com.heyu.api.data.entity.vv.VvPropertyValueEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lz.mybatis.plugin.annotations.IN;
|
||||
import com.lz.mybatis.plugin.annotations.OrderBy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface VvPropertyValueDao extends BaseMapper<VvPropertyValueEntity> {
|
||||
|
||||
|
||||
VvPropertyValueEntity selectVvPropertyValueById(@Param("id")Long id);
|
||||
|
||||
|
||||
Long insertVvPropertyValue(VvPropertyValueEntity vvPropertyValue);
|
||||
|
||||
|
||||
Long insertOrUpdateVvPropertyValue(VvPropertyValueEntity vvPropertyValue);
|
||||
|
||||
|
||||
int updateVvPropertyValueById(VvPropertyValueEntity vvPropertyValue);
|
||||
|
||||
|
||||
int updateCoverVvPropertyValueById(VvPropertyValueEntity vvPropertyValue);
|
||||
|
||||
|
||||
int deleteVvPropertyValueById(@Param("id")Long id);
|
||||
|
||||
|
||||
@OrderBy(VvPropertyValueEntity.default_sort)
|
||||
List<VvPropertyValueEntity> selectVvPropertyValueByPropertyId(Long propertyId);
|
||||
|
||||
|
||||
|
||||
List<VvPropertyValueEntity> selectVvPropertyValueByIds(@IN List<Long> id);
|
||||
}
|
||||
@ -10,7 +10,6 @@ package com.heyu.api.data.dao.vv;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.heyu.api.data.entity.vv.VvSkuEntity;
|
||||
import com.lz.mybatis.plugin.annotations.OrderBy;
|
||||
import com.lz.mybatis.plugin.annotations.Realy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@ -39,7 +38,6 @@ public interface VvSkuDao extends BaseMapper<VvSkuEntity> {
|
||||
int deleteVvSkuById(@Param("id")Long id);
|
||||
|
||||
|
||||
@OrderBy(VvSkuEntity.default_sort)
|
||||
List<VvSkuEntity> selectVvSkuByProductId(Long productId);
|
||||
|
||||
@Realy
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package com.heyu.api.data.dto.vv;
|
||||
|
||||
import com.heyu.api.data.entity.vv.VvCategoryPropertyEntity;
|
||||
import com.heyu.api.data.entity.vv.VvCategoryPropertyValueEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class VvCategoryPropertyDTO extends VvCategoryPropertyEntity {
|
||||
|
||||
private List<VvCategoryPropertyValueEntity> vvPropertyValueList;
|
||||
}
|
||||
@ -0,0 +1,11 @@
|
||||
package com.heyu.api.data.dto.vv;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class VvCopyProductRequest {
|
||||
|
||||
private Long productId;
|
||||
|
||||
}
|
||||
@ -1,14 +0,0 @@
|
||||
package com.heyu.api.data.dto.vv;
|
||||
|
||||
import com.heyu.api.data.entity.vv.VvPropertyEntity;
|
||||
import com.heyu.api.data.entity.vv.VvPropertyValueEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class VvPropertyDTO extends VvPropertyEntity {
|
||||
|
||||
private List<VvPropertyValueEntity> vvPropertyValueList;
|
||||
}
|
||||
@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*类目和sku的对应关系
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
* @since 2025-08-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -21,13 +21,14 @@ private static final long serialVersionUID = 1L;
|
||||
public final static String CLASS_NAME ="com.heyu.api.data.entity.vv.VvCategoryPropertyEntity:";
|
||||
|
||||
public final static String all = CLASS_NAME + "*";
|
||||
public final static String id_ = CLASS_NAME + "id"; //
|
||||
public final static String is_delete = CLASS_NAME + "is_delete"; // 是否删除:0 否 1 删除
|
||||
public final static String create_time = CLASS_NAME + "create_time"; // 创建时间
|
||||
public final static String modify_time = CLASS_NAME + "modify_time"; // 修改时间
|
||||
public final static String category_id = CLASS_NAME + "category_id"; // 类目id
|
||||
public final static String level_ = CLASS_NAME + "level"; // 层级
|
||||
public final static String property_id = CLASS_NAME + "property_id"; // 属性id
|
||||
public final static String id_ = CLASS_NAME + "id"; //
|
||||
public final static String is_delete = CLASS_NAME + "is_delete"; // 是否删除:0 否 1 删除
|
||||
public final static String create_time = CLASS_NAME + "create_time"; // 创建时间
|
||||
public final static String modify_time = CLASS_NAME + "modify_time"; // 修改时间
|
||||
public final static String category_id = CLASS_NAME + "category_id"; // 类目id
|
||||
public final static String category_name = CLASS_NAME + "category_name"; // 类目名称
|
||||
public final static String category_property_name = CLASS_NAME + "category_property_name"; // 属性名称
|
||||
public final static String default_sort = CLASS_NAME + "default_sort"; // 排序
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@ -39,10 +40,12 @@ private static final long serialVersionUID = 1L;
|
||||
private Date modifyTime;
|
||||
//类目id
|
||||
private Long categoryId;
|
||||
//层级
|
||||
private Integer level;
|
||||
//属性id
|
||||
private Long propertyId;
|
||||
//类目名称
|
||||
private String categoryName;
|
||||
//属性名称
|
||||
private String categoryPropertyName;
|
||||
//排序
|
||||
private Integer defaultSort;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -119,33 +122,48 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
/**
|
||||
* 层级
|
||||
* 类目名称
|
||||
* @return
|
||||
*/
|
||||
public Integer getLevel() {
|
||||
return level;
|
||||
public String getCategoryName() {
|
||||
return categoryName;
|
||||
}
|
||||
/**
|
||||
* 层级
|
||||
* @param level
|
||||
* 类目名称
|
||||
* @param categoryName
|
||||
*/
|
||||
public void setLevel(Integer level) {
|
||||
this.level = level;
|
||||
public void setCategoryName(String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性id
|
||||
* 属性名称
|
||||
* @return
|
||||
*/
|
||||
public Long getPropertyId() {
|
||||
return propertyId;
|
||||
public String getCategoryPropertyName() {
|
||||
return categoryPropertyName;
|
||||
}
|
||||
/**
|
||||
* 属性id
|
||||
* @param propertyId
|
||||
* 属性名称
|
||||
* @param categoryPropertyName
|
||||
*/
|
||||
public void setPropertyId(Long propertyId) {
|
||||
this.propertyId = propertyId;
|
||||
public void setCategoryPropertyName(String categoryPropertyName) {
|
||||
this.categoryPropertyName = categoryPropertyName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 排序
|
||||
* @return
|
||||
*/
|
||||
public Integer getDefaultSort() {
|
||||
return defaultSort;
|
||||
}
|
||||
/**
|
||||
* 排序
|
||||
* @param defaultSort
|
||||
*/
|
||||
public void setDefaultSort(Integer defaultSort) {
|
||||
this.defaultSort = defaultSort;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -156,8 +174,9 @@ private static final long serialVersionUID = 1L;
|
||||
",createTime=" + createTime +
|
||||
",modifyTime=" + modifyTime +
|
||||
",categoryId=" + categoryId +
|
||||
",level=" + level +
|
||||
",propertyId=" + propertyId +
|
||||
",categoryName=" + categoryName +
|
||||
",categoryPropertyName=" + categoryPropertyName +
|
||||
",defaultSort=" + defaultSort +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -10,24 +10,24 @@ import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*属性值表
|
||||
* @author quyixiao
|
||||
* @since 2025-08-21
|
||||
* @since 2025-08-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("vv_property_value")
|
||||
public class VvPropertyValueEntity implements java.io.Serializable {
|
||||
@TableName("vv_category_property_value")
|
||||
public class VvCategoryPropertyValueEntity implements java.io.Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public final static String CLASS_NAME ="com.heyu.api.data.entity.vv.VvPropertyValueEntity:";
|
||||
public final static String CLASS_NAME ="com.heyu.api.data.entity.vv.VvCategoryPropertyValueEntity:";
|
||||
|
||||
public final static String all = CLASS_NAME + "*";
|
||||
public final static String id_ = CLASS_NAME + "id"; //
|
||||
public final static String is_delete = CLASS_NAME + "is_delete"; // 是否删除:0 否 1 删除
|
||||
public final static String create_time = CLASS_NAME + "create_time"; // 创建时间
|
||||
public final static String modify_time = CLASS_NAME + "modify_time"; // 修改时间
|
||||
public final static String value_ = CLASS_NAME + "value"; // 具体的属性
|
||||
public final static String default_sort = CLASS_NAME + "default_sort"; // 排序
|
||||
public final static String property_id = CLASS_NAME + "property_id"; // 属性id
|
||||
public final static String id_ = CLASS_NAME + "id"; //
|
||||
public final static String is_delete = CLASS_NAME + "is_delete"; // 是否删除:0 否 1 删除
|
||||
public final static String create_time = CLASS_NAME + "create_time"; // 创建时间
|
||||
public final static String modify_time = CLASS_NAME + "modify_time"; // 修改时间
|
||||
public final static String category_property_id = CLASS_NAME + "category_property_id"; // 属性id
|
||||
public final static String category_property_value = CLASS_NAME + "category_property_value"; // 具体的属性
|
||||
public final static String default_sort = CLASS_NAME + "default_sort"; // 排序
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@ -37,12 +37,12 @@ private static final long serialVersionUID = 1L;
|
||||
private Date createTime;
|
||||
//修改时间
|
||||
private Date modifyTime;
|
||||
//属性id
|
||||
private Long categoryPropertyId;
|
||||
//具体的属性
|
||||
private String value;
|
||||
private String categoryPropertyValue;
|
||||
//排序
|
||||
private Integer defaultSort;
|
||||
//属性id
|
||||
private Long propertyId;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -103,19 +103,34 @@ private static final long serialVersionUID = 1L;
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性id
|
||||
* @return
|
||||
*/
|
||||
public Long getCategoryPropertyId() {
|
||||
return categoryPropertyId;
|
||||
}
|
||||
/**
|
||||
* 属性id
|
||||
* @param categoryPropertyId
|
||||
*/
|
||||
public void setCategoryPropertyId(Long categoryPropertyId) {
|
||||
this.categoryPropertyId = categoryPropertyId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 具体的属性
|
||||
* @return
|
||||
*/
|
||||
public String getValue() {
|
||||
return value;
|
||||
public String getCategoryPropertyValue() {
|
||||
return categoryPropertyValue;
|
||||
}
|
||||
/**
|
||||
* 具体的属性
|
||||
* @param value
|
||||
* @param categoryPropertyValue
|
||||
*/
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
public void setCategoryPropertyValue(String categoryPropertyValue) {
|
||||
this.categoryPropertyValue = categoryPropertyValue;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -133,31 +148,16 @@ private static final long serialVersionUID = 1L;
|
||||
this.defaultSort = defaultSort;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性id
|
||||
* @return
|
||||
*/
|
||||
public Long getPropertyId() {
|
||||
return propertyId;
|
||||
}
|
||||
/**
|
||||
* 属性id
|
||||
* @param propertyId
|
||||
*/
|
||||
public void setPropertyId(Long propertyId) {
|
||||
this.propertyId = propertyId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvPropertyValueEntity{" +
|
||||
return "VvCategoryPropertyValueEntity{" +
|
||||
",id=" + id +
|
||||
",isDelete=" + isDelete +
|
||||
",createTime=" + createTime +
|
||||
",modifyTime=" + modifyTime +
|
||||
",value=" + value +
|
||||
",categoryPropertyId=" + categoryPropertyId +
|
||||
",categoryPropertyValue=" + categoryPropertyValue +
|
||||
",defaultSort=" + defaultSort +
|
||||
",propertyId=" + propertyId +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*sku 与属性的对应关系
|
||||
* @author quyixiao
|
||||
* @since 2025-08-23
|
||||
* @since 2025-08-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -21,16 +21,13 @@ private static final long serialVersionUID = 1L;
|
||||
public final static String CLASS_NAME ="com.heyu.api.data.entity.vv.VvProductPropertyEntity:";
|
||||
|
||||
public final static String all = CLASS_NAME + "*";
|
||||
public final static String id_ = CLASS_NAME + "id"; //
|
||||
public final static String is_delete = CLASS_NAME + "is_delete"; // 是否删除:0 否 1 删除
|
||||
public final static String create_time = CLASS_NAME + "create_time"; // 创建时间
|
||||
public final static String modify_time = CLASS_NAME + "modify_time"; // 修改时间
|
||||
public final static String property_id = CLASS_NAME + "property_id"; // 属性id
|
||||
public final static String category_id = CLASS_NAME + "category_id"; // 类目id
|
||||
public final static String property_name = CLASS_NAME + "property_name"; // 属性名称
|
||||
public final static String category_name = CLASS_NAME + "category_name"; // 类目名称
|
||||
public final static String defalut_sort = CLASS_NAME + "defalut_sort"; // 默认排序
|
||||
public final static String product_id = CLASS_NAME + "product_id"; // 商品id
|
||||
public final static String id_ = CLASS_NAME + "id"; //
|
||||
public final static String is_delete = CLASS_NAME + "is_delete"; // 是否删除:0 否 1 删除
|
||||
public final static String create_time = CLASS_NAME + "create_time"; // 创建时间
|
||||
public final static String modify_time = CLASS_NAME + "modify_time"; // 修改时间
|
||||
public final static String product_id = CLASS_NAME + "product_id"; // 商品id
|
||||
public final static String product_property_name = CLASS_NAME + "product_property_name"; // 属性名称
|
||||
public final static String defalut_sort = CLASS_NAME + "defalut_sort"; // 默认排序
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@ -40,18 +37,12 @@ private static final long serialVersionUID = 1L;
|
||||
private Date createTime;
|
||||
//修改时间
|
||||
private Date modifyTime;
|
||||
//属性id
|
||||
private Long propertyId;
|
||||
//类目id
|
||||
private Long categoryId;
|
||||
//属性名称
|
||||
private String propertyName;
|
||||
//类目名称
|
||||
private String categoryName;
|
||||
//默认排序
|
||||
private Integer defalutSort;
|
||||
//商品id
|
||||
private Long productId;
|
||||
//属性名称
|
||||
private String productPropertyName;
|
||||
//默认排序
|
||||
private Integer defalutSort;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -113,63 +104,33 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性id
|
||||
* 商品id
|
||||
* @return
|
||||
*/
|
||||
public Long getPropertyId() {
|
||||
return propertyId;
|
||||
public Long getProductId() {
|
||||
return productId;
|
||||
}
|
||||
/**
|
||||
* 属性id
|
||||
* @param propertyId
|
||||
* 商品id
|
||||
* @param productId
|
||||
*/
|
||||
public void setPropertyId(Long propertyId) {
|
||||
this.propertyId = propertyId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类目id
|
||||
* @return
|
||||
*/
|
||||
public Long getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
/**
|
||||
* 类目id
|
||||
* @param categoryId
|
||||
*/
|
||||
public void setCategoryId(Long categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
public void setProductId(Long productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性名称
|
||||
* @return
|
||||
*/
|
||||
public String getPropertyName() {
|
||||
return propertyName;
|
||||
public String getProductPropertyName() {
|
||||
return productPropertyName;
|
||||
}
|
||||
/**
|
||||
* 属性名称
|
||||
* @param propertyName
|
||||
* @param productPropertyName
|
||||
*/
|
||||
public void setPropertyName(String propertyName) {
|
||||
this.propertyName = propertyName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类目名称
|
||||
* @return
|
||||
*/
|
||||
public String getCategoryName() {
|
||||
return categoryName;
|
||||
}
|
||||
/**
|
||||
* 类目名称
|
||||
* @param categoryName
|
||||
*/
|
||||
public void setCategoryName(String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
public void setProductPropertyName(String productPropertyName) {
|
||||
this.productPropertyName = productPropertyName;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -187,21 +148,6 @@ private static final long serialVersionUID = 1L;
|
||||
this.defalutSort = defalutSort;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
* @return
|
||||
*/
|
||||
public Long getProductId() {
|
||||
return productId;
|
||||
}
|
||||
/**
|
||||
* 商品id
|
||||
* @param productId
|
||||
*/
|
||||
public void setProductId(Long productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvProductPropertyEntity{" +
|
||||
@ -209,12 +155,9 @@ private static final long serialVersionUID = 1L;
|
||||
",isDelete=" + isDelete +
|
||||
",createTime=" + createTime +
|
||||
",modifyTime=" + modifyTime +
|
||||
",propertyId=" + propertyId +
|
||||
",categoryId=" + categoryId +
|
||||
",propertyName=" + propertyName +
|
||||
",categoryName=" + categoryName +
|
||||
",defalutSort=" + defalutSort +
|
||||
",productId=" + productId +
|
||||
",productPropertyName=" + productPropertyName +
|
||||
",defalutSort=" + defalutSort +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*sku 与属性的对应关系
|
||||
* @author quyixiao
|
||||
* @since 2025-08-22
|
||||
* @since 2025-08-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -21,16 +21,15 @@ private static final long serialVersionUID = 1L;
|
||||
public final static String CLASS_NAME ="com.heyu.api.data.entity.vv.VvProductPropertyValueEntity:";
|
||||
|
||||
public final static String all = CLASS_NAME + "*";
|
||||
public final static String id_ = CLASS_NAME + "id"; //
|
||||
public final static String is_delete = CLASS_NAME + "is_delete"; // 是否删除:0 否 1 删除
|
||||
public final static String create_time = CLASS_NAME + "create_time"; // 创建时间
|
||||
public final static String modify_time = CLASS_NAME + "modify_time"; // 修改时间
|
||||
public final static String product_id = CLASS_NAME + "product_id"; // skuid
|
||||
public final static String property_name = CLASS_NAME + "property_name"; // 属性名称
|
||||
public final static String property_value = CLASS_NAME + "property_value"; // 属性id
|
||||
public final static String defalut_sort = CLASS_NAME + "defalut_sort"; // 默认排序
|
||||
public final static String property_id = CLASS_NAME + "property_id"; // 属性id
|
||||
public final static String product_property_id = CLASS_NAME + "product_property_id"; // 商品属性id
|
||||
public final static String id_ = CLASS_NAME + "id"; //
|
||||
public final static String is_delete = CLASS_NAME + "is_delete"; // 是否删除:0 否 1 删除
|
||||
public final static String create_time = CLASS_NAME + "create_time"; // 创建时间
|
||||
public final static String modify_time = CLASS_NAME + "modify_time"; // 修改时间
|
||||
public final static String product_id = CLASS_NAME + "product_id"; // skuid
|
||||
public final static String product_property_name = CLASS_NAME + "product_property_name"; // 属性名称
|
||||
public final static String product_property_value = CLASS_NAME + "product_property_value"; // 属性id
|
||||
public final static String product_property_id = CLASS_NAME + "product_property_id"; // 商品属性id
|
||||
public final static String defalut_sort = CLASS_NAME + "defalut_sort"; // 默认排序
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@ -43,15 +42,13 @@ private static final long serialVersionUID = 1L;
|
||||
//skuid
|
||||
private Long productId;
|
||||
//属性名称
|
||||
private String propertyName;
|
||||
private String productPropertyName;
|
||||
//属性id
|
||||
private String propertyValue;
|
||||
//默认排序
|
||||
private Integer defalutSort;
|
||||
//属性id
|
||||
private Long propertyId;
|
||||
private String productPropertyValue;
|
||||
//商品属性id
|
||||
private Long productPropertyId;
|
||||
//默认排序
|
||||
private Integer defalutSort;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -131,60 +128,30 @@ private static final long serialVersionUID = 1L;
|
||||
* 属性名称
|
||||
* @return
|
||||
*/
|
||||
public String getPropertyName() {
|
||||
return propertyName;
|
||||
public String getProductPropertyName() {
|
||||
return productPropertyName;
|
||||
}
|
||||
/**
|
||||
* 属性名称
|
||||
* @param propertyName
|
||||
* @param productPropertyName
|
||||
*/
|
||||
public void setPropertyName(String propertyName) {
|
||||
this.propertyName = propertyName;
|
||||
public void setProductPropertyName(String productPropertyName) {
|
||||
this.productPropertyName = productPropertyName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性id
|
||||
* @return
|
||||
*/
|
||||
public String getPropertyValue() {
|
||||
return propertyValue;
|
||||
public String getProductPropertyValue() {
|
||||
return productPropertyValue;
|
||||
}
|
||||
/**
|
||||
* 属性id
|
||||
* @param propertyValue
|
||||
* @param productPropertyValue
|
||||
*/
|
||||
public void setPropertyValue(String propertyValue) {
|
||||
this.propertyValue = propertyValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认排序
|
||||
* @return
|
||||
*/
|
||||
public Integer getDefalutSort() {
|
||||
return defalutSort;
|
||||
}
|
||||
/**
|
||||
* 默认排序
|
||||
* @param defalutSort
|
||||
*/
|
||||
public void setDefalutSort(Integer defalutSort) {
|
||||
this.defalutSort = defalutSort;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性id
|
||||
* @return
|
||||
*/
|
||||
public Long getPropertyId() {
|
||||
return propertyId;
|
||||
}
|
||||
/**
|
||||
* 属性id
|
||||
* @param propertyId
|
||||
*/
|
||||
public void setPropertyId(Long propertyId) {
|
||||
this.propertyId = propertyId;
|
||||
public void setProductPropertyValue(String productPropertyValue) {
|
||||
this.productPropertyValue = productPropertyValue;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -202,6 +169,21 @@ private static final long serialVersionUID = 1L;
|
||||
this.productPropertyId = productPropertyId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认排序
|
||||
* @return
|
||||
*/
|
||||
public Integer getDefalutSort() {
|
||||
return defalutSort;
|
||||
}
|
||||
/**
|
||||
* 默认排序
|
||||
* @param defalutSort
|
||||
*/
|
||||
public void setDefalutSort(Integer defalutSort) {
|
||||
this.defalutSort = defalutSort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvProductPropertyValueEntity{" +
|
||||
@ -210,11 +192,10 @@ private static final long serialVersionUID = 1L;
|
||||
",createTime=" + createTime +
|
||||
",modifyTime=" + modifyTime +
|
||||
",productId=" + productId +
|
||||
",propertyName=" + propertyName +
|
||||
",propertyValue=" + propertyValue +
|
||||
",defalutSort=" + defalutSort +
|
||||
",propertyId=" + propertyId +
|
||||
",productPropertyName=" + productPropertyName +
|
||||
",productPropertyValue=" + productPropertyValue +
|
||||
",productPropertyId=" + productPropertyId +
|
||||
",defalutSort=" + defalutSort +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -1,182 +0,0 @@
|
||||
package com.heyu.api.data.entity.vv;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import com.lz.mybatis.plugin.annotations.AS;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*属性表
|
||||
* @author quyixiao
|
||||
* @since 2025-08-21
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("vv_property")
|
||||
public class VvPropertyEntity implements java.io.Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public final static String CLASS_NAME ="com.heyu.api.data.entity.vv.VvPropertyEntity:";
|
||||
|
||||
public final static String all = CLASS_NAME + "*";
|
||||
public final static String id_ = CLASS_NAME + "id"; //
|
||||
public final static String is_delete = CLASS_NAME + "is_delete"; // 是否删除:0 否 1 删除
|
||||
public final static String create_time = CLASS_NAME + "create_time"; // 创建时间
|
||||
public final static String modify_time = CLASS_NAME + "modify_time"; // 修改时间
|
||||
public final static String property_name = CLASS_NAME + "property_name"; // 属性名
|
||||
public final static String default_sort = CLASS_NAME + "default_sort"; // 默认排序
|
||||
public final static String category_id = CLASS_NAME + "category_id"; // 类目id
|
||||
public final static String category_name = CLASS_NAME + "category_name"; // 类目id
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
//是否删除:0 否 1 删除
|
||||
private Integer isDelete;
|
||||
//创建时间
|
||||
private Date createTime;
|
||||
//修改时间
|
||||
private Date modifyTime;
|
||||
//属性名
|
||||
private String propertyName;
|
||||
//默认排序
|
||||
private Integer defaultSort;
|
||||
//类目id
|
||||
private Long categoryId;
|
||||
//类目id
|
||||
private Integer categoryName;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
/**
|
||||
*
|
||||
* @param id
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否删除:0 否 1 删除
|
||||
* @return
|
||||
*/
|
||||
public Integer getIsDelete() {
|
||||
return isDelete;
|
||||
}
|
||||
/**
|
||||
* 是否删除:0 否 1 删除
|
||||
* @param isDelete
|
||||
*/
|
||||
public void setIsDelete(Integer isDelete) {
|
||||
this.isDelete = isDelete;
|
||||
}
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
* @return
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
/**
|
||||
* 创建时间
|
||||
* @param createTime
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
* @return
|
||||
*/
|
||||
public Date getModifyTime() {
|
||||
return modifyTime;
|
||||
}
|
||||
/**
|
||||
* 修改时间
|
||||
* @param modifyTime
|
||||
*/
|
||||
public void setModifyTime(Date modifyTime) {
|
||||
this.modifyTime = modifyTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性名
|
||||
* @return
|
||||
*/
|
||||
public String getPropertyName() {
|
||||
return propertyName;
|
||||
}
|
||||
/**
|
||||
* 属性名
|
||||
* @param propertyName
|
||||
*/
|
||||
public void setPropertyName(String propertyName) {
|
||||
this.propertyName = propertyName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认排序
|
||||
* @return
|
||||
*/
|
||||
public Integer getDefaultSort() {
|
||||
return defaultSort;
|
||||
}
|
||||
/**
|
||||
* 默认排序
|
||||
* @param defaultSort
|
||||
*/
|
||||
public void setDefaultSort(Integer defaultSort) {
|
||||
this.defaultSort = defaultSort;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类目id
|
||||
* @return
|
||||
*/
|
||||
public Long getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
/**
|
||||
* 类目id
|
||||
* @param categoryId
|
||||
*/
|
||||
public void setCategoryId(Long categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类目id
|
||||
* @return
|
||||
*/
|
||||
public Integer getCategoryName() {
|
||||
return categoryName;
|
||||
}
|
||||
/**
|
||||
* 类目id
|
||||
* @param categoryName
|
||||
*/
|
||||
public void setCategoryName(Integer categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvPropertyEntity{" +
|
||||
",id=" + id +
|
||||
",isDelete=" + isDelete +
|
||||
",createTime=" + createTime +
|
||||
",modifyTime=" + modifyTime +
|
||||
",propertyName=" + propertyName +
|
||||
",defaultSort=" + defaultSort +
|
||||
",categoryId=" + categoryId +
|
||||
",categoryName=" + categoryName +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*sku详描
|
||||
* @author quyixiao
|
||||
* @since 2025-08-22
|
||||
* @since 2025-08-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -28,7 +28,6 @@ private static final long serialVersionUID = 1L;
|
||||
public final static String image_url = CLASS_NAME + "image_url"; // 图片url
|
||||
public final static String sale_price = CLASS_NAME + "sale_price"; // 销售价
|
||||
public final static String origin_price = CLASS_NAME + "origin_price"; // 原价
|
||||
public final static String default_sort = CLASS_NAME + "default_sort"; // 排序
|
||||
public final static String product_id = CLASS_NAME + "product_id"; // 商品id
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
@ -45,8 +44,6 @@ private static final long serialVersionUID = 1L;
|
||||
private BigDecimal salePrice;
|
||||
//原价
|
||||
private BigDecimal originPrice;
|
||||
//排序
|
||||
private Integer defaultSort;
|
||||
//商品id
|
||||
private Long productId;
|
||||
/**
|
||||
@ -154,21 +151,6 @@ private static final long serialVersionUID = 1L;
|
||||
this.originPrice = originPrice;
|
||||
}
|
||||
|
||||
/**
|
||||
* 排序
|
||||
* @return
|
||||
*/
|
||||
public Integer getDefaultSort() {
|
||||
return defaultSort;
|
||||
}
|
||||
/**
|
||||
* 排序
|
||||
* @param defaultSort
|
||||
*/
|
||||
public void setDefaultSort(Integer defaultSort) {
|
||||
this.defaultSort = defaultSort;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
* @return
|
||||
@ -194,7 +176,6 @@ private static final long serialVersionUID = 1L;
|
||||
",imageUrl=" + imageUrl +
|
||||
",salePrice=" + salePrice +
|
||||
",originPrice=" + originPrice +
|
||||
",defaultSort=" + defaultSort +
|
||||
",productId=" + productId +
|
||||
"}";
|
||||
}
|
||||
|
||||
@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*sku 的属性值表
|
||||
* @author quyixiao
|
||||
* @since 2025-08-21
|
||||
* @since 2025-08-24
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -25,13 +25,10 @@ private static final long serialVersionUID = 1L;
|
||||
public final static String is_delete = CLASS_NAME + "is_delete"; // 是否删除:0 否 1 删除
|
||||
public final static String create_time = CLASS_NAME + "create_time"; // 创建时间
|
||||
public final static String modify_time = CLASS_NAME + "modify_time"; // 修改时间
|
||||
public final static String property_id = CLASS_NAME + "property_id"; // 属性id
|
||||
public final static String product_id = CLASS_NAME + "product_id"; // 商品id
|
||||
public final static String sku_id = CLASS_NAME + "sku_id"; // skuid
|
||||
public final static String category_id = CLASS_NAME + "category_id"; // 类目id
|
||||
public final static String property_name = CLASS_NAME + "property_name"; // 属性名称
|
||||
public final static String category_name = CLASS_NAME + "category_name"; // 类目名称
|
||||
public final static String property_value = CLASS_NAME + "property_value"; // sku 属性值表
|
||||
public final static String defalut_sort = CLASS_NAME + "defalut_sort"; // 默认排序
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@ -41,20 +38,14 @@ private static final long serialVersionUID = 1L;
|
||||
private Date createTime;
|
||||
//修改时间
|
||||
private Date modifyTime;
|
||||
//属性id
|
||||
private Long propertyId;
|
||||
//商品id
|
||||
private Long productId;
|
||||
//skuid
|
||||
private Long skuId;
|
||||
//类目id
|
||||
private Long categoryId;
|
||||
//属性名称
|
||||
private String propertyName;
|
||||
//类目名称
|
||||
private String categoryName;
|
||||
//sku 属性值表
|
||||
private String propertyValue;
|
||||
//默认排序
|
||||
private Integer defalutSort;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -116,18 +107,18 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性id
|
||||
* 商品id
|
||||
* @return
|
||||
*/
|
||||
public Long getPropertyId() {
|
||||
return propertyId;
|
||||
public Long getProductId() {
|
||||
return productId;
|
||||
}
|
||||
/**
|
||||
* 属性id
|
||||
* @param propertyId
|
||||
* 商品id
|
||||
* @param productId
|
||||
*/
|
||||
public void setPropertyId(Long propertyId) {
|
||||
this.propertyId = propertyId;
|
||||
public void setProductId(Long productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -145,21 +136,6 @@ private static final long serialVersionUID = 1L;
|
||||
this.skuId = skuId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类目id
|
||||
* @return
|
||||
*/
|
||||
public Long getCategoryId() {
|
||||
return categoryId;
|
||||
}
|
||||
/**
|
||||
* 类目id
|
||||
* @param categoryId
|
||||
*/
|
||||
public void setCategoryId(Long categoryId) {
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性名称
|
||||
* @return
|
||||
@ -175,21 +151,6 @@ private static final long serialVersionUID = 1L;
|
||||
this.propertyName = propertyName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 类目名称
|
||||
* @return
|
||||
*/
|
||||
public String getCategoryName() {
|
||||
return categoryName;
|
||||
}
|
||||
/**
|
||||
* 类目名称
|
||||
* @param categoryName
|
||||
*/
|
||||
public void setCategoryName(String categoryName) {
|
||||
this.categoryName = categoryName;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku 属性值表
|
||||
* @return
|
||||
@ -205,21 +166,6 @@ private static final long serialVersionUID = 1L;
|
||||
this.propertyValue = propertyValue;
|
||||
}
|
||||
|
||||
/**
|
||||
* 默认排序
|
||||
* @return
|
||||
*/
|
||||
public Integer getDefalutSort() {
|
||||
return defalutSort;
|
||||
}
|
||||
/**
|
||||
* 默认排序
|
||||
* @param defalutSort
|
||||
*/
|
||||
public void setDefalutSort(Integer defalutSort) {
|
||||
this.defalutSort = defalutSort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvSkuPropertyValueEntity{" +
|
||||
@ -227,13 +173,10 @@ private static final long serialVersionUID = 1L;
|
||||
",isDelete=" + isDelete +
|
||||
",createTime=" + createTime +
|
||||
",modifyTime=" + modifyTime +
|
||||
",propertyId=" + propertyId +
|
||||
",productId=" + productId +
|
||||
",skuId=" + skuId +
|
||||
",categoryId=" + categoryId +
|
||||
",propertyName=" + propertyName +
|
||||
",categoryName=" + categoryName +
|
||||
",propertyValue=" + propertyValue +
|
||||
",defalutSort=" + defalutSort +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.heyu.api.data.service.impl.vv;
|
||||
/**
|
||||
* <p>
|
||||
* 属性值表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-24
|
||||
*/
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.heyu.api.data.dao.vv.VvCategoryPropertyValueDao;
|
||||
import com.heyu.api.data.entity.vv.VvCategoryPropertyValueEntity;
|
||||
import com.heyu.api.data.service.vv.VvCategoryPropertyValueService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class VvCategoryPropertyValueServiceImpl extends ServiceImpl<VvCategoryPropertyValueDao, VvCategoryPropertyValueEntity> implements VvCategoryPropertyValueService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private VvCategoryPropertyValueDao vvCategoryPropertyValueDao;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public VvCategoryPropertyValueEntity selectVvCategoryPropertyValueById(Long id){
|
||||
return vvCategoryPropertyValueDao.selectVvCategoryPropertyValueById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertVvCategoryPropertyValue(VvCategoryPropertyValueEntity vvCategoryPropertyValue){
|
||||
return vvCategoryPropertyValueDao.insertVvCategoryPropertyValue(vvCategoryPropertyValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertOrUpdateVvCategoryPropertyValue(VvCategoryPropertyValueEntity vvCategoryPropertyValue){
|
||||
return vvCategoryPropertyValueDao.insertOrUpdateVvCategoryPropertyValue(vvCategoryPropertyValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateVvCategoryPropertyValueById(VvCategoryPropertyValueEntity vvCategoryPropertyValue){
|
||||
return vvCategoryPropertyValueDao.updateVvCategoryPropertyValueById(vvCategoryPropertyValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateCoverVvCategoryPropertyValueById(VvCategoryPropertyValueEntity vvCategoryPropertyValue){
|
||||
return vvCategoryPropertyValueDao.updateCoverVvCategoryPropertyValueById(vvCategoryPropertyValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteVvCategoryPropertyValueById(Long id){
|
||||
return vvCategoryPropertyValueDao.deleteVvCategoryPropertyValueById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
package com.heyu.api.data.service.impl.vv;
|
||||
/**
|
||||
* <p>
|
||||
* 属性表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
*/
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.heyu.api.data.dao.vv.VvPropertyDao;
|
||||
import com.heyu.api.data.entity.vv.VvPropertyEntity;
|
||||
import com.heyu.api.data.service.vv.VvPropertyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class VvPropertyServiceImpl extends ServiceImpl<VvPropertyDao, VvPropertyEntity> implements VvPropertyService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private VvPropertyDao vvPropertyDao;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public VvPropertyEntity selectVvPropertyById(Long id){
|
||||
return vvPropertyDao.selectVvPropertyById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertVvProperty(VvPropertyEntity vvProperty){
|
||||
return vvPropertyDao.insertVvProperty(vvProperty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertOrUpdateVvProperty(VvPropertyEntity vvProperty){
|
||||
return vvPropertyDao.insertOrUpdateVvProperty(vvProperty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateVvPropertyById(VvPropertyEntity vvProperty){
|
||||
return vvPropertyDao.updateVvPropertyById(vvProperty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateCoverVvPropertyById(VvPropertyEntity vvProperty){
|
||||
return vvPropertyDao.updateCoverVvPropertyById(vvProperty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteVvPropertyById(Long id){
|
||||
return vvPropertyDao.deleteVvPropertyById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
package com.heyu.api.data.service.impl.vv;
|
||||
/**
|
||||
* <p>
|
||||
* 属性值表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
*/
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.heyu.api.data.dao.vv.VvPropertyValueDao;
|
||||
import com.heyu.api.data.entity.vv.VvPropertyValueEntity;
|
||||
import com.heyu.api.data.service.vv.VvPropertyValueService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class VvPropertyValueServiceImpl extends ServiceImpl<VvPropertyValueDao, VvPropertyValueEntity> implements VvPropertyValueService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private VvPropertyValueDao vvPropertyValueDao;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public VvPropertyValueEntity selectVvPropertyValueById(Long id){
|
||||
return vvPropertyValueDao.selectVvPropertyValueById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertVvPropertyValue(VvPropertyValueEntity vvPropertyValue){
|
||||
return vvPropertyValueDao.insertVvPropertyValue(vvPropertyValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertOrUpdateVvPropertyValue(VvPropertyValueEntity vvPropertyValue){
|
||||
return vvPropertyValueDao.insertOrUpdateVvPropertyValue(vvPropertyValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateVvPropertyValueById(VvPropertyValueEntity vvPropertyValue){
|
||||
return vvPropertyValueDao.updateVvPropertyValueById(vvPropertyValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateCoverVvPropertyValueById(VvPropertyValueEntity vvPropertyValue){
|
||||
return vvPropertyValueDao.updateCoverVvPropertyValueById(vvPropertyValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteVvPropertyValueById(Long id){
|
||||
return vvPropertyValueDao.deleteVvPropertyValueById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.heyu.api.data.service.vv;
|
||||
/**
|
||||
* <p>
|
||||
* 属性值表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-24
|
||||
*/
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.heyu.api.data.entity.vv.VvCategoryPropertyValueEntity;
|
||||
public interface VvCategoryPropertyValueService extends IService<VvCategoryPropertyValueEntity> {
|
||||
|
||||
|
||||
|
||||
VvCategoryPropertyValueEntity selectVvCategoryPropertyValueById(Long id);
|
||||
|
||||
|
||||
Long insertVvCategoryPropertyValue(VvCategoryPropertyValueEntity vvCategoryPropertyValue);
|
||||
|
||||
|
||||
Long insertOrUpdateVvCategoryPropertyValue(VvCategoryPropertyValueEntity vvCategoryPropertyValue);
|
||||
|
||||
|
||||
int updateVvCategoryPropertyValueById(VvCategoryPropertyValueEntity vvCategoryPropertyValue);
|
||||
|
||||
|
||||
int updateCoverVvCategoryPropertyValueById(VvCategoryPropertyValueEntity vvCategoryPropertyValue);
|
||||
|
||||
|
||||
int deleteVvCategoryPropertyValueById(Long id);
|
||||
|
||||
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
package com.heyu.api.data.service.vv;
|
||||
/**
|
||||
* <p>
|
||||
* 属性表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
*/
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.heyu.api.data.entity.vv.VvPropertyEntity;
|
||||
public interface VvPropertyService extends IService<VvPropertyEntity> {
|
||||
|
||||
|
||||
|
||||
VvPropertyEntity selectVvPropertyById(Long id);
|
||||
|
||||
|
||||
Long insertVvProperty(VvPropertyEntity vvProperty);
|
||||
|
||||
|
||||
Long insertOrUpdateVvProperty(VvPropertyEntity vvProperty);
|
||||
|
||||
|
||||
int updateVvPropertyById(VvPropertyEntity vvProperty);
|
||||
|
||||
|
||||
int updateCoverVvPropertyById(VvPropertyEntity vvProperty);
|
||||
|
||||
|
||||
int deleteVvPropertyById(Long id);
|
||||
|
||||
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
package com.heyu.api.data.service.vv;
|
||||
/**
|
||||
* <p>
|
||||
* 属性值表 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
*/
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.heyu.api.data.entity.vv.VvPropertyValueEntity;
|
||||
public interface VvPropertyValueService extends IService<VvPropertyValueEntity> {
|
||||
|
||||
|
||||
|
||||
VvPropertyValueEntity selectVvPropertyValueById(Long id);
|
||||
|
||||
|
||||
Long insertVvPropertyValue(VvPropertyValueEntity vvPropertyValue);
|
||||
|
||||
|
||||
Long insertOrUpdateVvPropertyValue(VvPropertyValueEntity vvPropertyValue);
|
||||
|
||||
|
||||
int updateVvPropertyValueById(VvPropertyValueEntity vvPropertyValue);
|
||||
|
||||
|
||||
int updateCoverVvPropertyValueById(VvPropertyValueEntity vvPropertyValue);
|
||||
|
||||
|
||||
int deleteVvPropertyValueById(Long id);
|
||||
|
||||
|
||||
}
|
||||
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.heyu.api.data.dao.vv.VvPropertyDao">
|
||||
<mapper namespace="com.heyu.api.data.dao.vv.VvCategoryPropertyValueDao">
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.heyu.api.data.dao.vv.VvPropertyValueDao">
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -94,9 +94,7 @@ public class MysqlMain_insert {
|
||||
|
||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||
|
||||
list.add(new TablesBean("vv_buyer"));
|
||||
|
||||
|
||||
list.add(new TablesBean("vv_category_property_value"));
|
||||
|
||||
|
||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||
|
||||
@ -49,7 +49,7 @@ public class MysqlMain_update {
|
||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||
|
||||
|
||||
String a = "vv_product_property";
|
||||
String a = "vv_category_property,vv_category_property_value";
|
||||
for (String s : a.split(",")) {
|
||||
list.add(new TablesBean(s));
|
||||
}
|
||||
|
||||
@ -4,9 +4,9 @@ package com.heyu.api.alibaba.request.mm;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class VvPropertyIndexSortRequest {
|
||||
public class VvCategoryPropertyIndexSortRequest {
|
||||
|
||||
private Long propertyId;
|
||||
private Long categoryPropertyId;
|
||||
|
||||
|
||||
|
||||
@ -4,9 +4,9 @@ package com.heyu.api.alibaba.request.mm;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class VvPropertyIndexValueSortRequest {
|
||||
public class VvCategoryPropertyIndexValueSortRequest {
|
||||
|
||||
private Long propertyValueId;
|
||||
private Long categoryPropertyValueId;
|
||||
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ package com.heyu.api.alibaba.request.mm;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class VvPropesrtyRequest {
|
||||
public class VvCategoryPropertyRequest {
|
||||
|
||||
private Integer pageNum;
|
||||
|
||||
@ -9,6 +9,6 @@ import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class VvPropertySortRequest {
|
||||
private List<Long> propertyIds;
|
||||
public class VvCategoryPropertySortRequest {
|
||||
private List<Long> categoryPropertyIds;
|
||||
}
|
||||
@ -0,0 +1,13 @@
|
||||
package com.heyu.api.alibaba.request.mm;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class VvCategoryPropertyValueSortRequest {
|
||||
private List<Long> categoryPropertyValueIds;
|
||||
|
||||
|
||||
}
|
||||
@ -1,19 +1,19 @@
|
||||
package com.heyu.api.alibaba.request.mm;
|
||||
|
||||
import com.heyu.api.data.entity.vv.VvPropertyEntity;
|
||||
import com.heyu.api.data.entity.vv.VvPropertyValueEntity;
|
||||
import com.heyu.api.data.entity.vv.VvCategoryPropertyEntity;
|
||||
import com.heyu.api.data.entity.vv.VvCategoryPropertyValueEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class VvPropertyInsertOrUpdateRequest extends VvPropertyEntity {
|
||||
public class VvPropertyInsertOrUpdateRequest extends VvCategoryPropertyEntity {
|
||||
|
||||
|
||||
/***
|
||||
* 属性值列表
|
||||
*/
|
||||
private List<VvPropertyValueEntity> vvPropertyValueList;
|
||||
private List<VvCategoryPropertyValueEntity> vvCategoryPropertyValueEntities;
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,32 +0,0 @@
|
||||
package com.heyu.api.alibaba.request.mm;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class VvPropertyRequest {
|
||||
|
||||
private Integer pageNum;
|
||||
|
||||
|
||||
private Integer pageSize;
|
||||
|
||||
/***
|
||||
* 属性名称
|
||||
*/
|
||||
private String propertyName;
|
||||
|
||||
|
||||
/***
|
||||
* 类目名称
|
||||
*/
|
||||
private String categoryName;
|
||||
|
||||
|
||||
/***
|
||||
* 类目id
|
||||
*/
|
||||
private Long categoryId;
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,13 +0,0 @@
|
||||
package com.heyu.api.alibaba.request.mm;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class VvPropertyValueSortRequest {
|
||||
private List<Long> propertyValueIds;
|
||||
|
||||
|
||||
}
|
||||
@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.heyu.api.alibaba.request.mm.VvProductDetailRequest;
|
||||
import com.heyu.api.alibaba.request.mm.VvProductRequest;
|
||||
import com.heyu.api.data.dao.vv.*;
|
||||
import com.heyu.api.data.dto.vv.VvCopyProductRequest;
|
||||
import com.heyu.api.data.dto.vv.VvProductDTO;
|
||||
import com.heyu.api.data.dto.vv.VvProductPropertyDTO;
|
||||
import com.heyu.api.data.dto.vv.VvSkuDTO;
|
||||
@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@ -52,6 +54,13 @@ public class ProductController {
|
||||
private VvProductPropertyValueDao vvProductPropertyValueDao;
|
||||
|
||||
|
||||
@Autowired
|
||||
private VvCategoryPropertyDao vvCategoryPropertyDao;
|
||||
|
||||
|
||||
@Autowired
|
||||
private VvCategoryPropertyValueDao vvCategoryPropertyValueDao;
|
||||
|
||||
/***
|
||||
* 列表
|
||||
* http://localhost:8888/mm/product/list
|
||||
@ -104,12 +113,18 @@ public class ProductController {
|
||||
vvProductDTO.setVvProductDetailList(productDetailEntities);
|
||||
|
||||
List<VvSkuEntity> vvSkuEntities = vvSkuDao.selectVvSkuByProductId(vvProductDetailRequest.getProductId());
|
||||
|
||||
List<VvSkuDTO> vvSkuDTOS = new ArrayList<>();
|
||||
for (VvSkuEntity vvSkuEntity : vvSkuEntities) {
|
||||
|
||||
VvSkuDTO vvSkuDTO = new VvSkuDTO();
|
||||
|
||||
BeanUtils.copyProperties(vvSkuEntity, vvSkuDTO);
|
||||
|
||||
List<VvSkuPropertyValueEntity> vvSkuPropertyValueEntities = vvSkuPropertyValueDao.selectVvSkuPropertyValueBySkuId(vvSkuEntity.getId());
|
||||
|
||||
vvSkuDTO.setVvSkuPropertyValueList(vvSkuPropertyValueEntities);
|
||||
|
||||
vvSkuDTOS.add(vvSkuDTO);
|
||||
}
|
||||
|
||||
@ -125,21 +140,152 @@ public class ProductController {
|
||||
|
||||
BeanUtils.copyProperties(vvProductPropertyEntity, vvProductPropertyDTO);
|
||||
|
||||
List<VvProductPropertyValueEntity> productPropertyValues = vvProductPropertyValueDao.selectVvProductPropertyValueByProductIdPropertyId(vvProductDetailRequest.getProductId(), vvProductPropertyEntity.getId());
|
||||
List<VvProductPropertyValueEntity> productPropertyValues = vvProductPropertyValueDao.selectVvProductPropertyValueByProductIdPropertyId(vvProductPropertyEntity.getId());
|
||||
|
||||
vvProductPropertyDTO.setVvProductPropertyValueList(productPropertyValues);
|
||||
|
||||
vvProductPropertyDTOS.add(vvProductPropertyDTO);
|
||||
}
|
||||
|
||||
vvProductDTO.setVvProductPropertyList(vvProductPropertyDTOS);
|
||||
return R.ok().setData(vvProductDTO);
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/copy")
|
||||
public R copy(@RequestBody VvCopyProductRequest vvCopyProductRequest) {
|
||||
|
||||
Long productId = vvCopyProductRequest.getProductId();
|
||||
|
||||
VvProductEntity vvProduct = vvProductDao.selectVvProductById(vvCopyProductRequest.getProductId());
|
||||
vvProduct.setId(null);
|
||||
|
||||
vvProductDao.insertOrUpdateVvProduct(vvProduct);
|
||||
|
||||
|
||||
List<VvProductDetailEntity> productDetailEntities = vvProductDetailDao.selectVvProductDetailByProductId(productId);
|
||||
|
||||
|
||||
for (VvProductDetailEntity productDetailEntity : productDetailEntities) {
|
||||
productDetailEntity.setProductId(vvProduct.getId());
|
||||
productDetailEntity.setId(null);
|
||||
vvProductDetailDao.insertOrUpdateVvProductDetail(productDetailEntity);
|
||||
}
|
||||
|
||||
List<VvProductPropertyEntity> vvProductPropertyEntities = vvProductPropertyDao.selectVvProductPropertyByProductId(productId);
|
||||
for (VvProductPropertyEntity productPropertyEntity : vvProductPropertyEntities) {
|
||||
Long productPropertyId = productPropertyEntity.getId();
|
||||
productPropertyEntity.setId(null);
|
||||
productPropertyEntity.setProductId(vvProduct.getId());
|
||||
vvProductPropertyDao.insertVvProductProperty(productPropertyEntity);
|
||||
List<VvProductPropertyValueEntity> productPropertyValues = vvProductPropertyValueDao.selectVvProductPropertyValueByProductIdPropertyId(productPropertyId);
|
||||
for (VvProductPropertyValueEntity productPropertyValue : productPropertyValues) {
|
||||
productPropertyValue.setProductId(vvProduct.getId());
|
||||
productPropertyValue.setId(null);
|
||||
productPropertyValue.setProductPropertyId(productPropertyEntity.getId());
|
||||
vvProductPropertyValueDao.insertVvProductPropertyValue(productPropertyValue);
|
||||
}
|
||||
}
|
||||
|
||||
List<VvSkuEntity> vvSkuEntities = vvSkuDao.selectVvSkuByProductId(productId);
|
||||
for (VvSkuEntity vvSkuEntity : vvSkuEntities) {
|
||||
Long skuId = vvSkuEntity.getId();
|
||||
vvSkuEntity.setId(null);
|
||||
vvSkuEntity.setProductId(vvProduct.getId());
|
||||
vvSkuDao.insertOrUpdateVvSku(vvSkuEntity);
|
||||
List<VvSkuPropertyValueEntity> vvSkuPropertyValueEntities = vvSkuPropertyValueDao.selectVvSkuPropertyValueBySkuId(skuId);
|
||||
for (VvSkuPropertyValueEntity vvSkuPropertyValueEntity : vvSkuPropertyValueEntities) {
|
||||
vvSkuPropertyValueEntity.setId(null);
|
||||
vvSkuPropertyValueEntity.setSkuId(vvSkuEntity.getId());
|
||||
vvSkuPropertyValueEntity.setProductId(vvProduct.getId());
|
||||
vvSkuPropertyValueDao.insertOrUpdateVvSkuPropertyValue(vvSkuPropertyValueEntity);
|
||||
}
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@RequestMapping("/test/save")
|
||||
public R save(@RequestBody VvProductDTO vvProductDTO) {
|
||||
VvProductEntity vvProduct = vvProductDao.selectVvProductById(3L);
|
||||
|
||||
|
||||
VvCategoryPropertyEntity vvPropertyEntity1 = vvCategoryPropertyDao.selectVvCategoryPropertyById(1L);
|
||||
|
||||
VvCategoryPropertyEntity vvPropertyEntity2 = vvCategoryPropertyDao.selectVvCategoryPropertyById(2L);
|
||||
|
||||
VvCategoryPropertyEntity vvPropertyEntity3 = vvCategoryPropertyDao.selectVvCategoryPropertyById(3L);
|
||||
|
||||
|
||||
List<VvCategoryPropertyValueEntity> vvPropertyValueEntityList1 = vvCategoryPropertyValueDao.selectVvPropertyValueByPropertyId(vvPropertyEntity1.getId());
|
||||
List<VvCategoryPropertyValueEntity> vvPropertyValueEntityList2 = vvCategoryPropertyValueDao.selectVvPropertyValueByPropertyId(vvPropertyEntity2.getId());
|
||||
List<VvCategoryPropertyValueEntity> vvPropertyValueEntityList3 = vvCategoryPropertyValueDao.selectVvPropertyValueByPropertyId(vvPropertyEntity3.getId());
|
||||
|
||||
|
||||
int i = 1;
|
||||
for (VvCategoryPropertyValueEntity vvPropertyValue1 : vvPropertyValueEntityList1) {
|
||||
|
||||
for (VvCategoryPropertyValueEntity vvPropertyValue2 : vvPropertyValueEntityList2) {
|
||||
|
||||
for (VvCategoryPropertyValueEntity vvPropertyValue3 : vvPropertyValueEntityList3) {
|
||||
|
||||
VvSkuEntity vvSkuEntity = new VvSkuEntity();
|
||||
|
||||
vvSkuEntity.setProductId(vvProduct.getId());
|
||||
vvSkuEntity.setImageUrl("ioewoieiw");
|
||||
vvSkuEntity.setSalePrice(new BigDecimal(i));
|
||||
vvSkuEntity.setOriginPrice(new BigDecimal(i));
|
||||
|
||||
|
||||
vvSkuDao.insertOrUpdateVvSku(vvSkuEntity);
|
||||
|
||||
VvSkuPropertyValueEntity vvSkuPropertyValueEntity1 = new VvSkuPropertyValueEntity();
|
||||
|
||||
|
||||
vvSkuPropertyValueEntity1.setSkuId(vvSkuEntity.getId());
|
||||
|
||||
vvSkuPropertyValueEntity1.setPropertyName(vvPropertyEntity1.getCategoryPropertyName());
|
||||
|
||||
vvSkuPropertyValueEntity1.setPropertyValue(vvPropertyValue1.getCategoryPropertyValue());
|
||||
|
||||
vvSkuPropertyValueEntity1.setProductId(vvProduct.getId());
|
||||
|
||||
VvSkuPropertyValueEntity vvSkuPropertyValueEntity2 = new VvSkuPropertyValueEntity();
|
||||
|
||||
|
||||
vvSkuPropertyValueEntity2.setSkuId(vvSkuEntity.getId());
|
||||
|
||||
vvSkuPropertyValueEntity2.setPropertyName(vvPropertyEntity2.getCategoryPropertyName());
|
||||
|
||||
vvSkuPropertyValueEntity2.setPropertyValue(vvPropertyValue2.getCategoryPropertyValue());
|
||||
|
||||
vvSkuPropertyValueEntity2.setProductId(vvProduct.getId());
|
||||
|
||||
|
||||
VvSkuPropertyValueEntity vvSkuPropertyValueEntity3 = new VvSkuPropertyValueEntity();
|
||||
|
||||
|
||||
vvSkuPropertyValueEntity3.setSkuId(vvSkuEntity.getId());
|
||||
|
||||
vvSkuPropertyValueEntity3.setPropertyName(vvPropertyEntity3.getCategoryPropertyName());
|
||||
|
||||
vvSkuPropertyValueEntity3.setPropertyValue(vvPropertyValue3.getCategoryPropertyValue());
|
||||
|
||||
vvSkuPropertyValueEntity3.setProductId(vvProduct.getId());
|
||||
|
||||
|
||||
vvSkuPropertyValueDao.insertVvSkuPropertyValue(vvSkuPropertyValueEntity1);
|
||||
vvSkuPropertyValueDao.insertVvSkuPropertyValue(vvSkuPropertyValueEntity2);
|
||||
vvSkuPropertyValueDao.insertVvSkuPropertyValue(vvSkuPropertyValueEntity3);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/insertOrUpadate")
|
||||
public R insertOrUpadate(@RequestBody VvProductDTO vvProductDTO) {
|
||||
|
||||
Long productId = vvProductDTO.getId() == null ? -1L : vvProductDTO.getId();
|
||||
|
||||
vvProductDao.insertOrUpdateVvProduct(vvProductDTO);
|
||||
@ -158,17 +304,16 @@ public class ProductController {
|
||||
vvProductDetailDao.deleteVvProductDetailRealById(productDetailEntity.getId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 传过来的
|
||||
*/
|
||||
for (VvProductDetailEntity vvProductDetailEntity : vvProductDTO.getVvProductDetailList()) {
|
||||
vvProductDetailDao.insertOrUpdateVvProductDetail(vvProductDetailEntity);
|
||||
}
|
||||
|
||||
List<VvSkuDTO> vvSkuDTOS = vvProductDTO.getVvSkuList();
|
||||
|
||||
List<VvSkuEntity> vvSkuEntities = vvSkuDao.selectVvSkuByProductId(productId);
|
||||
|
||||
for (VvSkuEntity vvSkuEntity : vvSkuEntities) {
|
||||
boolean flag = true;
|
||||
for (VvSkuDTO vvSkuDTO : vvSkuDTOS) {
|
||||
@ -228,13 +373,12 @@ public class ProductController {
|
||||
vvProductPropertyValueDao.deleteVvProductPropertyValueRealByProductPropertyId(vvProductPropertyDb.getId());
|
||||
}
|
||||
}
|
||||
|
||||
for (VvProductPropertyDTO vvProductPropertyDTO : vvProductPropertyDTOS) {
|
||||
Long productPropertyId = vvProductPropertyDTO.getId();
|
||||
vvProductPropertyDao.insertOrUpdateVvProductProperty(vvProductPropertyDTO);
|
||||
List<VvProductPropertyValueEntity> vvProductPropertyValueEntities = vvProductPropertyDTO.getVvProductPropertyValueList();
|
||||
if (productPropertyId != null) {
|
||||
List<VvProductPropertyValueEntity> productPropertyValueDb = vvProductPropertyValueDao.selectVvProductPropertyValueByProductIdPropertyId(productId, productPropertyId);
|
||||
List<VvProductPropertyValueEntity> productPropertyValueDb = vvProductPropertyValueDao.selectVvProductPropertyValueByProductIdPropertyId(productPropertyId);
|
||||
for (VvProductPropertyValueEntity vvProductPropertyValueEntity : productPropertyValueDb) {
|
||||
boolean flag = true;
|
||||
for (VvProductPropertyValueEntity productPropertyValueEntity : vvProductPropertyValueEntities) {
|
||||
|
||||
@ -3,11 +3,11 @@ package com.heyu.api.controller.mm;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.heyu.api.alibaba.request.mm.*;
|
||||
import com.heyu.api.data.dao.vv.VvPropertyDao;
|
||||
import com.heyu.api.data.dao.vv.VvPropertyValueDao;
|
||||
import com.heyu.api.data.dto.vv.VvPropertyDTO;
|
||||
import com.heyu.api.data.entity.vv.VvPropertyEntity;
|
||||
import com.heyu.api.data.entity.vv.VvPropertyValueEntity;
|
||||
import com.heyu.api.data.dao.vv.VvCategoryPropertyDao;
|
||||
import com.heyu.api.data.dao.vv.VvCategoryPropertyValueDao;
|
||||
import com.heyu.api.data.dto.vv.VvCategoryPropertyDTO;
|
||||
import com.heyu.api.data.entity.vv.VvCategoryPropertyEntity;
|
||||
import com.heyu.api.data.entity.vv.VvCategoryPropertyValueEntity;
|
||||
import com.heyu.api.data.utils.R;
|
||||
import com.heyu.api.utils.ISelect;
|
||||
import com.heyu.api.utils.PPageUtils;
|
||||
@ -27,38 +27,34 @@ import java.util.List;
|
||||
public class PropertyController {
|
||||
|
||||
@Autowired
|
||||
private VvPropertyDao vvPropertyDao;
|
||||
private VvCategoryPropertyDao vvCategoryPropertyDao;
|
||||
|
||||
|
||||
@Autowired
|
||||
private VvPropertyValueDao vvPropertyValueDao;
|
||||
private VvCategoryPropertyValueDao vvCategoryPropertyValueDao;
|
||||
|
||||
|
||||
/***
|
||||
* 列表
|
||||
*/
|
||||
@RequestMapping("/list")
|
||||
public R list(VvPropesrtyRequest vvPropertyRequest) {
|
||||
PPageUtils pageUtils = PPageUtils.startPage(vvPropertyRequest.getPageNum(), vvPropertyRequest.getPageSize())
|
||||
.doSelect(new ISelect() {
|
||||
@Override
|
||||
public List doSelect(IPage page) {
|
||||
return vvPropertyDao.selectVvProperByCondition(page,
|
||||
vvPropertyRequest.getPropertyName(),
|
||||
vvPropertyRequest.getCategoryName(),
|
||||
vvPropertyRequest.getCategoryId()
|
||||
);
|
||||
public R list(VvCategoryPropertyRequest vvPropertyRequest) {
|
||||
|
||||
}
|
||||
});
|
||||
PPageUtils pageUtils = PPageUtils.startPage(vvPropertyRequest.getPageNum(), vvPropertyRequest.getPageSize()).doSelect(new ISelect() {
|
||||
@Override
|
||||
public List doSelect(IPage page) {
|
||||
return vvCategoryPropertyDao.selectVvProperByCondition(page, vvPropertyRequest.getPropertyName(), vvPropertyRequest.getCategoryName(), vvPropertyRequest.getCategoryId());
|
||||
|
||||
List<VvPropertyEntity> vvPropertyEntities = pageUtils.getRows();
|
||||
}
|
||||
});
|
||||
|
||||
List<VvPropertyDTO> vvPropertyDTOS = new ArrayList<>();
|
||||
for (VvPropertyEntity vvPropertyEntity : vvPropertyEntities) {
|
||||
VvPropertyDTO vvPropertyDTO = new VvPropertyDTO();
|
||||
List<VvCategoryPropertyEntity> vvPropertyEntities = pageUtils.getRows();
|
||||
|
||||
List<VvCategoryPropertyDTO> vvPropertyDTOS = new ArrayList<>();
|
||||
for (VvCategoryPropertyEntity vvPropertyEntity : vvPropertyEntities) {
|
||||
VvCategoryPropertyDTO vvPropertyDTO = new VvCategoryPropertyDTO();
|
||||
BeanUtils.copyProperties(vvPropertyEntity, vvPropertyDTO);
|
||||
List<VvPropertyValueEntity> vvPropertyValueEntityList = vvPropertyValueDao.selectVvPropertyValueByPropertyId(vvPropertyEntity.getId());
|
||||
List<VvCategoryPropertyValueEntity> vvPropertyValueEntityList = vvCategoryPropertyValueDao.selectVvPropertyValueByPropertyId(vvPropertyEntity.getId());
|
||||
vvPropertyDTO.setVvPropertyValueList(vvPropertyValueEntityList);
|
||||
vvPropertyDTOS.add(vvPropertyDTO);
|
||||
}
|
||||
@ -75,12 +71,15 @@ public class PropertyController {
|
||||
*/
|
||||
@RequestMapping("/insertOrUpdate")
|
||||
public R insert(VvPropertyInsertOrUpdateRequest vvPropertyInsertOrUpdateRequest) {
|
||||
VvPropertyEntity vvPropertyEntity = new VvPropertyEntity();
|
||||
|
||||
VvCategoryPropertyEntity vvPropertyEntity = new VvCategoryPropertyEntity();
|
||||
|
||||
BeanUtils.copyProperties(vvPropertyInsertOrUpdateRequest, vvPropertyEntity);
|
||||
vvPropertyDao.insertOrUpdateVvProperty(vvPropertyEntity);
|
||||
if (CollectionUtils.isNotEmpty(vvPropertyInsertOrUpdateRequest.getVvPropertyValueList())) {
|
||||
for (VvPropertyValueEntity vvPropertyValueEntity : vvPropertyInsertOrUpdateRequest.getVvPropertyValueList()) {
|
||||
vvPropertyValueDao.insertOrUpdateVvPropertyValue(vvPropertyValueEntity);
|
||||
vvCategoryPropertyDao.insertOrUpdateVvCategoryProperty(vvPropertyEntity);
|
||||
|
||||
if (CollectionUtils.isNotEmpty(vvPropertyInsertOrUpdateRequest.getVvCategoryPropertyValueEntities())) {
|
||||
for (VvCategoryPropertyValueEntity vvPropertyValueEntity : vvPropertyInsertOrUpdateRequest.getVvCategoryPropertyValueEntities()) {
|
||||
vvCategoryPropertyValueDao.insertOrUpdateVvCategoryPropertyValue(vvPropertyValueEntity);
|
||||
}
|
||||
}
|
||||
return R.ok().setData("保存成功");
|
||||
@ -90,11 +89,11 @@ public class PropertyController {
|
||||
* 排序
|
||||
*/
|
||||
@RequestMapping("/sort")
|
||||
public R sort(VvPropertySortRequest vvPropertySortRequest) {
|
||||
List<VvPropertyEntity> propertyEntities = vvPropertyDao.selectVvPropertyByIds(vvPropertySortRequest.getPropertyIds());
|
||||
for (VvPropertyEntity propertyEntity : propertyEntities) {
|
||||
propertyEntity.setDefaultSort(vvPropertySortRequest.getPropertyIds().indexOf(propertyEntity.getId()) + 1);
|
||||
vvPropertyDao.updateVvPropertyById(propertyEntity);
|
||||
public R sort(VvCategoryPropertySortRequest vvPropertySortRequest) {
|
||||
List<VvCategoryPropertyEntity> propertyEntities = vvCategoryPropertyDao.selectVvPropertyByIds(vvPropertySortRequest.getCategoryPropertyIds());
|
||||
for (VvCategoryPropertyEntity propertyEntity : propertyEntities) {
|
||||
propertyEntity.setDefaultSort(vvPropertySortRequest.getCategoryPropertyIds().indexOf(propertyEntity.getId()) + 1);
|
||||
vvCategoryPropertyDao.insertOrUpdateVvCategoryProperty(propertyEntity);
|
||||
}
|
||||
return R.ok().setData("保存成功");
|
||||
}
|
||||
@ -104,13 +103,12 @@ public class PropertyController {
|
||||
* 排序
|
||||
*/
|
||||
@RequestMapping("/value/sort")
|
||||
public R sortValue(VvPropertyValueSortRequest vvPropertyValueSortRequest) {
|
||||
List<VvPropertyValueEntity> propertyEntities = vvPropertyValueDao.selectVvPropertyValueByIds(vvPropertyValueSortRequest.getPropertyValueIds());
|
||||
for (VvPropertyValueEntity propertyEntity : propertyEntities) {
|
||||
propertyEntity.setDefaultSort(vvPropertyValueSortRequest.getPropertyValueIds().indexOf(propertyEntity.getId()) + 1);
|
||||
vvPropertyValueDao.updateVvPropertyValueById(propertyEntity);
|
||||
public R sortValue(VvCategoryPropertyValueSortRequest vvPropertyValueSortRequest) {
|
||||
List<VvCategoryPropertyValueEntity> propertyEntities = vvCategoryPropertyValueDao.selectVvPropertyValueByIds(vvPropertyValueSortRequest.getCategoryPropertyValueIds());
|
||||
for (VvCategoryPropertyValueEntity propertyEntity : propertyEntities) {
|
||||
propertyEntity.setDefaultSort(vvPropertyValueSortRequest.getCategoryPropertyValueIds().indexOf(propertyEntity.getId()) + 1);
|
||||
vvCategoryPropertyValueDao.insertOrUpdateVvCategoryPropertyValue(propertyEntity);
|
||||
}
|
||||
|
||||
return R.ok().setData("保存成功");
|
||||
}
|
||||
|
||||
@ -118,13 +116,10 @@ public class PropertyController {
|
||||
* 排序
|
||||
*/
|
||||
@RequestMapping("/update/sort/index")
|
||||
public R updateSortIndex(VvPropertyIndexSortRequest vvCategorySortRequest) {
|
||||
|
||||
VvPropertyEntity vvPropertyEntity = vvPropertyDao.selectVvPropertyById(vvCategorySortRequest.getPropertyId());
|
||||
public R updateSortIndex(VvCategoryPropertyIndexSortRequest vvCategorySortRequest) {
|
||||
VvCategoryPropertyEntity vvPropertyEntity = vvCategoryPropertyDao.selectVvCategoryPropertyById(vvCategorySortRequest.getCategoryPropertyId());
|
||||
vvPropertyEntity.setDefaultSort(vvCategorySortRequest.getDefaultSort());
|
||||
|
||||
vvPropertyDao.updateVvPropertyById(vvPropertyEntity);
|
||||
|
||||
vvCategoryPropertyDao.insertOrUpdateVvCategoryProperty(vvPropertyEntity);
|
||||
return R.ok().setData("保存成功");
|
||||
}
|
||||
|
||||
@ -133,10 +128,10 @@ public class PropertyController {
|
||||
* 排序
|
||||
*/
|
||||
@RequestMapping("/update/value/sort/index")
|
||||
public R updateSortIndex(VvPropertyIndexValueSortRequest vvCategorySortRequest) {
|
||||
VvPropertyValueEntity vvPropertyValue = vvPropertyValueDao.selectVvPropertyValueById(vvCategorySortRequest.getPropertyValueId());
|
||||
public R updateSortIndex(VvCategoryPropertyIndexValueSortRequest vvCategorySortRequest) {
|
||||
VvCategoryPropertyValueEntity vvPropertyValue = vvCategoryPropertyValueDao.selectVvCategoryPropertyValueById(vvCategorySortRequest.getCategoryPropertyValueId());
|
||||
vvPropertyValue.setDefaultSort(vvCategorySortRequest.getDefaultSort());
|
||||
vvPropertyValueDao.updateVvPropertyValueById(vvPropertyValue);
|
||||
vvCategoryPropertyValueDao.insertOrUpdateVvCategoryPropertyValue(vvPropertyValue);
|
||||
return R.ok().setData("保存成功");
|
||||
}
|
||||
|
||||
|
||||
@ -88,10 +88,15 @@ public class AppIndexPageController {
|
||||
List<VvSkuEntity> vvSkuEntities = vvSkuDao.selectVvSkuByProductId(vvProductDetailRequest.getProductId());
|
||||
List<VvSkuDTO> vvSkuDTOS = new ArrayList<>();
|
||||
for (VvSkuEntity vvSkuEntity : vvSkuEntities) {
|
||||
|
||||
VvSkuDTO vvSkuDTO = new VvSkuDTO();
|
||||
|
||||
BeanUtils.copyProperties(vvSkuEntity, vvSkuDTO);
|
||||
|
||||
List<VvSkuPropertyValueEntity> vvSkuPropertyValueEntities = vvSkuPropertyValueDao.selectVvSkuPropertyValueBySkuId(vvSkuEntity.getId());
|
||||
|
||||
vvSkuDTO.setVvSkuPropertyValueList(vvSkuPropertyValueEntities);
|
||||
|
||||
vvSkuDTOS.add(vvSkuDTO);
|
||||
}
|
||||
|
||||
@ -107,7 +112,7 @@ public class AppIndexPageController {
|
||||
|
||||
BeanUtils.copyProperties(vvProductPropertyEntity, vvProductPropertyDTO);
|
||||
|
||||
List<VvProductPropertyValueEntity> productPropertyValues = vvProductPropertyValueDao.selectVvProductPropertyValueByProductIdPropertyId(vvProductDetailRequest.getProductId(), vvProductPropertyEntity.getId());
|
||||
List<VvProductPropertyValueEntity> productPropertyValues = vvProductPropertyValueDao.selectVvProductPropertyValueByProductIdPropertyId(vvProductPropertyEntity.getId());
|
||||
|
||||
vvProductPropertyDTO.setVvProductPropertyValueList(productPropertyValues);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user