提交修改
This commit is contained in:
parent
701920f202
commit
b699112ec2
@ -9,6 +9,7 @@ package com.heyu.api.data.dao.vv;
|
||||
*/
|
||||
import com.heyu.api.data.entity.vv.VvProductDetailEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.lz.mybatis.plugin.annotations.OrderBy;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -35,6 +36,6 @@ public interface VvProductDetailDao extends BaseMapper<VvProductDetailEntity> {
|
||||
|
||||
int deleteVvProductDetailById(@Param("id")Long id);
|
||||
|
||||
|
||||
@OrderBy(VvProductDetailEntity.default_sort)
|
||||
List<VvProductDetailEntity> selectVvProductDetailByProductId(Long productId);
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.heyu.api.data.dao.vv;
|
||||
/**
|
||||
* <p>
|
||||
* sku 与属性的对应关系 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-22
|
||||
*/
|
||||
import com.heyu.api.data.entity.vv.VvProductPropertyEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
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 VvProductPropertyDao extends BaseMapper<VvProductPropertyEntity> {
|
||||
|
||||
|
||||
VvProductPropertyEntity selectVvProductPropertyById(@Param("id")Long id);
|
||||
|
||||
|
||||
Long insertVvProductProperty(VvProductPropertyEntity vvProductProperty);
|
||||
|
||||
|
||||
Long insertOrUpdateVvProductProperty(VvProductPropertyEntity vvProductProperty);
|
||||
|
||||
|
||||
int updateVvProductPropertyById(VvProductPropertyEntity vvProductProperty);
|
||||
|
||||
|
||||
int updateCoverVvProductPropertyById(VvProductPropertyEntity vvProductProperty);
|
||||
|
||||
|
||||
int deleteVvProductPropertyById(@Param("id")Long id);
|
||||
|
||||
|
||||
@OrderBy(VvProductPropertyEntity.defalut_sort)
|
||||
List<VvProductPropertyEntity> selectVvProductPropertyByProductId(Long productId);
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
package com.heyu.api.data.dao.vv;
|
||||
/**
|
||||
* <p>
|
||||
* sku 与属性的对应关系 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-22
|
||||
*/
|
||||
import com.heyu.api.data.entity.vv.VvProductPropertyValueEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
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 VvProductPropertyValueDao extends BaseMapper<VvProductPropertyValueEntity> {
|
||||
|
||||
|
||||
VvProductPropertyValueEntity selectVvProductPropertyValueById(@Param("id")Long id);
|
||||
|
||||
|
||||
Long insertVvProductPropertyValue(VvProductPropertyValueEntity vvProductPropertyValue);
|
||||
|
||||
|
||||
Long insertOrUpdateVvProductPropertyValue(VvProductPropertyValueEntity vvProductPropertyValue);
|
||||
|
||||
|
||||
int updateVvProductPropertyValueById(VvProductPropertyValueEntity vvProductPropertyValue);
|
||||
|
||||
|
||||
int updateCoverVvProductPropertyValueById(VvProductPropertyValueEntity vvProductPropertyValue);
|
||||
|
||||
|
||||
int deleteVvProductPropertyValueById(@Param("id")Long id);
|
||||
|
||||
|
||||
@OrderBy(VvProductPropertyValueEntity.defalut_sort)
|
||||
List<VvProductPropertyValueEntity> selectVvProductPropertyValueByProductIdPropertyId(Long productId, Long propertyId);
|
||||
}
|
||||
@ -10,6 +10,7 @@ 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 org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -37,6 +38,6 @@ public interface VvSkuDao extends BaseMapper<VvSkuEntity> {
|
||||
int deleteVvSkuById(@Param("id")Long id);
|
||||
|
||||
|
||||
|
||||
@OrderBy(VvSkuEntity.default_sort)
|
||||
List<VvSkuEntity> selectVvSkuByProductId(Long productId);
|
||||
}
|
||||
@ -1,36 +0,0 @@
|
||||
package com.heyu.api.data.dao.vv;
|
||||
/**
|
||||
* <p>
|
||||
* sku 与属性的对应关系 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
*/
|
||||
import com.heyu.api.data.entity.vv.VvSkuPropertyEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
@Mapper
|
||||
public interface VvSkuPropertyDao extends BaseMapper<VvSkuPropertyEntity> {
|
||||
|
||||
|
||||
VvSkuPropertyEntity selectVvSkuPropertyById(@Param("id")Long id);
|
||||
|
||||
|
||||
Long insertVvSkuProperty(VvSkuPropertyEntity vvSkuProperty);
|
||||
|
||||
|
||||
Long insertOrUpdateVvSkuProperty(VvSkuPropertyEntity vvSkuProperty);
|
||||
|
||||
|
||||
int updateVvSkuPropertyById(VvSkuPropertyEntity vvSkuProperty);
|
||||
|
||||
|
||||
int updateCoverVvSkuPropertyById(VvSkuPropertyEntity vvSkuProperty);
|
||||
|
||||
|
||||
int deleteVvSkuPropertyById(@Param("id")Long id);
|
||||
|
||||
|
||||
}
|
||||
@ -11,6 +11,9 @@ import com.heyu.api.data.entity.vv.VvSkuPropertyValueEntity;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface VvSkuPropertyValueDao extends BaseMapper<VvSkuPropertyValueEntity> {
|
||||
|
||||
@ -33,4 +36,5 @@ public interface VvSkuPropertyValueDao extends BaseMapper<VvSkuPropertyValueEnti
|
||||
int deleteVvSkuPropertyValueById(@Param("id")Long id);
|
||||
|
||||
|
||||
List<VvSkuPropertyValueEntity> selectVvSkuPropertyValueBySkuId(Long skuId);
|
||||
}
|
||||
@ -1,23 +1,21 @@
|
||||
package com.heyu.api.data.dto.vv;
|
||||
|
||||
import com.heyu.api.data.entity.vv.VvProductDetailEntity;
|
||||
import com.heyu.api.data.entity.vv.VvPropertyEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
@Data
|
||||
public class VvProductDTO extends VvPropertyEntity {
|
||||
|
||||
|
||||
|
||||
private List<VvProductDetailEntity> vvProductDetailList;
|
||||
|
||||
private List<VvSkuDTO> vvSkuList;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private List<VvProductPropertyDTO> vvProductPropertyList;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,15 @@
|
||||
package com.heyu.api.data.dto.vv;
|
||||
|
||||
import com.heyu.api.data.entity.vv.VvProductPropertyEntity;
|
||||
import com.heyu.api.data.entity.vv.VvProductPropertyValueEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class VvProductPropertyDTO extends VvProductPropertyEntity {
|
||||
|
||||
private List<VvProductPropertyValueEntity> vvProductPropertyValueList;
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.heyu.api.data.dto.vv;
|
||||
|
||||
import com.heyu.api.data.entity.vv.VvSkuEntity;
|
||||
import com.heyu.api.data.entity.vv.VvSkuPropertyValueEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class VvSkuDTO extends VvSkuEntity {
|
||||
|
||||
|
||||
private List<VvSkuPropertyValueEntity> vvSkuPropertyValueList;
|
||||
|
||||
}
|
||||
@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*商品详描
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
* @since 2025-08-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -21,13 +21,14 @@ private static final long serialVersionUID = 1L;
|
||||
public final static String CLASS_NAME ="com.heyu.api.data.entity.vv.VvProductDetailEntity:";
|
||||
|
||||
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 type_ = CLASS_NAME + "type"; // 1 表示图片,2 表示商品详情
|
||||
public final static String detail_ = CLASS_NAME + "detail"; // 具体的值 ,是图片 ,或者详情
|
||||
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 type_ = CLASS_NAME + "type"; // 1 表示图片,2 表示商品详情
|
||||
public final static String detail_ = CLASS_NAME + "detail"; // 具体的值,image ,是图片 ,或者详情
|
||||
public final static String product_id = CLASS_NAME + "product_id"; // 商品id
|
||||
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;
|
||||
//1 表示图片,2 表示商品详情
|
||||
private Integer type;
|
||||
//具体的值 ,是图片 ,或者详情
|
||||
//具体的值,image ,是图片 ,或者详情
|
||||
private String detail;
|
||||
//商品id
|
||||
private Long productId;
|
||||
//排序
|
||||
private Integer defaultSort;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -119,14 +122,14 @@ private static final long serialVersionUID = 1L;
|
||||
}
|
||||
|
||||
/**
|
||||
* 具体的值 ,是图片 ,或者详情
|
||||
* 具体的值,image ,是图片 ,或者详情
|
||||
* @return
|
||||
*/
|
||||
public String getDetail() {
|
||||
return detail;
|
||||
}
|
||||
/**
|
||||
* 具体的值 ,是图片 ,或者详情
|
||||
* 具体的值,image ,是图片 ,或者详情
|
||||
* @param detail
|
||||
*/
|
||||
public void setDetail(String detail) {
|
||||
@ -148,6 +151,21 @@ private static final long serialVersionUID = 1L;
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 排序
|
||||
* @return
|
||||
*/
|
||||
public Integer getDefaultSort() {
|
||||
return defaultSort;
|
||||
}
|
||||
/**
|
||||
* 排序
|
||||
* @param defaultSort
|
||||
*/
|
||||
public void setDefaultSort(Integer defaultSort) {
|
||||
this.defaultSort = defaultSort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvProductDetailEntity{" +
|
||||
@ -158,6 +176,7 @@ private static final long serialVersionUID = 1L;
|
||||
",type=" + type +
|
||||
",detail=" + detail +
|
||||
",productId=" + productId +
|
||||
",defaultSort=" + defaultSort +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -10,15 +10,15 @@ import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*sku 与属性的对应关系
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
* @since 2025-08-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("vv_sku_property")
|
||||
public class VvSkuPropertyEntity implements java.io.Serializable {
|
||||
@TableName("vv_product_property")
|
||||
public class VvProductPropertyEntity implements java.io.Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public final static String CLASS_NAME ="com.heyu.api.data.entity.vv.VvSkuPropertyEntity:";
|
||||
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"; //
|
||||
@ -204,7 +204,7 @@ private static final long serialVersionUID = 1L;
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvSkuPropertyEntity{" +
|
||||
return "VvProductPropertyEntity{" +
|
||||
",id=" + id +
|
||||
",isDelete=" + isDelete +
|
||||
",createTime=" + createTime +
|
||||
@ -0,0 +1,201 @@
|
||||
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;
|
||||
/**
|
||||
*sku 与属性的对应关系
|
||||
* @author quyixiao
|
||||
* @since 2025-08-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
@TableName("vv_product_property_value")
|
||||
public class VvProductPropertyValueEntity implements java.io.Serializable {
|
||||
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
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
//是否删除:0 否 1 删除
|
||||
private Integer isDelete;
|
||||
//创建时间
|
||||
private Date createTime;
|
||||
//修改时间
|
||||
private Date modifyTime;
|
||||
//skuid
|
||||
private Long productId;
|
||||
//属性名称
|
||||
private String propertyName;
|
||||
//属性id
|
||||
private String propertyValue;
|
||||
//默认排序
|
||||
private Integer defalutSort;
|
||||
//属性id
|
||||
private Long propertyId;
|
||||
/**
|
||||
*
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* skuid
|
||||
* @return
|
||||
*/
|
||||
public Long getProductId() {
|
||||
return productId;
|
||||
}
|
||||
/**
|
||||
* skuid
|
||||
* @param productId
|
||||
*/
|
||||
public void setProductId(Long productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性名称
|
||||
* @return
|
||||
*/
|
||||
public String getPropertyName() {
|
||||
return propertyName;
|
||||
}
|
||||
/**
|
||||
* 属性名称
|
||||
* @param propertyName
|
||||
*/
|
||||
public void setPropertyName(String propertyName) {
|
||||
this.propertyName = propertyName;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性id
|
||||
* @return
|
||||
*/
|
||||
public String getPropertyValue() {
|
||||
return propertyValue;
|
||||
}
|
||||
/**
|
||||
* 属性id
|
||||
* @param propertyValue
|
||||
*/
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvProductPropertyValueEntity{" +
|
||||
",id=" + id +
|
||||
",isDelete=" + isDelete +
|
||||
",createTime=" + createTime +
|
||||
",modifyTime=" + modifyTime +
|
||||
",productId=" + productId +
|
||||
",propertyName=" + propertyName +
|
||||
",propertyValue=" + propertyValue +
|
||||
",defalutSort=" + defalutSort +
|
||||
",propertyId=" + propertyId +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -10,7 +10,7 @@ import java.util.Date;import java.util.Date;
|
||||
/**
|
||||
*sku详描
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
* @since 2025-08-22
|
||||
*/
|
||||
|
||||
@Data
|
||||
@ -29,6 +29,7 @@ private static final long serialVersionUID = 1L;
|
||||
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)
|
||||
private Long id;
|
||||
@ -46,6 +47,8 @@ private static final long serialVersionUID = 1L;
|
||||
private BigDecimal originPrice;
|
||||
//排序
|
||||
private Integer defaultSort;
|
||||
//商品id
|
||||
private Long productId;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -166,6 +169,21 @@ private static final long serialVersionUID = 1L;
|
||||
this.defaultSort = defaultSort;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品id
|
||||
* @return
|
||||
*/
|
||||
public Long getProductId() {
|
||||
return productId;
|
||||
}
|
||||
/**
|
||||
* 商品id
|
||||
* @param productId
|
||||
*/
|
||||
public void setProductId(Long productId) {
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "VvSkuEntity{" +
|
||||
@ -177,6 +195,7 @@ private static final long serialVersionUID = 1L;
|
||||
",salePrice=" + salePrice +
|
||||
",originPrice=" + originPrice +
|
||||
",defaultSort=" + defaultSort +
|
||||
",productId=" + productId +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.heyu.api.data.service.impl.vv;
|
||||
/**
|
||||
* <p>
|
||||
* sku 与属性的对应关系 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-22
|
||||
*/
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.heyu.api.data.dao.vv.VvProductPropertyDao;
|
||||
import com.heyu.api.data.entity.vv.VvProductPropertyEntity;
|
||||
import com.heyu.api.data.service.vv.VvProductPropertyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class VvProductPropertyServiceImpl extends ServiceImpl<VvProductPropertyDao, VvProductPropertyEntity> implements VvProductPropertyService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private VvProductPropertyDao vvProductPropertyDao;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public VvProductPropertyEntity selectVvProductPropertyById(Long id){
|
||||
return vvProductPropertyDao.selectVvProductPropertyById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertVvProductProperty(VvProductPropertyEntity vvProductProperty){
|
||||
return vvProductPropertyDao.insertVvProductProperty(vvProductProperty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertOrUpdateVvProductProperty(VvProductPropertyEntity vvProductProperty){
|
||||
return vvProductPropertyDao.insertOrUpdateVvProductProperty(vvProductProperty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateVvProductPropertyById(VvProductPropertyEntity vvProductProperty){
|
||||
return vvProductPropertyDao.updateVvProductPropertyById(vvProductProperty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateCoverVvProductPropertyById(VvProductPropertyEntity vvProductProperty){
|
||||
return vvProductPropertyDao.updateCoverVvProductPropertyById(vvProductProperty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteVvProductPropertyById(Long id){
|
||||
return vvProductPropertyDao.deleteVvProductPropertyById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,68 @@
|
||||
package com.heyu.api.data.service.impl.vv;
|
||||
/**
|
||||
* <p>
|
||||
* sku 与属性的对应关系 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-22
|
||||
*/
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.heyu.api.data.dao.vv.VvProductPropertyValueDao;
|
||||
import com.heyu.api.data.entity.vv.VvProductPropertyValueEntity;
|
||||
import com.heyu.api.data.service.vv.VvProductPropertyValueService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class VvProductPropertyValueServiceImpl extends ServiceImpl<VvProductPropertyValueDao, VvProductPropertyValueEntity> implements VvProductPropertyValueService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private VvProductPropertyValueDao vvProductPropertyValueDao;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public VvProductPropertyValueEntity selectVvProductPropertyValueById(Long id){
|
||||
return vvProductPropertyValueDao.selectVvProductPropertyValueById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertVvProductPropertyValue(VvProductPropertyValueEntity vvProductPropertyValue){
|
||||
return vvProductPropertyValueDao.insertVvProductPropertyValue(vvProductPropertyValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertOrUpdateVvProductPropertyValue(VvProductPropertyValueEntity vvProductPropertyValue){
|
||||
return vvProductPropertyValueDao.insertOrUpdateVvProductPropertyValue(vvProductPropertyValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateVvProductPropertyValueById(VvProductPropertyValueEntity vvProductPropertyValue){
|
||||
return vvProductPropertyValueDao.updateVvProductPropertyValueById(vvProductPropertyValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateCoverVvProductPropertyValueById(VvProductPropertyValueEntity vvProductPropertyValue){
|
||||
return vvProductPropertyValueDao.updateCoverVvProductPropertyValueById(vvProductPropertyValue);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteVvProductPropertyValueById(Long id){
|
||||
return vvProductPropertyValueDao.deleteVvProductPropertyValueById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -1,68 +0,0 @@
|
||||
package com.heyu.api.data.service.impl.vv;
|
||||
/**
|
||||
* <p>
|
||||
* sku 与属性的对应关系 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
*/
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.heyu.api.data.dao.vv.VvSkuPropertyDao;
|
||||
import com.heyu.api.data.entity.vv.VvSkuPropertyEntity;
|
||||
import com.heyu.api.data.service.vv.VvSkuPropertyService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class VvSkuPropertyServiceImpl extends ServiceImpl<VvSkuPropertyDao, VvSkuPropertyEntity> implements VvSkuPropertyService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private VvSkuPropertyDao vvSkuPropertyDao;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public VvSkuPropertyEntity selectVvSkuPropertyById(Long id){
|
||||
return vvSkuPropertyDao.selectVvSkuPropertyById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertVvSkuProperty(VvSkuPropertyEntity vvSkuProperty){
|
||||
return vvSkuPropertyDao.insertVvSkuProperty(vvSkuProperty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public Long insertOrUpdateVvSkuProperty(VvSkuPropertyEntity vvSkuProperty){
|
||||
return vvSkuPropertyDao.insertOrUpdateVvSkuProperty(vvSkuProperty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateVvSkuPropertyById(VvSkuPropertyEntity vvSkuProperty){
|
||||
return vvSkuPropertyDao.updateVvSkuPropertyById(vvSkuProperty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int updateCoverVvSkuPropertyById(VvSkuPropertyEntity vvSkuProperty){
|
||||
return vvSkuPropertyDao.updateCoverVvSkuPropertyById(vvSkuProperty);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int deleteVvSkuPropertyById(Long id){
|
||||
return vvSkuPropertyDao.deleteVvSkuPropertyById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.heyu.api.data.service.vv;
|
||||
/**
|
||||
* <p>
|
||||
* sku 与属性的对应关系 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-22
|
||||
*/
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.heyu.api.data.entity.vv.VvProductPropertyEntity;
|
||||
public interface VvProductPropertyService extends IService<VvProductPropertyEntity> {
|
||||
|
||||
|
||||
|
||||
VvProductPropertyEntity selectVvProductPropertyById(Long id);
|
||||
|
||||
|
||||
Long insertVvProductProperty(VvProductPropertyEntity vvProductProperty);
|
||||
|
||||
|
||||
Long insertOrUpdateVvProductProperty(VvProductPropertyEntity vvProductProperty);
|
||||
|
||||
|
||||
int updateVvProductPropertyById(VvProductPropertyEntity vvProductProperty);
|
||||
|
||||
|
||||
int updateCoverVvProductPropertyById(VvProductPropertyEntity vvProductProperty);
|
||||
|
||||
|
||||
int deleteVvProductPropertyById(Long id);
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,34 @@
|
||||
package com.heyu.api.data.service.vv;
|
||||
/**
|
||||
* <p>
|
||||
* sku 与属性的对应关系 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-22
|
||||
*/
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.heyu.api.data.entity.vv.VvProductPropertyValueEntity;
|
||||
public interface VvProductPropertyValueService extends IService<VvProductPropertyValueEntity> {
|
||||
|
||||
|
||||
|
||||
VvProductPropertyValueEntity selectVvProductPropertyValueById(Long id);
|
||||
|
||||
|
||||
Long insertVvProductPropertyValue(VvProductPropertyValueEntity vvProductPropertyValue);
|
||||
|
||||
|
||||
Long insertOrUpdateVvProductPropertyValue(VvProductPropertyValueEntity vvProductPropertyValue);
|
||||
|
||||
|
||||
int updateVvProductPropertyValueById(VvProductPropertyValueEntity vvProductPropertyValue);
|
||||
|
||||
|
||||
int updateCoverVvProductPropertyValueById(VvProductPropertyValueEntity vvProductPropertyValue);
|
||||
|
||||
|
||||
int deleteVvProductPropertyValueById(Long id);
|
||||
|
||||
|
||||
}
|
||||
@ -1,34 +0,0 @@
|
||||
package com.heyu.api.data.service.vv;
|
||||
/**
|
||||
* <p>
|
||||
* sku 与属性的对应关系 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author quyixiao
|
||||
* @since 2025-08-20
|
||||
*/
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.heyu.api.data.entity.vv.VvSkuPropertyEntity;
|
||||
public interface VvSkuPropertyService extends IService<VvSkuPropertyEntity> {
|
||||
|
||||
|
||||
|
||||
VvSkuPropertyEntity selectVvSkuPropertyById(Long id);
|
||||
|
||||
|
||||
Long insertVvSkuProperty(VvSkuPropertyEntity vvSkuProperty);
|
||||
|
||||
|
||||
Long insertOrUpdateVvSkuProperty(VvSkuPropertyEntity vvSkuProperty);
|
||||
|
||||
|
||||
int updateVvSkuPropertyById(VvSkuPropertyEntity vvSkuProperty);
|
||||
|
||||
|
||||
int updateCoverVvSkuPropertyById(VvSkuPropertyEntity vvSkuProperty);
|
||||
|
||||
|
||||
int deleteVvSkuPropertyById(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.VvSkuPropertyDao">
|
||||
<mapper namespace="com.heyu.api.data.dao.vv.VvProductPropertyDao">
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -0,0 +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.VvProductPropertyValueDao">
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -94,7 +94,7 @@ public class MysqlMain_insert {
|
||||
|
||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||
|
||||
list.add(new TablesBean("vv_sku_property_value"));
|
||||
list.add(new TablesBean("vv_product_property_value"));
|
||||
|
||||
|
||||
List<TablesBean> list2 = new ArrayList<TablesBean>();
|
||||
|
||||
@ -49,17 +49,12 @@ public class MysqlMain_update {
|
||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||
|
||||
|
||||
String a = "vv_product";
|
||||
String a = "vv_product_property_value";
|
||||
for (String s : a.split(",")) {
|
||||
list.add(new TablesBean(s));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Map<String, String> map = MysqlUtil2ShowCreateTable.getComments();
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
TablesBean obj = list.get(i);
|
||||
|
||||
@ -4,13 +4,11 @@ package com.heyu.api.controller.mm;
|
||||
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.VvProductDao;
|
||||
import com.heyu.api.data.dao.vv.VvProductDetailDao;
|
||||
import com.heyu.api.data.dao.vv.VvSkuDao;
|
||||
import com.heyu.api.data.dao.vv.*;
|
||||
import com.heyu.api.data.dto.vv.VvProductDTO;
|
||||
import com.heyu.api.data.entity.vv.VvProductDetailEntity;
|
||||
import com.heyu.api.data.entity.vv.VvProductEntity;
|
||||
import com.heyu.api.data.entity.vv.VvSkuEntity;
|
||||
import com.heyu.api.data.dto.vv.VvProductPropertyDTO;
|
||||
import com.heyu.api.data.dto.vv.VvSkuDTO;
|
||||
import com.heyu.api.data.entity.vv.*;
|
||||
import com.heyu.api.data.utils.R;
|
||||
import com.heyu.api.data.utils.StringUtils;
|
||||
import com.heyu.api.utils.ISelect;
|
||||
@ -21,6 +19,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@Slf4j
|
||||
@ -41,6 +40,18 @@ public class ProductController {
|
||||
private VvSkuDao vvSkuDao;
|
||||
|
||||
|
||||
@Autowired
|
||||
private VvSkuPropertyValueDao vvSkuPropertyValueDao;
|
||||
|
||||
|
||||
@Autowired
|
||||
private VvProductPropertyDao vvProductPropertyDao;
|
||||
|
||||
|
||||
@Autowired
|
||||
private VvProductPropertyValueDao vvProductPropertyValueDao;
|
||||
|
||||
|
||||
/***
|
||||
* 列表
|
||||
*/
|
||||
@ -92,11 +103,43 @@ public class ProductController {
|
||||
|
||||
List<VvProductDetailEntity> productDetailEntities = vvProductDetailDao.selectVvProductDetailByProductId(vvProductDetailRequest.getProductId());
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
vvProductDTO.setVvSkuList(vvSkuDTOS);
|
||||
|
||||
return R.ok();
|
||||
List<VvProductPropertyEntity> vvProductPropertyEntities = vvProductPropertyDao.selectVvProductPropertyByProductId(vvProductDetailRequest.getProductId());
|
||||
|
||||
List<VvProductPropertyDTO> vvProductPropertyDTOS = new ArrayList<>();
|
||||
|
||||
for (VvProductPropertyEntity vvProductPropertyEntity : vvProductPropertyEntities) {
|
||||
|
||||
VvProductPropertyDTO vvProductPropertyDTO = new VvProductPropertyDTO();
|
||||
|
||||
BeanUtils.copyProperties(vvProductPropertyEntity, vvProductPropertyDTO);
|
||||
|
||||
List<VvProductPropertyValueEntity> productPropertyValues = vvProductPropertyValueDao.selectVvProductPropertyValueByProductIdPropertyId(vvProductDetailRequest.getProductId(),vvProductPropertyEntity.getId());
|
||||
|
||||
vvProductPropertyDTO.setVvProductPropertyValueList(productPropertyValues);
|
||||
|
||||
vvProductPropertyDTOS.add(vvProductPropertyDTO);
|
||||
}
|
||||
|
||||
vvProductDTO.setVvProductPropertyList(vvProductPropertyDTOS);
|
||||
|
||||
return R.ok().setData(vvProductDTO);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user