品类的增删改查
parent
90bcce03e0
commit
265583c5ac
|
@ -15,7 +15,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 属性与组中间对象 as_attribute_group
|
* 属性与组中间对象 as_attribute_group
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -15,7 +15,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 品牌商品中间对象 as_brand_project
|
* 品牌商品中间对象 as_brand_project
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -16,7 +16,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 品类属性中间对象 as_category_attribute
|
* 品类属性中间对象 as_category_attribute
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author 杨乐
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@ -45,10 +45,10 @@ public class AsCategoryAttribute extends BaseEntity implements CategoryBase {
|
||||||
@ApiModelProperty(name = "属性id", value = "属性id", required = true)
|
@ApiModelProperty(name = "属性id", value = "属性id", required = true)
|
||||||
private Long attributeId;
|
private Long attributeId;
|
||||||
|
|
||||||
public static AsCategoryAttribute categoryBuild(Long groupId, Long categoryInfoId) {
|
public static AsCategoryAttribute categoryBuild(Long categoryInfoId, Long attributeId) {
|
||||||
return AsCategoryAttribute.builder()
|
return AsCategoryAttribute.builder()
|
||||||
.categoryId(categoryInfoId)
|
.categoryId(categoryInfoId)
|
||||||
.attributeId(groupId)
|
.attributeId(attributeId)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,15 @@ public class AsCategoryAttribute extends BaseEntity implements CategoryBase {
|
||||||
.categoryId(attributeId) // 修改此处为 categoryId
|
.categoryId(attributeId) // 修改此处为 categoryId
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static AsCategoryAttribute categoryBuildtwo(Long categoryInfoId, Long attributeId) {
|
||||||
|
return AsCategoryAttribute.builder()
|
||||||
|
.categoryId(categoryInfoId)
|
||||||
|
.attributeId(attributeId)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long getBaseId() {
|
public Long getBaseId() {
|
||||||
return this.attributeId;
|
return this.attributeId;
|
||||||
|
|
|
@ -16,7 +16,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 品类属性组中间对象 as_category_attribute_group
|
* 品类属性组中间对象 as_category_attribute_group
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@ -52,6 +52,12 @@ public class AsCategoryAttributeGroup extends BaseEntity implements CategoryBase
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static AsCategoryAttributeGroup cateBuild(Long categoryId){
|
||||||
|
return AsCategoryAttributeGroup.builder()
|
||||||
|
.attributeGroupId(categoryId)
|
||||||
|
.categoryId(categoryId)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public Long getBaseId() {
|
public Long getBaseId() {
|
||||||
return this.attributeGroupId;
|
return this.attributeGroupId;
|
||||||
|
|
|
@ -16,7 +16,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 品类品牌中间对象 as_category_brand
|
* 品类品牌中间对象 as_category_brand
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@ -44,6 +44,7 @@ public class AsCategoryBrand extends BaseEntity implements CategoryBase {
|
||||||
@Excel(name = "品牌id")
|
@Excel(name = "品牌id")
|
||||||
@ApiModelProperty(name = "品牌id", value = "品牌id", required = true)
|
@ApiModelProperty(name = "品牌id", value = "品牌id", required = true)
|
||||||
private Long brandId;
|
private Long brandId;
|
||||||
|
|
||||||
public static AsCategoryBrand categoryBuild(Long categoryInfoId, Long brandId) {
|
public static AsCategoryBrand categoryBuild(Long categoryInfoId, Long brandId) {
|
||||||
return AsCategoryBrand.builder()
|
return AsCategoryBrand.builder()
|
||||||
.brandId(brandId)
|
.brandId(brandId)
|
||||||
|
@ -51,6 +52,11 @@ public class AsCategoryBrand extends BaseEntity implements CategoryBase {
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static AsCategoryBrand categoryBrand(Long brandId){
|
||||||
|
return AsCategoryBrand.builder()
|
||||||
|
.brandId(brandId)
|
||||||
|
.build();
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public Long getBaseId() {
|
public Long getBaseId() {
|
||||||
return this.brandId;
|
return this.brandId;
|
||||||
|
|
|
@ -18,7 +18,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品属性对象 as_product_attribute_info
|
* 商品属性对象 as_product_attribute_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -20,7 +20,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 属性组对象 attribute_group
|
* 属性组对象 attribute_group
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -21,7 +21,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品属性对象 attribute_info
|
* 商品属性对象 attribute_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -18,7 +18,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 品牌信息对象 brand_info
|
* 品牌信息对象 brand_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -17,11 +17,12 @@ import com.muyu.product.domain.req.CategoryInfoEditReq;
|
||||||
import com.muyu.common.core.web.domain.TreeEntity;
|
import com.muyu.common.core.web.domain.TreeEntity;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 品类信息对象 category_info
|
* 品类信息对象 category_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@ -59,20 +60,6 @@ public class CategoryInfo extends TreeEntity {
|
||||||
@Excel(name = "介绍")
|
@Excel(name = "介绍")
|
||||||
@ApiModelProperty(name = "介绍", value = "介绍")
|
@ApiModelProperty(name = "介绍", value = "介绍")
|
||||||
private String introduction;
|
private String introduction;
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 商品属性组关联ID
|
|
||||||
// */
|
|
||||||
// private List<Long> attributeGroupIdList;
|
|
||||||
// /**
|
|
||||||
// * 商品属性关联ID
|
|
||||||
// */
|
|
||||||
// private List<Long> attributeIdList;
|
|
||||||
//
|
|
||||||
// /**
|
|
||||||
// * 商品品牌组关联ID
|
|
||||||
// */
|
|
||||||
// private List<Long> brandIdList;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -18,7 +18,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品评论对象 comment_info
|
* 商品评论对象 comment_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -18,7 +18,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 评论点赞对象 comment_like_info
|
* 评论点赞对象 comment_like_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -18,7 +18,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品信息对象 project_info
|
* 商品信息对象 project_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -19,7 +19,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品SKU对象 project_sku_info
|
* 商品SKU对象 project_sku_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -22,7 +22,7 @@ import java.util.function.Supplier;
|
||||||
/**
|
/**
|
||||||
* 规格详情对象 rule_attr_info
|
* 规格详情对象 rule_attr_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -24,7 +24,7 @@ import java.util.function.Supplier;
|
||||||
/**
|
/**
|
||||||
* 商品规格对象 rule_info
|
* 商品规格对象 rule_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -1,55 +0,0 @@
|
||||||
package com.muyu.product.domain.model;
|
|
||||||
|
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
|
||||||
import com.muyu.product.domain.AttributeGroup;
|
|
||||||
import com.muyu.product.domain.req.AttributeGroupSaveReq;
|
|
||||||
import lombok.AllArgsConstructor;
|
|
||||||
import lombok.Data;
|
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import lombok.NoArgsConstructor;
|
|
||||||
import lombok.experimental.SuperBuilder;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author DongZl
|
|
||||||
* @description: 属性组添加模型
|
|
||||||
* @Date 2024-2-28 下午 03:16
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
@SuperBuilder
|
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@EqualsAndHashCode(callSuper = true)
|
|
||||||
public class AttributeGroupSaveModel extends BaseEntity {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
|
||||||
|
|
||||||
/** 组名称 */
|
|
||||||
private String name;
|
|
||||||
|
|
||||||
/** 状态 */
|
|
||||||
private String states;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 属性ID集合
|
|
||||||
*/
|
|
||||||
private List<Long> attributeIdList;
|
|
||||||
|
|
||||||
public static AttributeGroupSaveModel saveReqBuild (AttributeGroupSaveReq req){
|
|
||||||
return AttributeGroupSaveModel.builder()
|
|
||||||
.name(req.getName())
|
|
||||||
.states(req.getStates())
|
|
||||||
.attributeIdList(req.getAttributeIdList())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
public AttributeGroup buildAttributeGroup () {
|
|
||||||
return AttributeGroup.builder()
|
|
||||||
.name(this.getName())
|
|
||||||
.states(this.getStates())
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -15,7 +15,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 属性组对象 attribute_group
|
* 属性组对象 attribute_group
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -13,7 +13,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 属性组对象 attribute_group
|
* 属性组对象 attribute_group
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -15,7 +15,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 属性组对象 attribute_group
|
* 属性组对象 attribute_group
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -13,7 +13,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品属性对象 attribute_info
|
* 商品属性对象 attribute_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -13,7 +13,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品属性对象 attribute_info
|
* 商品属性对象 attribute_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -13,7 +13,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品属性对象 attribute_info
|
* 商品属性对象 attribute_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -12,7 +12,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 品牌信息对象 brand_info
|
* 品牌信息对象 brand_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 品牌信息对象 brand_info
|
* 品牌信息对象 brand_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 品牌信息对象 brand_info
|
* 品牌信息对象 brand_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -13,7 +13,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* 品类信息对象 category_info
|
* 品类信息对象 category_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@ -42,4 +42,19 @@ public class CategoryInfoEditReq extends TreeEntity {
|
||||||
private String introduction;
|
private String introduction;
|
||||||
|
|
||||||
private List<Long> cateGoryIdList;
|
private List<Long> cateGoryIdList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 品类属性组关联ID
|
||||||
|
*/
|
||||||
|
private List<Long> attributeGroupIdList;
|
||||||
|
/**
|
||||||
|
* 商品属性组关联ID
|
||||||
|
*/
|
||||||
|
private List<Long> attributeIdList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 商品属性组关联的ID
|
||||||
|
*/
|
||||||
|
private List<Long> brandIdList;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.TreeEntity;
|
||||||
/**
|
/**
|
||||||
* 品类信息对象 category_info
|
* 品类信息对象 category_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -13,7 +13,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* 品类信息对象 category_info
|
* 品类信息对象 category_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品评论对象 comment_info
|
* 商品评论对象 comment_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品评论对象 comment_info
|
* 商品评论对象 comment_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品评论对象 comment_info
|
* 商品评论对象 comment_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 评论点赞对象 comment_like_info
|
* 评论点赞对象 comment_like_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 评论点赞对象 comment_like_info
|
* 评论点赞对象 comment_like_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 评论点赞对象 comment_like_info
|
* 评论点赞对象 comment_like_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品信息对象 project_info
|
* 商品信息对象 project_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品信息对象 project_info
|
* 商品信息对象 project_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品信息对象 project_info
|
* 商品信息对象 project_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -12,7 +12,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品SKU对象 project_sku_info
|
* 商品SKU对象 project_sku_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -12,7 +12,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品SKU对象 project_sku_info
|
* 商品SKU对象 project_sku_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -12,7 +12,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品SKU对象 project_sku_info
|
* 商品SKU对象 project_sku_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 规格详情对象 rule_attr_info
|
* 规格详情对象 rule_attr_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 规格详情对象 rule_attr_info
|
* 规格详情对象 rule_attr_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 规格详情对象 rule_attr_info
|
* 规格详情对象 rule_attr_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品规格对象 rule_info
|
* 商品规格对象 rule_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
/**
|
/**
|
||||||
* 商品规格对象 rule_info
|
* 商品规格对象 rule_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -14,7 +14,7 @@ import java.util.List;
|
||||||
/**
|
/**
|
||||||
* 商品规格对象 rule_info
|
* 商品规格对象 rule_info
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.controller;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.muyu.product.domain.model.AttributeGroupSaveModel;
|
import com.muyu.product.domain.model.AttributeGroupSaveModel;
|
||||||
import com.muyu.product.domain.resp.AttributeGroupPageResp;
|
import com.muyu.product.domain.resp.AttributeGroupPageResp;
|
||||||
import io.swagger.annotations.*;
|
import io.swagger.annotations.*;
|
||||||
|
@ -31,7 +32,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
/**
|
/**
|
||||||
* 属性组Controller
|
* 属性组Controller
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Api(tags = "属性组")
|
@Api(tags = "属性组")
|
||||||
|
@ -112,6 +113,7 @@ public class AttributeGroupController extends BaseController {
|
||||||
@ApiOperation("删除属性组")
|
@ApiOperation("删除属性组")
|
||||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||||
return toAjax(attributeGroupService.removeBatchByIds(ids));
|
attributeGroupService.removeBatchById(ids);
|
||||||
|
return toAjax(attributeGroupService.removeBatchById(ids));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
/**
|
/**
|
||||||
* 商品属性Controller
|
* 商品属性Controller
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Api(tags = "商品属性")
|
@Api(tags = "商品属性")
|
||||||
|
|
|
@ -29,7 +29,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
/**
|
/**
|
||||||
* 品牌信息Controller
|
* 品牌信息Controller
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Api(tags = "品牌信息")
|
@Api(tags = "品牌信息")
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package com.muyu.product.controller;
|
package com.muyu.product.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Supplier;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
@ -36,7 +35,7 @@ import com.muyu.product.service.CategoryInfoService;
|
||||||
/**
|
/**
|
||||||
* 品类信息Controller
|
* 品类信息Controller
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Api(tags = "品类信息")
|
@Api(tags = "品类信息")
|
||||||
|
@ -113,6 +112,7 @@ public class CategoryInfoController extends BaseController {
|
||||||
@PutMapping("/{id}")
|
@PutMapping("/{id}")
|
||||||
@ApiOperation("修改品类信息")
|
@ApiOperation("修改品类信息")
|
||||||
public Result<String> edit(@PathVariable Long id, @RequestBody CategoryInfoEditReq categoryInfoEditReq) {
|
public Result<String> edit(@PathVariable Long id, @RequestBody CategoryInfoEditReq categoryInfoEditReq) {
|
||||||
|
categoryInfoService.utilCateGoryInfo(id,categoryInfoEditReq);
|
||||||
return toAjax(categoryInfoService.updateById(CategoryInfo.editBuild(id,categoryInfoEditReq)));
|
return toAjax(categoryInfoService.updateById(CategoryInfo.editBuild(id,categoryInfoEditReq)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -125,7 +125,8 @@ public class CategoryInfoController extends BaseController {
|
||||||
@ApiOperation("删除品类信息")
|
@ApiOperation("删除品类信息")
|
||||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||||
return toAjax(categoryInfoService.removeBatchByIds(ids));
|
categoryInfoService.removeBatchById(ids);
|
||||||
|
return toAjax(categoryInfoService.removeBatchById(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -135,10 +136,11 @@ public class CategoryInfoController extends BaseController {
|
||||||
*/
|
*/
|
||||||
@GetMapping("/parentCommonElement/{categoryId}")
|
@GetMapping("/parentCommonElement/{categoryId}")
|
||||||
@ApiOperation("通过品类ID获取父级以上的属性集合")
|
@ApiOperation("通过品类ID获取父级以上的属性集合")
|
||||||
@ApiImplicitParam(name = "categoryId", value = "categoryId", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class, example = "1")
|
@ApiImplicitParam(name = "categoryId",value = "categoryId",required = true,dataType = "Long",paramType = "path",dataTypeClass = Long.class,example = "1")
|
||||||
public Result<CategoryParentCommonElementResp> parentCommonElement(
|
public Result<CategoryParentCommonElementResp> parentCommonElementRespResult(
|
||||||
@PathVariable(value = "categoryId") Long categoryId
|
@PathVariable(value = "categoryId") Long categoryId
|
||||||
) {
|
){
|
||||||
return Result.success(categoryInfoService.parentCommonElement(categoryId));
|
|
||||||
|
return Result.success(categoryInfoService.parentCommonElement(categoryId));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
/**
|
/**
|
||||||
* 商品评论Controller
|
* 商品评论Controller
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Api(tags = "商品评论")
|
@Api(tags = "商品评论")
|
||||||
|
|
|
@ -29,7 +29,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
/**
|
/**
|
||||||
* 评论点赞Controller
|
* 评论点赞Controller
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Api(tags = "评论点赞")
|
@Api(tags = "评论点赞")
|
||||||
|
|
|
@ -29,7 +29,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
/**
|
/**
|
||||||
* 商品信息Controller
|
* 商品信息Controller
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Api(tags = "商品信息")
|
@Api(tags = "商品信息")
|
||||||
|
|
|
@ -29,7 +29,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
/**
|
/**
|
||||||
* 商品SKUController
|
* 商品SKUController
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Api(tags = "商品SKU")
|
@Api(tags = "商品SKU")
|
||||||
|
|
|
@ -29,7 +29,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
/**
|
/**
|
||||||
* 规格详情Controller
|
* 规格详情Controller
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Api(tags = "规格详情")
|
@Api(tags = "规格详情")
|
||||||
|
|
|
@ -31,7 +31,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
/**
|
/**
|
||||||
* 商品规格Controller
|
* 商品规格Controller
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Api(tags = "商品规格")
|
@Api(tags = "商品规格")
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.AsAttributeGroup;
|
||||||
/**
|
/**
|
||||||
* 属性与组中间Mapper接口
|
* 属性与组中间Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AsAttributeGroupMapper extends BaseMapper<AsAttributeGroup> {
|
public interface AsAttributeGroupMapper extends BaseMapper<AsAttributeGroup> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.AsBrandProject;
|
||||||
/**
|
/**
|
||||||
* 品牌商品中间Mapper接口
|
* 品牌商品中间Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AsBrandProjectMapper extends BaseMapper<AsBrandProject> {
|
public interface AsBrandProjectMapper extends BaseMapper<AsBrandProject> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.AsCategoryAttributeGroup;
|
||||||
/**
|
/**
|
||||||
* 品类属性组中间Mapper接口
|
* 品类属性组中间Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AsCategoryAttributeGroupMapper extends BaseMapper<AsCategoryAttributeGroup> {
|
public interface AsCategoryAttributeGroupMapper extends BaseMapper<AsCategoryAttributeGroup> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.AsCategoryAttribute;
|
||||||
/**
|
/**
|
||||||
* 品类属性中间Mapper接口
|
* 品类属性中间Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AsCategoryAttributeMapper extends BaseMapper<AsCategoryAttribute> {
|
public interface AsCategoryAttributeMapper extends BaseMapper<AsCategoryAttribute> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.AsCategoryBrand;
|
||||||
/**
|
/**
|
||||||
* 品类品牌中间Mapper接口
|
* 品类品牌中间Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AsCategoryBrandMapper extends BaseMapper<AsCategoryBrand> {
|
public interface AsCategoryBrandMapper extends BaseMapper<AsCategoryBrand> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.AsProductAttributeInfo;
|
||||||
/**
|
/**
|
||||||
* 商品属性Mapper接口
|
* 商品属性Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AsProductAttributeInfoMapper extends BaseMapper<AsProductAttributeInfo> {
|
public interface AsProductAttributeInfoMapper extends BaseMapper<AsProductAttributeInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.AttributeGroup;
|
||||||
/**
|
/**
|
||||||
* 属性组Mapper接口
|
* 属性组Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AttributeGroupMapper extends BaseMapper<AttributeGroup> {
|
public interface AttributeGroupMapper extends BaseMapper<AttributeGroup> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.AttributeInfo;
|
||||||
/**
|
/**
|
||||||
* 商品属性Mapper接口
|
* 商品属性Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AttributeInfoMapper extends BaseMapper<AttributeInfo> {
|
public interface AttributeInfoMapper extends BaseMapper<AttributeInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.BrandInfo;
|
||||||
/**
|
/**
|
||||||
* 品牌信息Mapper接口
|
* 品牌信息Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface BrandInfoMapper extends BaseMapper<BrandInfo> {
|
public interface BrandInfoMapper extends BaseMapper<BrandInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.CategoryInfo;
|
||||||
/**
|
/**
|
||||||
* 品类信息Mapper接口
|
* 品类信息Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface CategoryInfoMapper extends BaseMapper<CategoryInfo> {
|
public interface CategoryInfoMapper extends BaseMapper<CategoryInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.CommentInfo;
|
||||||
/**
|
/**
|
||||||
* 商品评论Mapper接口
|
* 商品评论Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface CommentInfoMapper extends BaseMapper<CommentInfo> {
|
public interface CommentInfoMapper extends BaseMapper<CommentInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.CommentLikeInfo;
|
||||||
/**
|
/**
|
||||||
* 评论点赞Mapper接口
|
* 评论点赞Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface CommentLikeInfoMapper extends BaseMapper<CommentLikeInfo> {
|
public interface CommentLikeInfoMapper extends BaseMapper<CommentLikeInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.ProjectInfo;
|
||||||
/**
|
/**
|
||||||
* 商品信息Mapper接口
|
* 商品信息Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface ProjectInfoMapper extends BaseMapper<ProjectInfo> {
|
public interface ProjectInfoMapper extends BaseMapper<ProjectInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.ProjectSkuInfo;
|
||||||
/**
|
/**
|
||||||
* 商品SKUMapper接口
|
* 商品SKUMapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface ProjectSkuInfoMapper extends BaseMapper<ProjectSkuInfo> {
|
public interface ProjectSkuInfoMapper extends BaseMapper<ProjectSkuInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.RuleAttrInfo;
|
||||||
/**
|
/**
|
||||||
* 规格详情Mapper接口
|
* 规格详情Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface RuleAttrInfoMapper extends BaseMapper<RuleAttrInfo> {
|
public interface RuleAttrInfoMapper extends BaseMapper<RuleAttrInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.muyu.product.domain.RuleInfo;
|
||||||
/**
|
/**
|
||||||
* 商品规格Mapper接口
|
* 商品规格Mapper接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface RuleInfoMapper extends BaseMapper<RuleInfo> {
|
public interface RuleInfoMapper extends BaseMapper<RuleInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
/**
|
/**
|
||||||
* 属性与组中间Service接口
|
* 属性与组中间Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AsAttributeGroupService extends IService<AsAttributeGroup> {
|
public interface AsAttributeGroupService extends IService<AsAttributeGroup> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
/**
|
/**
|
||||||
* 品牌商品中间Service接口
|
* 品牌商品中间Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AsBrandProjectService extends IService<AsBrandProject> {
|
public interface AsBrandProjectService extends IService<AsBrandProject> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
/**
|
/**
|
||||||
* 品类属性组中间Service接口
|
* 品类属性组中间Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AsCategoryAttributeGroupService extends IService<AsCategoryAttributeGroup> {
|
public interface AsCategoryAttributeGroupService extends IService<AsCategoryAttributeGroup> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
/**
|
/**
|
||||||
* 品类属性中间Service接口
|
* 品类属性中间Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AsCategoryAttributeService extends IService<AsCategoryAttribute> {
|
public interface AsCategoryAttributeService extends IService<AsCategoryAttribute> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
/**
|
/**
|
||||||
* 品类品牌中间Service接口
|
* 品类品牌中间Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AsCategoryBrandService extends IService<AsCategoryBrand> {
|
public interface AsCategoryBrandService extends IService<AsCategoryBrand> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
/**
|
/**
|
||||||
* 商品属性Service接口
|
* 商品属性Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AsProductAttributeInfoService extends IService<AsProductAttributeInfo> {
|
public interface AsProductAttributeInfoService extends IService<AsProductAttributeInfo> {
|
||||||
|
|
|
@ -5,15 +5,15 @@ import java.util.List;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.product.domain.AttributeGroup;
|
import com.muyu.product.domain.AttributeGroup;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.muyu.product.domain.AttributeInfo;
|
|
||||||
import com.muyu.product.domain.model.AttributeGroupSaveModel;
|
import com.muyu.product.domain.model.AttributeGroupSaveModel;
|
||||||
import com.muyu.product.domain.req.AttributeGroupEditReq;
|
import com.muyu.product.domain.req.AttributeGroupEditReq;
|
||||||
import com.muyu.product.domain.resp.AttributeGroupPageResp;
|
import com.muyu.product.domain.resp.AttributeGroupPageResp;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 属性组Service接口
|
* 属性组Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AttributeGroupService extends IService<AttributeGroup> {
|
public interface AttributeGroupService extends IService<AttributeGroup> {
|
||||||
|
@ -41,4 +41,6 @@ public interface AttributeGroupService extends IService<AttributeGroup> {
|
||||||
public Boolean save(AttributeGroupSaveModel attributeGroupSaveModel);
|
public Boolean save(AttributeGroupSaveModel attributeGroupSaveModel);
|
||||||
|
|
||||||
void updateAsAttributGrop(AttributeGroupEditReq attributeGroupEditReq, Long groupId);
|
void updateAsAttributGrop(AttributeGroupEditReq attributeGroupEditReq, Long groupId);
|
||||||
|
|
||||||
|
Boolean removeBatchById(List<Long> ids);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
/**
|
/**
|
||||||
* 商品属性Service接口
|
* 商品属性Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface AttributeInfoService extends IService<AttributeInfo> {
|
public interface AttributeInfoService extends IService<AttributeInfo> {
|
||||||
|
|
|
@ -8,7 +8,7 @@ import com.muyu.product.domain.req.BrandInfoEditReq;
|
||||||
/**
|
/**
|
||||||
* 品牌信息Service接口
|
* 品牌信息Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface BrandInfoService extends IService<BrandInfo> {
|
public interface BrandInfoService extends IService<BrandInfo> {
|
||||||
|
|
|
@ -15,7 +15,7 @@ import com.muyu.product.domain.resp.CategoryParentCommonElementResp;
|
||||||
/**
|
/**
|
||||||
* 品类信息Service接口
|
* 品类信息Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface CategoryInfoService extends IService<CategoryInfo> {
|
public interface CategoryInfoService extends IService<CategoryInfo> {
|
||||||
|
@ -30,17 +30,16 @@ public interface CategoryInfoService extends IService<CategoryInfo> {
|
||||||
CategoryParentCommonElementResp parentCommonElement(Long categoryId);
|
CategoryParentCommonElementResp parentCommonElement(Long categoryId);
|
||||||
|
|
||||||
|
|
||||||
void util(CategoryInfoEditReq categoryInfoEditReq, Long id);
|
|
||||||
|
|
||||||
public boolean save(CategoryInfoSaveModel categoryInfoSaveModel);
|
public boolean save(CategoryInfoSaveModel categoryInfoSaveModel);
|
||||||
|
|
||||||
List<AttributeGroup> getAttributeGroup(Long categoryId);
|
// List<AttributeGroup> getAttributeGroup(Long categoryId);
|
||||||
|
//
|
||||||
List<BrandInfo> getBrand(Long categoryId);
|
// List<BrandInfo> getBrand(Long categoryId);
|
||||||
|
//
|
||||||
List<AttributeInfo> getAttribute(Long categoryId);
|
// List<AttributeInfo> getAttribute(Long categoryId);
|
||||||
|
//
|
||||||
CategoryParentCommonElementResp paretCoommonElement(Long categoryId);
|
// CategoryParentCommonElementResp paretCoommonElement(Long categoryId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 品类共有属性
|
* 品类共有属性
|
||||||
|
@ -48,4 +47,8 @@ public interface CategoryInfoService extends IService<CategoryInfo> {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
CategoryCommonElementResp getTemplateAttributeByCateGoryId(Long cateGoryId);
|
CategoryCommonElementResp getTemplateAttributeByCateGoryId(Long cateGoryId);
|
||||||
|
|
||||||
|
void utilCateGoryInfo(Long id, CategoryInfoEditReq categoryInfoEditReq);
|
||||||
|
|
||||||
|
Boolean removeBatchById(List<Long> ids);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
/**
|
/**
|
||||||
* 商品评论Service接口
|
* 商品评论Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface CommentInfoService extends IService<CommentInfo> {
|
public interface CommentInfoService extends IService<CommentInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
/**
|
/**
|
||||||
* 评论点赞Service接口
|
* 评论点赞Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface CommentLikeInfoService extends IService<CommentLikeInfo> {
|
public interface CommentLikeInfoService extends IService<CommentLikeInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
/**
|
/**
|
||||||
* 商品信息Service接口
|
* 商品信息Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface ProjectInfoService extends IService<ProjectInfo> {
|
public interface ProjectInfoService extends IService<ProjectInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
/**
|
/**
|
||||||
* 商品SKUService接口
|
* 商品SKUService接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface ProjectSkuInfoService extends IService<ProjectSkuInfo> {
|
public interface ProjectSkuInfoService extends IService<ProjectSkuInfo> {
|
||||||
|
|
|
@ -7,7 +7,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
/**
|
/**
|
||||||
* 规格详情Service接口
|
* 规格详情Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface RuleAttrInfoService extends IService<RuleAttrInfo> {
|
public interface RuleAttrInfoService extends IService<RuleAttrInfo> {
|
||||||
|
|
|
@ -13,7 +13,7 @@ import com.muyu.product.domain.resp.RuleInfoResp;
|
||||||
/**
|
/**
|
||||||
* 商品规格Service接口
|
* 商品规格Service接口
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
public interface RuleInfoService extends IService<RuleInfo> {
|
public interface RuleInfoService extends IService<RuleInfo> {
|
||||||
|
|
|
@ -14,7 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
/**
|
/**
|
||||||
* 属性与组中间Service业务层处理
|
* 属性与组中间Service业务层处理
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
|
@ -14,7 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
/**
|
/**
|
||||||
* 品牌商品中间Service业务层处理
|
* 品牌商品中间Service业务层处理
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
|
@ -14,7 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
/**
|
/**
|
||||||
* 品类属性组中间Service业务层处理
|
* 品类属性组中间Service业务层处理
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
|
@ -14,7 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
/**
|
/**
|
||||||
* 品类属性中间Service业务层处理
|
* 品类属性中间Service业务层处理
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
|
@ -14,7 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
/**
|
/**
|
||||||
* 品类品牌中间Service业务层处理
|
* 品类品牌中间Service业务层处理
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
|
@ -14,7 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
/**
|
/**
|
||||||
* 商品属性Service业务层处理
|
* 商品属性Service业务层处理
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
|
@ -7,10 +7,10 @@ import com.muyu.common.core.utils.ObjUtils;
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
import com.muyu.product.domain.AsAttributeGroup;
|
import com.muyu.product.domain.AsAttributeGroup;
|
||||||
import com.muyu.product.domain.AttributeGroup;
|
import com.muyu.product.domain.AttributeGroup;
|
||||||
import com.muyu.product.domain.AttributeInfo;
|
|
||||||
import com.muyu.product.domain.model.AttributeGroupSaveModel;
|
import com.muyu.product.domain.model.AttributeGroupSaveModel;
|
||||||
import com.muyu.product.domain.req.AttributeGroupEditReq;
|
import com.muyu.product.domain.req.AttributeGroupEditReq;
|
||||||
import com.muyu.product.domain.resp.AttributeGroupPageResp;
|
import com.muyu.product.domain.resp.AttributeGroupPageResp;
|
||||||
|
import com.muyu.product.mapper.AsAttributeGroupMapper;
|
||||||
import com.muyu.product.mapper.AttributeGroupMapper;
|
import com.muyu.product.mapper.AttributeGroupMapper;
|
||||||
import com.muyu.product.service.AsAttributeGroupService;
|
import com.muyu.product.service.AsAttributeGroupService;
|
||||||
import com.muyu.product.service.AttributeGroupService;
|
import com.muyu.product.service.AttributeGroupService;
|
||||||
|
@ -22,13 +22,12 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.function.Function;
|
import java.util.Spliterator;
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 属性组Service业务层处理
|
* 属性组Service业务层处理
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@ -128,4 +127,16 @@ public class AttributeGroupServiceImpl extends ServiceImpl<AttributeGroupMapper,
|
||||||
.toList()
|
.toList()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AsAttributeGroupMapper asAttributeGroupMapper;
|
||||||
|
@Override
|
||||||
|
public Boolean removeBatchById(List<Long> ids) {
|
||||||
|
LambdaQueryWrapper<AsAttributeGroup> asAttributeGroupLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
asAttributeGroupLambdaQueryWrapper.in(AsAttributeGroup::getGroupId, ids);
|
||||||
|
asAttributeGroupMapper.delete(asAttributeGroupLambdaQueryWrapper);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,7 +18,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
/**
|
/**
|
||||||
* 商品属性Service业务层处理
|
* 商品属性Service业务层处理
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
|
@ -20,7 +20,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
/**
|
/**
|
||||||
* 品牌信息Service业务层处理
|
* 品牌信息Service业务层处理
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
|
@ -13,6 +13,9 @@ import com.muyu.product.domain.model.TemplateAttributeModel;
|
||||||
import com.muyu.product.domain.req.CategoryInfoEditReq;
|
import com.muyu.product.domain.req.CategoryInfoEditReq;
|
||||||
import com.muyu.product.domain.resp.CategoryCommonElementResp;
|
import com.muyu.product.domain.resp.CategoryCommonElementResp;
|
||||||
import com.muyu.product.domain.resp.CategoryParentCommonElementResp;
|
import com.muyu.product.domain.resp.CategoryParentCommonElementResp;
|
||||||
|
import com.muyu.product.mapper.AsCategoryAttributeGroupMapper;
|
||||||
|
import com.muyu.product.mapper.AsCategoryAttributeMapper;
|
||||||
|
import com.muyu.product.mapper.AsCategoryBrandMapper;
|
||||||
import com.muyu.product.mapper.CategoryInfoMapper;
|
import com.muyu.product.mapper.CategoryInfoMapper;
|
||||||
import com.muyu.product.service.*;
|
import com.muyu.product.service.*;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
@ -30,7 +33,7 @@ import java.util.stream.Stream;
|
||||||
/**
|
/**
|
||||||
* 品类信息Service业务层处理
|
* 品类信息Service业务层处理
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
@ -69,34 +72,47 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
|
||||||
@Override
|
@Override
|
||||||
public List<CategoryInfo> list (CategoryInfo categoryInfo) {
|
public List<CategoryInfo> list (CategoryInfo categoryInfo) {
|
||||||
LambdaQueryWrapper<CategoryInfo> queryWrapper = new LambdaQueryWrapper<>();
|
LambdaQueryWrapper<CategoryInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
if (ObjUtils.notNull(categoryInfo.getName())){
|
||||||
|
queryWrapper.like(CategoryInfo::getName,categoryInfo.getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ObjUtils.notNull(categoryInfo.getImage())){
|
||||||
|
queryWrapper.eq(CategoryInfo::getImage,categoryInfo.getImage());
|
||||||
|
}
|
||||||
|
|
||||||
if (ObjUtils.notNull(categoryInfo.getName())) {
|
if (ObjUtils.notNull(categoryInfo.getParentId())){
|
||||||
queryWrapper.like(CategoryInfo::getName, categoryInfo.getName());
|
queryWrapper.eq(CategoryInfo::getParentId,categoryInfo.getParentId());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ObjUtils.notNull(categoryInfo.getImage())) {
|
if (ObjUtils.notNull(categoryInfo.getStart())){
|
||||||
queryWrapper.eq(CategoryInfo::getImage, categoryInfo.getImage());
|
queryWrapper.eq(CategoryInfo::getStart,categoryInfo.getStart());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ObjUtils.notNull(categoryInfo.getParentId())) {
|
if (ObjUtils.notNull(categoryInfo.getIntroduction())){
|
||||||
queryWrapper.eq(CategoryInfo::getParentId, categoryInfo.getParentId());
|
queryWrapper.eq(CategoryInfo::getIntroduction,categoryInfo.getIntroduction());
|
||||||
}
|
|
||||||
|
|
||||||
if (ObjUtils.notNull(categoryInfo.getStart())) {
|
|
||||||
queryWrapper.eq(CategoryInfo::getStart, categoryInfo.getStart());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ObjUtils.notNull(categoryInfo.getIntroduction())) {
|
|
||||||
queryWrapper.eq(CategoryInfo::getIntroduction, categoryInfo.getIntroduction());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return list(queryWrapper);
|
return list(queryWrapper);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param categoryId 品类ID
|
||||||
|
* @return 父级以上的属性.属性组.品牌集合
|
||||||
|
*/
|
||||||
|
@Override //通过品类ID获取父级以上的属性,属性组,品牌集
|
||||||
|
public CategoryParentCommonElementResp parentCommonElement(Long categoryId) {
|
||||||
|
return CategoryParentCommonElementResp.builder()
|
||||||
|
.attributeInfoList(getCommon(categoryId,asCategoryAttributeService,attributeInfoService))
|
||||||
|
.attributeGroupList(getCommon(categoryId,asCategoryAttributeGroupService,attributeGroupService))
|
||||||
|
.brandInfoList(getCommon(categoryId,asCategoryBrandService,brandInfoService))
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional
|
@Transactional
|
||||||
public boolean save (CategoryInfoSaveModel categoryInfoSaveModel) {
|
public boolean save (CategoryInfoSaveModel categoryInfoSaveModel) {
|
||||||
|
|
||||||
CategoryInfo categoryInfo = CategoryInfo.saveModelBuild(categoryInfoSaveModel);
|
CategoryInfo categoryInfo = CategoryInfo.saveModelBuild(categoryInfoSaveModel);
|
||||||
boolean save = this.save(categoryInfo);
|
boolean save = this.save(categoryInfo);
|
||||||
Long categoryInfoId = categoryInfo.getId();
|
Long categoryInfoId = categoryInfo.getId();
|
||||||
|
@ -104,7 +120,7 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
|
||||||
if (attributeIdList != null && !attributeIdList.isEmpty()) {
|
if (attributeIdList != null && !attributeIdList.isEmpty()) {
|
||||||
asCategoryAttributeService.saveBatch(
|
asCategoryAttributeService.saveBatch(
|
||||||
attributeIdList.stream()
|
attributeIdList.stream()
|
||||||
.map(attributeId -> AsCategoryAttribute.categoryBuild(categoryInfoId, attributeId))
|
.map(attributeId -> AsCategoryAttribute.categoryBuildtwo(categoryInfoId,attributeId))
|
||||||
.toList()
|
.toList()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -127,116 +143,111 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
|
||||||
return save;
|
return save;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// /**
|
||||||
* 通过品类ID获取父级以上的属性组集合
|
// * 通过品类ID获取父级以上的属性组集合
|
||||||
*
|
// *
|
||||||
* @param categoryId 品类ID
|
// * @param categoryId 品类ID
|
||||||
*
|
// *
|
||||||
* @return 父级以上的属性组集合
|
// * @return 父级以上的属性组集合
|
||||||
*/
|
// */
|
||||||
@Override
|
// @Override
|
||||||
public List<AttributeGroup> getAttributeGroup (Long categoryId) {
|
// public List<AttributeGroup> getAttributeGroup (Long categoryId) {
|
||||||
List<AttributeGroup> attributeGroupList = new ArrayList<>();
|
// List<AttributeGroup> attributeGroupList = new ArrayList<>();
|
||||||
LambdaQueryWrapper<AsCategoryAttributeGroup> queryWrapper = new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<AsCategoryAttributeGroup> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(AsCategoryAttributeGroup::getCategoryId, categoryId);
|
// queryWrapper.eq(AsCategoryAttributeGroup::getCategoryId, categoryId);
|
||||||
List<AsCategoryAttributeGroup> asCategoryAttributeGroupList = asCategoryAttributeGroupService.list(queryWrapper);
|
// List<AsCategoryAttributeGroup> asCategoryAttributeGroupList = asCategoryAttributeGroupService.list(queryWrapper);
|
||||||
if (asCategoryAttributeGroupList != null && !asCategoryAttributeGroupList.isEmpty()) {
|
// if (asCategoryAttributeGroupList != null && !asCategoryAttributeGroupList.isEmpty()) {
|
||||||
List<Long> attributeGroupIdList = asCategoryAttributeGroupList.stream()
|
// List<Long> attributeGroupIdList = asCategoryAttributeGroupList.stream()
|
||||||
.map(AsCategoryAttributeGroup::getAttributeGroupId)
|
// .map(AsCategoryAttributeGroup::getAttributeGroupId)
|
||||||
.toList();
|
// .toList();
|
||||||
attributeGroupList.addAll(attributeGroupService.listByIds(attributeGroupIdList));
|
// attributeGroupList.addAll(attributeGroupService.listByIds(attributeGroupIdList));
|
||||||
}
|
// }
|
||||||
CategoryInfo categoryInfo = this.getById(categoryId);
|
// CategoryInfo categoryInfo = this.getById(categoryId);
|
||||||
if (categoryInfo.getParentId() != 0) {
|
// if (categoryInfo.getParentId() != 0) {
|
||||||
if (attributeGroupList.isEmpty()) {
|
// if (attributeGroupList.isEmpty()) {
|
||||||
attributeGroupList.addAll(getAttributeGroup(categoryInfo.getParentId()));
|
// attributeGroupList.addAll(getAttributeGroup(categoryInfo.getParentId()));
|
||||||
} else {
|
// } else {
|
||||||
List<AttributeGroup> attributeGroups = getAttributeGroup(categoryInfo.getParentId());
|
// List<AttributeGroup> attributeGroups = getAttributeGroup(categoryInfo.getParentId());
|
||||||
attributeGroups.forEach(attributeGroup -> {
|
// attributeGroups.forEach(attributeGroup -> {
|
||||||
if (!attributeGroupList.contains(attributeGroup)) {
|
// if (!attributeGroupList.contains(attributeGroup)) {
|
||||||
attributeGroupList.add(attributeGroup);
|
// attributeGroupList.add(attributeGroup);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return attributeGroupList;
|
// return attributeGroupList;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 通过品类ID获取父级以上的品牌集合
|
// * 通过品类ID获取父级以上的品牌集合
|
||||||
*
|
// *
|
||||||
* @param categoryId 品类ID
|
// * @param categoryId 品类ID
|
||||||
*
|
// *
|
||||||
* @return 父级以上的品牌集合
|
// * @return 父级以上的品牌集合
|
||||||
*/
|
// */
|
||||||
@Override
|
// @Override
|
||||||
public List<BrandInfo> getBrand (Long categoryId) {
|
// public List<BrandInfo> getBrand (Long categoryId) {
|
||||||
List<BrandInfo> brandInfoList = new ArrayList<>();
|
// List<BrandInfo> brandInfoList = new ArrayList<>();
|
||||||
LambdaQueryWrapper<AsCategoryBrand> queryWrapper = new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<AsCategoryBrand> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(AsCategoryBrand::getCategoryId, categoryId);
|
// queryWrapper.eq(AsCategoryBrand::getCategoryId, categoryId);
|
||||||
List<AsCategoryBrand> asCategoryBrandList = asCategoryBrandService.list(queryWrapper);
|
// List<AsCategoryBrand> asCategoryBrandList = asCategoryBrandService.list(queryWrapper);
|
||||||
if (asCategoryBrandList != null && !asCategoryBrandList.isEmpty()) {
|
// if (asCategoryBrandList != null && !asCategoryBrandList.isEmpty()) {
|
||||||
List<Long> brandIdList = asCategoryBrandList.stream()
|
// List<Long> brandIdList = asCategoryBrandList.stream()
|
||||||
.map(AsCategoryBrand::getBrandId)
|
// .map(AsCategoryBrand::getBrandId)
|
||||||
.toList();
|
// .toList();
|
||||||
brandInfoList.addAll(brandInfoService.listByIds(brandIdList));
|
// brandInfoList.addAll(brandInfoService.listByIds(brandIdList));
|
||||||
}
|
// }
|
||||||
CategoryInfo categoryInfo = this.getById(categoryId);
|
// CategoryInfo categoryInfo = this.getById(categoryId);
|
||||||
if (categoryInfo.getParentId() != 0) {
|
// if (categoryInfo.getParentId() != 0) {
|
||||||
if (brandInfoList.isEmpty()) {
|
// if (brandInfoList.isEmpty()) {
|
||||||
brandInfoList.addAll(getBrand(categoryInfo.getParentId()));
|
// brandInfoList.addAll(getBrand(categoryInfo.getParentId()));
|
||||||
} else {
|
// } else {
|
||||||
List<BrandInfo> brandInfos = getBrand(categoryInfo.getParentId());
|
// List<BrandInfo> brandInfos = getBrand(categoryInfo.getParentId());
|
||||||
brandInfos.forEach(brandInfo -> {
|
// brandInfos.forEach(brandInfo -> {
|
||||||
if (!brandInfoList.contains(brandInfo)) {
|
// if (!brandInfoList.contains(brandInfo)) {
|
||||||
brandInfoList.add(brandInfo);
|
// brandInfoList.add(brandInfo);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
}
|
// }
|
||||||
return brandInfoList;
|
// return brandInfoList;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 通过品类ID获取父级以上的属性集合
|
// * 通过品类ID获取父级以上的属性集合
|
||||||
*
|
// *
|
||||||
* @param categoryId 品类ID
|
// * @param categoryId 品类ID
|
||||||
*
|
// *
|
||||||
* @return 父级以上的属性集合
|
// * @return 父级以上的属性集合
|
||||||
*/
|
// */
|
||||||
@Override
|
// @Override
|
||||||
public List<AttributeInfo> getAttribute (Long categoryId) {
|
// public List<AttributeInfo> getAttribute (Long categoryId) {
|
||||||
List<AttributeInfo> attributeInfoList = new ArrayList<>();
|
// List<AttributeInfo> attributeInfoList = new ArrayList<>();
|
||||||
LambdaQueryWrapper<AsCategoryAttribute> queryWrapper = new LambdaQueryWrapper<>();
|
// LambdaQueryWrapper<AsCategoryAttribute> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
queryWrapper.eq(AsCategoryAttribute::getCategoryId, categoryId);
|
// queryWrapper.eq(AsCategoryAttribute::getCategoryId, categoryId);
|
||||||
List<AsCategoryAttribute> asCategoryAttributeList = asCategoryAttributeService.list(queryWrapper);
|
// List<AsCategoryAttribute> asCategoryAttributeList = asCategoryAttributeService.list(queryWrapper);
|
||||||
if (asCategoryAttributeList != null && !asCategoryAttributeList.isEmpty()) {
|
// if (asCategoryAttributeList != null && !asCategoryAttributeList.isEmpty()) {
|
||||||
List<Long> attributeIdList = asCategoryAttributeList.stream()
|
// List<Long> attributeIdList = asCategoryAttributeList.stream()
|
||||||
.map(AsCategoryAttribute::getAttributeId)
|
// .map(AsCategoryAttribute::getAttributeId)
|
||||||
.toList();
|
// .toList();
|
||||||
attributeInfoList.addAll(attributeInfoService.listByIds(attributeIdList));
|
// attributeInfoList.addAll(attributeInfoService.listByIds(attributeIdList));
|
||||||
}
|
// }
|
||||||
CategoryInfo categoryInfo = this.getById(categoryId);
|
// CategoryInfo categoryInfo = this.getById(categoryId);
|
||||||
if (categoryInfo.getParentId() != 0) {
|
// if (categoryInfo.getParentId() != 0) {
|
||||||
if (attributeInfoList.isEmpty()) {
|
// if (attributeInfoList.isEmpty()) {
|
||||||
attributeInfoList.addAll(getAttribute(categoryInfo.getParentId()));
|
// attributeInfoList.addAll(getAttribute(categoryInfo.getParentId()));
|
||||||
} else {
|
// } else {
|
||||||
List<AttributeInfo> attributeInfos = getAttribute(categoryInfo.getParentId());
|
// List<AttributeInfo> attributeInfos = getAttribute(categoryInfo.getParentId());
|
||||||
attributeInfos.forEach(attributeInfoQuery -> {
|
// attributeInfos.forEach(attributeInfoQuery -> {
|
||||||
if (!attributeInfoList.contains(attributeInfoQuery)) {
|
// if (!attributeInfoList.contains(attributeInfoQuery)) {
|
||||||
attributeInfoList.add(attributeInfoQuery);
|
// attributeInfoList.add(attributeInfoQuery);
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
return attributeInfoList;
|
// return attributeInfoList;
|
||||||
}
|
// }
|
||||||
|
|
||||||
@Override
|
|
||||||
public CategoryParentCommonElementResp paretCoommonElement(Long categoryId) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public <T, AS> List<T> getCommon (Long categoryId, IService<AS> iService, IService<T> bsiService) {
|
public <T, AS> List<T> getCommon (Long categoryId, IService<AS> iService, IService<T> bsiService) {
|
||||||
|
@ -271,26 +282,7 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
|
||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 通过品类ID获取父级以上的属性、属性组、品牌集合
|
|
||||||
*
|
|
||||||
* @param categoryId 品类ID
|
|
||||||
*
|
|
||||||
* @return 父级以上的属性、属性组、品牌集合
|
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
public CategoryParentCommonElementResp parentCommonElement (Long categoryId) {
|
|
||||||
return CategoryParentCommonElementResp.builder()
|
|
||||||
.attributeInfoList(getCommon(categoryId, asCategoryAttributeService, attributeInfoService))
|
|
||||||
.attributeGroupList(getCommon(categoryId, asCategoryAttributeGroupService, attributeGroupService))
|
|
||||||
.brandInfoList(getCommon(categoryId, asCategoryBrandService, brandInfoService))
|
|
||||||
.build();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void util(CategoryInfoEditReq categoryInfoEditReq, Long id) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
private void getParentIdListByCateGoryId(List<Long> parentIdList, Long cateGoryId){
|
private void getParentIdListByCateGoryId(List<Long> parentIdList, Long cateGoryId){
|
||||||
if (cateGoryId.equals(0L)){
|
if (cateGoryId.equals(0L)){
|
||||||
|
@ -381,4 +373,82 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
|
||||||
.attributeList(attributeModelList)
|
.attributeList(attributeModelList)
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void utilCateGoryInfo(Long id, CategoryInfoEditReq categoryInfoEditReq) {
|
||||||
|
//品类 属性组
|
||||||
|
//品牌
|
||||||
|
// 属性
|
||||||
|
AsCategoryAttribute asCategoryAttributeGroup = AsCategoryAttribute.categoryAttribute(id);
|
||||||
|
List<AsCategoryAttribute> list = asCategoryAttributeService.list(asCategoryAttributeGroup);
|
||||||
|
ArrayList<Long> longs = new ArrayList<>();
|
||||||
|
for (AsCategoryAttribute asCategoryAttribute : list) {
|
||||||
|
longs.add(asCategoryAttribute.getId());
|
||||||
|
}
|
||||||
|
asCategoryAttributeService.removeBatchByIds(longs);
|
||||||
|
List<Long> attributeGroupIdList = categoryInfoEditReq.getAttributeGroupIdList();
|
||||||
|
asCategoryAttributeService.saveBatch(
|
||||||
|
attributeGroupIdList.stream()
|
||||||
|
.map(aLong -> AsCategoryAttribute.categoryBuild(id,aLong))
|
||||||
|
.toList()
|
||||||
|
);
|
||||||
|
|
||||||
|
AsCategoryAttributeGroup asCategoryAttribute = AsCategoryAttributeGroup.cateBuild(id);
|
||||||
|
List<AsCategoryAttributeGroup> categoryAttributeGroupList = asCategoryAttributeGroupService.list(asCategoryAttribute);
|
||||||
|
ArrayList<Long> arrayList = new ArrayList<>();
|
||||||
|
for (AsCategoryAttributeGroup categoryAttributeGroup : categoryAttributeGroupList) {
|
||||||
|
arrayList.add(categoryAttributeGroup.getId());
|
||||||
|
}
|
||||||
|
asCategoryAttributeGroupService.removeBatchByIds(arrayList);
|
||||||
|
List<Long> reqAttributeGroupIdList = categoryInfoEditReq.getAttributeGroupIdList();
|
||||||
|
asCategoryAttributeGroupService.saveBatch(
|
||||||
|
reqAttributeGroupIdList.stream()
|
||||||
|
.map(aLong ->
|
||||||
|
AsCategoryAttributeGroup.categoryBuild(id,aLong)
|
||||||
|
).toList()
|
||||||
|
);
|
||||||
|
AsCategoryBrand asCategoryBrand = AsCategoryBrand.categoryBrand(id);
|
||||||
|
List<AsCategoryBrand> asCategoryBrands = asCategoryBrandService.list(asCategoryBrand);
|
||||||
|
ArrayList<Long> longArrayList = new ArrayList<>();
|
||||||
|
for (AsCategoryBrand categoryBrand : asCategoryBrands) {
|
||||||
|
longArrayList.add(categoryBrand.getId());
|
||||||
|
}
|
||||||
|
asCategoryBrandService.removeBatchByIds(longArrayList);
|
||||||
|
List<Long> brandIdList = categoryInfoEditReq.getBrandIdList();
|
||||||
|
asCategoryBrandService.saveBatch(
|
||||||
|
brandIdList.stream()
|
||||||
|
.map(aLong ->
|
||||||
|
AsCategoryBrand.categoryBuild(id,aLong))
|
||||||
|
.toList()
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
@Autowired
|
||||||
|
private AsCategoryAttributeGroupMapper asCategoryAttributeGroupMapper;
|
||||||
|
@Autowired
|
||||||
|
private AsCategoryAttributeMapper asCategoryAttributeMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AsCategoryBrandMapper asCategoryBrandMapper;
|
||||||
|
@Override
|
||||||
|
public Boolean removeBatchById(List<Long> ids) {
|
||||||
|
//删除品类属性组中间表
|
||||||
|
LambdaQueryWrapper<AsCategoryAttributeGroup> asCategoryAttributeGroupLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
asCategoryAttributeGroupLambdaQueryWrapper.in(AsCategoryAttributeGroup::getAttributeGroupId, ids);
|
||||||
|
asCategoryAttributeGroupMapper.delete(asCategoryAttributeGroupLambdaQueryWrapper);
|
||||||
|
//删除品类属性中间表
|
||||||
|
LambdaQueryWrapper<AsCategoryAttribute> queryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
queryWrapper.in(AsCategoryAttribute::getAttributeId, ids);
|
||||||
|
asCategoryAttributeMapper.delete(queryWrapper);
|
||||||
|
|
||||||
|
//删除品类品牌中间
|
||||||
|
LambdaQueryWrapper<AsCategoryBrand> brandLambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||||
|
brandLambdaQueryWrapper.in(AsCategoryBrand::getBrandId, ids);
|
||||||
|
asCategoryBrandMapper.delete(brandLambdaQueryWrapper);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
/**
|
/**
|
||||||
* 商品评论Service业务层处理
|
* 商品评论Service业务层处理
|
||||||
*
|
*
|
||||||
* @author DongZeLiang
|
* @author YangLe
|
||||||
* @date 2024-02-27
|
* @date 2024-02-27
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue