From 7c0c4e83482a922c2117374ab1aecd915d709fe9 Mon Sep 17 00:00:00 2001 From: yuanjunzhe <1374457292@qq.com> Date: Fri, 1 Mar 2024 09:56:22 +0800 Subject: [PATCH] Default Changelist --- .../com/muyu/product/domain/Attribute.java | 70 ++++++++ .../muyu/product/domain/AttributeGroup.java | 70 ++++++++ .../com/muyu/product/domain/BrandInfo.java | 98 +++++++++++ .../com/muyu/product/domain/BrandProduct.java | 70 ++++++++ .../product/domain/CategoryAttribute.java | 70 ++++++++ .../domain/CategoryAttributeGroup.java | 70 ++++++++ .../muyu/product/domain/CategoryBrand.java | 70 ++++++++ .../com/muyu/product/domain/CategoryInfo.java | 99 +++++++++++ .../com/muyu/product/domain/CommentLike.java | 70 ++++++++ .../java/com/muyu/product/domain/Product.java | 154 ++++++++++++++++++ .../muyu/product/domain/ProductAttribute.java | 84 ++++++++++ .../muyu/product/domain/ProductComment.java | 98 +++++++++++ .../com/muyu/product/domain/ProductSku.java | 113 +++++++++++++ .../java/com/muyu/product/domain/Rule.java | 70 ++++++++ .../com/muyu/product/domain/RuleAttr.java | 84 ++++++++++ .../controller/AttributeController.java | 105 ++++++++++++ .../controller/AttributeGroupController.java | 105 ++++++++++++ .../controller/BrandInfoController.java | 105 ++++++++++++ .../controller/CategoryInfoController.java | 103 ++++++++++++ .../controller/CommentLikeController.java | 105 ++++++++++++ .../controller/ProductCommentController.java | 105 ++++++++++++ .../product/controller/ProductController.java | 105 ++++++++++++ .../controller/ProductSkuController.java | 105 ++++++++++++ .../controller/RuleAttrController.java | 105 ++++++++++++ .../product/controller/RuleController.java | 105 ++++++++++++ .../product/mapper/AttributeGroupMapper.java | 61 +++++++ .../muyu/product/mapper/AttributeMapper.java | 61 +++++++ .../muyu/product/mapper/BrandInfoMapper.java | 61 +++++++ .../product/mapper/BrandProductMapper.java | 61 +++++++ .../mapper/CategoryAttributeGroupMapper.java | 61 +++++++ .../mapper/CategoryAttributeMapper.java | 61 +++++++ .../product/mapper/CategoryBrandMapper.java | 61 +++++++ .../product/mapper/CategoryInfoMapper.java | 61 +++++++ .../product/mapper/CommentLikeMapper.java | 61 +++++++ .../mapper/ProductAttributeMapper.java | 61 +++++++ .../product/mapper/ProductCommentMapper.java | 61 +++++++ .../muyu/product/mapper/ProductMapper.java | 61 +++++++ .../muyu/product/mapper/ProductSkuMapper.java | 61 +++++++ .../muyu/product/mapper/RuleAttrMapper.java | 61 +++++++ .../com/muyu/product/mapper/RuleMapper.java | 61 +++++++ .../service/IAttributeGroupService.java | 61 +++++++ .../product/service/IAttributeService.java | 61 +++++++ .../product/service/IBrandInfoService.java | 61 +++++++ .../product/service/IBrandProductService.java | 61 +++++++ .../ICategoryAttributeGroupService.java | 61 +++++++ .../service/ICategoryAttributeService.java | 61 +++++++ .../service/ICategoryBrandService.java | 61 +++++++ .../product/service/ICategoryInfoService.java | 61 +++++++ .../product/service/ICommentLikeService.java | 61 +++++++ .../service/IProductAttributeService.java | 61 +++++++ .../service/IProductCommentService.java | 61 +++++++ .../muyu/product/service/IProductService.java | 61 +++++++ .../product/service/IProductSkuService.java | 61 +++++++ .../product/service/IRuleAttrService.java | 61 +++++++ .../muyu/product/service/IRuleService.java | 61 +++++++ .../impl/AttributeGroupServiceImpl.java | 96 +++++++++++ .../service/impl/AttributeServiceImpl.java | 96 +++++++++++ .../service/impl/BrandInfoServiceImpl.java | 96 +++++++++++ .../service/impl/BrandProductServiceImpl.java | 96 +++++++++++ .../CategoryAttributeGroupServiceImpl.java | 96 +++++++++++ .../impl/CategoryAttributeServiceImpl.java | 96 +++++++++++ .../impl/CategoryBrandServiceImpl.java | 96 +++++++++++ .../service/impl/CategoryInfoServiceImpl.java | 96 +++++++++++ .../service/impl/CommentLikeServiceImpl.java | 96 +++++++++++ .../impl/ProductAttributeServiceImpl.java | 96 +++++++++++ .../impl/ProductCommentServiceImpl.java | 96 +++++++++++ .../service/impl/ProductServiceImpl.java | 96 +++++++++++ .../service/impl/ProductSkuServiceImpl.java | 96 +++++++++++ .../service/impl/RuleAttrServiceImpl.java | 96 +++++++++++ .../product/service/impl/RuleServiceImpl.java | 96 +++++++++++ .../mapper/product/AttributeGroupMapper.xml | 81 +++++++++ .../mapper/product/AttributeMapper.xml | 81 +++++++++ .../mapper/product/BrandInfoMapper.xml | 91 +++++++++++ .../mapper/product/BrandProductMapper.xml | 81 +++++++++ .../product/CategoryAttributeGroupMapper.xml | 81 +++++++++ .../product/CategoryAttributeMapper.xml | 81 +++++++++ .../mapper/product/CategoryBrandMapper.xml | 81 +++++++++ .../mapper/product/CategoryInfoMapper.xml | 96 +++++++++++ .../mapper/product/CommentLikeMapper.xml | 81 +++++++++ .../mapper/product/ProductAttributeMapper.xml | 86 ++++++++++ .../mapper/product/ProductCommentMapper.xml | 91 +++++++++++ .../mapper/product/ProductMapper.xml | 111 +++++++++++++ .../mapper/product/ProductSkuMapper.xml | 96 +++++++++++ .../mapper/product/RuleAttrMapper.xml | 86 ++++++++++ .../resources/mapper/product/RuleMapper.xml | 81 +++++++++ 85 files changed, 6913 insertions(+) create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Attribute.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeGroup.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandInfo.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandProduct.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttribute.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttributeGroup.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryBrand.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentLike.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Product.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductAttribute.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductComment.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductSku.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Rule.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleAttr.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/AttributeController.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/AttributeGroupController.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/BrandInfoController.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/CategoryInfoController.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/CommentLikeController.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/ProductCommentController.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/ProductController.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/ProductSkuController.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/RuleAttrController.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/RuleController.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/AttributeGroupMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/AttributeMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/BrandInfoMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/BrandProductMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryAttributeGroupMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryAttributeMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryBrandMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CommentLikeMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductAttributeMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductCommentMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductSkuMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/RuleAttrMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/RuleMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IAttributeGroupService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IAttributeService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IBrandInfoService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IBrandProductService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryAttributeGroupService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryAttributeService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryBrandService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryInfoService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICommentLikeService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductAttributeService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductCommentService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductSkuService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IRuleAttrService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IRuleService.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/AttributeServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/BrandInfoServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/BrandProductServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryAttributeGroupServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryAttributeServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryBrandServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryInfoServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CommentLikeServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductAttributeServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductCommentServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductSkuServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/RuleAttrServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/RuleServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/AttributeGroupMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/AttributeMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/BrandInfoMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/BrandProductMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryAttributeGroupMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryAttributeMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryBrandMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryInfoMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CommentLikeMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductAttributeMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductCommentMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductSkuMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/RuleAttrMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/RuleMapper.xml diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Attribute.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Attribute.java new file mode 100644 index 0000000..3c4c7b0 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Attribute.java @@ -0,0 +1,70 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 商品属性对象 attribute + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class Attribute extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 属性名 */ + @Excel(name = "属性名") + private String name; + + /** 分组 */ + @Excel(name = "分组") + private Long gruopId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setGruopId(Long gruopId) + { + this.gruopId = gruopId; + } + + public Long getGruopId() + { + return gruopId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("gruopId", getGruopId()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeGroup.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeGroup.java new file mode 100644 index 0000000..eb9319f --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeGroup.java @@ -0,0 +1,70 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 属性组对象 attribute_group + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class AttributeGroup extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 组名称 */ + @Excel(name = "组名称") + private String name; + + /** 转态 */ + @Excel(name = "转态") + private String status; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("status", getStatus()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandInfo.java new file mode 100644 index 0000000..10ff9ee --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandInfo.java @@ -0,0 +1,98 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 商品品牌对象 brand_info + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class BrandInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 品牌名称 */ + @Excel(name = "品牌名称") + private String name; + + /** logo */ + @Excel(name = "logo") + private String logo; + + /** 介绍 */ + @Excel(name = "介绍") + private String introduction; + + /** 状态 */ + @Excel(name = "状态") + private String status; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setLogo(String logo) + { + this.logo = logo; + } + + public String getLogo() + { + return logo; + } + public void setIntroduction(String introduction) + { + this.introduction = introduction; + } + + public String getIntroduction() + { + return introduction; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("logo", getLogo()) + .append("introduction", getIntroduction()) + .append("status", getStatus()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandProduct.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandProduct.java new file mode 100644 index 0000000..d2ce99f --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandProduct.java @@ -0,0 +1,70 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 品牌商品中间对象 brand_product + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class BrandProduct extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 品牌id */ + @Excel(name = "品牌id") + private Long brandId; + + /** 商品id */ + @Excel(name = "商品id") + private Long productId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setBrandId(Long brandId) + { + this.brandId = brandId; + } + + public Long getBrandId() + { + return brandId; + } + public void setProductId(Long productId) + { + this.productId = productId; + } + + public Long getProductId() + { + return productId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("brandId", getBrandId()) + .append("productId", getProductId()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttribute.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttribute.java new file mode 100644 index 0000000..520dcd7 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttribute.java @@ -0,0 +1,70 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 品类对象 category_attribute + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class CategoryAttribute extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 品类 */ + @Excel(name = "品类") + private Long categoryId; + + /** 属性id */ + @Excel(name = "属性id") + private Long attributeId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCategoryId(Long categoryId) + { + this.categoryId = categoryId; + } + + public Long getCategoryId() + { + return categoryId; + } + public void setAttributeId(Long attributeId) + { + this.attributeId = attributeId; + } + + public Long getAttributeId() + { + return attributeId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("categoryId", getCategoryId()) + .append("attributeId", getAttributeId()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttributeGroup.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttributeGroup.java new file mode 100644 index 0000000..4267f5d --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryAttributeGroup.java @@ -0,0 +1,70 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 品类对象 category_attribute_group + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class CategoryAttributeGroup extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 品类 */ + @Excel(name = "品类") + private Long categoryId; + + /** 属性组 */ + @Excel(name = "属性组") + private Long attributeGroupId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCategoryId(Long categoryId) + { + this.categoryId = categoryId; + } + + public Long getCategoryId() + { + return categoryId; + } + public void setAttributeGroupId(Long attributeGroupId) + { + this.attributeGroupId = attributeGroupId; + } + + public Long getAttributeGroupId() + { + return attributeGroupId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("categoryId", getCategoryId()) + .append("attributeGroupId", getAttributeGroupId()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryBrand.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryBrand.java new file mode 100644 index 0000000..e6fdaf8 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryBrand.java @@ -0,0 +1,70 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 品类对象 category_brand + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class CategoryBrand extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 品类 */ + @Excel(name = "品类") + private Long categoryId; + + /** 品牌 */ + @Excel(name = "品牌") + private Long brandId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCategoryId(Long categoryId) + { + this.categoryId = categoryId; + } + + public Long getCategoryId() + { + return categoryId; + } + public void setBrandId(Long brandId) + { + this.brandId = brandId; + } + + public Long getBrandId() + { + return brandId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("categoryId", getCategoryId()) + .append("brandId", getBrandId()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java new file mode 100644 index 0000000..d663b2b --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java @@ -0,0 +1,99 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.TreeEntity; + +/** + * 品类信息对象 category_info + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class CategoryInfo extends TreeEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 品类信息 */ + @Excel(name = "品类信息") + private String name; + + /** 图片 */ + @Excel(name = "图片") + private String image; + + /** 是否启用 */ + @Excel(name = "是否启用") + private String status; + + /** 介绍 */ + @Excel(name = "介绍") + private String introduction; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setImage(String image) + { + this.image = image; + } + + public String getImage() + { + return image; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + public void setIntroduction(String introduction) + { + this.introduction = introduction; + } + + public String getIntroduction() + { + return introduction; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("image", getImage()) + .append("parentId", getParentId()) + .append("status", getStatus()) + .append("introduction", getIntroduction()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentLike.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentLike.java new file mode 100644 index 0000000..00de39e --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentLike.java @@ -0,0 +1,70 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 评论点赞对象 comment_like + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class CommentLike extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 评论id */ + @Excel(name = "评论id") + private Long commentId; + + /** 点赞人id */ + @Excel(name = "点赞人id") + private Long userId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setCommentId(Long commentId) + { + this.commentId = commentId; + } + + public Long getCommentId() + { + return commentId; + } + public void setUserId(Long userId) + { + this.userId = userId; + } + + public Long getUserId() + { + return userId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("commentId", getCommentId()) + .append("userId", getUserId()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Product.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Product.java new file mode 100644 index 0000000..e59f34e --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Product.java @@ -0,0 +1,154 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 商品信息对象 product + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class Product extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 商品名称 */ + @Excel(name = "商品名称") + private String name; + + /** 描述 */ + @Excel(name = "描述") + private String describe; + + /** 类型 */ + @Excel(name = "类型") + private String type; + + /** 图片 */ + @Excel(name = "图片") + private String image; + + /** 轮播图片 */ + @Excel(name = "轮播图片") + private String carouselImages; + + /** 状态 */ + @Excel(name = "状态") + private String status; + + /** 规格 */ + @Excel(name = "规格") + private Long ruleId; + + /** 品牌 */ + @Excel(name = "品牌") + private Long brandId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setDescribe(String describe) + { + this.describe = describe; + } + + public String getDescribe() + { + return describe; + } + public void setType(String type) + { + this.type = type; + } + + public String getType() + { + return type; + } + public void setImage(String image) + { + this.image = image; + } + + public String getImage() + { + return image; + } + public void setCarouselImages(String carouselImages) + { + this.carouselImages = carouselImages; + } + + public String getCarouselImages() + { + return carouselImages; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + public void setRuleId(Long ruleId) + { + this.ruleId = ruleId; + } + + public Long getRuleId() + { + return ruleId; + } + public void setBrandId(Long brandId) + { + this.brandId = brandId; + } + + public Long getBrandId() + { + return brandId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("describe", getDescribe()) + .append("type", getType()) + .append("image", getImage()) + .append("carouselImages", getCarouselImages()) + .append("status", getStatus()) + .append("ruleId", getRuleId()) + .append("brandId", getBrandId()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductAttribute.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductAttribute.java new file mode 100644 index 0000000..c13f7f5 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductAttribute.java @@ -0,0 +1,84 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 商品属性对象 product_attribute + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class ProductAttribute extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 商品 */ + @Excel(name = "商品") + private Long productId; + + /** 属性 */ + @Excel(name = "属性") + private String attributeId; + + /** 属性值 */ + @Excel(name = "属性值") + private String value; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setProductId(Long productId) + { + this.productId = productId; + } + + public Long getProductId() + { + return productId; + } + public void setAttributeId(String attributeId) + { + this.attributeId = attributeId; + } + + public String getAttributeId() + { + return attributeId; + } + public void setValue(String value) + { + this.value = value; + } + + public String getValue() + { + return value; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("productId", getProductId()) + .append("attributeId", getAttributeId()) + .append("value", getValue()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductComment.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductComment.java new file mode 100644 index 0000000..308a66b --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductComment.java @@ -0,0 +1,98 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 商品评论对象 product_comment + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class ProductComment extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 商品id */ + @Excel(name = "商品id") + private Long productId; + + /** 评论 */ + @Excel(name = "评论") + private String comment; + + /** 图片 */ + @Excel(name = "图片") + private String images; + + /** 父级id */ + @Excel(name = "父级id") + private String parentId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setProductId(Long productId) + { + this.productId = productId; + } + + public Long getProductId() + { + return productId; + } + public void setComment(String comment) + { + this.comment = comment; + } + + public String getComment() + { + return comment; + } + public void setImages(String images) + { + this.images = images; + } + + public String getImages() + { + return images; + } + public void setParentId(String parentId) + { + this.parentId = parentId; + } + + public String getParentId() + { + return parentId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("productId", getProductId()) + .append("comment", getComment()) + .append("images", getImages()) + .append("parentId", getParentId()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductSku.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductSku.java new file mode 100644 index 0000000..fb1526a --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductSku.java @@ -0,0 +1,113 @@ +package com.muyu.product.domain; + +import java.math.BigDecimal; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 商品sku对象 product_sku + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class ProductSku extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 商品id */ + @Excel(name = "商品id") + private Long productId; + + /** sku */ + @Excel(name = "sku") + private String sku; + + /** 库存 */ + @Excel(name = "库存") + private Long stock; + + /** 价格 */ + @Excel(name = "价格") + private BigDecimal price; + + /** 图片 */ + @Excel(name = "图片") + private String image; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setProductId(Long productId) + { + this.productId = productId; + } + + public Long getProductId() + { + return productId; + } + public void setSku(String sku) + { + this.sku = sku; + } + + public String getSku() + { + return sku; + } + public void setStock(Long stock) + { + this.stock = stock; + } + + public Long getStock() + { + return stock; + } + public void setPrice(BigDecimal price) + { + this.price = price; + } + + public BigDecimal getPrice() + { + return price; + } + public void setImage(String image) + { + this.image = image; + } + + public String getImage() + { + return image; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("productId", getProductId()) + .append("sku", getSku()) + .append("stock", getStock()) + .append("price", getPrice()) + .append("image", getImage()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Rule.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Rule.java new file mode 100644 index 0000000..80361ad --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Rule.java @@ -0,0 +1,70 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 商品规格对象 rule + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class Rule extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 规格名称 */ + @Excel(name = "规格名称") + private String name; + + /** 状态 */ + @Excel(name = "状态") + private String status; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("status", getStatus()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleAttr.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleAttr.java new file mode 100644 index 0000000..ae3bd7d --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleAttr.java @@ -0,0 +1,84 @@ +package com.muyu.product.domain; + +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; + +/** + * 规格详情对象 rule_attr + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public class RuleAttr extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 规格id */ + @Excel(name = "规格id") + private Long ruleId; + + /** 类目名称 */ + @Excel(name = "类目名称") + private String name; + + /** 规格值 */ + @Excel(name = "规格值") + private String attrValue; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setRuleId(Long ruleId) + { + this.ruleId = ruleId; + } + + public Long getRuleId() + { + return ruleId; + } + public void setName(String name) + { + this.name = name; + } + + public String getName() + { + return name; + } + public void setAttrValue(String attrValue) + { + this.attrValue = attrValue; + } + + public String getAttrValue() + { + return attrValue; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("ruleId", getRuleId()) + .append("name", getName()) + .append("attrValue", getAttrValue()) + .append("remark", getRemark()) + .append("createBy", getCreateBy()) + .append("createTime", getCreateTime()) + .append("updateBy", getUpdateBy()) + .append("updateTime", getUpdateTime()) + .toString(); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/AttributeController.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/AttributeController.java new file mode 100644 index 0000000..4ab7966 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/AttributeController.java @@ -0,0 +1,105 @@ +package com.muyu.product.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.product.domain.Attribute; +import com.muyu.product.service.IAttributeService; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 商品属性Controller + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/attribute") +public class AttributeController extends BaseController +{ + @Autowired + private IAttributeService attributeService; + + /** + * 查询商品属性列表 + */ + @RequiresPermissions("product:attribute:list") + @GetMapping("/list") + public Result> list(Attribute attribute) + { + startPage(); + List list = attributeService.selectAttributeList(attribute); + return getDataTable(list); + } + + /** + * 导出商品属性列表 + */ + @RequiresPermissions("product:attribute:export") + @Log(title = "商品属性", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Attribute attribute) + { + List list = attributeService.selectAttributeList(attribute); + ExcelUtil util = new ExcelUtil(Attribute.class); + util.exportExcel(response, list, "商品属性数据"); + } + + /** + * 获取商品属性详细信息 + */ + @RequiresPermissions("product:attribute:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(attributeService.selectAttributeById(id)); + } + + /** + * 新增商品属性 + */ + @RequiresPermissions("product:attribute:add") + @Log(title = "商品属性", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody Attribute attribute) + { + return toAjax(attributeService.insertAttribute(attribute)); + } + + /** + * 修改商品属性 + */ + @RequiresPermissions("product:attribute:edit") + @Log(title = "商品属性", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody Attribute attribute) + { + return toAjax(attributeService.updateAttribute(attribute)); + } + + /** + * 删除商品属性 + */ + @RequiresPermissions("product:attribute:remove") + @Log(title = "商品属性", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(attributeService.deleteAttributeByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/AttributeGroupController.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/AttributeGroupController.java new file mode 100644 index 0000000..a349d7e --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/AttributeGroupController.java @@ -0,0 +1,105 @@ +package com.muyu.product.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.product.domain.AttributeGroup; +import com.muyu.product.service.IAttributeGroupService; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 属性组Controller + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/attributeGroup") +public class AttributeGroupController extends BaseController +{ + @Autowired + private IAttributeGroupService attributeGroupService; + + /** + * 查询属性组列表 + */ + @RequiresPermissions("product:attributeGroup:list") + @GetMapping("/list") + public Result> list(AttributeGroup attributeGroup) + { + startPage(); + List list = attributeGroupService.selectAttributeGroupList(attributeGroup); + return getDataTable(list); + } + + /** + * 导出属性组列表 + */ + @RequiresPermissions("product:attributeGroup:export") + @Log(title = "属性组", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AttributeGroup attributeGroup) + { + List list = attributeGroupService.selectAttributeGroupList(attributeGroup); + ExcelUtil util = new ExcelUtil(AttributeGroup.class); + util.exportExcel(response, list, "属性组数据"); + } + + /** + * 获取属性组详细信息 + */ + @RequiresPermissions("product:attributeGroup:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(attributeGroupService.selectAttributeGroupById(id)); + } + + /** + * 新增属性组 + */ + @RequiresPermissions("product:attributeGroup:add") + @Log(title = "属性组", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody AttributeGroup attributeGroup) + { + return toAjax(attributeGroupService.insertAttributeGroup(attributeGroup)); + } + + /** + * 修改属性组 + */ + @RequiresPermissions("product:attributeGroup:edit") + @Log(title = "属性组", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody AttributeGroup attributeGroup) + { + return toAjax(attributeGroupService.updateAttributeGroup(attributeGroup)); + } + + /** + * 删除属性组 + */ + @RequiresPermissions("product:attributeGroup:remove") + @Log(title = "属性组", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(attributeGroupService.deleteAttributeGroupByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/BrandInfoController.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/BrandInfoController.java new file mode 100644 index 0000000..4075e8b --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/BrandInfoController.java @@ -0,0 +1,105 @@ +package com.muyu.product.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.product.domain.BrandInfo; +import com.muyu.product.service.IBrandInfoService; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 商品品牌Controller + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/brand") +public class BrandInfoController extends BaseController +{ + @Autowired + private IBrandInfoService brandInfoService; + + /** + * 查询商品品牌列表 + */ + @RequiresPermissions("product:brand:list") + @GetMapping("/list") + public Result> list(BrandInfo brandInfo) + { + startPage(); + List list = brandInfoService.selectBrandInfoList(brandInfo); + return getDataTable(list); + } + + /** + * 导出商品品牌列表 + */ + @RequiresPermissions("product:brand:export") + @Log(title = "商品品牌", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BrandInfo brandInfo) + { + List list = brandInfoService.selectBrandInfoList(brandInfo); + ExcelUtil util = new ExcelUtil(BrandInfo.class); + util.exportExcel(response, list, "商品品牌数据"); + } + + /** + * 获取商品品牌详细信息 + */ + @RequiresPermissions("product:brand:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(brandInfoService.selectBrandInfoById(id)); + } + + /** + * 新增商品品牌 + */ + @RequiresPermissions("product:brand:add") + @Log(title = "商品品牌", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody BrandInfo brandInfo) + { + return toAjax(brandInfoService.insertBrandInfo(brandInfo)); + } + + /** + * 修改商品品牌 + */ + @RequiresPermissions("product:brand:edit") + @Log(title = "商品品牌", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody BrandInfo brandInfo) + { + return toAjax(brandInfoService.updateBrandInfo(brandInfo)); + } + + /** + * 删除商品品牌 + */ + @RequiresPermissions("product:brand:remove") + @Log(title = "商品品牌", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(brandInfoService.deleteBrandInfoByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/CategoryInfoController.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/CategoryInfoController.java new file mode 100644 index 0000000..e759984 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/CategoryInfoController.java @@ -0,0 +1,103 @@ +package com.muyu.product.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.product.domain.CategoryInfo; +import com.muyu.product.service.ICategoryInfoService; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; + +/** + * 品类信息Controller + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/category") +public class CategoryInfoController extends BaseController +{ + @Autowired + private ICategoryInfoService categoryInfoService; + + /** + * 查询品类信息列表 + */ + @RequiresPermissions("product:category:list") + @GetMapping("/list") + public Result list(CategoryInfo categoryInfo) + { + List list = categoryInfoService.selectCategoryInfoList(categoryInfo); + return success(list); + } + + /** + * 导出品类信息列表 + */ + @RequiresPermissions("product:category:export") + @Log(title = "品类信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, CategoryInfo categoryInfo) + { + List list = categoryInfoService.selectCategoryInfoList(categoryInfo); + ExcelUtil util = new ExcelUtil(CategoryInfo.class); + util.exportExcel(response, list, "品类信息数据"); + } + + /** + * 获取品类信息详细信息 + */ + @RequiresPermissions("product:category:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(categoryInfoService.selectCategoryInfoById(id)); + } + + /** + * 新增品类信息 + */ + @RequiresPermissions("product:category:add") + @Log(title = "品类信息", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody CategoryInfo categoryInfo) + { + return toAjax(categoryInfoService.insertCategoryInfo(categoryInfo)); + } + + /** + * 修改品类信息 + */ + @RequiresPermissions("product:category:edit") + @Log(title = "品类信息", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody CategoryInfo categoryInfo) + { + return toAjax(categoryInfoService.updateCategoryInfo(categoryInfo)); + } + + /** + * 删除品类信息 + */ + @RequiresPermissions("product:category:remove") + @Log(title = "品类信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(categoryInfoService.deleteCategoryInfoByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/CommentLikeController.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/CommentLikeController.java new file mode 100644 index 0000000..d7e6907 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/CommentLikeController.java @@ -0,0 +1,105 @@ +package com.muyu.product.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.product.domain.CommentLike; +import com.muyu.product.service.ICommentLikeService; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 评论点赞Controller + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/commentLike") +public class CommentLikeController extends BaseController +{ + @Autowired + private ICommentLikeService commentLikeService; + + /** + * 查询评论点赞列表 + */ + @RequiresPermissions("product:commentLike:list") + @GetMapping("/list") + public Result> list(CommentLike commentLike) + { + startPage(); + List list = commentLikeService.selectCommentLikeList(commentLike); + return getDataTable(list); + } + + /** + * 导出评论点赞列表 + */ + @RequiresPermissions("product:commentLike:export") + @Log(title = "评论点赞", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, CommentLike commentLike) + { + List list = commentLikeService.selectCommentLikeList(commentLike); + ExcelUtil util = new ExcelUtil(CommentLike.class); + util.exportExcel(response, list, "评论点赞数据"); + } + + /** + * 获取评论点赞详细信息 + */ + @RequiresPermissions("product:commentLike:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(commentLikeService.selectCommentLikeById(id)); + } + + /** + * 新增评论点赞 + */ + @RequiresPermissions("product:commentLike:add") + @Log(title = "评论点赞", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody CommentLike commentLike) + { + return toAjax(commentLikeService.insertCommentLike(commentLike)); + } + + /** + * 修改评论点赞 + */ + @RequiresPermissions("product:commentLike:edit") + @Log(title = "评论点赞", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody CommentLike commentLike) + { + return toAjax(commentLikeService.updateCommentLike(commentLike)); + } + + /** + * 删除评论点赞 + */ + @RequiresPermissions("product:commentLike:remove") + @Log(title = "评论点赞", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(commentLikeService.deleteCommentLikeByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/ProductCommentController.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/ProductCommentController.java new file mode 100644 index 0000000..fd6ea90 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/ProductCommentController.java @@ -0,0 +1,105 @@ +package com.muyu.product.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.product.domain.ProductComment; +import com.muyu.product.service.IProductCommentService; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 商品评论Controller + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/productComment") +public class ProductCommentController extends BaseController +{ + @Autowired + private IProductCommentService productCommentService; + + /** + * 查询商品评论列表 + */ + @RequiresPermissions("product:productComment:list") + @GetMapping("/list") + public Result> list(ProductComment productComment) + { + startPage(); + List list = productCommentService.selectProductCommentList(productComment); + return getDataTable(list); + } + + /** + * 导出商品评论列表 + */ + @RequiresPermissions("product:productComment:export") + @Log(title = "商品评论", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProductComment productComment) + { + List list = productCommentService.selectProductCommentList(productComment); + ExcelUtil util = new ExcelUtil(ProductComment.class); + util.exportExcel(response, list, "商品评论数据"); + } + + /** + * 获取商品评论详细信息 + */ + @RequiresPermissions("product:productComment:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(productCommentService.selectProductCommentById(id)); + } + + /** + * 新增商品评论 + */ + @RequiresPermissions("product:productComment:add") + @Log(title = "商品评论", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody ProductComment productComment) + { + return toAjax(productCommentService.insertProductComment(productComment)); + } + + /** + * 修改商品评论 + */ + @RequiresPermissions("product:productComment:edit") + @Log(title = "商品评论", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody ProductComment productComment) + { + return toAjax(productCommentService.updateProductComment(productComment)); + } + + /** + * 删除商品评论 + */ + @RequiresPermissions("product:productComment:remove") + @Log(title = "商品评论", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(productCommentService.deleteProductCommentByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/ProductController.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/ProductController.java new file mode 100644 index 0000000..4f04a89 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/ProductController.java @@ -0,0 +1,105 @@ +package com.muyu.product.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.product.domain.Product; +import com.muyu.product.service.IProductService; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 商品信息Controller + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/product") +public class ProductController extends BaseController +{ + @Autowired + private IProductService productService; + + /** + * 查询商品信息列表 + */ + @RequiresPermissions("product:product:list") + @GetMapping("/list") + public Result> list(Product product) + { + startPage(); + List list = productService.selectProductList(product); + return getDataTable(list); + } + + /** + * 导出商品信息列表 + */ + @RequiresPermissions("product:product:export") + @Log(title = "商品信息", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Product product) + { + List list = productService.selectProductList(product); + ExcelUtil util = new ExcelUtil(Product.class); + util.exportExcel(response, list, "商品信息数据"); + } + + /** + * 获取商品信息详细信息 + */ + @RequiresPermissions("product:product:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(productService.selectProductById(id)); + } + + /** + * 新增商品信息 + */ + @RequiresPermissions("product:product:add") + @Log(title = "商品信息", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody Product product) + { + return toAjax(productService.insertProduct(product)); + } + + /** + * 修改商品信息 + */ + @RequiresPermissions("product:product:edit") + @Log(title = "商品信息", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody Product product) + { + return toAjax(productService.updateProduct(product)); + } + + /** + * 删除商品信息 + */ + @RequiresPermissions("product:product:remove") + @Log(title = "商品信息", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(productService.deleteProductByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/ProductSkuController.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/ProductSkuController.java new file mode 100644 index 0000000..78a4c5d --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/ProductSkuController.java @@ -0,0 +1,105 @@ +package com.muyu.product.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.product.domain.ProductSku; +import com.muyu.product.service.IProductSkuService; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 商品skuController + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/SKU") +public class ProductSkuController extends BaseController +{ + @Autowired + private IProductSkuService productSkuService; + + /** + * 查询商品sku列表 + */ + @RequiresPermissions("product:SKU:list") + @GetMapping("/list") + public Result> list(ProductSku productSku) + { + startPage(); + List list = productSkuService.selectProductSkuList(productSku); + return getDataTable(list); + } + + /** + * 导出商品sku列表 + */ + @RequiresPermissions("product:SKU:export") + @Log(title = "商品sku", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProductSku productSku) + { + List list = productSkuService.selectProductSkuList(productSku); + ExcelUtil util = new ExcelUtil(ProductSku.class); + util.exportExcel(response, list, "商品sku数据"); + } + + /** + * 获取商品sku详细信息 + */ + @RequiresPermissions("product:SKU:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(productSkuService.selectProductSkuById(id)); + } + + /** + * 新增商品sku + */ + @RequiresPermissions("product:SKU:add") + @Log(title = "商品sku", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody ProductSku productSku) + { + return toAjax(productSkuService.insertProductSku(productSku)); + } + + /** + * 修改商品sku + */ + @RequiresPermissions("product:SKU:edit") + @Log(title = "商品sku", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody ProductSku productSku) + { + return toAjax(productSkuService.updateProductSku(productSku)); + } + + /** + * 删除商品sku + */ + @RequiresPermissions("product:SKU:remove") + @Log(title = "商品sku", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(productSkuService.deleteProductSkuByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/RuleAttrController.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/RuleAttrController.java new file mode 100644 index 0000000..0ce5c80 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/RuleAttrController.java @@ -0,0 +1,105 @@ +package com.muyu.product.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.product.domain.RuleAttr; +import com.muyu.product.service.IRuleAttrService; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 规格详情Controller + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/ruleAttr") +public class RuleAttrController extends BaseController +{ + @Autowired + private IRuleAttrService ruleAttrService; + + /** + * 查询规格详情列表 + */ + @RequiresPermissions("product:ruleAttr:list") + @GetMapping("/list") + public Result> list(RuleAttr ruleAttr) + { + startPage(); + List list = ruleAttrService.selectRuleAttrList(ruleAttr); + return getDataTable(list); + } + + /** + * 导出规格详情列表 + */ + @RequiresPermissions("product:ruleAttr:export") + @Log(title = "规格详情", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, RuleAttr ruleAttr) + { + List list = ruleAttrService.selectRuleAttrList(ruleAttr); + ExcelUtil util = new ExcelUtil(RuleAttr.class); + util.exportExcel(response, list, "规格详情数据"); + } + + /** + * 获取规格详情详细信息 + */ + @RequiresPermissions("product:ruleAttr:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(ruleAttrService.selectRuleAttrById(id)); + } + + /** + * 新增规格详情 + */ + @RequiresPermissions("product:ruleAttr:add") + @Log(title = "规格详情", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody RuleAttr ruleAttr) + { + return toAjax(ruleAttrService.insertRuleAttr(ruleAttr)); + } + + /** + * 修改规格详情 + */ + @RequiresPermissions("product:ruleAttr:edit") + @Log(title = "规格详情", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody RuleAttr ruleAttr) + { + return toAjax(ruleAttrService.updateRuleAttr(ruleAttr)); + } + + /** + * 删除规格详情 + */ + @RequiresPermissions("product:ruleAttr:remove") + @Log(title = "规格详情", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(ruleAttrService.deleteRuleAttrByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/RuleController.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/RuleController.java new file mode 100644 index 0000000..a47145d --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/controller/RuleController.java @@ -0,0 +1,105 @@ +package com.muyu.product.controller; + +import java.util.List; + +import javax.servlet.http.HttpServletResponse; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +import com.muyu.common.log.annotation.Log; +import com.muyu.common.log.enums.BusinessType; +import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.product.domain.Rule; +import com.muyu.product.service.IRuleService; +import com.muyu.common.core.web.controller.BaseController; +import com.muyu.common.core.domain.Result; +import com.muyu.common.core.utils.poi.ExcelUtil; +import com.muyu.common.core.web.page.TableDataInfo; + +/** + * 商品规格Controller + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/rule") +public class RuleController extends BaseController +{ + @Autowired + private IRuleService ruleService; + + /** + * 查询商品规格列表 + */ + @RequiresPermissions("product:rule:list") + @GetMapping("/list") + public Result> list(Rule rule) + { + startPage(); + List list = ruleService.selectRuleList(rule); + return getDataTable(list); + } + + /** + * 导出商品规格列表 + */ + @RequiresPermissions("product:rule:export") + @Log(title = "商品规格", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Rule rule) + { + List list = ruleService.selectRuleList(rule); + ExcelUtil util = new ExcelUtil(Rule.class); + util.exportExcel(response, list, "商品规格数据"); + } + + /** + * 获取商品规格详细信息 + */ + @RequiresPermissions("product:rule:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(ruleService.selectRuleById(id)); + } + + /** + * 新增商品规格 + */ + @RequiresPermissions("product:rule:add") + @Log(title = "商品规格", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody Rule rule) + { + return toAjax(ruleService.insertRule(rule)); + } + + /** + * 修改商品规格 + */ + @RequiresPermissions("product:rule:edit") + @Log(title = "商品规格", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody Rule rule) + { + return toAjax(ruleService.updateRule(rule)); + } + + /** + * 删除商品规格 + */ + @RequiresPermissions("product:rule:remove") + @Log(title = "商品规格", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(ruleService.deleteRuleByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/AttributeGroupMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/AttributeGroupMapper.java new file mode 100644 index 0000000..24f67f4 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/AttributeGroupMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.AttributeGroup; + +/** + * 属性组Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface AttributeGroupMapper +{ + /** + * 查询属性组 + * + * @param id 属性组主键 + * @return 属性组 + */ + public AttributeGroup selectAttributeGroupById(Long id); + + /** + * 查询属性组列表 + * + * @param attributeGroup 属性组 + * @return 属性组集合 + */ + public List selectAttributeGroupList(AttributeGroup attributeGroup); + + /** + * 新增属性组 + * + * @param attributeGroup 属性组 + * @return 结果 + */ + public int insertAttributeGroup(AttributeGroup attributeGroup); + + /** + * 修改属性组 + * + * @param attributeGroup 属性组 + * @return 结果 + */ + public int updateAttributeGroup(AttributeGroup attributeGroup); + + /** + * 删除属性组 + * + * @param id 属性组主键 + * @return 结果 + */ + public int deleteAttributeGroupById(Long id); + + /** + * 批量删除属性组 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAttributeGroupByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/AttributeMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/AttributeMapper.java new file mode 100644 index 0000000..6d5cb55 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/AttributeMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.Attribute; + +/** + * 商品属性Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface AttributeMapper +{ + /** + * 查询商品属性 + * + * @param id 商品属性主键 + * @return 商品属性 + */ + public Attribute selectAttributeById(Long id); + + /** + * 查询商品属性列表 + * + * @param attribute 商品属性 + * @return 商品属性集合 + */ + public List selectAttributeList(Attribute attribute); + + /** + * 新增商品属性 + * + * @param attribute 商品属性 + * @return 结果 + */ + public int insertAttribute(Attribute attribute); + + /** + * 修改商品属性 + * + * @param attribute 商品属性 + * @return 结果 + */ + public int updateAttribute(Attribute attribute); + + /** + * 删除商品属性 + * + * @param id 商品属性主键 + * @return 结果 + */ + public int deleteAttributeById(Long id); + + /** + * 批量删除商品属性 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAttributeByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/BrandInfoMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/BrandInfoMapper.java new file mode 100644 index 0000000..7feb86c --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/BrandInfoMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.BrandInfo; + +/** + * 商品品牌Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface BrandInfoMapper +{ + /** + * 查询商品品牌 + * + * @param id 商品品牌主键 + * @return 商品品牌 + */ + public BrandInfo selectBrandInfoById(Long id); + + /** + * 查询商品品牌列表 + * + * @param brandInfo 商品品牌 + * @return 商品品牌集合 + */ + public List selectBrandInfoList(BrandInfo brandInfo); + + /** + * 新增商品品牌 + * + * @param brandInfo 商品品牌 + * @return 结果 + */ + public int insertBrandInfo(BrandInfo brandInfo); + + /** + * 修改商品品牌 + * + * @param brandInfo 商品品牌 + * @return 结果 + */ + public int updateBrandInfo(BrandInfo brandInfo); + + /** + * 删除商品品牌 + * + * @param id 商品品牌主键 + * @return 结果 + */ + public int deleteBrandInfoById(Long id); + + /** + * 批量删除商品品牌 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBrandInfoByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/BrandProductMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/BrandProductMapper.java new file mode 100644 index 0000000..98142a4 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/BrandProductMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.BrandProduct; + +/** + * 品牌商品中间Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface BrandProductMapper +{ + /** + * 查询品牌商品中间 + * + * @param id 品牌商品中间主键 + * @return 品牌商品中间 + */ + public BrandProduct selectBrandProductById(Long id); + + /** + * 查询品牌商品中间列表 + * + * @param brandProduct 品牌商品中间 + * @return 品牌商品中间集合 + */ + public List selectBrandProductList(BrandProduct brandProduct); + + /** + * 新增品牌商品中间 + * + * @param brandProduct 品牌商品中间 + * @return 结果 + */ + public int insertBrandProduct(BrandProduct brandProduct); + + /** + * 修改品牌商品中间 + * + * @param brandProduct 品牌商品中间 + * @return 结果 + */ + public int updateBrandProduct(BrandProduct brandProduct); + + /** + * 删除品牌商品中间 + * + * @param id 品牌商品中间主键 + * @return 结果 + */ + public int deleteBrandProductById(Long id); + + /** + * 批量删除品牌商品中间 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBrandProductByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryAttributeGroupMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryAttributeGroupMapper.java new file mode 100644 index 0000000..068c0c8 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryAttributeGroupMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.CategoryAttributeGroup; + +/** + * 品类Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface CategoryAttributeGroupMapper +{ + /** + * 查询品类 + * + * @param id 品类主键 + * @return 品类 + */ + public CategoryAttributeGroup selectCategoryAttributeGroupById(Long id); + + /** + * 查询品类列表 + * + * @param categoryAttributeGroup 品类 + * @return 品类集合 + */ + public List selectCategoryAttributeGroupList(CategoryAttributeGroup categoryAttributeGroup); + + /** + * 新增品类 + * + * @param categoryAttributeGroup 品类 + * @return 结果 + */ + public int insertCategoryAttributeGroup(CategoryAttributeGroup categoryAttributeGroup); + + /** + * 修改品类 + * + * @param categoryAttributeGroup 品类 + * @return 结果 + */ + public int updateCategoryAttributeGroup(CategoryAttributeGroup categoryAttributeGroup); + + /** + * 删除品类 + * + * @param id 品类主键 + * @return 结果 + */ + public int deleteCategoryAttributeGroupById(Long id); + + /** + * 批量删除品类 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCategoryAttributeGroupByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryAttributeMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryAttributeMapper.java new file mode 100644 index 0000000..a26de01 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryAttributeMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.CategoryAttribute; + +/** + * 品类Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface CategoryAttributeMapper +{ + /** + * 查询品类 + * + * @param id 品类主键 + * @return 品类 + */ + public CategoryAttribute selectCategoryAttributeById(Long id); + + /** + * 查询品类列表 + * + * @param categoryAttribute 品类 + * @return 品类集合 + */ + public List selectCategoryAttributeList(CategoryAttribute categoryAttribute); + + /** + * 新增品类 + * + * @param categoryAttribute 品类 + * @return 结果 + */ + public int insertCategoryAttribute(CategoryAttribute categoryAttribute); + + /** + * 修改品类 + * + * @param categoryAttribute 品类 + * @return 结果 + */ + public int updateCategoryAttribute(CategoryAttribute categoryAttribute); + + /** + * 删除品类 + * + * @param id 品类主键 + * @return 结果 + */ + public int deleteCategoryAttributeById(Long id); + + /** + * 批量删除品类 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCategoryAttributeByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryBrandMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryBrandMapper.java new file mode 100644 index 0000000..306cc13 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryBrandMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.CategoryBrand; + +/** + * 品类Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface CategoryBrandMapper +{ + /** + * 查询品类 + * + * @param id 品类主键 + * @return 品类 + */ + public CategoryBrand selectCategoryBrandById(Long id); + + /** + * 查询品类列表 + * + * @param categoryBrand 品类 + * @return 品类集合 + */ + public List selectCategoryBrandList(CategoryBrand categoryBrand); + + /** + * 新增品类 + * + * @param categoryBrand 品类 + * @return 结果 + */ + public int insertCategoryBrand(CategoryBrand categoryBrand); + + /** + * 修改品类 + * + * @param categoryBrand 品类 + * @return 结果 + */ + public int updateCategoryBrand(CategoryBrand categoryBrand); + + /** + * 删除品类 + * + * @param id 品类主键 + * @return 结果 + */ + public int deleteCategoryBrandById(Long id); + + /** + * 批量删除品类 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCategoryBrandByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java new file mode 100644 index 0000000..34edba8 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.CategoryInfo; + +/** + * 品类信息Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface CategoryInfoMapper +{ + /** + * 查询品类信息 + * + * @param id 品类信息主键 + * @return 品类信息 + */ + public CategoryInfo selectCategoryInfoById(Long id); + + /** + * 查询品类信息列表 + * + * @param categoryInfo 品类信息 + * @return 品类信息集合 + */ + public List selectCategoryInfoList(CategoryInfo categoryInfo); + + /** + * 新增品类信息 + * + * @param categoryInfo 品类信息 + * @return 结果 + */ + public int insertCategoryInfo(CategoryInfo categoryInfo); + + /** + * 修改品类信息 + * + * @param categoryInfo 品类信息 + * @return 结果 + */ + public int updateCategoryInfo(CategoryInfo categoryInfo); + + /** + * 删除品类信息 + * + * @param id 品类信息主键 + * @return 结果 + */ + public int deleteCategoryInfoById(Long id); + + /** + * 批量删除品类信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCategoryInfoByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CommentLikeMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CommentLikeMapper.java new file mode 100644 index 0000000..d0b1e94 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/CommentLikeMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.CommentLike; + +/** + * 评论点赞Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface CommentLikeMapper +{ + /** + * 查询评论点赞 + * + * @param id 评论点赞主键 + * @return 评论点赞 + */ + public CommentLike selectCommentLikeById(Long id); + + /** + * 查询评论点赞列表 + * + * @param commentLike 评论点赞 + * @return 评论点赞集合 + */ + public List selectCommentLikeList(CommentLike commentLike); + + /** + * 新增评论点赞 + * + * @param commentLike 评论点赞 + * @return 结果 + */ + public int insertCommentLike(CommentLike commentLike); + + /** + * 修改评论点赞 + * + * @param commentLike 评论点赞 + * @return 结果 + */ + public int updateCommentLike(CommentLike commentLike); + + /** + * 删除评论点赞 + * + * @param id 评论点赞主键 + * @return 结果 + */ + public int deleteCommentLikeById(Long id); + + /** + * 批量删除评论点赞 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteCommentLikeByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductAttributeMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductAttributeMapper.java new file mode 100644 index 0000000..c21e8a1 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductAttributeMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.ProductAttribute; + +/** + * 商品属性Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface ProductAttributeMapper +{ + /** + * 查询商品属性 + * + * @param id 商品属性主键 + * @return 商品属性 + */ + public ProductAttribute selectProductAttributeById(Long id); + + /** + * 查询商品属性列表 + * + * @param productAttribute 商品属性 + * @return 商品属性集合 + */ + public List selectProductAttributeList(ProductAttribute productAttribute); + + /** + * 新增商品属性 + * + * @param productAttribute 商品属性 + * @return 结果 + */ + public int insertProductAttribute(ProductAttribute productAttribute); + + /** + * 修改商品属性 + * + * @param productAttribute 商品属性 + * @return 结果 + */ + public int updateProductAttribute(ProductAttribute productAttribute); + + /** + * 删除商品属性 + * + * @param id 商品属性主键 + * @return 结果 + */ + public int deleteProductAttributeById(Long id); + + /** + * 批量删除商品属性 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProductAttributeByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductCommentMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductCommentMapper.java new file mode 100644 index 0000000..50d5a66 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductCommentMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.ProductComment; + +/** + * 商品评论Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface ProductCommentMapper +{ + /** + * 查询商品评论 + * + * @param id 商品评论主键 + * @return 商品评论 + */ + public ProductComment selectProductCommentById(Long id); + + /** + * 查询商品评论列表 + * + * @param productComment 商品评论 + * @return 商品评论集合 + */ + public List selectProductCommentList(ProductComment productComment); + + /** + * 新增商品评论 + * + * @param productComment 商品评论 + * @return 结果 + */ + public int insertProductComment(ProductComment productComment); + + /** + * 修改商品评论 + * + * @param productComment 商品评论 + * @return 结果 + */ + public int updateProductComment(ProductComment productComment); + + /** + * 删除商品评论 + * + * @param id 商品评论主键 + * @return 结果 + */ + public int deleteProductCommentById(Long id); + + /** + * 批量删除商品评论 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProductCommentByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductMapper.java new file mode 100644 index 0000000..98e33e2 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.Product; + +/** + * 商品信息Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface ProductMapper +{ + /** + * 查询商品信息 + * + * @param id 商品信息主键 + * @return 商品信息 + */ + public Product selectProductById(Long id); + + /** + * 查询商品信息列表 + * + * @param product 商品信息 + * @return 商品信息集合 + */ + public List selectProductList(Product product); + + /** + * 新增商品信息 + * + * @param product 商品信息 + * @return 结果 + */ + public int insertProduct(Product product); + + /** + * 修改商品信息 + * + * @param product 商品信息 + * @return 结果 + */ + public int updateProduct(Product product); + + /** + * 删除商品信息 + * + * @param id 商品信息主键 + * @return 结果 + */ + public int deleteProductById(Long id); + + /** + * 批量删除商品信息 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProductByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductSkuMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductSkuMapper.java new file mode 100644 index 0000000..8ea9fae --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/ProductSkuMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.ProductSku; + +/** + * 商品skuMapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface ProductSkuMapper +{ + /** + * 查询商品sku + * + * @param id 商品sku主键 + * @return 商品sku + */ + public ProductSku selectProductSkuById(Long id); + + /** + * 查询商品sku列表 + * + * @param productSku 商品sku + * @return 商品sku集合 + */ + public List selectProductSkuList(ProductSku productSku); + + /** + * 新增商品sku + * + * @param productSku 商品sku + * @return 结果 + */ + public int insertProductSku(ProductSku productSku); + + /** + * 修改商品sku + * + * @param productSku 商品sku + * @return 结果 + */ + public int updateProductSku(ProductSku productSku); + + /** + * 删除商品sku + * + * @param id 商品sku主键 + * @return 结果 + */ + public int deleteProductSkuById(Long id); + + /** + * 批量删除商品sku + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProductSkuByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/RuleAttrMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/RuleAttrMapper.java new file mode 100644 index 0000000..118e978 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/RuleAttrMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.RuleAttr; + +/** + * 规格详情Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface RuleAttrMapper +{ + /** + * 查询规格详情 + * + * @param id 规格详情主键 + * @return 规格详情 + */ + public RuleAttr selectRuleAttrById(Long id); + + /** + * 查询规格详情列表 + * + * @param ruleAttr 规格详情 + * @return 规格详情集合 + */ + public List selectRuleAttrList(RuleAttr ruleAttr); + + /** + * 新增规格详情 + * + * @param ruleAttr 规格详情 + * @return 结果 + */ + public int insertRuleAttr(RuleAttr ruleAttr); + + /** + * 修改规格详情 + * + * @param ruleAttr 规格详情 + * @return 结果 + */ + public int updateRuleAttr(RuleAttr ruleAttr); + + /** + * 删除规格详情 + * + * @param id 规格详情主键 + * @return 结果 + */ + public int deleteRuleAttrById(Long id); + + /** + * 批量删除规格详情 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteRuleAttrByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/RuleMapper.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/RuleMapper.java new file mode 100644 index 0000000..786d536 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/mapper/RuleMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.Rule; + +/** + * 商品规格Mapper接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface RuleMapper +{ + /** + * 查询商品规格 + * + * @param id 商品规格主键 + * @return 商品规格 + */ + public Rule selectRuleById(Long id); + + /** + * 查询商品规格列表 + * + * @param rule 商品规格 + * @return 商品规格集合 + */ + public List selectRuleList(Rule rule); + + /** + * 新增商品规格 + * + * @param rule 商品规格 + * @return 结果 + */ + public int insertRule(Rule rule); + + /** + * 修改商品规格 + * + * @param rule 商品规格 + * @return 结果 + */ + public int updateRule(Rule rule); + + /** + * 删除商品规格 + * + * @param id 商品规格主键 + * @return 结果 + */ + public int deleteRuleById(Long id); + + /** + * 批量删除商品规格 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteRuleByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IAttributeGroupService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IAttributeGroupService.java new file mode 100644 index 0000000..71621c4 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IAttributeGroupService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.AttributeGroup; + +/** + * 属性组Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface IAttributeGroupService +{ + /** + * 查询属性组 + * + * @param id 属性组主键 + * @return 属性组 + */ + public AttributeGroup selectAttributeGroupById(Long id); + + /** + * 查询属性组列表 + * + * @param attributeGroup 属性组 + * @return 属性组集合 + */ + public List selectAttributeGroupList(AttributeGroup attributeGroup); + + /** + * 新增属性组 + * + * @param attributeGroup 属性组 + * @return 结果 + */ + public int insertAttributeGroup(AttributeGroup attributeGroup); + + /** + * 修改属性组 + * + * @param attributeGroup 属性组 + * @return 结果 + */ + public int updateAttributeGroup(AttributeGroup attributeGroup); + + /** + * 批量删除属性组 + * + * @param ids 需要删除的属性组主键集合 + * @return 结果 + */ + public int deleteAttributeGroupByIds(Long[] ids); + + /** + * 删除属性组信息 + * + * @param id 属性组主键 + * @return 结果 + */ + public int deleteAttributeGroupById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IAttributeService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IAttributeService.java new file mode 100644 index 0000000..ec95bdc --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IAttributeService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.Attribute; + +/** + * 商品属性Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface IAttributeService +{ + /** + * 查询商品属性 + * + * @param id 商品属性主键 + * @return 商品属性 + */ + public Attribute selectAttributeById(Long id); + + /** + * 查询商品属性列表 + * + * @param attribute 商品属性 + * @return 商品属性集合 + */ + public List selectAttributeList(Attribute attribute); + + /** + * 新增商品属性 + * + * @param attribute 商品属性 + * @return 结果 + */ + public int insertAttribute(Attribute attribute); + + /** + * 修改商品属性 + * + * @param attribute 商品属性 + * @return 结果 + */ + public int updateAttribute(Attribute attribute); + + /** + * 批量删除商品属性 + * + * @param ids 需要删除的商品属性主键集合 + * @return 结果 + */ + public int deleteAttributeByIds(Long[] ids); + + /** + * 删除商品属性信息 + * + * @param id 商品属性主键 + * @return 结果 + */ + public int deleteAttributeById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IBrandInfoService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IBrandInfoService.java new file mode 100644 index 0000000..e9e913b --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IBrandInfoService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.BrandInfo; + +/** + * 商品品牌Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface IBrandInfoService +{ + /** + * 查询商品品牌 + * + * @param id 商品品牌主键 + * @return 商品品牌 + */ + public BrandInfo selectBrandInfoById(Long id); + + /** + * 查询商品品牌列表 + * + * @param brandInfo 商品品牌 + * @return 商品品牌集合 + */ + public List selectBrandInfoList(BrandInfo brandInfo); + + /** + * 新增商品品牌 + * + * @param brandInfo 商品品牌 + * @return 结果 + */ + public int insertBrandInfo(BrandInfo brandInfo); + + /** + * 修改商品品牌 + * + * @param brandInfo 商品品牌 + * @return 结果 + */ + public int updateBrandInfo(BrandInfo brandInfo); + + /** + * 批量删除商品品牌 + * + * @param ids 需要删除的商品品牌主键集合 + * @return 结果 + */ + public int deleteBrandInfoByIds(Long[] ids); + + /** + * 删除商品品牌信息 + * + * @param id 商品品牌主键 + * @return 结果 + */ + public int deleteBrandInfoById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IBrandProductService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IBrandProductService.java new file mode 100644 index 0000000..e3f75ba --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IBrandProductService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.BrandProduct; + +/** + * 品牌商品中间Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface IBrandProductService +{ + /** + * 查询品牌商品中间 + * + * @param id 品牌商品中间主键 + * @return 品牌商品中间 + */ + public BrandProduct selectBrandProductById(Long id); + + /** + * 查询品牌商品中间列表 + * + * @param brandProduct 品牌商品中间 + * @return 品牌商品中间集合 + */ + public List selectBrandProductList(BrandProduct brandProduct); + + /** + * 新增品牌商品中间 + * + * @param brandProduct 品牌商品中间 + * @return 结果 + */ + public int insertBrandProduct(BrandProduct brandProduct); + + /** + * 修改品牌商品中间 + * + * @param brandProduct 品牌商品中间 + * @return 结果 + */ + public int updateBrandProduct(BrandProduct brandProduct); + + /** + * 批量删除品牌商品中间 + * + * @param ids 需要删除的品牌商品中间主键集合 + * @return 结果 + */ + public int deleteBrandProductByIds(Long[] ids); + + /** + * 删除品牌商品中间信息 + * + * @param id 品牌商品中间主键 + * @return 结果 + */ + public int deleteBrandProductById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryAttributeGroupService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryAttributeGroupService.java new file mode 100644 index 0000000..4878684 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryAttributeGroupService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.CategoryAttributeGroup; + +/** + * 品类Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface ICategoryAttributeGroupService +{ + /** + * 查询品类 + * + * @param id 品类主键 + * @return 品类 + */ + public CategoryAttributeGroup selectCategoryAttributeGroupById(Long id); + + /** + * 查询品类列表 + * + * @param categoryAttributeGroup 品类 + * @return 品类集合 + */ + public List selectCategoryAttributeGroupList(CategoryAttributeGroup categoryAttributeGroup); + + /** + * 新增品类 + * + * @param categoryAttributeGroup 品类 + * @return 结果 + */ + public int insertCategoryAttributeGroup(CategoryAttributeGroup categoryAttributeGroup); + + /** + * 修改品类 + * + * @param categoryAttributeGroup 品类 + * @return 结果 + */ + public int updateCategoryAttributeGroup(CategoryAttributeGroup categoryAttributeGroup); + + /** + * 批量删除品类 + * + * @param ids 需要删除的品类主键集合 + * @return 结果 + */ + public int deleteCategoryAttributeGroupByIds(Long[] ids); + + /** + * 删除品类信息 + * + * @param id 品类主键 + * @return 结果 + */ + public int deleteCategoryAttributeGroupById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryAttributeService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryAttributeService.java new file mode 100644 index 0000000..57ca2b2 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryAttributeService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.CategoryAttribute; + +/** + * 品类Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface ICategoryAttributeService +{ + /** + * 查询品类 + * + * @param id 品类主键 + * @return 品类 + */ + public CategoryAttribute selectCategoryAttributeById(Long id); + + /** + * 查询品类列表 + * + * @param categoryAttribute 品类 + * @return 品类集合 + */ + public List selectCategoryAttributeList(CategoryAttribute categoryAttribute); + + /** + * 新增品类 + * + * @param categoryAttribute 品类 + * @return 结果 + */ + public int insertCategoryAttribute(CategoryAttribute categoryAttribute); + + /** + * 修改品类 + * + * @param categoryAttribute 品类 + * @return 结果 + */ + public int updateCategoryAttribute(CategoryAttribute categoryAttribute); + + /** + * 批量删除品类 + * + * @param ids 需要删除的品类主键集合 + * @return 结果 + */ + public int deleteCategoryAttributeByIds(Long[] ids); + + /** + * 删除品类信息 + * + * @param id 品类主键 + * @return 结果 + */ + public int deleteCategoryAttributeById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryBrandService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryBrandService.java new file mode 100644 index 0000000..a4b997e --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryBrandService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.CategoryBrand; + +/** + * 品类Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface ICategoryBrandService +{ + /** + * 查询品类 + * + * @param id 品类主键 + * @return 品类 + */ + public CategoryBrand selectCategoryBrandById(Long id); + + /** + * 查询品类列表 + * + * @param categoryBrand 品类 + * @return 品类集合 + */ + public List selectCategoryBrandList(CategoryBrand categoryBrand); + + /** + * 新增品类 + * + * @param categoryBrand 品类 + * @return 结果 + */ + public int insertCategoryBrand(CategoryBrand categoryBrand); + + /** + * 修改品类 + * + * @param categoryBrand 品类 + * @return 结果 + */ + public int updateCategoryBrand(CategoryBrand categoryBrand); + + /** + * 批量删除品类 + * + * @param ids 需要删除的品类主键集合 + * @return 结果 + */ + public int deleteCategoryBrandByIds(Long[] ids); + + /** + * 删除品类信息 + * + * @param id 品类主键 + * @return 结果 + */ + public int deleteCategoryBrandById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryInfoService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryInfoService.java new file mode 100644 index 0000000..a6d754f --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICategoryInfoService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.CategoryInfo; + +/** + * 品类信息Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface ICategoryInfoService +{ + /** + * 查询品类信息 + * + * @param id 品类信息主键 + * @return 品类信息 + */ + public CategoryInfo selectCategoryInfoById(Long id); + + /** + * 查询品类信息列表 + * + * @param categoryInfo 品类信息 + * @return 品类信息集合 + */ + public List selectCategoryInfoList(CategoryInfo categoryInfo); + + /** + * 新增品类信息 + * + * @param categoryInfo 品类信息 + * @return 结果 + */ + public int insertCategoryInfo(CategoryInfo categoryInfo); + + /** + * 修改品类信息 + * + * @param categoryInfo 品类信息 + * @return 结果 + */ + public int updateCategoryInfo(CategoryInfo categoryInfo); + + /** + * 批量删除品类信息 + * + * @param ids 需要删除的品类信息主键集合 + * @return 结果 + */ + public int deleteCategoryInfoByIds(Long[] ids); + + /** + * 删除品类信息信息 + * + * @param id 品类信息主键 + * @return 结果 + */ + public int deleteCategoryInfoById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICommentLikeService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICommentLikeService.java new file mode 100644 index 0000000..d880c59 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/ICommentLikeService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.CommentLike; + +/** + * 评论点赞Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface ICommentLikeService +{ + /** + * 查询评论点赞 + * + * @param id 评论点赞主键 + * @return 评论点赞 + */ + public CommentLike selectCommentLikeById(Long id); + + /** + * 查询评论点赞列表 + * + * @param commentLike 评论点赞 + * @return 评论点赞集合 + */ + public List selectCommentLikeList(CommentLike commentLike); + + /** + * 新增评论点赞 + * + * @param commentLike 评论点赞 + * @return 结果 + */ + public int insertCommentLike(CommentLike commentLike); + + /** + * 修改评论点赞 + * + * @param commentLike 评论点赞 + * @return 结果 + */ + public int updateCommentLike(CommentLike commentLike); + + /** + * 批量删除评论点赞 + * + * @param ids 需要删除的评论点赞主键集合 + * @return 结果 + */ + public int deleteCommentLikeByIds(Long[] ids); + + /** + * 删除评论点赞信息 + * + * @param id 评论点赞主键 + * @return 结果 + */ + public int deleteCommentLikeById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductAttributeService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductAttributeService.java new file mode 100644 index 0000000..0b4eb2f --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductAttributeService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.ProductAttribute; + +/** + * 商品属性Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface IProductAttributeService +{ + /** + * 查询商品属性 + * + * @param id 商品属性主键 + * @return 商品属性 + */ + public ProductAttribute selectProductAttributeById(Long id); + + /** + * 查询商品属性列表 + * + * @param productAttribute 商品属性 + * @return 商品属性集合 + */ + public List selectProductAttributeList(ProductAttribute productAttribute); + + /** + * 新增商品属性 + * + * @param productAttribute 商品属性 + * @return 结果 + */ + public int insertProductAttribute(ProductAttribute productAttribute); + + /** + * 修改商品属性 + * + * @param productAttribute 商品属性 + * @return 结果 + */ + public int updateProductAttribute(ProductAttribute productAttribute); + + /** + * 批量删除商品属性 + * + * @param ids 需要删除的商品属性主键集合 + * @return 结果 + */ + public int deleteProductAttributeByIds(Long[] ids); + + /** + * 删除商品属性信息 + * + * @param id 商品属性主键 + * @return 结果 + */ + public int deleteProductAttributeById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductCommentService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductCommentService.java new file mode 100644 index 0000000..71a9ba4 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductCommentService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.ProductComment; + +/** + * 商品评论Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface IProductCommentService +{ + /** + * 查询商品评论 + * + * @param id 商品评论主键 + * @return 商品评论 + */ + public ProductComment selectProductCommentById(Long id); + + /** + * 查询商品评论列表 + * + * @param productComment 商品评论 + * @return 商品评论集合 + */ + public List selectProductCommentList(ProductComment productComment); + + /** + * 新增商品评论 + * + * @param productComment 商品评论 + * @return 结果 + */ + public int insertProductComment(ProductComment productComment); + + /** + * 修改商品评论 + * + * @param productComment 商品评论 + * @return 结果 + */ + public int updateProductComment(ProductComment productComment); + + /** + * 批量删除商品评论 + * + * @param ids 需要删除的商品评论主键集合 + * @return 结果 + */ + public int deleteProductCommentByIds(Long[] ids); + + /** + * 删除商品评论信息 + * + * @param id 商品评论主键 + * @return 结果 + */ + public int deleteProductCommentById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductService.java new file mode 100644 index 0000000..7684ec5 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.Product; + +/** + * 商品信息Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface IProductService +{ + /** + * 查询商品信息 + * + * @param id 商品信息主键 + * @return 商品信息 + */ + public Product selectProductById(Long id); + + /** + * 查询商品信息列表 + * + * @param product 商品信息 + * @return 商品信息集合 + */ + public List selectProductList(Product product); + + /** + * 新增商品信息 + * + * @param product 商品信息 + * @return 结果 + */ + public int insertProduct(Product product); + + /** + * 修改商品信息 + * + * @param product 商品信息 + * @return 结果 + */ + public int updateProduct(Product product); + + /** + * 批量删除商品信息 + * + * @param ids 需要删除的商品信息主键集合 + * @return 结果 + */ + public int deleteProductByIds(Long[] ids); + + /** + * 删除商品信息信息 + * + * @param id 商品信息主键 + * @return 结果 + */ + public int deleteProductById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductSkuService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductSkuService.java new file mode 100644 index 0000000..5d0f053 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IProductSkuService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.ProductSku; + +/** + * 商品skuService接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface IProductSkuService +{ + /** + * 查询商品sku + * + * @param id 商品sku主键 + * @return 商品sku + */ + public ProductSku selectProductSkuById(Long id); + + /** + * 查询商品sku列表 + * + * @param productSku 商品sku + * @return 商品sku集合 + */ + public List selectProductSkuList(ProductSku productSku); + + /** + * 新增商品sku + * + * @param productSku 商品sku + * @return 结果 + */ + public int insertProductSku(ProductSku productSku); + + /** + * 修改商品sku + * + * @param productSku 商品sku + * @return 结果 + */ + public int updateProductSku(ProductSku productSku); + + /** + * 批量删除商品sku + * + * @param ids 需要删除的商品sku主键集合 + * @return 结果 + */ + public int deleteProductSkuByIds(Long[] ids); + + /** + * 删除商品sku信息 + * + * @param id 商品sku主键 + * @return 结果 + */ + public int deleteProductSkuById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IRuleAttrService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IRuleAttrService.java new file mode 100644 index 0000000..413d788 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IRuleAttrService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.RuleAttr; + +/** + * 规格详情Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface IRuleAttrService +{ + /** + * 查询规格详情 + * + * @param id 规格详情主键 + * @return 规格详情 + */ + public RuleAttr selectRuleAttrById(Long id); + + /** + * 查询规格详情列表 + * + * @param ruleAttr 规格详情 + * @return 规格详情集合 + */ + public List selectRuleAttrList(RuleAttr ruleAttr); + + /** + * 新增规格详情 + * + * @param ruleAttr 规格详情 + * @return 结果 + */ + public int insertRuleAttr(RuleAttr ruleAttr); + + /** + * 修改规格详情 + * + * @param ruleAttr 规格详情 + * @return 结果 + */ + public int updateRuleAttr(RuleAttr ruleAttr); + + /** + * 批量删除规格详情 + * + * @param ids 需要删除的规格详情主键集合 + * @return 结果 + */ + public int deleteRuleAttrByIds(Long[] ids); + + /** + * 删除规格详情信息 + * + * @param id 规格详情主键 + * @return 结果 + */ + public int deleteRuleAttrById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IRuleService.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IRuleService.java new file mode 100644 index 0000000..68ec24f --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/IRuleService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.Rule; + +/** + * 商品规格Service接口 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +public interface IRuleService +{ + /** + * 查询商品规格 + * + * @param id 商品规格主键 + * @return 商品规格 + */ + public Rule selectRuleById(Long id); + + /** + * 查询商品规格列表 + * + * @param rule 商品规格 + * @return 商品规格集合 + */ + public List selectRuleList(Rule rule); + + /** + * 新增商品规格 + * + * @param rule 商品规格 + * @return 结果 + */ + public int insertRule(Rule rule); + + /** + * 修改商品规格 + * + * @param rule 商品规格 + * @return 结果 + */ + public int updateRule(Rule rule); + + /** + * 批量删除商品规格 + * + * @param ids 需要删除的商品规格主键集合 + * @return 结果 + */ + public int deleteRuleByIds(Long[] ids); + + /** + * 删除商品规格信息 + * + * @param id 商品规格主键 + * @return 结果 + */ + public int deleteRuleById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java new file mode 100644 index 0000000..1029dc7 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.AttributeGroupMapper; +import com.muyu.product.domain.AttributeGroup; +import com.muyu.product.service.IAttributeGroupService; + +/** + * 属性组Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class AttributeGroupServiceImpl implements IAttributeGroupService +{ + @Autowired + private AttributeGroupMapper attributeGroupMapper; + + /** + * 查询属性组 + * + * @param id 属性组主键 + * @return 属性组 + */ + @Override + public AttributeGroup selectAttributeGroupById(Long id) + { + return attributeGroupMapper.selectAttributeGroupById(id); + } + + /** + * 查询属性组列表 + * + * @param attributeGroup 属性组 + * @return 属性组 + */ + @Override + public List selectAttributeGroupList(AttributeGroup attributeGroup) + { + return attributeGroupMapper.selectAttributeGroupList(attributeGroup); + } + + /** + * 新增属性组 + * + * @param attributeGroup 属性组 + * @return 结果 + */ + @Override + public int insertAttributeGroup(AttributeGroup attributeGroup) + { + attributeGroup.setCreateTime(DateUtils.getNowDate()); + return attributeGroupMapper.insertAttributeGroup(attributeGroup); + } + + /** + * 修改属性组 + * + * @param attributeGroup 属性组 + * @return 结果 + */ + @Override + public int updateAttributeGroup(AttributeGroup attributeGroup) + { + attributeGroup.setUpdateTime(DateUtils.getNowDate()); + return attributeGroupMapper.updateAttributeGroup(attributeGroup); + } + + /** + * 批量删除属性组 + * + * @param ids 需要删除的属性组主键 + * @return 结果 + */ + @Override + public int deleteAttributeGroupByIds(Long[] ids) + { + return attributeGroupMapper.deleteAttributeGroupByIds(ids); + } + + /** + * 删除属性组信息 + * + * @param id 属性组主键 + * @return 结果 + */ + @Override + public int deleteAttributeGroupById(Long id) + { + return attributeGroupMapper.deleteAttributeGroupById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/AttributeServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/AttributeServiceImpl.java new file mode 100644 index 0000000..eb5e3b9 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/AttributeServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.AttributeMapper; +import com.muyu.product.domain.Attribute; +import com.muyu.product.service.IAttributeService; + +/** + * 商品属性Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class AttributeServiceImpl implements IAttributeService +{ + @Autowired + private AttributeMapper attributeMapper; + + /** + * 查询商品属性 + * + * @param id 商品属性主键 + * @return 商品属性 + */ + @Override + public Attribute selectAttributeById(Long id) + { + return attributeMapper.selectAttributeById(id); + } + + /** + * 查询商品属性列表 + * + * @param attribute 商品属性 + * @return 商品属性 + */ + @Override + public List selectAttributeList(Attribute attribute) + { + return attributeMapper.selectAttributeList(attribute); + } + + /** + * 新增商品属性 + * + * @param attribute 商品属性 + * @return 结果 + */ + @Override + public int insertAttribute(Attribute attribute) + { + attribute.setCreateTime(DateUtils.getNowDate()); + return attributeMapper.insertAttribute(attribute); + } + + /** + * 修改商品属性 + * + * @param attribute 商品属性 + * @return 结果 + */ + @Override + public int updateAttribute(Attribute attribute) + { + attribute.setUpdateTime(DateUtils.getNowDate()); + return attributeMapper.updateAttribute(attribute); + } + + /** + * 批量删除商品属性 + * + * @param ids 需要删除的商品属性主键 + * @return 结果 + */ + @Override + public int deleteAttributeByIds(Long[] ids) + { + return attributeMapper.deleteAttributeByIds(ids); + } + + /** + * 删除商品属性信息 + * + * @param id 商品属性主键 + * @return 结果 + */ + @Override + public int deleteAttributeById(Long id) + { + return attributeMapper.deleteAttributeById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/BrandInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/BrandInfoServiceImpl.java new file mode 100644 index 0000000..b7858da --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/BrandInfoServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.BrandInfoMapper; +import com.muyu.product.domain.BrandInfo; +import com.muyu.product.service.IBrandInfoService; + +/** + * 商品品牌Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class BrandInfoServiceImpl implements IBrandInfoService +{ + @Autowired + private BrandInfoMapper brandInfoMapper; + + /** + * 查询商品品牌 + * + * @param id 商品品牌主键 + * @return 商品品牌 + */ + @Override + public BrandInfo selectBrandInfoById(Long id) + { + return brandInfoMapper.selectBrandInfoById(id); + } + + /** + * 查询商品品牌列表 + * + * @param brandInfo 商品品牌 + * @return 商品品牌 + */ + @Override + public List selectBrandInfoList(BrandInfo brandInfo) + { + return brandInfoMapper.selectBrandInfoList(brandInfo); + } + + /** + * 新增商品品牌 + * + * @param brandInfo 商品品牌 + * @return 结果 + */ + @Override + public int insertBrandInfo(BrandInfo brandInfo) + { + brandInfo.setCreateTime(DateUtils.getNowDate()); + return brandInfoMapper.insertBrandInfo(brandInfo); + } + + /** + * 修改商品品牌 + * + * @param brandInfo 商品品牌 + * @return 结果 + */ + @Override + public int updateBrandInfo(BrandInfo brandInfo) + { + brandInfo.setUpdateTime(DateUtils.getNowDate()); + return brandInfoMapper.updateBrandInfo(brandInfo); + } + + /** + * 批量删除商品品牌 + * + * @param ids 需要删除的商品品牌主键 + * @return 结果 + */ + @Override + public int deleteBrandInfoByIds(Long[] ids) + { + return brandInfoMapper.deleteBrandInfoByIds(ids); + } + + /** + * 删除商品品牌信息 + * + * @param id 商品品牌主键 + * @return 结果 + */ + @Override + public int deleteBrandInfoById(Long id) + { + return brandInfoMapper.deleteBrandInfoById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/BrandProductServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/BrandProductServiceImpl.java new file mode 100644 index 0000000..c3ecb16 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/BrandProductServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.BrandProductMapper; +import com.muyu.product.domain.BrandProduct; +import com.muyu.product.service.IBrandProductService; + +/** + * 品牌商品中间Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class BrandProductServiceImpl implements IBrandProductService +{ + @Autowired + private BrandProductMapper brandProductMapper; + + /** + * 查询品牌商品中间 + * + * @param id 品牌商品中间主键 + * @return 品牌商品中间 + */ + @Override + public BrandProduct selectBrandProductById(Long id) + { + return brandProductMapper.selectBrandProductById(id); + } + + /** + * 查询品牌商品中间列表 + * + * @param brandProduct 品牌商品中间 + * @return 品牌商品中间 + */ + @Override + public List selectBrandProductList(BrandProduct brandProduct) + { + return brandProductMapper.selectBrandProductList(brandProduct); + } + + /** + * 新增品牌商品中间 + * + * @param brandProduct 品牌商品中间 + * @return 结果 + */ + @Override + public int insertBrandProduct(BrandProduct brandProduct) + { + brandProduct.setCreateTime(DateUtils.getNowDate()); + return brandProductMapper.insertBrandProduct(brandProduct); + } + + /** + * 修改品牌商品中间 + * + * @param brandProduct 品牌商品中间 + * @return 结果 + */ + @Override + public int updateBrandProduct(BrandProduct brandProduct) + { + brandProduct.setUpdateTime(DateUtils.getNowDate()); + return brandProductMapper.updateBrandProduct(brandProduct); + } + + /** + * 批量删除品牌商品中间 + * + * @param ids 需要删除的品牌商品中间主键 + * @return 结果 + */ + @Override + public int deleteBrandProductByIds(Long[] ids) + { + return brandProductMapper.deleteBrandProductByIds(ids); + } + + /** + * 删除品牌商品中间信息 + * + * @param id 品牌商品中间主键 + * @return 结果 + */ + @Override + public int deleteBrandProductById(Long id) + { + return brandProductMapper.deleteBrandProductById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryAttributeGroupServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryAttributeGroupServiceImpl.java new file mode 100644 index 0000000..dd2c2d1 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryAttributeGroupServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.CategoryAttributeGroupMapper; +import com.muyu.product.domain.CategoryAttributeGroup; +import com.muyu.product.service.ICategoryAttributeGroupService; + +/** + * 品类Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class CategoryAttributeGroupServiceImpl implements ICategoryAttributeGroupService +{ + @Autowired + private CategoryAttributeGroupMapper categoryAttributeGroupMapper; + + /** + * 查询品类 + * + * @param id 品类主键 + * @return 品类 + */ + @Override + public CategoryAttributeGroup selectCategoryAttributeGroupById(Long id) + { + return categoryAttributeGroupMapper.selectCategoryAttributeGroupById(id); + } + + /** + * 查询品类列表 + * + * @param categoryAttributeGroup 品类 + * @return 品类 + */ + @Override + public List selectCategoryAttributeGroupList(CategoryAttributeGroup categoryAttributeGroup) + { + return categoryAttributeGroupMapper.selectCategoryAttributeGroupList(categoryAttributeGroup); + } + + /** + * 新增品类 + * + * @param categoryAttributeGroup 品类 + * @return 结果 + */ + @Override + public int insertCategoryAttributeGroup(CategoryAttributeGroup categoryAttributeGroup) + { + categoryAttributeGroup.setCreateTime(DateUtils.getNowDate()); + return categoryAttributeGroupMapper.insertCategoryAttributeGroup(categoryAttributeGroup); + } + + /** + * 修改品类 + * + * @param categoryAttributeGroup 品类 + * @return 结果 + */ + @Override + public int updateCategoryAttributeGroup(CategoryAttributeGroup categoryAttributeGroup) + { + categoryAttributeGroup.setUpdateTime(DateUtils.getNowDate()); + return categoryAttributeGroupMapper.updateCategoryAttributeGroup(categoryAttributeGroup); + } + + /** + * 批量删除品类 + * + * @param ids 需要删除的品类主键 + * @return 结果 + */ + @Override + public int deleteCategoryAttributeGroupByIds(Long[] ids) + { + return categoryAttributeGroupMapper.deleteCategoryAttributeGroupByIds(ids); + } + + /** + * 删除品类信息 + * + * @param id 品类主键 + * @return 结果 + */ + @Override + public int deleteCategoryAttributeGroupById(Long id) + { + return categoryAttributeGroupMapper.deleteCategoryAttributeGroupById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryAttributeServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryAttributeServiceImpl.java new file mode 100644 index 0000000..b370941 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryAttributeServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.CategoryAttributeMapper; +import com.muyu.product.domain.CategoryAttribute; +import com.muyu.product.service.ICategoryAttributeService; + +/** + * 品类Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class CategoryAttributeServiceImpl implements ICategoryAttributeService +{ + @Autowired + private CategoryAttributeMapper categoryAttributeMapper; + + /** + * 查询品类 + * + * @param id 品类主键 + * @return 品类 + */ + @Override + public CategoryAttribute selectCategoryAttributeById(Long id) + { + return categoryAttributeMapper.selectCategoryAttributeById(id); + } + + /** + * 查询品类列表 + * + * @param categoryAttribute 品类 + * @return 品类 + */ + @Override + public List selectCategoryAttributeList(CategoryAttribute categoryAttribute) + { + return categoryAttributeMapper.selectCategoryAttributeList(categoryAttribute); + } + + /** + * 新增品类 + * + * @param categoryAttribute 品类 + * @return 结果 + */ + @Override + public int insertCategoryAttribute(CategoryAttribute categoryAttribute) + { + categoryAttribute.setCreateTime(DateUtils.getNowDate()); + return categoryAttributeMapper.insertCategoryAttribute(categoryAttribute); + } + + /** + * 修改品类 + * + * @param categoryAttribute 品类 + * @return 结果 + */ + @Override + public int updateCategoryAttribute(CategoryAttribute categoryAttribute) + { + categoryAttribute.setUpdateTime(DateUtils.getNowDate()); + return categoryAttributeMapper.updateCategoryAttribute(categoryAttribute); + } + + /** + * 批量删除品类 + * + * @param ids 需要删除的品类主键 + * @return 结果 + */ + @Override + public int deleteCategoryAttributeByIds(Long[] ids) + { + return categoryAttributeMapper.deleteCategoryAttributeByIds(ids); + } + + /** + * 删除品类信息 + * + * @param id 品类主键 + * @return 结果 + */ + @Override + public int deleteCategoryAttributeById(Long id) + { + return categoryAttributeMapper.deleteCategoryAttributeById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryBrandServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryBrandServiceImpl.java new file mode 100644 index 0000000..46b1765 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryBrandServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.CategoryBrandMapper; +import com.muyu.product.domain.CategoryBrand; +import com.muyu.product.service.ICategoryBrandService; + +/** + * 品类Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class CategoryBrandServiceImpl implements ICategoryBrandService +{ + @Autowired + private CategoryBrandMapper categoryBrandMapper; + + /** + * 查询品类 + * + * @param id 品类主键 + * @return 品类 + */ + @Override + public CategoryBrand selectCategoryBrandById(Long id) + { + return categoryBrandMapper.selectCategoryBrandById(id); + } + + /** + * 查询品类列表 + * + * @param categoryBrand 品类 + * @return 品类 + */ + @Override + public List selectCategoryBrandList(CategoryBrand categoryBrand) + { + return categoryBrandMapper.selectCategoryBrandList(categoryBrand); + } + + /** + * 新增品类 + * + * @param categoryBrand 品类 + * @return 结果 + */ + @Override + public int insertCategoryBrand(CategoryBrand categoryBrand) + { + categoryBrand.setCreateTime(DateUtils.getNowDate()); + return categoryBrandMapper.insertCategoryBrand(categoryBrand); + } + + /** + * 修改品类 + * + * @param categoryBrand 品类 + * @return 结果 + */ + @Override + public int updateCategoryBrand(CategoryBrand categoryBrand) + { + categoryBrand.setUpdateTime(DateUtils.getNowDate()); + return categoryBrandMapper.updateCategoryBrand(categoryBrand); + } + + /** + * 批量删除品类 + * + * @param ids 需要删除的品类主键 + * @return 结果 + */ + @Override + public int deleteCategoryBrandByIds(Long[] ids) + { + return categoryBrandMapper.deleteCategoryBrandByIds(ids); + } + + /** + * 删除品类信息 + * + * @param id 品类主键 + * @return 结果 + */ + @Override + public int deleteCategoryBrandById(Long id) + { + return categoryBrandMapper.deleteCategoryBrandById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryInfoServiceImpl.java new file mode 100644 index 0000000..99308b9 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CategoryInfoServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.CategoryInfoMapper; +import com.muyu.product.domain.CategoryInfo; +import com.muyu.product.service.ICategoryInfoService; + +/** + * 品类信息Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class CategoryInfoServiceImpl implements ICategoryInfoService +{ + @Autowired + private CategoryInfoMapper categoryInfoMapper; + + /** + * 查询品类信息 + * + * @param id 品类信息主键 + * @return 品类信息 + */ + @Override + public CategoryInfo selectCategoryInfoById(Long id) + { + return categoryInfoMapper.selectCategoryInfoById(id); + } + + /** + * 查询品类信息列表 + * + * @param categoryInfo 品类信息 + * @return 品类信息 + */ + @Override + public List selectCategoryInfoList(CategoryInfo categoryInfo) + { + return categoryInfoMapper.selectCategoryInfoList(categoryInfo); + } + + /** + * 新增品类信息 + * + * @param categoryInfo 品类信息 + * @return 结果 + */ + @Override + public int insertCategoryInfo(CategoryInfo categoryInfo) + { + categoryInfo.setCreateTime(DateUtils.getNowDate()); + return categoryInfoMapper.insertCategoryInfo(categoryInfo); + } + + /** + * 修改品类信息 + * + * @param categoryInfo 品类信息 + * @return 结果 + */ + @Override + public int updateCategoryInfo(CategoryInfo categoryInfo) + { + categoryInfo.setUpdateTime(DateUtils.getNowDate()); + return categoryInfoMapper.updateCategoryInfo(categoryInfo); + } + + /** + * 批量删除品类信息 + * + * @param ids 需要删除的品类信息主键 + * @return 结果 + */ + @Override + public int deleteCategoryInfoByIds(Long[] ids) + { + return categoryInfoMapper.deleteCategoryInfoByIds(ids); + } + + /** + * 删除品类信息信息 + * + * @param id 品类信息主键 + * @return 结果 + */ + @Override + public int deleteCategoryInfoById(Long id) + { + return categoryInfoMapper.deleteCategoryInfoById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CommentLikeServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CommentLikeServiceImpl.java new file mode 100644 index 0000000..7ff3ec4 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/CommentLikeServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.CommentLikeMapper; +import com.muyu.product.domain.CommentLike; +import com.muyu.product.service.ICommentLikeService; + +/** + * 评论点赞Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class CommentLikeServiceImpl implements ICommentLikeService +{ + @Autowired + private CommentLikeMapper commentLikeMapper; + + /** + * 查询评论点赞 + * + * @param id 评论点赞主键 + * @return 评论点赞 + */ + @Override + public CommentLike selectCommentLikeById(Long id) + { + return commentLikeMapper.selectCommentLikeById(id); + } + + /** + * 查询评论点赞列表 + * + * @param commentLike 评论点赞 + * @return 评论点赞 + */ + @Override + public List selectCommentLikeList(CommentLike commentLike) + { + return commentLikeMapper.selectCommentLikeList(commentLike); + } + + /** + * 新增评论点赞 + * + * @param commentLike 评论点赞 + * @return 结果 + */ + @Override + public int insertCommentLike(CommentLike commentLike) + { + commentLike.setCreateTime(DateUtils.getNowDate()); + return commentLikeMapper.insertCommentLike(commentLike); + } + + /** + * 修改评论点赞 + * + * @param commentLike 评论点赞 + * @return 结果 + */ + @Override + public int updateCommentLike(CommentLike commentLike) + { + commentLike.setUpdateTime(DateUtils.getNowDate()); + return commentLikeMapper.updateCommentLike(commentLike); + } + + /** + * 批量删除评论点赞 + * + * @param ids 需要删除的评论点赞主键 + * @return 结果 + */ + @Override + public int deleteCommentLikeByIds(Long[] ids) + { + return commentLikeMapper.deleteCommentLikeByIds(ids); + } + + /** + * 删除评论点赞信息 + * + * @param id 评论点赞主键 + * @return 结果 + */ + @Override + public int deleteCommentLikeById(Long id) + { + return commentLikeMapper.deleteCommentLikeById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductAttributeServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductAttributeServiceImpl.java new file mode 100644 index 0000000..7246dc8 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductAttributeServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.ProductAttributeMapper; +import com.muyu.product.domain.ProductAttribute; +import com.muyu.product.service.IProductAttributeService; + +/** + * 商品属性Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class ProductAttributeServiceImpl implements IProductAttributeService +{ + @Autowired + private ProductAttributeMapper productAttributeMapper; + + /** + * 查询商品属性 + * + * @param id 商品属性主键 + * @return 商品属性 + */ + @Override + public ProductAttribute selectProductAttributeById(Long id) + { + return productAttributeMapper.selectProductAttributeById(id); + } + + /** + * 查询商品属性列表 + * + * @param productAttribute 商品属性 + * @return 商品属性 + */ + @Override + public List selectProductAttributeList(ProductAttribute productAttribute) + { + return productAttributeMapper.selectProductAttributeList(productAttribute); + } + + /** + * 新增商品属性 + * + * @param productAttribute 商品属性 + * @return 结果 + */ + @Override + public int insertProductAttribute(ProductAttribute productAttribute) + { + productAttribute.setCreateTime(DateUtils.getNowDate()); + return productAttributeMapper.insertProductAttribute(productAttribute); + } + + /** + * 修改商品属性 + * + * @param productAttribute 商品属性 + * @return 结果 + */ + @Override + public int updateProductAttribute(ProductAttribute productAttribute) + { + productAttribute.setUpdateTime(DateUtils.getNowDate()); + return productAttributeMapper.updateProductAttribute(productAttribute); + } + + /** + * 批量删除商品属性 + * + * @param ids 需要删除的商品属性主键 + * @return 结果 + */ + @Override + public int deleteProductAttributeByIds(Long[] ids) + { + return productAttributeMapper.deleteProductAttributeByIds(ids); + } + + /** + * 删除商品属性信息 + * + * @param id 商品属性主键 + * @return 结果 + */ + @Override + public int deleteProductAttributeById(Long id) + { + return productAttributeMapper.deleteProductAttributeById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductCommentServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductCommentServiceImpl.java new file mode 100644 index 0000000..d15e21c --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductCommentServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.ProductCommentMapper; +import com.muyu.product.domain.ProductComment; +import com.muyu.product.service.IProductCommentService; + +/** + * 商品评论Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class ProductCommentServiceImpl implements IProductCommentService +{ + @Autowired + private ProductCommentMapper productCommentMapper; + + /** + * 查询商品评论 + * + * @param id 商品评论主键 + * @return 商品评论 + */ + @Override + public ProductComment selectProductCommentById(Long id) + { + return productCommentMapper.selectProductCommentById(id); + } + + /** + * 查询商品评论列表 + * + * @param productComment 商品评论 + * @return 商品评论 + */ + @Override + public List selectProductCommentList(ProductComment productComment) + { + return productCommentMapper.selectProductCommentList(productComment); + } + + /** + * 新增商品评论 + * + * @param productComment 商品评论 + * @return 结果 + */ + @Override + public int insertProductComment(ProductComment productComment) + { + productComment.setCreateTime(DateUtils.getNowDate()); + return productCommentMapper.insertProductComment(productComment); + } + + /** + * 修改商品评论 + * + * @param productComment 商品评论 + * @return 结果 + */ + @Override + public int updateProductComment(ProductComment productComment) + { + productComment.setUpdateTime(DateUtils.getNowDate()); + return productCommentMapper.updateProductComment(productComment); + } + + /** + * 批量删除商品评论 + * + * @param ids 需要删除的商品评论主键 + * @return 结果 + */ + @Override + public int deleteProductCommentByIds(Long[] ids) + { + return productCommentMapper.deleteProductCommentByIds(ids); + } + + /** + * 删除商品评论信息 + * + * @param id 商品评论主键 + * @return 结果 + */ + @Override + public int deleteProductCommentById(Long id) + { + return productCommentMapper.deleteProductCommentById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductServiceImpl.java new file mode 100644 index 0000000..1d52db5 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.ProductMapper; +import com.muyu.product.domain.Product; +import com.muyu.product.service.IProductService; + +/** + * 商品信息Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class ProductServiceImpl implements IProductService +{ + @Autowired + private ProductMapper productMapper; + + /** + * 查询商品信息 + * + * @param id 商品信息主键 + * @return 商品信息 + */ + @Override + public Product selectProductById(Long id) + { + return productMapper.selectProductById(id); + } + + /** + * 查询商品信息列表 + * + * @param product 商品信息 + * @return 商品信息 + */ + @Override + public List selectProductList(Product product) + { + return productMapper.selectProductList(product); + } + + /** + * 新增商品信息 + * + * @param product 商品信息 + * @return 结果 + */ + @Override + public int insertProduct(Product product) + { + product.setCreateTime(DateUtils.getNowDate()); + return productMapper.insertProduct(product); + } + + /** + * 修改商品信息 + * + * @param product 商品信息 + * @return 结果 + */ + @Override + public int updateProduct(Product product) + { + product.setUpdateTime(DateUtils.getNowDate()); + return productMapper.updateProduct(product); + } + + /** + * 批量删除商品信息 + * + * @param ids 需要删除的商品信息主键 + * @return 结果 + */ + @Override + public int deleteProductByIds(Long[] ids) + { + return productMapper.deleteProductByIds(ids); + } + + /** + * 删除商品信息信息 + * + * @param id 商品信息主键 + * @return 结果 + */ + @Override + public int deleteProductById(Long id) + { + return productMapper.deleteProductById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductSkuServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductSkuServiceImpl.java new file mode 100644 index 0000000..fa9c67c --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/ProductSkuServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.ProductSkuMapper; +import com.muyu.product.domain.ProductSku; +import com.muyu.product.service.IProductSkuService; + +/** + * 商品skuService业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class ProductSkuServiceImpl implements IProductSkuService +{ + @Autowired + private ProductSkuMapper productSkuMapper; + + /** + * 查询商品sku + * + * @param id 商品sku主键 + * @return 商品sku + */ + @Override + public ProductSku selectProductSkuById(Long id) + { + return productSkuMapper.selectProductSkuById(id); + } + + /** + * 查询商品sku列表 + * + * @param productSku 商品sku + * @return 商品sku + */ + @Override + public List selectProductSkuList(ProductSku productSku) + { + return productSkuMapper.selectProductSkuList(productSku); + } + + /** + * 新增商品sku + * + * @param productSku 商品sku + * @return 结果 + */ + @Override + public int insertProductSku(ProductSku productSku) + { + productSku.setCreateTime(DateUtils.getNowDate()); + return productSkuMapper.insertProductSku(productSku); + } + + /** + * 修改商品sku + * + * @param productSku 商品sku + * @return 结果 + */ + @Override + public int updateProductSku(ProductSku productSku) + { + productSku.setUpdateTime(DateUtils.getNowDate()); + return productSkuMapper.updateProductSku(productSku); + } + + /** + * 批量删除商品sku + * + * @param ids 需要删除的商品sku主键 + * @return 结果 + */ + @Override + public int deleteProductSkuByIds(Long[] ids) + { + return productSkuMapper.deleteProductSkuByIds(ids); + } + + /** + * 删除商品sku信息 + * + * @param id 商品sku主键 + * @return 结果 + */ + @Override + public int deleteProductSkuById(Long id) + { + return productSkuMapper.deleteProductSkuById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/RuleAttrServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/RuleAttrServiceImpl.java new file mode 100644 index 0000000..1b5f636 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/RuleAttrServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.RuleAttrMapper; +import com.muyu.product.domain.RuleAttr; +import com.muyu.product.service.IRuleAttrService; + +/** + * 规格详情Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class RuleAttrServiceImpl implements IRuleAttrService +{ + @Autowired + private RuleAttrMapper ruleAttrMapper; + + /** + * 查询规格详情 + * + * @param id 规格详情主键 + * @return 规格详情 + */ + @Override + public RuleAttr selectRuleAttrById(Long id) + { + return ruleAttrMapper.selectRuleAttrById(id); + } + + /** + * 查询规格详情列表 + * + * @param ruleAttr 规格详情 + * @return 规格详情 + */ + @Override + public List selectRuleAttrList(RuleAttr ruleAttr) + { + return ruleAttrMapper.selectRuleAttrList(ruleAttr); + } + + /** + * 新增规格详情 + * + * @param ruleAttr 规格详情 + * @return 结果 + */ + @Override + public int insertRuleAttr(RuleAttr ruleAttr) + { + ruleAttr.setCreateTime(DateUtils.getNowDate()); + return ruleAttrMapper.insertRuleAttr(ruleAttr); + } + + /** + * 修改规格详情 + * + * @param ruleAttr 规格详情 + * @return 结果 + */ + @Override + public int updateRuleAttr(RuleAttr ruleAttr) + { + ruleAttr.setUpdateTime(DateUtils.getNowDate()); + return ruleAttrMapper.updateRuleAttr(ruleAttr); + } + + /** + * 批量删除规格详情 + * + * @param ids 需要删除的规格详情主键 + * @return 结果 + */ + @Override + public int deleteRuleAttrByIds(Long[] ids) + { + return ruleAttrMapper.deleteRuleAttrByIds(ids); + } + + /** + * 删除规格详情信息 + * + * @param id 规格详情主键 + * @return 结果 + */ + @Override + public int deleteRuleAttrById(Long id) + { + return ruleAttrMapper.deleteRuleAttrById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/RuleServiceImpl.java b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/RuleServiceImpl.java new file mode 100644 index 0000000..5949405 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/java/com/muyu/product/service/impl/RuleServiceImpl.java @@ -0,0 +1,96 @@ +package com.muyu.product.service.impl; + +import java.util.List; +import com.muyu.common.core.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.muyu.product.mapper.RuleMapper; +import com.muyu.product.domain.Rule; +import com.muyu.product.service.IRuleService; + +/** + * 商品规格Service业务层处理 + * + * @author yuanjunzhe + * @date 2024-02-29 + */ +@Service +public class RuleServiceImpl implements IRuleService +{ + @Autowired + private RuleMapper ruleMapper; + + /** + * 查询商品规格 + * + * @param id 商品规格主键 + * @return 商品规格 + */ + @Override + public Rule selectRuleById(Long id) + { + return ruleMapper.selectRuleById(id); + } + + /** + * 查询商品规格列表 + * + * @param rule 商品规格 + * @return 商品规格 + */ + @Override + public List selectRuleList(Rule rule) + { + return ruleMapper.selectRuleList(rule); + } + + /** + * 新增商品规格 + * + * @param rule 商品规格 + * @return 结果 + */ + @Override + public int insertRule(Rule rule) + { + rule.setCreateTime(DateUtils.getNowDate()); + return ruleMapper.insertRule(rule); + } + + /** + * 修改商品规格 + * + * @param rule 商品规格 + * @return 结果 + */ + @Override + public int updateRule(Rule rule) + { + rule.setUpdateTime(DateUtils.getNowDate()); + return ruleMapper.updateRule(rule); + } + + /** + * 批量删除商品规格 + * + * @param ids 需要删除的商品规格主键 + * @return 结果 + */ + @Override + public int deleteRuleByIds(Long[] ids) + { + return ruleMapper.deleteRuleByIds(ids); + } + + /** + * 删除商品规格信息 + * + * @param id 商品规格主键 + * @return 结果 + */ + @Override + public int deleteRuleById(Long id) + { + return ruleMapper.deleteRuleById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/AttributeGroupMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/AttributeGroupMapper.xml new file mode 100644 index 0000000..4c37542 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/AttributeGroupMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, name, status, remark, create_by, create_time, update_by, update_time from attribute_group + + + + + + + + insert into attribute_group + + name, + status, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{name}, + #{status}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update attribute_group + + name = #{name}, + status = #{status}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from attribute_group where id = #{id} + + + + delete from attribute_group where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/AttributeMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/AttributeMapper.xml new file mode 100644 index 0000000..737e303 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/AttributeMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, name, gruop_id, remark, create_by, create_time, update_by, update_time from attribute + + + + + + + + insert into attribute + + name, + gruop_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{name}, + #{gruopId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update attribute + + name = #{name}, + gruop_id = #{gruopId}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from attribute where id = #{id} + + + + delete from attribute where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/BrandInfoMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/BrandInfoMapper.xml new file mode 100644 index 0000000..d5157fd --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/BrandInfoMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + select id, name, logo, introduction, status, remark, create_by, create_time, update_by, update_time from brand_info + + + + + + + + insert into brand_info + + name, + logo, + introduction, + status, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{name}, + #{logo}, + #{introduction}, + #{status}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update brand_info + + name = #{name}, + logo = #{logo}, + introduction = #{introduction}, + status = #{status}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from brand_info where id = #{id} + + + + delete from brand_info where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/BrandProductMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/BrandProductMapper.xml new file mode 100644 index 0000000..cb47dd5 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/BrandProductMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, brand_id, product_id, remark, create_by, create_time, update_by, update_time from brand_product + + + + + + + + insert into brand_product + + brand_id, + product_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{brandId}, + #{productId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update brand_product + + brand_id = #{brandId}, + product_id = #{productId}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from brand_product where id = #{id} + + + + delete from brand_product where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryAttributeGroupMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryAttributeGroupMapper.xml new file mode 100644 index 0000000..bab8fd8 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryAttributeGroupMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, category_id, attribute_group_id, remark, create_by, create_time, update_by, update_time from category_attribute_group + + + + + + + + insert into category_attribute_group + + category_id, + attribute_group_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{categoryId}, + #{attributeGroupId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update category_attribute_group + + category_id = #{categoryId}, + attribute_group_id = #{attributeGroupId}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from category_attribute_group where id = #{id} + + + + delete from category_attribute_group where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryAttributeMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryAttributeMapper.xml new file mode 100644 index 0000000..63b7e38 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryAttributeMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, category_id, attribute_id, remark, create_by, create_time, update_by, update_time from category_attribute + + + + + + + + insert into category_attribute + + category_id, + attribute_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{categoryId}, + #{attributeId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update category_attribute + + category_id = #{categoryId}, + attribute_id = #{attributeId}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from category_attribute where id = #{id} + + + + delete from category_attribute where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryBrandMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryBrandMapper.xml new file mode 100644 index 0000000..84fa794 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryBrandMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, category_id, brand_id, remark, create_by, create_time, update_by, update_time from category_brand + + + + + + + + insert into category_brand + + category_id, + brand_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{categoryId}, + #{brandId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update category_brand + + category_id = #{categoryId}, + brand_id = #{brandId}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from category_brand where id = #{id} + + + + delete from category_brand where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryInfoMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryInfoMapper.xml new file mode 100644 index 0000000..f7c4ed4 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CategoryInfoMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + select id, name, image, parent_id, status, introduction, remark, create_by, create_time, update_by, update_time from category_info + + + + + + + + insert into category_info + + name, + image, + parent_id, + status, + introduction, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{name}, + #{image}, + #{parentId}, + #{status}, + #{introduction}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update category_info + + name = #{name}, + image = #{image}, + parent_id = #{parentId}, + status = #{status}, + introduction = #{introduction}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from category_info where id = #{id} + + + + delete from category_info where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CommentLikeMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CommentLikeMapper.xml new file mode 100644 index 0000000..7cb1571 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/CommentLikeMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, comment_id, user_id, remark, create_by, create_time, update_by, update_time from comment_like + + + + + + + + insert into comment_like + + comment_id, + user_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{commentId}, + #{userId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update comment_like + + comment_id = #{commentId}, + user_id = #{userId}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from comment_like where id = #{id} + + + + delete from comment_like where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductAttributeMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductAttributeMapper.xml new file mode 100644 index 0000000..dfbe5fb --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductAttributeMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + select id, product_id, attribute_id, value, remark, create_by, create_time, update_by, update_time from product_attribute + + + + + + + + insert into product_attribute + + product_id, + attribute_id, + value, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{productId}, + #{attributeId}, + #{value}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update product_attribute + + product_id = #{productId}, + attribute_id = #{attributeId}, + value = #{value}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from product_attribute where id = #{id} + + + + delete from product_attribute where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductCommentMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductCommentMapper.xml new file mode 100644 index 0000000..dd44388 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductCommentMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + select id, product_id, comment, images, parent_id, remark, create_by, create_time, update_by, update_time from product_comment + + + + + + + + insert into product_comment + + product_id, + comment, + images, + parent_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{productId}, + #{comment}, + #{images}, + #{parentId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update product_comment + + product_id = #{productId}, + comment = #{comment}, + images = #{images}, + parent_id = #{parentId}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from product_comment where id = #{id} + + + + delete from product_comment where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductMapper.xml new file mode 100644 index 0000000..ebf4e3f --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductMapper.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + select id, name, describe, type, image, carousel_images, status, rule_id, brand_id, remark, create_by, create_time, update_by, update_time from product + + + + + + + + insert into product + + name, + describe, + type, + image, + carousel_images, + status, + rule_id, + brand_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{name}, + #{describe}, + #{type}, + #{image}, + #{carouselImages}, + #{status}, + #{ruleId}, + #{brandId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update product + + name = #{name}, + describe = #{describe}, + type = #{type}, + image = #{image}, + carousel_images = #{carouselImages}, + status = #{status}, + rule_id = #{ruleId}, + brand_id = #{brandId}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from product where id = #{id} + + + + delete from product where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductSkuMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductSkuMapper.xml new file mode 100644 index 0000000..6cef11f --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/ProductSkuMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + select id, product_id, sku, stock, price, image, remark, create_by, create_time, update_by, update_time from product_sku + + + + + + + + insert into product_sku + + product_id, + sku, + stock, + price, + image, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{productId}, + #{sku}, + #{stock}, + #{price}, + #{image}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update product_sku + + product_id = #{productId}, + sku = #{sku}, + stock = #{stock}, + price = #{price}, + image = #{image}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from product_sku where id = #{id} + + + + delete from product_sku where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/RuleAttrMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/RuleAttrMapper.xml new file mode 100644 index 0000000..81dd34b --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/RuleAttrMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + select id, rule_id, name, attr_value, remark, create_by, create_time, update_by, update_time from rule_attr + + + + + + + + insert into rule_attr + + rule_id, + name, + attr_value, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{ruleId}, + #{name}, + #{attrValue}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update rule_attr + + rule_id = #{ruleId}, + name = #{name}, + attr_value = #{attrValue}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from rule_attr where id = #{id} + + + + delete from rule_attr where id in + + #{id} + + + \ No newline at end of file diff --git a/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/RuleMapper.xml b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/RuleMapper.xml new file mode 100644 index 0000000..0a9e4ee --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-service/src/main/resources/mapper/product/RuleMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, name, status, remark, create_by, create_time, update_by, update_time from rule + + + + + + + + insert into rule + + name, + status, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{name}, + #{status}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update rule + + name = #{name}, + status = #{status}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from rule where id = #{id} + + + + delete from rule where id in + + #{id} + + + \ No newline at end of file