提交修改
This commit is contained in:
parent
9a914668ef
commit
d76546a333
@ -21,14 +21,16 @@ private static final long serialVersionUID = 1L;
|
||||
public final static String CLASS_NAME ="com.heyu.api.data.entity.vv.VvSkuPropertyValueEntity:";
|
||||
|
||||
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"; // 商品id
|
||||
public final static String sku_id = CLASS_NAME + "sku_id"; // skuid
|
||||
public final static String property_name = CLASS_NAME + "property_name"; // 属性名称
|
||||
public final static String property_value = CLASS_NAME + "property_value"; // sku 属性值表
|
||||
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 sku_id = CLASS_NAME + "sku_id"; // skuid
|
||||
public final static String product_property_id = CLASS_NAME + "product_property_id"; // 商品属性id
|
||||
public final static String product_property_value_id = CLASS_NAME + "product_property_value_id"; // 商品属性值id
|
||||
public final static String product_property_name = CLASS_NAME + "product_property_name"; // 属性名称
|
||||
public final static String product_property_value = CLASS_NAME + "product_property_value"; // sku 属性值表
|
||||
//
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
@ -42,10 +44,14 @@ private static final long serialVersionUID = 1L;
|
||||
private Long productId;
|
||||
//skuid
|
||||
private Long skuId;
|
||||
//商品属性id
|
||||
private Long productPropertyId;
|
||||
//商品属性值id
|
||||
private Long productPropertyValueId;
|
||||
//属性名称
|
||||
private String propertyName;
|
||||
private String productPropertyName;
|
||||
//sku 属性值表
|
||||
private String propertyValue;
|
||||
private String productPropertyValue;
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
@ -136,34 +142,64 @@ private static final long serialVersionUID = 1L;
|
||||
this.skuId = skuId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品属性id
|
||||
* @return
|
||||
*/
|
||||
public Long getProductPropertyId() {
|
||||
return productPropertyId;
|
||||
}
|
||||
/**
|
||||
* 商品属性id
|
||||
* @param productPropertyId
|
||||
*/
|
||||
public void setProductPropertyId(Long productPropertyId) {
|
||||
this.productPropertyId = productPropertyId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品属性值id
|
||||
* @return
|
||||
*/
|
||||
public Long getProductPropertyValueId() {
|
||||
return productPropertyValueId;
|
||||
}
|
||||
/**
|
||||
* 商品属性值id
|
||||
* @param productPropertyValueId
|
||||
*/
|
||||
public void setProductPropertyValueId(Long productPropertyValueId) {
|
||||
this.productPropertyValueId = productPropertyValueId;
|
||||
}
|
||||
|
||||
/**
|
||||
* 属性名称
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* sku 属性值表
|
||||
* @return
|
||||
*/
|
||||
public String getPropertyValue() {
|
||||
return propertyValue;
|
||||
public String getProductPropertyValue() {
|
||||
return productPropertyValue;
|
||||
}
|
||||
/**
|
||||
* sku 属性值表
|
||||
* @param propertyValue
|
||||
* @param productPropertyValue
|
||||
*/
|
||||
public void setPropertyValue(String propertyValue) {
|
||||
this.propertyValue = propertyValue;
|
||||
public void setProductPropertyValue(String productPropertyValue) {
|
||||
this.productPropertyValue = productPropertyValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -175,8 +211,10 @@ private static final long serialVersionUID = 1L;
|
||||
",modifyTime=" + modifyTime +
|
||||
",productId=" + productId +
|
||||
",skuId=" + skuId +
|
||||
",propertyName=" + propertyName +
|
||||
",propertyValue=" + propertyValue +
|
||||
",productPropertyId=" + productPropertyId +
|
||||
",productPropertyValueId=" + productPropertyValueId +
|
||||
",productPropertyName=" + productPropertyName +
|
||||
",productPropertyValue=" + productPropertyValue +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
@ -49,7 +49,7 @@ public class MysqlMain_update {
|
||||
List<TablesBean> list = new ArrayList<TablesBean>();
|
||||
|
||||
|
||||
String a = "vv_category_property,vv_category_property_value";
|
||||
String a = "vv_sku_property_value";
|
||||
for (String s : a.split(",")) {
|
||||
list.add(new TablesBean(s));
|
||||
}
|
||||
|
||||
@ -84,10 +84,8 @@ public class CategoryController {
|
||||
*/
|
||||
@RequestMapping("/update/sort/index")
|
||||
public R updateSortIndex(@RequestBody VvCategoryIndexSortRequest vvCategorySortRequest) {
|
||||
|
||||
VvCategoryEntity vvCategory = vvCategoryDao.selectVvCategoryById(vvCategorySortRequest.getCategoryId());
|
||||
vvCategory.setDefaultSort(vvCategorySortRequest.getDefaultSort());
|
||||
|
||||
vvCategoryDao.updateVvCategoryById(vvCategory);
|
||||
return R.ok().setData("保存成功");
|
||||
}
|
||||
|
||||
@ -207,25 +207,24 @@ public class ProductController {
|
||||
public R save(@RequestBody VvProductDTO vvProductDTO) {
|
||||
VvProductEntity vvProduct = vvProductDao.selectVvProductById(3L);
|
||||
|
||||
VvProductPropertyEntity vvProductPropertyEntity1 = vvProductPropertyDao.selectVvProductPropertyById(1L);
|
||||
|
||||
VvCategoryPropertyEntity vvPropertyEntity1 = vvCategoryPropertyDao.selectVvCategoryPropertyById(1L);
|
||||
VvProductPropertyEntity vvProductPropertyEntity2 = vvProductPropertyDao.selectVvProductPropertyById(2L);
|
||||
|
||||
VvCategoryPropertyEntity vvPropertyEntity2 = vvCategoryPropertyDao.selectVvCategoryPropertyById(2L);
|
||||
|
||||
VvCategoryPropertyEntity vvPropertyEntity3 = vvCategoryPropertyDao.selectVvCategoryPropertyById(3L);
|
||||
VvProductPropertyEntity vvProductPropertyEntity3 = vvProductPropertyDao.selectVvProductPropertyById(3L);
|
||||
|
||||
|
||||
List<VvCategoryPropertyValueEntity> vvPropertyValueEntityList1 = vvCategoryPropertyValueDao.selectVvPropertyValueByPropertyId(vvPropertyEntity1.getId());
|
||||
List<VvCategoryPropertyValueEntity> vvPropertyValueEntityList2 = vvCategoryPropertyValueDao.selectVvPropertyValueByPropertyId(vvPropertyEntity2.getId());
|
||||
List<VvCategoryPropertyValueEntity> vvPropertyValueEntityList3 = vvCategoryPropertyValueDao.selectVvPropertyValueByPropertyId(vvPropertyEntity3.getId());
|
||||
List<VvProductPropertyValueEntity> vvProductPropertyValueEntities1 = vvProductPropertyValueDao.selectVvProductPropertyValueByProductIdPropertyId(vvProductPropertyEntity1.getId());
|
||||
List<VvProductPropertyValueEntity> vvProductPropertyValueEntities2 = vvProductPropertyValueDao.selectVvProductPropertyValueByProductIdPropertyId(vvProductPropertyEntity2.getId());
|
||||
List<VvProductPropertyValueEntity> vvProductPropertyValueEntities3 = vvProductPropertyValueDao.selectVvProductPropertyValueByProductIdPropertyId(vvProductPropertyEntity3.getId());
|
||||
|
||||
|
||||
int i = 1;
|
||||
for (VvCategoryPropertyValueEntity vvPropertyValue1 : vvPropertyValueEntityList1) {
|
||||
for (VvProductPropertyValueEntity vvProductPropertyValueEntity1 : vvProductPropertyValueEntities1) {
|
||||
|
||||
for (VvCategoryPropertyValueEntity vvPropertyValue2 : vvPropertyValueEntityList2) {
|
||||
for (VvProductPropertyValueEntity vvProductPropertyValueEntity2 : vvProductPropertyValueEntities2) {
|
||||
|
||||
for (VvCategoryPropertyValueEntity vvPropertyValue3 : vvPropertyValueEntityList3) {
|
||||
for (VvProductPropertyValueEntity vvProductPropertyValueEntity3 : vvProductPropertyValueEntities3) {
|
||||
|
||||
VvSkuEntity vvSkuEntity = new VvSkuEntity();
|
||||
|
||||
@ -239,12 +238,14 @@ public class ProductController {
|
||||
|
||||
VvSkuPropertyValueEntity vvSkuPropertyValueEntity1 = new VvSkuPropertyValueEntity();
|
||||
|
||||
vvSkuPropertyValueEntity1.setProductPropertyId(vvProductPropertyEntity1.getId());
|
||||
vvSkuPropertyValueEntity1.setProductPropertyValueId(vvProductPropertyValueEntity1.getId());
|
||||
|
||||
vvSkuPropertyValueEntity1.setSkuId(vvSkuEntity.getId());
|
||||
|
||||
vvSkuPropertyValueEntity1.setPropertyName(vvPropertyEntity1.getCategoryPropertyName());
|
||||
vvSkuPropertyValueEntity1.setProductPropertyName(vvProductPropertyEntity1.getProductPropertyName());
|
||||
|
||||
vvSkuPropertyValueEntity1.setPropertyValue(vvPropertyValue1.getCategoryPropertyValue());
|
||||
vvSkuPropertyValueEntity1.setProductPropertyValue(vvProductPropertyValueEntity1.getProductPropertyValue());
|
||||
|
||||
vvSkuPropertyValueEntity1.setProductId(vvProduct.getId());
|
||||
|
||||
@ -252,26 +253,28 @@ public class ProductController {
|
||||
|
||||
|
||||
vvSkuPropertyValueEntity2.setSkuId(vvSkuEntity.getId());
|
||||
vvSkuPropertyValueEntity2.setProductPropertyId(vvProductPropertyEntity2.getId());
|
||||
vvSkuPropertyValueEntity2.setProductPropertyValueId(vvProductPropertyValueEntity2.getId());
|
||||
|
||||
vvSkuPropertyValueEntity2.setPropertyName(vvPropertyEntity2.getCategoryPropertyName());
|
||||
vvSkuPropertyValueEntity2.setProductPropertyName(vvProductPropertyEntity2.getProductPropertyName());
|
||||
|
||||
vvSkuPropertyValueEntity2.setPropertyValue(vvPropertyValue2.getCategoryPropertyValue());
|
||||
vvSkuPropertyValueEntity2.setProductPropertyValue(vvProductPropertyValueEntity2.getProductPropertyValue());
|
||||
|
||||
vvSkuPropertyValueEntity2.setProductId(vvProduct.getId());
|
||||
|
||||
|
||||
VvSkuPropertyValueEntity vvSkuPropertyValueEntity3 = new VvSkuPropertyValueEntity();
|
||||
|
||||
|
||||
vvSkuPropertyValueEntity3.setSkuId(vvSkuEntity.getId());
|
||||
vvSkuPropertyValueEntity3.setProductPropertyId(vvProductPropertyEntity3.getId());
|
||||
vvSkuPropertyValueEntity3.setProductPropertyValueId(vvProductPropertyValueEntity3.getId());
|
||||
|
||||
vvSkuPropertyValueEntity3.setPropertyName(vvPropertyEntity3.getCategoryPropertyName());
|
||||
vvSkuPropertyValueEntity3.setProductPropertyName(vvProductPropertyEntity3.getProductPropertyName());
|
||||
|
||||
vvSkuPropertyValueEntity3.setPropertyValue(vvPropertyValue3.getCategoryPropertyValue());
|
||||
vvSkuPropertyValueEntity3.setProductPropertyValue(vvProductPropertyValueEntity3.getProductPropertyValue());
|
||||
|
||||
vvSkuPropertyValueEntity3.setProductId(vvProduct.getId());
|
||||
|
||||
|
||||
vvSkuPropertyValueDao.insertVvSkuPropertyValue(vvSkuPropertyValueEntity1);
|
||||
vvSkuPropertyValueDao.insertVvSkuPropertyValue(vvSkuPropertyValueEntity2);
|
||||
vvSkuPropertyValueDao.insertVvSkuPropertyValue(vvSkuPropertyValueEntity3);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user