From fd28a8fbc869d88fc13d08595060b72b09db673e Mon Sep 17 00:00:00 2001 From: Saisai Liu <1374434128@qq.com> Date: Thu, 29 Feb 2024 09:46:33 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B7=9F=E9=A1=B9=E7=9B=AE=EF=BC=8C=E7=94=9F?= =?UTF-8?q?=E6=88=90=E5=99=A8=E6=96=87=E4=BB=B6=E5=B8=A6=E5=85=A5=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mapper/generator/GenTableMapper.xml | 4 +- .../main/resources/vm/java/controller.java.vm | 2 +- .../src/main/resources/vm/xml/mapper.xml.vm | 18 +- .../src/main/java/com/muyu/Main.java | 7 - .../java/com/muyu/product/domain/Address.java | 69 ++++++++ .../muyu/product/domain/AsAttributeGroup.java | 70 ++++++++ .../com/muyu/product/domain/Attribute.java | 70 ++++++++ .../muyu/product/domain/AttributeGroup.java | 70 ++++++++ .../muyu/product/domain/AttributeProduct.java | 84 +++++++++ .../java/com/muyu/product/domain/Brand.java | 112 ++++++++++++ .../muyu/product/domain/BrandCategory.java | 70 ++++++++ .../product/domain/CategoryAttribute.java | 70 ++++++++ .../domain/CategoryAttributeGroup.java | 70 ++++++++ .../com/muyu/product/domain/CategoryInfo.java | 85 +++++++++ .../muyu/product/domain/ProductCategory.java | 70 ++++++++ .../com/muyu/product/domain/ProductInfo.java | 164 ++++++++++++++++++ .../java/com/muyu/product/domain/Rule.java | 56 ++++++ .../com/muyu/product/domain/RuleProduct.java | 84 +++++++++ .../product/controller/AddressController.java | 103 +++++++++++ .../AsAttributeGroupController.java | 107 ++++++++++++ .../controller/AttributeController.java | 105 +++++++++++ .../controller/AttributeGroupController.java | 105 +++++++++++ .../AttributeProductController.java | 105 +++++++++++ .../controller/BrandCategoryController.java | 105 +++++++++++ .../product/controller/BrandController.java | 105 +++++++++++ .../CategoryAttributeController.java | 105 +++++++++++ .../CategoryAttributeGroupController.java | 105 +++++++++++ .../controller/CategoryInfoController.java | 103 +++++++++++ .../controller/ProductCategoryController.java | 105 +++++++++++ .../controller/ProductInfoController.java | 105 +++++++++++ .../product/controller/RuleController.java | 105 +++++++++++ .../controller/RuleProductController.java | 105 +++++++++++ .../muyu/product/mapper/AddressMapper.java | 61 +++++++ .../mapper/AsAttributeGroupMapper.java | 61 +++++++ .../product/mapper/AttributeGroupMapper.java | 61 +++++++ .../muyu/product/mapper/AttributeMapper.java | 61 +++++++ .../mapper/AttributeProductMapper.java | 61 +++++++ .../product/mapper/BrandCategoryMapper.java | 61 +++++++ .../com/muyu/product/mapper/BrandMapper.java | 61 +++++++ .../mapper/CategoryAttributeGroupMapper.java | 61 +++++++ .../mapper/CategoryAttributeMapper.java | 61 +++++++ .../product/mapper/CategoryInfoMapper.java | 61 +++++++ .../product/mapper/ProductCategoryMapper.java | 61 +++++++ .../product/mapper/ProductInfoMapper.java | 61 +++++++ .../com/muyu/product/mapper/RuleMapper.java | 61 +++++++ .../product/mapper/RuleProductMapper.java | 61 +++++++ .../muyu/product/service/IAddressService.java | 61 +++++++ .../service/IAsAttributeGroupService.java | 61 +++++++ .../service/IAttributeGroupService.java | 61 +++++++ .../service/IAttributeProductService.java | 61 +++++++ .../product/service/IAttributeService.java | 61 +++++++ .../service/IBrandCategoryService.java | 61 +++++++ .../muyu/product/service/IBrandService.java | 61 +++++++ .../ICategoryAttributeGroupService.java | 61 +++++++ .../service/ICategoryAttributeService.java | 61 +++++++ .../product/service/ICategoryInfoService.java | 61 +++++++ .../service/IProductCategoryService.java | 61 +++++++ .../product/service/IProductInfoService.java | 61 +++++++ .../product/service/IRuleProductService.java | 61 +++++++ .../muyu/product/service/IRuleService.java | 61 +++++++ .../service/impl/AddressServiceImpl.java | 96 ++++++++++ .../impl/AsAttributeGroupServiceImpl.java | 96 ++++++++++ .../impl/AttributeGroupServiceImpl.java | 96 ++++++++++ .../impl/AttributeProductServiceImpl.java | 96 ++++++++++ .../service/impl/AttributeServiceImpl.java | 96 ++++++++++ .../impl/BrandCategoryServiceImpl.java | 96 ++++++++++ .../service/impl/BrandServiceImpl.java | 96 ++++++++++ .../CategoryAttributeGroupServiceImpl.java | 96 ++++++++++ .../impl/CategoryAttributeServiceImpl.java | 96 ++++++++++ .../service/impl/CategoryInfoServiceImpl.java | 96 ++++++++++ .../impl/ProductCategoryServiceImpl.java | 96 ++++++++++ .../service/impl/ProductInfoServiceImpl.java | 95 ++++++++++ .../service/impl/RuleProductServiceImpl.java | 96 ++++++++++ .../product/service/impl/RuleServiceImpl.java | 96 ++++++++++ .../mapper/product/AddressMapper.xml | 77 ++++++++ .../mapper/product/AsAttributeGroupMapper.xml | 83 +++++++++ .../mapper/product/AttributeGroupMapper.xml | 81 +++++++++ .../mapper/product/AttributeMapper.xml | 81 +++++++++ .../mapper/product/AttributeProductMapper.xml | 86 +++++++++ .../mapper/product/BrandCategoryMapper.xml | 81 +++++++++ .../resources/mapper/product/BrandMapper.xml | 96 ++++++++++ .../product/CategoryAttributeGroupMapper.xml | 81 +++++++++ .../product/CategoryAttributeMapper.xml | 81 +++++++++ .../mapper/product/CategoryInfoMapper.xml | 91 ++++++++++ .../mapper/product/ProductCategoryMapper.xml | 81 +++++++++ .../mapper/product/ProductInfoMapper.xml | 101 +++++++++++ .../resources/mapper/product/RuleMapper.xml | 76 ++++++++ .../mapper/product/RuleProductMapper.xml | 86 +++++++++ 88 files changed, 6857 insertions(+), 19 deletions(-) delete mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/Main.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Address.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsAttributeGroup.java 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/AttributeProduct.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Brand.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandCategory.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/CategoryInfo.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductCategory.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductInfo.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/RuleProduct.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AddressController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AsAttributeGroupController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeGroupController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeProductController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/BrandCategoryController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/BrandController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryAttributeController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryAttributeGroupController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductCategoryController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductInfoController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/RuleController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/RuleProductController.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AddressMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsAttributeGroupMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeGroupMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeProductMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandCategoryMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryAttributeGroupMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryAttributeMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductCategoryMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductInfoMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleProductMapper.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAddressService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAsAttributeGroupService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeGroupService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeProductService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandCategoryService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryAttributeGroupService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryAttributeService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryInfoService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductCategoryService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductInfoService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleProductService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleService.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AddressServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AsAttributeGroupServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeProductServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandCategoryServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryAttributeGroupServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryAttributeServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryInfoServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProductCategoryServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProductInfoServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleProductServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleServiceImpl.java create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AddressMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsAttributeGroupMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeGroupMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeProductMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/BrandCategoryMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/BrandMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryAttributeGroupMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryAttributeMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryInfoMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductCategoryMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductInfoMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/RuleMapper.xml create mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/RuleProductMapper.xml diff --git a/muyu-modules/muyu-gen/src/main/resources/mapper/generator/GenTableMapper.xml b/muyu-modules/muyu-gen/src/main/resources/mapper/generator/GenTableMapper.xml index 9f6f3ce..0226e0d 100644 --- a/muyu-modules/muyu-gen/src/main/resources/mapper/generator/GenTableMapper.xml +++ b/muyu-modules/muyu-gen/src/main/resources/mapper/generator/GenTableMapper.xml @@ -97,7 +97,7 @@ - + #foreach($column in $columns) #set($queryType=$column.queryType) #set($javaField=$column.javaField) @@ -57,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #end - + - + insert into ${tableName} @@ -107,15 +107,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - delete from ${tableName} where ${pkColumn.columnName} in + delete from ${tableName} where ${pkColumn.columnName} in #{${pkColumn.javaField}} #if($table.sub) - + - delete from ${subTableName} where ${subTableFkName} in + delete from ${subTableName} where ${subTableFkName} in #{${subTableFkclassName}} @@ -132,4 +132,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #end - \ No newline at end of file + diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/Main.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/Main.java deleted file mode 100644 index 75fcd65..0000000 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/Main.java +++ /dev/null @@ -1,7 +0,0 @@ -package com.muyu; - -public class Main { - public static void main(String[] args) { - System.out.println("Hello world!"); - } -} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Address.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Address.java new file mode 100644 index 0000000..f4f61fa --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Address.java @@ -0,0 +1,69 @@ +package com.muyu.product.domain; + +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.TreeEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 地区对象 address + * + * @author Saisai + * @date 2024-02-29 + */ +public class Address extends TreeEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 地区名 */ + @Excel(name = "地区名") + private String addressName; + + /** 子级地区 */ + @Excel(name = "子级地区") + private Long sonId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setAddressName(String addressName) + { + this.addressName = addressName; + } + + public String getAddressName() + { + return addressName; + } + public void setSonId(Long sonId) + { + this.sonId = sonId; + } + + public Long getSonId() + { + return sonId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("addressName", getAddressName()) + .append("sonId", getSonId()) + .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/AsAttributeGroup.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsAttributeGroup.java new file mode 100644 index 0000000..47259ce --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsAttributeGroup.java @@ -0,0 +1,70 @@ +package com.muyu.product.domain; + +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 属性组中间对象 as_attribute_group + * + * @author Saisai + * @date 2024-02-29 + */ +public class AsAttributeGroup extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 属性编号 */ + @Excel(name = "属性编号") + private Long attributeId; + + /** 分组编号 */ + @Excel(name = "分组编号") + private Long groupId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setAttributeId(Long attributeId) + { + this.attributeId = attributeId; + } + + public Long getAttributeId() + { + return attributeId; + } + public void setGroupId(Long groupId) + { + this.groupId = groupId; + } + + public Long getGroupId() + { + return groupId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("attributeId", getAttributeId()) + .append("groupId", getGroupId()) + .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/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..da9d730 --- /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 com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 属性对象 attribute + * + * @author Saisai + * @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 String groupId; + + 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 setGroupId(String groupId) + { + this.groupId = groupId; + } + + public String getGroupId() + { + return groupId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("groupId", getGroupId()) + .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..f698202 --- /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 com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 属性组对象 attribute_group + * + * @author muyu + * @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 states; + + 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 setStates(String states) + { + this.states = states; + } + + public String getStates() + { + return states; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("states", getStates()) + .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/AttributeProduct.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeProduct.java new file mode 100644 index 0000000..1941752 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeProduct.java @@ -0,0 +1,84 @@ +package com.muyu.product.domain; + +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 商品属性中间表对象 attribute_product + * + * @author Saisai + * @date 2024-02-29 + */ +public class AttributeProduct extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 商品编号 */ + @Excel(name = "商品编号") + private Long productId; + + /** 属性编号 */ + @Excel(name = "属性编号") + private Long 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(Long attributeId) + { + this.attributeId = attributeId; + } + + public Long 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/Brand.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Brand.java new file mode 100644 index 0000000..eba36ba --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Brand.java @@ -0,0 +1,112 @@ +package com.muyu.product.domain; + +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 品牌对象 brand + * + * @author Saisai + * @date 2024-02-29 + */ +public class Brand extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 品牌名称 */ + @Excel(name = "品牌名称") + private String name; + + /** 图像标识 */ + @Excel(name = "图像标识") + private String logo; + + /** 描述 */ + @Excel(name = "描述") + private String introduction; + + /** 品牌启用 */ + @Excel(name = "品牌启用") + private String status; + + /** 公司地址 */ + @Excel(name = "公司地址") + private String addressName; + + 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; + } + public void setAddressName(String addressName) + { + this.addressName = addressName; + } + + public String getAddressName() + { + return addressName; + } + + @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("addressName", getAddressName()) + .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/BrandCategory.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandCategory.java new file mode 100644 index 0000000..23f52c1 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandCategory.java @@ -0,0 +1,70 @@ +package com.muyu.product.domain; + +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 品牌品类中间对象 brand_category + * + * @author Saisai + * @date 2024-02-29 + */ +public class BrandCategory 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/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..c34db9d --- /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 com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 品类属性中间对象 category_attribute + * + * @author Saisai + * @date 2024-02-29 + */ +public class CategoryAttribute extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 属性编号 */ + @Excel(name = "属性编号") + private Long attributeId; + + /** 品类编号 */ + @Excel(name = "品类编号") + private Long categoryId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setAttributeId(Long attributeId) + { + this.attributeId = attributeId; + } + + public Long getAttributeId() + { + return attributeId; + } + public void setCategoryId(Long categoryId) + { + this.categoryId = categoryId; + } + + public Long getCategoryId() + { + return categoryId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("attributeId", getAttributeId()) + .append("categoryId", getCategoryId()) + .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..4915b31 --- /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 com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 品类属性组中间对象 category_attribute_group + * + * @author saisai + * @date 2024-02-29 + */ +public class CategoryAttributeGroup extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 属性组编号 */ + @Excel(name = "属性组编号") + private Long attributeGroupId; + + /** 品类编号 */ + @Excel(name = "品类编号") + private Long categoryId; + + public void setId(Long id) + { + this.id = id; + } + + public Long getId() + { + return id; + } + public void setAttributeGroupId(Long attributeGroupId) + { + this.attributeGroupId = attributeGroupId; + } + + public Long getAttributeGroupId() + { + return attributeGroupId; + } + public void setCategoryId(Long categoryId) + { + this.categoryId = categoryId; + } + + public Long getCategoryId() + { + return categoryId; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("attributeGroupId", getAttributeGroupId()) + .append("categoryId", getCategoryId()) + .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..8b5c7b8 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java @@ -0,0 +1,85 @@ +package com.muyu.product.domain; + +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.TreeEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 品类信息对象 category_info + * + * @author Saisai + * @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; + + 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; + } + + @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("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/ProductCategory.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductCategory.java new file mode 100644 index 0000000..5ab0558 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductCategory.java @@ -0,0 +1,70 @@ +package com.muyu.product.domain; + +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 品类商品中间对象 product_category + * + * @author Saisai + * @date 2024-02-29 + */ +public class ProductCategory extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 品类id */ + @Excel(name = "品类id") + private Long categoryId; + + /** 商品id */ + @Excel(name = "商品id") + private Long productId; + + 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 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("categoryId", getCategoryId()) + .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/ProductInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductInfo.java new file mode 100644 index 0000000..d885e45 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProductInfo.java @@ -0,0 +1,164 @@ +package com.muyu.product.domain; + +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +import java.util.Date; + +/** + * 商品;对象 product_info + * + * @author Saisai + * @date 2024-02-29 + */ +public class ProductInfo extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 商品名 */ + @Excel(name = "商品名") + private String name; + + /** 商品信息 */ + @Excel(name = "商品信息") + private String introduction; + + /** 品牌编号 */ + @Excel(name = "品牌编号") + private Long brandId; + + /** 图片 */ + @Excel(name = "图片") + private String images; + + /** 发货地 */ + @Excel(name = "发货地") + private String addressSend; + + /** 商品状态 */ + @Excel(name = "商品状态") + private String status; + + /** 创建人 */ + private String createdBy; + + /** 创建时间 */ + private Date createdTime; + + /** 更新人 */ + private String updatedBy; + + 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 setIntroduction(String introduction) + { + this.introduction = introduction; + } + + public String getIntroduction() + { + return introduction; + } + public void setBrandId(Long brandId) + { + this.brandId = brandId; + } + + public Long getBrandId() + { + return brandId; + } + public void setImages(String images) + { + this.images = images; + } + + public String getImages() + { + return images; + } + public void setAddressSend(String addressSend) + { + this.addressSend = addressSend; + } + + public String getAddressSend() + { + return addressSend; + } + public void setStatus(String status) + { + this.status = status; + } + + public String getStatus() + { + return status; + } + public void setCreatedBy(String createdBy) + { + this.createdBy = createdBy; + } + + public String getCreatedBy() + { + return createdBy; + } + public void setCreatedTime(Date createdTime) + { + this.createdTime = createdTime; + } + + public Date getCreatedTime() + { + return createdTime; + } + public void setUpdatedBy(String updatedBy) + { + this.updatedBy = updatedBy; + } + + public String getUpdatedBy() + { + return updatedBy; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .append("introduction", getIntroduction()) + .append("brandId", getBrandId()) + .append("images", getImages()) + .append("addressSend", getAddressSend()) + .append("status", getStatus()) + .append("remark", getRemark()) + .append("createdBy", getCreatedBy()) + .append("createdTime", getCreatedTime()) + .append("updatedBy", getUpdatedBy()) + .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..ea46c4c --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/Rule.java @@ -0,0 +1,56 @@ +package com.muyu.product.domain; + +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 规格对象 rule + * + * @author saisai + * @date 2024-02-29 + */ +public class Rule extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 规格名称 */ + @Excel(name = "规格名称") + private String name; + + 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; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("name", getName()) + .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/RuleProduct.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleProduct.java new file mode 100644 index 0000000..38acad0 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleProduct.java @@ -0,0 +1,84 @@ +package com.muyu.product.domain; + +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.BaseEntity; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; + +/** + * 规格商品中间对象 rule_product + * + * @author saisai + * @date 2024-02-29 + */ +public class RuleProduct extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 商品编号 */ + @Excel(name = "商品编号") + private Long productId; + + /** 规格编号 */ + @Excel(name = "规格编号") + private Long ruleId; + + /** 规格值 */ + @Excel(name = "规格值") + private String ruleValue; + + 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 setRuleId(Long ruleId) + { + this.ruleId = ruleId; + } + + public Long getRuleId() + { + return ruleId; + } + public void setRuleValue(String ruleValue) + { + this.ruleValue = ruleValue; + } + + public String getRuleValue() + { + return ruleValue; + } + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("productId", getProductId()) + .append("ruleId", getRuleId()) + .append("ruleValue", getRuleValue()) + .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-server/src/main/java/com/muyu/product/controller/AddressController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AddressController.java new file mode 100644 index 0000000..02cd007 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AddressController.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.Address; +import com.muyu.product.service.IAddressService; +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 Saisai + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/address") +public class AddressController extends BaseController +{ + @Autowired + private IAddressService addressService; + + /** + * 查询地区列表 + */ + @RequiresPermissions("product:address:list") + @GetMapping("/list") + public Result list(Address address) + { + List
list = addressService.selectAddressList(address); + return success(list); + } + + /** + * 导出地区列表 + */ + @RequiresPermissions("product:address:export") + @Log(title = "地区", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Address address) + { + List
list = addressService.selectAddressList(address); + ExcelUtil
util = new ExcelUtil
(Address.class); + util.exportExcel(response, list, "地区数据"); + } + + /** + * 获取地区详细信息 + */ + @RequiresPermissions("product:address:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(addressService.selectAddressById(id)); + } + + /** + * 新增地区 + */ + @RequiresPermissions("product:address:add") + @Log(title = "地区", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody Address address) + { + return toAjax(addressService.insertAddress(address)); + } + + /** + * 修改地区 + */ + @RequiresPermissions("product:address:edit") + @Log(title = "地区", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody Address address) + { + return toAjax(addressService.updateAddress(address)); + } + + /** + * 删除地区 + */ + @RequiresPermissions("product:address:remove") + @Log(title = "地区", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(addressService.deleteAddressByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AsAttributeGroupController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AsAttributeGroupController.java new file mode 100644 index 0000000..f7a700f --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AsAttributeGroupController.java @@ -0,0 +1,107 @@ +package com.muyu.product.controller; + +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +import com.muyu.product.domain.AttributeGroup; +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.AsAttributeGroup; +import com.muyu.product.service.IAsAttributeGroupService; +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 Saisai + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/as_attribute_group") +public class AsAttributeGroupController extends BaseController +{ + @Autowired + private IAsAttributeGroupService asAttributeGroupService; + + /** + * 查询属性组中间列表 + */ + @RequiresPermissions("product:as_attribute_group:list") + @GetMapping("/list") + public Result> list(AsAttributeGroup asAttributeGroup) + { + startPage(); + List list = asAttributeGroupService.selectAsAttributeGroupList(asAttributeGroup); + return getDataTable(list); + } + + /** + * 导出属性组中间列表 + */ + @RequiresPermissions("product:as_attribute_group:export") + @Log(title = "属性组中间", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AsAttributeGroup asAttributeGroup) + { + List list = asAttributeGroupService.selectAsAttributeGroupList(asAttributeGroup); + ExcelUtil util = new ExcelUtil(AsAttributeGroup.class); + util.exportExcel(response, list, "属性组中间数据"); + } + + /** + * 获取属性组中间详细信息 + */ + @RequiresPermissions("product:as_attribute_group:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(asAttributeGroupService.selectAsAttributeGroupById(id)); + } + + /** + * 新增属性组中间 + */ + @RequiresPermissions("product:as_attribute_group:add") + @Log(title = "属性组中间", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody AsAttributeGroup asAttributeGroup) + { + return toAjax(asAttributeGroupService.insertAsAttributeGroup(asAttributeGroup)); + } + + /** + * 修改属性组中间 + */ + @RequiresPermissions("product:as_attribute_group:edit") + @Log(title = "属性组中间", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody AsAttributeGroup asAttributeGroup) + { + return toAjax(asAttributeGroupService.updateAsAttributeGroup(asAttributeGroup)); + } + + /** + * 删除属性组中间 + */ + @RequiresPermissions("product:as_attribute_group:remove") + @Log(title = "属性组中间", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(asAttributeGroupService.deleteAsAttributeGroupByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeController.java new file mode 100644 index 0000000..104ef4c --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 Saisai + * @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-server/src/main/java/com/muyu/product/controller/AttributeGroupController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeGroupController.java new file mode 100644 index 0000000..b7f549c --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 muyu + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/group") +public class AttributeGroupController extends BaseController +{ + @Autowired + private IAttributeGroupService attributeGroupService; + + /** + * 查询属性组列表 + */ + @RequiresPermissions("product:group:list") + @GetMapping("/list") + public Result> list(AttributeGroup attributeGroup) + { + startPage(); + List list = attributeGroupService.selectAttributeGroupList(attributeGroup); + return getDataTable(list); + } + + /** + * 导出属性组列表 + */ + @RequiresPermissions("product:group: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:group:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(attributeGroupService.selectAttributeGroupById(id)); + } + + /** + * 新增属性组 + */ + @RequiresPermissions("product:group:add") + @Log(title = "属性组", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody AttributeGroup attributeGroup) + { + return toAjax(attributeGroupService.insertAttributeGroup(attributeGroup)); + } + + /** + * 修改属性组 + */ + @RequiresPermissions("product:group:edit") + @Log(title = "属性组", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody AttributeGroup attributeGroup) + { + return toAjax(attributeGroupService.updateAttributeGroup(attributeGroup)); + } + + /** + * 删除属性组 + */ + @RequiresPermissions("product:group: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-server/src/main/java/com/muyu/product/controller/AttributeProductController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeProductController.java new file mode 100644 index 0000000..ab994af --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeProductController.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.AttributeProduct; +import com.muyu.product.service.IAttributeProductService; +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 Saisai + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/product") +public class AttributeProductController extends BaseController +{ + @Autowired + private IAttributeProductService attributeProductService; + + /** + * 查询商品属性中间表列表 + */ + @RequiresPermissions("product:product:list") + @GetMapping("/list") + public Result> list(AttributeProduct attributeProduct) + { + startPage(); + List list = attributeProductService.selectAttributeProductList(attributeProduct); + return getDataTable(list); + } + + /** + * 导出商品属性中间表列表 + */ + @RequiresPermissions("product:product:export") + @Log(title = "商品属性中间表", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, AttributeProduct attributeProduct) + { + List list = attributeProductService.selectAttributeProductList(attributeProduct); + ExcelUtil util = new ExcelUtil(AttributeProduct.class); + util.exportExcel(response, list, "商品属性中间表数据"); + } + + /** + * 获取商品属性中间表详细信息 + */ + @RequiresPermissions("product:product:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(attributeProductService.selectAttributeProductById(id)); + } + + /** + * 新增商品属性中间表 + */ + @RequiresPermissions("product:product:add") + @Log(title = "商品属性中间表", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody AttributeProduct attributeProduct) + { + return toAjax(attributeProductService.insertAttributeProduct(attributeProduct)); + } + + /** + * 修改商品属性中间表 + */ + @RequiresPermissions("product:product:edit") + @Log(title = "商品属性中间表", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody AttributeProduct attributeProduct) + { + return toAjax(attributeProductService.updateAttributeProduct(attributeProduct)); + } + + /** + * 删除商品属性中间表 + */ + @RequiresPermissions("product:product:remove") + @Log(title = "商品属性中间表", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(attributeProductService.deleteAttributeProductByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/BrandCategoryController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/BrandCategoryController.java new file mode 100644 index 0000000..682862d --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/BrandCategoryController.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.BrandCategory; +import com.muyu.product.service.IBrandCategoryService; +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 Saisai + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/category_brand") +public class BrandCategoryController extends BaseController +{ + @Autowired + private IBrandCategoryService brandCategoryService; + + /** + * 查询品牌品类中间列表 + */ + @RequiresPermissions("product:category_brand:list") + @GetMapping("/list") + public Result> list(BrandCategory brandCategory) + { + startPage(); + List list = brandCategoryService.selectBrandCategoryList(brandCategory); + return getDataTable(list); + } + + /** + * 导出品牌品类中间列表 + */ + @RequiresPermissions("product:category_brand:export") + @Log(title = "品牌品类中间", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, BrandCategory brandCategory) + { + List list = brandCategoryService.selectBrandCategoryList(brandCategory); + ExcelUtil util = new ExcelUtil(BrandCategory.class); + util.exportExcel(response, list, "品牌品类中间数据"); + } + + /** + * 获取品牌品类中间详细信息 + */ + @RequiresPermissions("product:category_brand:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(brandCategoryService.selectBrandCategoryById(id)); + } + + /** + * 新增品牌品类中间 + */ + @RequiresPermissions("product:category_brand:add") + @Log(title = "品牌品类中间", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody BrandCategory brandCategory) + { + return toAjax(brandCategoryService.insertBrandCategory(brandCategory)); + } + + /** + * 修改品牌品类中间 + */ + @RequiresPermissions("product:category_brand:edit") + @Log(title = "品牌品类中间", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody BrandCategory brandCategory) + { + return toAjax(brandCategoryService.updateBrandCategory(brandCategory)); + } + + /** + * 删除品牌品类中间 + */ + @RequiresPermissions("product:category_brand:remove") + @Log(title = "品牌品类中间", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(brandCategoryService.deleteBrandCategoryByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/BrandController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/BrandController.java new file mode 100644 index 0000000..676c116 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/BrandController.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.Brand; +import com.muyu.product.service.IBrandService; +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 Saisai + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/brand") +public class BrandController extends BaseController +{ + @Autowired + private IBrandService brandService; + + /** + * 查询品牌列表 + */ + @RequiresPermissions("product:brand:list") + @GetMapping("/list") + public Result> list(Brand brand) + { + startPage(); + List list = brandService.selectBrandList(brand); + return getDataTable(list); + } + + /** + * 导出品牌列表 + */ + @RequiresPermissions("product:brand:export") + @Log(title = "品牌", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, Brand brand) + { + List list = brandService.selectBrandList(brand); + ExcelUtil util = new ExcelUtil(Brand.class); + util.exportExcel(response, list, "品牌数据"); + } + + /** + * 获取品牌详细信息 + */ + @RequiresPermissions("product:brand:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(brandService.selectBrandById(id)); + } + + /** + * 新增品牌 + */ + @RequiresPermissions("product:brand:add") + @Log(title = "品牌", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody Brand brand) + { + return toAjax(brandService.insertBrand(brand)); + } + + /** + * 修改品牌 + */ + @RequiresPermissions("product:brand:edit") + @Log(title = "品牌", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody Brand brand) + { + return toAjax(brandService.updateBrand(brand)); + } + + /** + * 删除品牌 + */ + @RequiresPermissions("product:brand:remove") + @Log(title = "品牌", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(brandService.deleteBrandByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryAttributeController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryAttributeController.java new file mode 100644 index 0000000..fec7ed4 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryAttributeController.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.CategoryAttribute; +import com.muyu.product.service.ICategoryAttributeService; +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 Saisai + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/category_attribute") +public class CategoryAttributeController extends BaseController +{ + @Autowired + private ICategoryAttributeService categoryAttributeService; + + /** + * 查询品类属性中间列表 + */ + @RequiresPermissions("product:category_attribute:list") + @GetMapping("/list") + public Result> list(CategoryAttribute categoryAttribute) + { + startPage(); + List list = categoryAttributeService.selectCategoryAttributeList(categoryAttribute); + return getDataTable(list); + } + + /** + * 导出品类属性中间列表 + */ + @RequiresPermissions("product:category_attribute:export") + @Log(title = "品类属性中间", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, CategoryAttribute categoryAttribute) + { + List list = categoryAttributeService.selectCategoryAttributeList(categoryAttribute); + ExcelUtil util = new ExcelUtil(CategoryAttribute.class); + util.exportExcel(response, list, "品类属性中间数据"); + } + + /** + * 获取品类属性中间详细信息 + */ + @RequiresPermissions("product:category_attribute:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(categoryAttributeService.selectCategoryAttributeById(id)); + } + + /** + * 新增品类属性中间 + */ + @RequiresPermissions("product:category_attribute:add") + @Log(title = "品类属性中间", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody CategoryAttribute categoryAttribute) + { + return toAjax(categoryAttributeService.insertCategoryAttribute(categoryAttribute)); + } + + /** + * 修改品类属性中间 + */ + @RequiresPermissions("product:category_attribute:edit") + @Log(title = "品类属性中间", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody CategoryAttribute categoryAttribute) + { + return toAjax(categoryAttributeService.updateCategoryAttribute(categoryAttribute)); + } + + /** + * 删除品类属性中间 + */ + @RequiresPermissions("product:category_attribute:remove") + @Log(title = "品类属性中间", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(categoryAttributeService.deleteCategoryAttributeByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryAttributeGroupController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryAttributeGroupController.java new file mode 100644 index 0000000..3a2f94f --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryAttributeGroupController.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.CategoryAttributeGroup; +import com.muyu.product.service.ICategoryAttributeGroupService; +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 saisai + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/category_attribute_group") +public class CategoryAttributeGroupController extends BaseController +{ + @Autowired + private ICategoryAttributeGroupService categoryAttributeGroupService; + + /** + * 查询品类属性组中间列表 + */ + @RequiresPermissions("product:category_attribute_group:list") + @GetMapping("/list") + public Result> list(CategoryAttributeGroup categoryAttributeGroup) + { + startPage(); + List list = categoryAttributeGroupService.selectCategoryAttributeGroupList(categoryAttributeGroup); + return getDataTable(list); + } + + /** + * 导出品类属性组中间列表 + */ + @RequiresPermissions("product:category_attribute_group:export") + @Log(title = "品类属性组中间", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, CategoryAttributeGroup categoryAttributeGroup) + { + List list = categoryAttributeGroupService.selectCategoryAttributeGroupList(categoryAttributeGroup); + ExcelUtil util = new ExcelUtil(CategoryAttributeGroup.class); + util.exportExcel(response, list, "品类属性组中间数据"); + } + + /** + * 获取品类属性组中间详细信息 + */ + @RequiresPermissions("product:category_attribute_group:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(categoryAttributeGroupService.selectCategoryAttributeGroupById(id)); + } + + /** + * 新增品类属性组中间 + */ + @RequiresPermissions("product:category_attribute_group:add") + @Log(title = "品类属性组中间", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody CategoryAttributeGroup categoryAttributeGroup) + { + return toAjax(categoryAttributeGroupService.insertCategoryAttributeGroup(categoryAttributeGroup)); + } + + /** + * 修改品类属性组中间 + */ + @RequiresPermissions("product:category_attribute_group:edit") + @Log(title = "品类属性组中间", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody CategoryAttributeGroup categoryAttributeGroup) + { + return toAjax(categoryAttributeGroupService.updateCategoryAttributeGroup(categoryAttributeGroup)); + } + + /** + * 删除品类属性组中间 + */ + @RequiresPermissions("product:category_attribute_group:remove") + @Log(title = "品类属性组中间", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(categoryAttributeGroupService.deleteCategoryAttributeGroupByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java new file mode 100644 index 0000000..75b441e --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 Saisai + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/category_info") +public class CategoryInfoController extends BaseController +{ + @Autowired + private ICategoryInfoService categoryInfoService; + + /** + * 查询品类信息列表 + */ + @RequiresPermissions("product:category_info:list") + @GetMapping("/list") + public Result list(CategoryInfo categoryInfo) + { + List list = categoryInfoService.selectCategoryInfoList(categoryInfo); + return success(list); + } + + /** + * 导出品类信息列表 + */ + @RequiresPermissions("product:category_info: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_info:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(categoryInfoService.selectCategoryInfoById(id)); + } + + /** + * 新增品类信息 + */ + @RequiresPermissions("product:category_info:add") + @Log(title = "品类信息", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody CategoryInfo categoryInfo) + { + return toAjax(categoryInfoService.insertCategoryInfo(categoryInfo)); + } + + /** + * 修改品类信息 + */ + @RequiresPermissions("product:category_info:edit") + @Log(title = "品类信息", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody CategoryInfo categoryInfo) + { + return toAjax(categoryInfoService.updateCategoryInfo(categoryInfo)); + } + + /** + * 删除品类信息 + */ + @RequiresPermissions("product:category_info: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-server/src/main/java/com/muyu/product/controller/ProductCategoryController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductCategoryController.java new file mode 100644 index 0000000..017e1ef --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductCategoryController.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.ProductCategory; +import com.muyu.product.service.IProductCategoryService; +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 Saisai + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/product_category") +public class ProductCategoryController extends BaseController +{ + @Autowired + private IProductCategoryService productCategoryService; + + /** + * 查询品类商品中间列表 + */ + @RequiresPermissions("product:product_category:list") + @GetMapping("/list") + public Result> list(ProductCategory productCategory) + { + startPage(); + List list = productCategoryService.selectProductCategoryList(productCategory); + return getDataTable(list); + } + + /** + * 导出品类商品中间列表 + */ + @RequiresPermissions("product:product_category:export") + @Log(title = "品类商品中间", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProductCategory productCategory) + { + List list = productCategoryService.selectProductCategoryList(productCategory); + ExcelUtil util = new ExcelUtil(ProductCategory.class); + util.exportExcel(response, list, "品类商品中间数据"); + } + + /** + * 获取品类商品中间详细信息 + */ + @RequiresPermissions("product:product_category:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(productCategoryService.selectProductCategoryById(id)); + } + + /** + * 新增品类商品中间 + */ + @RequiresPermissions("product:product_category:add") + @Log(title = "品类商品中间", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody ProductCategory productCategory) + { + return toAjax(productCategoryService.insertProductCategory(productCategory)); + } + + /** + * 修改品类商品中间 + */ + @RequiresPermissions("product:product_category:edit") + @Log(title = "品类商品中间", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody ProductCategory productCategory) + { + return toAjax(productCategoryService.updateProductCategory(productCategory)); + } + + /** + * 删除品类商品中间 + */ + @RequiresPermissions("product:product_category:remove") + @Log(title = "品类商品中间", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(productCategoryService.deleteProductCategoryByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductInfoController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductInfoController.java new file mode 100644 index 0000000..d07e74a --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductInfoController.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.ProductInfo; +import com.muyu.product.service.IProductInfoService; +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 Saisai + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/product_info") +public class ProductInfoController extends BaseController +{ + @Autowired + private IProductInfoService productInfoService; + + /** + * 查询商品;列表 + */ + @RequiresPermissions("product:product_info:list") + @GetMapping("/list") + public Result> list(ProductInfo productInfo) + { + startPage(); + List list = productInfoService.selectProductInfoList(productInfo); + return getDataTable(list); + } + + /** + * 导出商品;列表 + */ + @RequiresPermissions("product:product_info:export") + @Log(title = "商品;", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, ProductInfo productInfo) + { + List list = productInfoService.selectProductInfoList(productInfo); + ExcelUtil util = new ExcelUtil(ProductInfo.class); + util.exportExcel(response, list, "商品;数据"); + } + + /** + * 获取商品;详细信息 + */ + @RequiresPermissions("product:product_info:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(productInfoService.selectProductInfoById(id)); + } + + /** + * 新增商品; + */ + @RequiresPermissions("product:product_info:add") + @Log(title = "商品;", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody ProductInfo productInfo) + { + return toAjax(productInfoService.insertProductInfo(productInfo)); + } + + /** + * 修改商品; + */ + @RequiresPermissions("product:product_info:edit") + @Log(title = "商品;", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody ProductInfo productInfo) + { + return toAjax(productInfoService.updateProductInfo(productInfo)); + } + + /** + * 删除商品; + */ + @RequiresPermissions("product:product_info:remove") + @Log(title = "商品;", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(productInfoService.deleteProductInfoByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/RuleController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/RuleController.java new file mode 100644 index 0000000..5c8cb90 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/RuleController.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.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 saisai + * @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-server/src/main/java/com/muyu/product/controller/RuleProductController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/RuleProductController.java new file mode 100644 index 0000000..d36d1ea --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/RuleProductController.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.RuleProduct; +import com.muyu.product.service.IRuleProductService; +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 saisai + * @date 2024-02-29 + */ +@RestController +@RequestMapping("/rule_product") +public class RuleProductController extends BaseController +{ + @Autowired + private IRuleProductService ruleProductService; + + /** + * 查询规格商品中间列表 + */ + @RequiresPermissions("product:product:list") + @GetMapping("/list") + public Result> list(RuleProduct ruleProduct) + { + startPage(); + List list = ruleProductService.selectRuleProductList(ruleProduct); + return getDataTable(list); + } + + /** + * 导出规格商品中间列表 + */ + @RequiresPermissions("product:product:export") + @Log(title = "规格商品中间", businessType = BusinessType.EXPORT) + @PostMapping("/export") + public void export(HttpServletResponse response, RuleProduct ruleProduct) + { + List list = ruleProductService.selectRuleProductList(ruleProduct); + ExcelUtil util = new ExcelUtil(RuleProduct.class); + util.exportExcel(response, list, "规格商品中间数据"); + } + + /** + * 获取规格商品中间详细信息 + */ + @RequiresPermissions("product:product:query") + @GetMapping(value = "/{id}") + public Result getInfo(@PathVariable("id") Long id) + { + return success(ruleProductService.selectRuleProductById(id)); + } + + /** + * 新增规格商品中间 + */ + @RequiresPermissions("product:product:add") + @Log(title = "规格商品中间", businessType = BusinessType.INSERT) + @PostMapping + public Result add(@RequestBody RuleProduct ruleProduct) + { + return toAjax(ruleProductService.insertRuleProduct(ruleProduct)); + } + + /** + * 修改规格商品中间 + */ + @RequiresPermissions("product:product:edit") + @Log(title = "规格商品中间", businessType = BusinessType.UPDATE) + @PutMapping + public Result edit(@RequestBody RuleProduct ruleProduct) + { + return toAjax(ruleProductService.updateRuleProduct(ruleProduct)); + } + + /** + * 删除规格商品中间 + */ + @RequiresPermissions("product:product:remove") + @Log(title = "规格商品中间", businessType = BusinessType.DELETE) + @DeleteMapping("/{ids}") + public Result remove(@PathVariable Long[] ids) + { + return toAjax(ruleProductService.deleteRuleProductByIds(ids)); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AddressMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AddressMapper.java new file mode 100644 index 0000000..be9aa57 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AddressMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.Address; + +/** + * 地区Mapper接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface AddressMapper +{ + /** + * 查询地区 + * + * @param id 地区主键 + * @return 地区 + */ + public Address selectAddressById(Long id); + + /** + * 查询地区列表 + * + * @param address 地区 + * @return 地区集合 + */ + public List
selectAddressList(Address address); + + /** + * 新增地区 + * + * @param address 地区 + * @return 结果 + */ + public int insertAddress(Address address); + + /** + * 修改地区 + * + * @param address 地区 + * @return 结果 + */ + public int updateAddress(Address address); + + /** + * 删除地区 + * + * @param id 地区主键 + * @return 结果 + */ + public int deleteAddressById(Long id); + + /** + * 批量删除地区 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAddressByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsAttributeGroupMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsAttributeGroupMapper.java new file mode 100644 index 0000000..229832b --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsAttributeGroupMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.AsAttributeGroup; + +/** + * 属性组中间Mapper接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface AsAttributeGroupMapper +{ + /** + * 查询属性组中间 + * + * @param id 属性组中间主键 + * @return 属性组中间 + */ + public AsAttributeGroup selectAsAttributeGroupById(Long id); + + /** + * 查询属性组中间列表 + * + * @param asAttributeGroup 属性组中间 + * @return 属性组中间集合 + */ + public List selectAsAttributeGroupList(AsAttributeGroup asAttributeGroup); + + /** + * 新增属性组中间 + * + * @param asAttributeGroup 属性组中间 + * @return 结果 + */ + public int insertAsAttributeGroup(AsAttributeGroup asAttributeGroup); + + /** + * 修改属性组中间 + * + * @param asAttributeGroup 属性组中间 + * @return 结果 + */ + public int updateAsAttributeGroup(AsAttributeGroup asAttributeGroup); + + /** + * 删除属性组中间 + * + * @param id 属性组中间主键 + * @return 结果 + */ + public int deleteAsAttributeGroupById(Long id); + + /** + * 批量删除属性组中间 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAsAttributeGroupByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeGroupMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeGroupMapper.java new file mode 100644 index 0000000..110cb35 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 muyu + * @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-server/src/main/java/com/muyu/product/mapper/AttributeMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeMapper.java new file mode 100644 index 0000000..f3e62ba --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 Saisai + * @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-server/src/main/java/com/muyu/product/mapper/AttributeProductMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeProductMapper.java new file mode 100644 index 0000000..b5956ec --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AttributeProductMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.AttributeProduct; + +/** + * 商品属性中间表Mapper接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface AttributeProductMapper +{ + /** + * 查询商品属性中间表 + * + * @param id 商品属性中间表主键 + * @return 商品属性中间表 + */ + public AttributeProduct selectAttributeProductById(Long id); + + /** + * 查询商品属性中间表列表 + * + * @param attributeProduct 商品属性中间表 + * @return 商品属性中间表集合 + */ + public List selectAttributeProductList(AttributeProduct attributeProduct); + + /** + * 新增商品属性中间表 + * + * @param attributeProduct 商品属性中间表 + * @return 结果 + */ + public int insertAttributeProduct(AttributeProduct attributeProduct); + + /** + * 修改商品属性中间表 + * + * @param attributeProduct 商品属性中间表 + * @return 结果 + */ + public int updateAttributeProduct(AttributeProduct attributeProduct); + + /** + * 删除商品属性中间表 + * + * @param id 商品属性中间表主键 + * @return 结果 + */ + public int deleteAttributeProductById(Long id); + + /** + * 批量删除商品属性中间表 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteAttributeProductByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandCategoryMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandCategoryMapper.java new file mode 100644 index 0000000..240f700 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandCategoryMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.BrandCategory; + +/** + * 品牌品类中间Mapper接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface BrandCategoryMapper +{ + /** + * 查询品牌品类中间 + * + * @param id 品牌品类中间主键 + * @return 品牌品类中间 + */ + public BrandCategory selectBrandCategoryById(Long id); + + /** + * 查询品牌品类中间列表 + * + * @param brandCategory 品牌品类中间 + * @return 品牌品类中间集合 + */ + public List selectBrandCategoryList(BrandCategory brandCategory); + + /** + * 新增品牌品类中间 + * + * @param brandCategory 品牌品类中间 + * @return 结果 + */ + public int insertBrandCategory(BrandCategory brandCategory); + + /** + * 修改品牌品类中间 + * + * @param brandCategory 品牌品类中间 + * @return 结果 + */ + public int updateBrandCategory(BrandCategory brandCategory); + + /** + * 删除品牌品类中间 + * + * @param id 品牌品类中间主键 + * @return 结果 + */ + public int deleteBrandCategoryById(Long id); + + /** + * 批量删除品牌品类中间 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBrandCategoryByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandMapper.java new file mode 100644 index 0000000..982884e --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.Brand; + +/** + * 品牌Mapper接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface BrandMapper +{ + /** + * 查询品牌 + * + * @param id 品牌主键 + * @return 品牌 + */ + public Brand selectBrandById(Long id); + + /** + * 查询品牌列表 + * + * @param brand 品牌 + * @return 品牌集合 + */ + public List selectBrandList(Brand brand); + + /** + * 新增品牌 + * + * @param brand 品牌 + * @return 结果 + */ + public int insertBrand(Brand brand); + + /** + * 修改品牌 + * + * @param brand 品牌 + * @return 结果 + */ + public int updateBrand(Brand brand); + + /** + * 删除品牌 + * + * @param id 品牌主键 + * @return 结果 + */ + public int deleteBrandById(Long id); + + /** + * 批量删除品牌 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteBrandByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryAttributeGroupMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryAttributeGroupMapper.java new file mode 100644 index 0000000..6965d24 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 saisai + * @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-server/src/main/java/com/muyu/product/mapper/CategoryAttributeMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryAttributeMapper.java new file mode 100644 index 0000000..c317727 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 Saisai + * @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-server/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java new file mode 100644 index 0000000..9968b14 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 Saisai + * @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-server/src/main/java/com/muyu/product/mapper/ProductCategoryMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductCategoryMapper.java new file mode 100644 index 0000000..62360f0 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductCategoryMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.ProductCategory; + +/** + * 品类商品中间Mapper接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface ProductCategoryMapper +{ + /** + * 查询品类商品中间 + * + * @param id 品类商品中间主键 + * @return 品类商品中间 + */ + public ProductCategory selectProductCategoryById(Long id); + + /** + * 查询品类商品中间列表 + * + * @param productCategory 品类商品中间 + * @return 品类商品中间集合 + */ + public List selectProductCategoryList(ProductCategory productCategory); + + /** + * 新增品类商品中间 + * + * @param productCategory 品类商品中间 + * @return 结果 + */ + public int insertProductCategory(ProductCategory productCategory); + + /** + * 修改品类商品中间 + * + * @param productCategory 品类商品中间 + * @return 结果 + */ + public int updateProductCategory(ProductCategory productCategory); + + /** + * 删除品类商品中间 + * + * @param id 品类商品中间主键 + * @return 结果 + */ + public int deleteProductCategoryById(Long id); + + /** + * 批量删除品类商品中间 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProductCategoryByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductInfoMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductInfoMapper.java new file mode 100644 index 0000000..7a45768 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductInfoMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.ProductInfo; + +/** + * 商品;Mapper接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface ProductInfoMapper +{ + /** + * 查询商品; + * + * @param id 商品;主键 + * @return 商品; + */ + public ProductInfo selectProductInfoById(Long id); + + /** + * 查询商品;列表 + * + * @param productInfo 商品; + * @return 商品;集合 + */ + public List selectProductInfoList(ProductInfo productInfo); + + /** + * 新增商品; + * + * @param productInfo 商品; + * @return 结果 + */ + public int insertProductInfo(ProductInfo productInfo); + + /** + * 修改商品; + * + * @param productInfo 商品; + * @return 结果 + */ + public int updateProductInfo(ProductInfo productInfo); + + /** + * 删除商品; + * + * @param id 商品;主键 + * @return 结果 + */ + public int deleteProductInfoById(Long id); + + /** + * 批量删除商品; + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteProductInfoByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleMapper.java new file mode 100644 index 0000000..27d2bc2 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 saisai + * @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-server/src/main/java/com/muyu/product/mapper/RuleProductMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleProductMapper.java new file mode 100644 index 0000000..df87ece --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleProductMapper.java @@ -0,0 +1,61 @@ +package com.muyu.product.mapper; + +import java.util.List; +import com.muyu.product.domain.RuleProduct; + +/** + * 规格商品中间Mapper接口 + * + * @author saisai + * @date 2024-02-29 + */ +public interface RuleProductMapper +{ + /** + * 查询规格商品中间 + * + * @param id 规格商品中间主键 + * @return 规格商品中间 + */ + public RuleProduct selectRuleProductById(Long id); + + /** + * 查询规格商品中间列表 + * + * @param ruleProduct 规格商品中间 + * @return 规格商品中间集合 + */ + public List selectRuleProductList(RuleProduct ruleProduct); + + /** + * 新增规格商品中间 + * + * @param ruleProduct 规格商品中间 + * @return 结果 + */ + public int insertRuleProduct(RuleProduct ruleProduct); + + /** + * 修改规格商品中间 + * + * @param ruleProduct 规格商品中间 + * @return 结果 + */ + public int updateRuleProduct(RuleProduct ruleProduct); + + /** + * 删除规格商品中间 + * + * @param id 规格商品中间主键 + * @return 结果 + */ + public int deleteRuleProductById(Long id); + + /** + * 批量删除规格商品中间 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteRuleProductByIds(Long[] ids); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAddressService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAddressService.java new file mode 100644 index 0000000..3456d7f --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAddressService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.Address; + +/** + * 地区Service接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface IAddressService +{ + /** + * 查询地区 + * + * @param id 地区主键 + * @return 地区 + */ + public Address selectAddressById(Long id); + + /** + * 查询地区列表 + * + * @param address 地区 + * @return 地区集合 + */ + public List
selectAddressList(Address address); + + /** + * 新增地区 + * + * @param address 地区 + * @return 结果 + */ + public int insertAddress(Address address); + + /** + * 修改地区 + * + * @param address 地区 + * @return 结果 + */ + public int updateAddress(Address address); + + /** + * 批量删除地区 + * + * @param ids 需要删除的地区主键集合 + * @return 结果 + */ + public int deleteAddressByIds(Long[] ids); + + /** + * 删除地区信息 + * + * @param id 地区主键 + * @return 结果 + */ + public int deleteAddressById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAsAttributeGroupService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAsAttributeGroupService.java new file mode 100644 index 0000000..82767be --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAsAttributeGroupService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.AsAttributeGroup; + +/** + * 属性组中间Service接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface IAsAttributeGroupService +{ + /** + * 查询属性组中间 + * + * @param id 属性组中间主键 + * @return 属性组中间 + */ + public AsAttributeGroup selectAsAttributeGroupById(Long id); + + /** + * 查询属性组中间列表 + * + * @param asAttributeGroup 属性组中间 + * @return 属性组中间集合 + */ + public List selectAsAttributeGroupList(AsAttributeGroup asAttributeGroup); + + /** + * 新增属性组中间 + * + * @param asAttributeGroup 属性组中间 + * @return 结果 + */ + public int insertAsAttributeGroup(AsAttributeGroup asAttributeGroup); + + /** + * 修改属性组中间 + * + * @param asAttributeGroup 属性组中间 + * @return 结果 + */ + public int updateAsAttributeGroup(AsAttributeGroup asAttributeGroup); + + /** + * 批量删除属性组中间 + * + * @param ids 需要删除的属性组中间主键集合 + * @return 结果 + */ + public int deleteAsAttributeGroupByIds(Long[] ids); + + /** + * 删除属性组中间信息 + * + * @param id 属性组中间主键 + * @return 结果 + */ + public int deleteAsAttributeGroupById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeGroupService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeGroupService.java new file mode 100644 index 0000000..6dd835f --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 muyu + * @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-server/src/main/java/com/muyu/product/service/IAttributeProductService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeProductService.java new file mode 100644 index 0000000..e135b4c --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeProductService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.AttributeProduct; + +/** + * 商品属性中间表Service接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface IAttributeProductService +{ + /** + * 查询商品属性中间表 + * + * @param id 商品属性中间表主键 + * @return 商品属性中间表 + */ + public AttributeProduct selectAttributeProductById(Long id); + + /** + * 查询商品属性中间表列表 + * + * @param attributeProduct 商品属性中间表 + * @return 商品属性中间表集合 + */ + public List selectAttributeProductList(AttributeProduct attributeProduct); + + /** + * 新增商品属性中间表 + * + * @param attributeProduct 商品属性中间表 + * @return 结果 + */ + public int insertAttributeProduct(AttributeProduct attributeProduct); + + /** + * 修改商品属性中间表 + * + * @param attributeProduct 商品属性中间表 + * @return 结果 + */ + public int updateAttributeProduct(AttributeProduct attributeProduct); + + /** + * 批量删除商品属性中间表 + * + * @param ids 需要删除的商品属性中间表主键集合 + * @return 结果 + */ + public int deleteAttributeProductByIds(Long[] ids); + + /** + * 删除商品属性中间表信息 + * + * @param id 商品属性中间表主键 + * @return 结果 + */ + public int deleteAttributeProductById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IAttributeService.java new file mode 100644 index 0000000..d2df242 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 Saisai + * @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-server/src/main/java/com/muyu/product/service/IBrandCategoryService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandCategoryService.java new file mode 100644 index 0000000..747081c --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandCategoryService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.BrandCategory; + +/** + * 品牌品类中间Service接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface IBrandCategoryService +{ + /** + * 查询品牌品类中间 + * + * @param id 品牌品类中间主键 + * @return 品牌品类中间 + */ + public BrandCategory selectBrandCategoryById(Long id); + + /** + * 查询品牌品类中间列表 + * + * @param brandCategory 品牌品类中间 + * @return 品牌品类中间集合 + */ + public List selectBrandCategoryList(BrandCategory brandCategory); + + /** + * 新增品牌品类中间 + * + * @param brandCategory 品牌品类中间 + * @return 结果 + */ + public int insertBrandCategory(BrandCategory brandCategory); + + /** + * 修改品牌品类中间 + * + * @param brandCategory 品牌品类中间 + * @return 结果 + */ + public int updateBrandCategory(BrandCategory brandCategory); + + /** + * 批量删除品牌品类中间 + * + * @param ids 需要删除的品牌品类中间主键集合 + * @return 结果 + */ + public int deleteBrandCategoryByIds(Long[] ids); + + /** + * 删除品牌品类中间信息 + * + * @param id 品牌品类中间主键 + * @return 结果 + */ + public int deleteBrandCategoryById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandService.java new file mode 100644 index 0000000..6d26c17 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IBrandService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.Brand; + +/** + * 品牌Service接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface IBrandService +{ + /** + * 查询品牌 + * + * @param id 品牌主键 + * @return 品牌 + */ + public Brand selectBrandById(Long id); + + /** + * 查询品牌列表 + * + * @param brand 品牌 + * @return 品牌集合 + */ + public List selectBrandList(Brand brand); + + /** + * 新增品牌 + * + * @param brand 品牌 + * @return 结果 + */ + public int insertBrand(Brand brand); + + /** + * 修改品牌 + * + * @param brand 品牌 + * @return 结果 + */ + public int updateBrand(Brand brand); + + /** + * 批量删除品牌 + * + * @param ids 需要删除的品牌主键集合 + * @return 结果 + */ + public int deleteBrandByIds(Long[] ids); + + /** + * 删除品牌信息 + * + * @param id 品牌主键 + * @return 结果 + */ + public int deleteBrandById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryAttributeGroupService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryAttributeGroupService.java new file mode 100644 index 0000000..bc3bd28 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 saisai + * @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-server/src/main/java/com/muyu/product/service/ICategoryAttributeService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryAttributeService.java new file mode 100644 index 0000000..297a5b8 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 Saisai + * @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-server/src/main/java/com/muyu/product/service/ICategoryInfoService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ICategoryInfoService.java new file mode 100644 index 0000000..d25643d --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 Saisai + * @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-server/src/main/java/com/muyu/product/service/IProductCategoryService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductCategoryService.java new file mode 100644 index 0000000..57cd9ce --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductCategoryService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.ProductCategory; + +/** + * 品类商品中间Service接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface IProductCategoryService +{ + /** + * 查询品类商品中间 + * + * @param id 品类商品中间主键 + * @return 品类商品中间 + */ + public ProductCategory selectProductCategoryById(Long id); + + /** + * 查询品类商品中间列表 + * + * @param productCategory 品类商品中间 + * @return 品类商品中间集合 + */ + public List selectProductCategoryList(ProductCategory productCategory); + + /** + * 新增品类商品中间 + * + * @param productCategory 品类商品中间 + * @return 结果 + */ + public int insertProductCategory(ProductCategory productCategory); + + /** + * 修改品类商品中间 + * + * @param productCategory 品类商品中间 + * @return 结果 + */ + public int updateProductCategory(ProductCategory productCategory); + + /** + * 批量删除品类商品中间 + * + * @param ids 需要删除的品类商品中间主键集合 + * @return 结果 + */ + public int deleteProductCategoryByIds(Long[] ids); + + /** + * 删除品类商品中间信息 + * + * @param id 品类商品中间主键 + * @return 结果 + */ + public int deleteProductCategoryById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductInfoService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductInfoService.java new file mode 100644 index 0000000..f2b48b2 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IProductInfoService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.ProductInfo; + +/** + * 商品;Service接口 + * + * @author Saisai + * @date 2024-02-29 + */ +public interface IProductInfoService +{ + /** + * 查询商品; + * + * @param id 商品;主键 + * @return 商品; + */ + public ProductInfo selectProductInfoById(Long id); + + /** + * 查询商品;列表 + * + * @param productInfo 商品; + * @return 商品;集合 + */ + public List selectProductInfoList(ProductInfo productInfo); + + /** + * 新增商品; + * + * @param productInfo 商品; + * @return 结果 + */ + public int insertProductInfo(ProductInfo productInfo); + + /** + * 修改商品; + * + * @param productInfo 商品; + * @return 结果 + */ + public int updateProductInfo(ProductInfo productInfo); + + /** + * 批量删除商品; + * + * @param ids 需要删除的商品;主键集合 + * @return 结果 + */ + public int deleteProductInfoByIds(Long[] ids); + + /** + * 删除商品;信息 + * + * @param id 商品;主键 + * @return 结果 + */ + public int deleteProductInfoById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleProductService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleProductService.java new file mode 100644 index 0000000..c747be3 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleProductService.java @@ -0,0 +1,61 @@ +package com.muyu.product.service; + +import java.util.List; +import com.muyu.product.domain.RuleProduct; + +/** + * 规格商品中间Service接口 + * + * @author saisai + * @date 2024-02-29 + */ +public interface IRuleProductService +{ + /** + * 查询规格商品中间 + * + * @param id 规格商品中间主键 + * @return 规格商品中间 + */ + public RuleProduct selectRuleProductById(Long id); + + /** + * 查询规格商品中间列表 + * + * @param ruleProduct 规格商品中间 + * @return 规格商品中间集合 + */ + public List selectRuleProductList(RuleProduct ruleProduct); + + /** + * 新增规格商品中间 + * + * @param ruleProduct 规格商品中间 + * @return 结果 + */ + public int insertRuleProduct(RuleProduct ruleProduct); + + /** + * 修改规格商品中间 + * + * @param ruleProduct 规格商品中间 + * @return 结果 + */ + public int updateRuleProduct(RuleProduct ruleProduct); + + /** + * 批量删除规格商品中间 + * + * @param ids 需要删除的规格商品中间主键集合 + * @return 结果 + */ + public int deleteRuleProductByIds(Long[] ids); + + /** + * 删除规格商品中间信息 + * + * @param id 规格商品中间主键 + * @return 结果 + */ + public int deleteRuleProductById(Long id); +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/IRuleService.java new file mode 100644 index 0000000..6a9a568 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 saisai + * @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-server/src/main/java/com/muyu/product/service/impl/AddressServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AddressServiceImpl.java new file mode 100644 index 0000000..f01233d --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AddressServiceImpl.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.AddressMapper; +import com.muyu.product.domain.Address; +import com.muyu.product.service.IAddressService; + +/** + * 地区Service业务层处理 + * + * @author Saisai + * @date 2024-02-29 + */ +@Service +public class AddressServiceImpl implements IAddressService +{ + @Autowired + private AddressMapper addressMapper; + + /** + * 查询地区 + * + * @param id 地区主键 + * @return 地区 + */ + @Override + public Address selectAddressById(Long id) + { + return addressMapper.selectAddressById(id); + } + + /** + * 查询地区列表 + * + * @param address 地区 + * @return 地区 + */ + @Override + public List
selectAddressList(Address address) + { + return addressMapper.selectAddressList(address); + } + + /** + * 新增地区 + * + * @param address 地区 + * @return 结果 + */ + @Override + public int insertAddress(Address address) + { + address.setCreateTime(DateUtils.getNowDate()); + return addressMapper.insertAddress(address); + } + + /** + * 修改地区 + * + * @param address 地区 + * @return 结果 + */ + @Override + public int updateAddress(Address address) + { + address.setUpdateTime(DateUtils.getNowDate()); + return addressMapper.updateAddress(address); + } + + /** + * 批量删除地区 + * + * @param ids 需要删除的地区主键 + * @return 结果 + */ + @Override + public int deleteAddressByIds(Long[] ids) + { + return addressMapper.deleteAddressByIds(ids); + } + + /** + * 删除地区信息 + * + * @param id 地区主键 + * @return 结果 + */ + @Override + public int deleteAddressById(Long id) + { + return addressMapper.deleteAddressById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AsAttributeGroupServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AsAttributeGroupServiceImpl.java new file mode 100644 index 0000000..40841c2 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AsAttributeGroupServiceImpl.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.AsAttributeGroupMapper; +import com.muyu.product.domain.AsAttributeGroup; +import com.muyu.product.service.IAsAttributeGroupService; + +/** + * 属性组中间Service业务层处理 + * + * @author Saisai + * @date 2024-02-29 + */ +@Service +public class AsAttributeGroupServiceImpl implements IAsAttributeGroupService +{ + @Autowired + private AsAttributeGroupMapper asAttributeGroupMapper; + + /** + * 查询属性组中间 + * + * @param id 属性组中间主键 + * @return 属性组中间 + */ + @Override + public AsAttributeGroup selectAsAttributeGroupById(Long id) + { + return asAttributeGroupMapper.selectAsAttributeGroupById(id); + } + + /** + * 查询属性组中间列表 + * + * @param asAttributeGroup 属性组中间 + * @return 属性组中间 + */ + @Override + public List selectAsAttributeGroupList(AsAttributeGroup asAttributeGroup) + { + return asAttributeGroupMapper.selectAsAttributeGroupList(asAttributeGroup); + } + + /** + * 新增属性组中间 + * + * @param asAttributeGroup 属性组中间 + * @return 结果 + */ + @Override + public int insertAsAttributeGroup(AsAttributeGroup asAttributeGroup) + { + asAttributeGroup.setCreateTime(DateUtils.getNowDate()); + return asAttributeGroupMapper.insertAsAttributeGroup(asAttributeGroup); + } + + /** + * 修改属性组中间 + * + * @param asAttributeGroup 属性组中间 + * @return 结果 + */ + @Override + public int updateAsAttributeGroup(AsAttributeGroup asAttributeGroup) + { + asAttributeGroup.setUpdateTime(DateUtils.getNowDate()); + return asAttributeGroupMapper.updateAsAttributeGroup(asAttributeGroup); + } + + /** + * 批量删除属性组中间 + * + * @param ids 需要删除的属性组中间主键 + * @return 结果 + */ + @Override + public int deleteAsAttributeGroupByIds(Long[] ids) + { + return asAttributeGroupMapper.deleteAsAttributeGroupByIds(ids); + } + + /** + * 删除属性组中间信息 + * + * @param id 属性组中间主键 + * @return 结果 + */ + @Override + public int deleteAsAttributeGroupById(Long id) + { + return asAttributeGroupMapper.deleteAsAttributeGroupById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java new file mode 100644 index 0000000..3971cdb --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 muyu + * @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-server/src/main/java/com/muyu/product/service/impl/AttributeProductServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeProductServiceImpl.java new file mode 100644 index 0000000..431f662 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeProductServiceImpl.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.AttributeProductMapper; +import com.muyu.product.domain.AttributeProduct; +import com.muyu.product.service.IAttributeProductService; + +/** + * 商品属性中间表Service业务层处理 + * + * @author Saisai + * @date 2024-02-29 + */ +@Service +public class AttributeProductServiceImpl implements IAttributeProductService +{ + @Autowired + private AttributeProductMapper attributeProductMapper; + + /** + * 查询商品属性中间表 + * + * @param id 商品属性中间表主键 + * @return 商品属性中间表 + */ + @Override + public AttributeProduct selectAttributeProductById(Long id) + { + return attributeProductMapper.selectAttributeProductById(id); + } + + /** + * 查询商品属性中间表列表 + * + * @param attributeProduct 商品属性中间表 + * @return 商品属性中间表 + */ + @Override + public List selectAttributeProductList(AttributeProduct attributeProduct) + { + return attributeProductMapper.selectAttributeProductList(attributeProduct); + } + + /** + * 新增商品属性中间表 + * + * @param attributeProduct 商品属性中间表 + * @return 结果 + */ + @Override + public int insertAttributeProduct(AttributeProduct attributeProduct) + { + attributeProduct.setCreateTime(DateUtils.getNowDate()); + return attributeProductMapper.insertAttributeProduct(attributeProduct); + } + + /** + * 修改商品属性中间表 + * + * @param attributeProduct 商品属性中间表 + * @return 结果 + */ + @Override + public int updateAttributeProduct(AttributeProduct attributeProduct) + { + attributeProduct.setUpdateTime(DateUtils.getNowDate()); + return attributeProductMapper.updateAttributeProduct(attributeProduct); + } + + /** + * 批量删除商品属性中间表 + * + * @param ids 需要删除的商品属性中间表主键 + * @return 结果 + */ + @Override + public int deleteAttributeProductByIds(Long[] ids) + { + return attributeProductMapper.deleteAttributeProductByIds(ids); + } + + /** + * 删除商品属性中间表信息 + * + * @param id 商品属性中间表主键 + * @return 结果 + */ + @Override + public int deleteAttributeProductById(Long id) + { + return attributeProductMapper.deleteAttributeProductById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeServiceImpl.java new file mode 100644 index 0000000..a1c1cc7 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 Saisai + * @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-server/src/main/java/com/muyu/product/service/impl/BrandCategoryServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandCategoryServiceImpl.java new file mode 100644 index 0000000..883f742 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandCategoryServiceImpl.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.BrandCategoryMapper; +import com.muyu.product.domain.BrandCategory; +import com.muyu.product.service.IBrandCategoryService; + +/** + * 品牌品类中间Service业务层处理 + * + * @author Saisai + * @date 2024-02-29 + */ +@Service +public class BrandCategoryServiceImpl implements IBrandCategoryService +{ + @Autowired + private BrandCategoryMapper brandCategoryMapper; + + /** + * 查询品牌品类中间 + * + * @param id 品牌品类中间主键 + * @return 品牌品类中间 + */ + @Override + public BrandCategory selectBrandCategoryById(Long id) + { + return brandCategoryMapper.selectBrandCategoryById(id); + } + + /** + * 查询品牌品类中间列表 + * + * @param brandCategory 品牌品类中间 + * @return 品牌品类中间 + */ + @Override + public List selectBrandCategoryList(BrandCategory brandCategory) + { + return brandCategoryMapper.selectBrandCategoryList(brandCategory); + } + + /** + * 新增品牌品类中间 + * + * @param brandCategory 品牌品类中间 + * @return 结果 + */ + @Override + public int insertBrandCategory(BrandCategory brandCategory) + { + brandCategory.setCreateTime(DateUtils.getNowDate()); + return brandCategoryMapper.insertBrandCategory(brandCategory); + } + + /** + * 修改品牌品类中间 + * + * @param brandCategory 品牌品类中间 + * @return 结果 + */ + @Override + public int updateBrandCategory(BrandCategory brandCategory) + { + brandCategory.setUpdateTime(DateUtils.getNowDate()); + return brandCategoryMapper.updateBrandCategory(brandCategory); + } + + /** + * 批量删除品牌品类中间 + * + * @param ids 需要删除的品牌品类中间主键 + * @return 结果 + */ + @Override + public int deleteBrandCategoryByIds(Long[] ids) + { + return brandCategoryMapper.deleteBrandCategoryByIds(ids); + } + + /** + * 删除品牌品类中间信息 + * + * @param id 品牌品类中间主键 + * @return 结果 + */ + @Override + public int deleteBrandCategoryById(Long id) + { + return brandCategoryMapper.deleteBrandCategoryById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandServiceImpl.java new file mode 100644 index 0000000..d16da12 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandServiceImpl.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.BrandMapper; +import com.muyu.product.domain.Brand; +import com.muyu.product.service.IBrandService; + +/** + * 品牌Service业务层处理 + * + * @author Saisai + * @date 2024-02-29 + */ +@Service +public class BrandServiceImpl implements IBrandService +{ + @Autowired + private BrandMapper brandMapper; + + /** + * 查询品牌 + * + * @param id 品牌主键 + * @return 品牌 + */ + @Override + public Brand selectBrandById(Long id) + { + return brandMapper.selectBrandById(id); + } + + /** + * 查询品牌列表 + * + * @param brand 品牌 + * @return 品牌 + */ + @Override + public List selectBrandList(Brand brand) + { + return brandMapper.selectBrandList(brand); + } + + /** + * 新增品牌 + * + * @param brand 品牌 + * @return 结果 + */ + @Override + public int insertBrand(Brand brand) + { + brand.setCreateTime(DateUtils.getNowDate()); + return brandMapper.insertBrand(brand); + } + + /** + * 修改品牌 + * + * @param brand 品牌 + * @return 结果 + */ + @Override + public int updateBrand(Brand brand) + { + brand.setUpdateTime(DateUtils.getNowDate()); + return brandMapper.updateBrand(brand); + } + + /** + * 批量删除品牌 + * + * @param ids 需要删除的品牌主键 + * @return 结果 + */ + @Override + public int deleteBrandByIds(Long[] ids) + { + return brandMapper.deleteBrandByIds(ids); + } + + /** + * 删除品牌信息 + * + * @param id 品牌主键 + * @return 结果 + */ + @Override + public int deleteBrandById(Long id) + { + return brandMapper.deleteBrandById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryAttributeGroupServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryAttributeGroupServiceImpl.java new file mode 100644 index 0000000..7c9f04a --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 saisai + * @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-server/src/main/java/com/muyu/product/service/impl/CategoryAttributeServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryAttributeServiceImpl.java new file mode 100644 index 0000000..e07c4ef --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 Saisai + * @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-server/src/main/java/com/muyu/product/service/impl/CategoryInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryInfoServiceImpl.java new file mode 100644 index 0000000..38d5636 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 Saisai + * @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-server/src/main/java/com/muyu/product/service/impl/ProductCategoryServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProductCategoryServiceImpl.java new file mode 100644 index 0000000..99963a9 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProductCategoryServiceImpl.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.ProductCategoryMapper; +import com.muyu.product.domain.ProductCategory; +import com.muyu.product.service.IProductCategoryService; + +/** + * 品类商品中间Service业务层处理 + * + * @author Saisai + * @date 2024-02-29 + */ +@Service +public class ProductCategoryServiceImpl implements IProductCategoryService +{ + @Autowired + private ProductCategoryMapper productCategoryMapper; + + /** + * 查询品类商品中间 + * + * @param id 品类商品中间主键 + * @return 品类商品中间 + */ + @Override + public ProductCategory selectProductCategoryById(Long id) + { + return productCategoryMapper.selectProductCategoryById(id); + } + + /** + * 查询品类商品中间列表 + * + * @param productCategory 品类商品中间 + * @return 品类商品中间 + */ + @Override + public List selectProductCategoryList(ProductCategory productCategory) + { + return productCategoryMapper.selectProductCategoryList(productCategory); + } + + /** + * 新增品类商品中间 + * + * @param productCategory 品类商品中间 + * @return 结果 + */ + @Override + public int insertProductCategory(ProductCategory productCategory) + { + productCategory.setCreateTime(DateUtils.getNowDate()); + return productCategoryMapper.insertProductCategory(productCategory); + } + + /** + * 修改品类商品中间 + * + * @param productCategory 品类商品中间 + * @return 结果 + */ + @Override + public int updateProductCategory(ProductCategory productCategory) + { + productCategory.setUpdateTime(DateUtils.getNowDate()); + return productCategoryMapper.updateProductCategory(productCategory); + } + + /** + * 批量删除品类商品中间 + * + * @param ids 需要删除的品类商品中间主键 + * @return 结果 + */ + @Override + public int deleteProductCategoryByIds(Long[] ids) + { + return productCategoryMapper.deleteProductCategoryByIds(ids); + } + + /** + * 删除品类商品中间信息 + * + * @param id 品类商品中间主键 + * @return 结果 + */ + @Override + public int deleteProductCategoryById(Long id) + { + return productCategoryMapper.deleteProductCategoryById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProductInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProductInfoServiceImpl.java new file mode 100644 index 0000000..ffd906a --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProductInfoServiceImpl.java @@ -0,0 +1,95 @@ +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.ProductInfoMapper; +import com.muyu.product.domain.ProductInfo; +import com.muyu.product.service.IProductInfoService; + +/** + * 商品;Service业务层处理 + * + * @author Saisai + * @date 2024-02-29 + */ +@Service +public class ProductInfoServiceImpl implements IProductInfoService +{ + @Autowired + private ProductInfoMapper productInfoMapper; + + /** + * 查询商品; + * + * @param id 商品;主键 + * @return 商品; + */ + @Override + public ProductInfo selectProductInfoById(Long id) + { + return productInfoMapper.selectProductInfoById(id); + } + + /** + * 查询商品;列表 + * + * @param productInfo 商品; + * @return 商品; + */ + @Override + public List selectProductInfoList(ProductInfo productInfo) + { + return productInfoMapper.selectProductInfoList(productInfo); + } + + /** + * 新增商品; + * + * @param productInfo 商品; + * @return 结果 + */ + @Override + public int insertProductInfo(ProductInfo productInfo) + { + return productInfoMapper.insertProductInfo(productInfo); + } + + /** + * 修改商品; + * + * @param productInfo 商品; + * @return 结果 + */ + @Override + public int updateProductInfo(ProductInfo productInfo) + { + productInfo.setUpdateTime(DateUtils.getNowDate()); + return productInfoMapper.updateProductInfo(productInfo); + } + + /** + * 批量删除商品; + * + * @param ids 需要删除的商品;主键 + * @return 结果 + */ + @Override + public int deleteProductInfoByIds(Long[] ids) + { + return productInfoMapper.deleteProductInfoByIds(ids); + } + + /** + * 删除商品;信息 + * + * @param id 商品;主键 + * @return 结果 + */ + @Override + public int deleteProductInfoById(Long id) + { + return productInfoMapper.deleteProductInfoById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleProductServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleProductServiceImpl.java new file mode 100644 index 0000000..9a5105a --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleProductServiceImpl.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.RuleProductMapper; +import com.muyu.product.domain.RuleProduct; +import com.muyu.product.service.IRuleProductService; + +/** + * 规格商品中间Service业务层处理 + * + * @author saisai + * @date 2024-02-29 + */ +@Service +public class RuleProductServiceImpl implements IRuleProductService +{ + @Autowired + private RuleProductMapper ruleProductMapper; + + /** + * 查询规格商品中间 + * + * @param id 规格商品中间主键 + * @return 规格商品中间 + */ + @Override + public RuleProduct selectRuleProductById(Long id) + { + return ruleProductMapper.selectRuleProductById(id); + } + + /** + * 查询规格商品中间列表 + * + * @param ruleProduct 规格商品中间 + * @return 规格商品中间 + */ + @Override + public List selectRuleProductList(RuleProduct ruleProduct) + { + return ruleProductMapper.selectRuleProductList(ruleProduct); + } + + /** + * 新增规格商品中间 + * + * @param ruleProduct 规格商品中间 + * @return 结果 + */ + @Override + public int insertRuleProduct(RuleProduct ruleProduct) + { + ruleProduct.setCreateTime(DateUtils.getNowDate()); + return ruleProductMapper.insertRuleProduct(ruleProduct); + } + + /** + * 修改规格商品中间 + * + * @param ruleProduct 规格商品中间 + * @return 结果 + */ + @Override + public int updateRuleProduct(RuleProduct ruleProduct) + { + ruleProduct.setUpdateTime(DateUtils.getNowDate()); + return ruleProductMapper.updateRuleProduct(ruleProduct); + } + + /** + * 批量删除规格商品中间 + * + * @param ids 需要删除的规格商品中间主键 + * @return 结果 + */ + @Override + public int deleteRuleProductByIds(Long[] ids) + { + return ruleProductMapper.deleteRuleProductByIds(ids); + } + + /** + * 删除规格商品中间信息 + * + * @param id 规格商品中间主键 + * @return 结果 + */ + @Override + public int deleteRuleProductById(Long id) + { + return ruleProductMapper.deleteRuleProductById(id); + } +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleServiceImpl.java new file mode 100644 index 0000000..6196ae5 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/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 saisai + * @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-server/src/main/resources/mapper/product/AddressMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AddressMapper.xml new file mode 100644 index 0000000..3465315 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AddressMapper.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + select id, address_name, son_id, create_by, create_time, update_by, update_time from address + + + + + + + + insert into address + + address_name, + son_id, + create_by, + create_time, + update_by, + update_time, + + + #{addressName}, + #{sonId}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update address + + address_name = #{addressName}, + son_id = #{sonId}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from address where id = #{id} + + + + delete from address where id in + + #{id} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsAttributeGroupMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsAttributeGroupMapper.xml new file mode 100644 index 0000000..1863782 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsAttributeGroupMapper.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + select id, attribute_id, group_id, remark, create_by, create_time, update_by, update_time from as_attribute_group + + + + + + + + insert into as_attribute_group + + id, + attribute_id, + group_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{id}, + #{attributeId}, + #{groupId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update as_attribute_group + + attribute_id = #{attributeId}, + group_id = #{groupId}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from as_attribute_group where id = #{id} + + + + delete from as_attribute_group where id in + + #{id} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeGroupMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeGroupMapper.xml new file mode 100644 index 0000000..c2df8ee --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeGroupMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, name, states, remark, create_by, create_time, update_by, update_time from attribute_group + + + + + + + + insert into attribute_group + + name, + states, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{name}, + #{states}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update attribute_group + + name = #{name}, + states = #{states}, + 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} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeMapper.xml new file mode 100644 index 0000000..973f3b1 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, name, group_id, remark, create_by, create_time, update_by, update_time from attribute + + + + + + + + insert into attribute + + name, + group_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{name}, + #{groupId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update attribute + + name = #{name}, + group_id = #{groupId}, + 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} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeProductMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeProductMapper.xml new file mode 100644 index 0000000..4133e9c --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeProductMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + select id, product_id, attribute_id, value, remark, create_by, create_time, update_by, update_time from attribute_product + + + + + + + + insert into attribute_product + + product_id, + attribute_id, + value, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{productId}, + #{attributeId}, + #{value}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update attribute_product + + 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 attribute_product where id = #{id} + + + + delete from attribute_product where id in + + #{id} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/BrandCategoryMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/BrandCategoryMapper.xml new file mode 100644 index 0000000..ba5126b --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/BrandCategoryMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, category_id, brand_id, remark, create_by, create_time, update_by, update_time from brand_category + + + + + + + + insert into brand_category + + category_id, + brand_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{categoryId}, + #{brandId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update brand_category + + 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 brand_category where id = #{id} + + + + delete from brand_category where id in + + #{id} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/BrandMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/BrandMapper.xml new file mode 100644 index 0000000..93c48c7 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/BrandMapper.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + select id, name, logo, introduction, status, address_name, remark, create_by, create_time, update_by, update_time from brand + + + + + + + + insert into brand + + name, + logo, + introduction, + status, + address_name, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{name}, + #{logo}, + #{introduction}, + #{status}, + #{addressName}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update brand + + name = #{name}, + logo = #{logo}, + introduction = #{introduction}, + status = #{status}, + address_name = #{addressName}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from brand where id = #{id} + + + + delete from brand where id in + + #{id} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryAttributeGroupMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryAttributeGroupMapper.xml new file mode 100644 index 0000000..68169f0 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryAttributeGroupMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, attribute_group_id, category_id, remark, create_by, create_time, update_by, update_time from category_attribute_group + + + + + + + + insert into category_attribute_group + + attribute_group_id, + category_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{attributeGroupId}, + #{categoryId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update category_attribute_group + + attribute_group_id = #{attributeGroupId}, + category_id = #{categoryId}, + 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} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryAttributeMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryAttributeMapper.xml new file mode 100644 index 0000000..44d9eb7 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryAttributeMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, attribute_id, category_id, remark, create_by, create_time, update_by, update_time from category_attribute + + + + + + + + insert into category_attribute + + attribute_id, + category_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{attributeId}, + #{categoryId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update category_attribute + + attribute_id = #{attributeId}, + category_id = #{categoryId}, + 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} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryInfoMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryInfoMapper.xml new file mode 100644 index 0000000..3ffa037 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryInfoMapper.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + select id, name, image, parent_id, status, remark, create_by, create_time, update_by, update_time from category_info + + + + + + + + insert into category_info + + name, + image, + parent_id, + status, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{name}, + #{image}, + #{parentId}, + #{status}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update category_info + + name = #{name}, + image = #{image}, + parent_id = #{parentId}, + status = #{status}, + 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} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductCategoryMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductCategoryMapper.xml new file mode 100644 index 0000000..72558b5 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductCategoryMapper.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + select id, category_id, product_id, remark, create_by, create_time, update_by, update_time from product_category + + + + + + + + insert into product_category + + category_id, + product_id, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{categoryId}, + #{productId}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update product_category + + category_id = #{categoryId}, + product_id = #{productId}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from product_category where id = #{id} + + + + delete from product_category where id in + + #{id} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductInfoMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductInfoMapper.xml new file mode 100644 index 0000000..97686d0 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductInfoMapper.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + select id, name, introduction, brand_id, images, address_send, status, remark, created_by, created_time, updated_by, update_time from product_info + + + + + + + + insert into product_info + + name, + introduction, + brand_id, + images, + address_send, + status, + remark, + created_by, + created_time, + updated_by, + update_time, + + + #{name}, + #{introduction}, + #{brandId}, + #{images}, + #{addressSend}, + #{status}, + #{remark}, + #{createdBy}, + #{createdTime}, + #{updatedBy}, + #{updateTime}, + + + + + update product_info + + name = #{name}, + introduction = #{introduction}, + brand_id = #{brandId}, + images = #{images}, + address_send = #{addressSend}, + status = #{status}, + remark = #{remark}, + created_by = #{createdBy}, + created_time = #{createdTime}, + updated_by = #{updatedBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from product_info where id = #{id} + + + + delete from product_info where id in + + #{id} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/RuleMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/RuleMapper.xml new file mode 100644 index 0000000..1e141d3 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/RuleMapper.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + select id, name, remark, create_by, create_time, update_by, update_time from rule + + + + + + + + insert into rule + + name, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{name}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update rule + + name = #{name}, + 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} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/RuleProductMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/RuleProductMapper.xml new file mode 100644 index 0000000..5013b71 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/RuleProductMapper.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + select id, product_id, rule_id, rule_value, remark, create_by, create_time, update_by, update_time from rule_product + + + + + + + + insert into rule_product + + product_id, + rule_id, + rule_value, + remark, + create_by, + create_time, + update_by, + update_time, + + + #{productId}, + #{ruleId}, + #{ruleValue}, + #{remark}, + #{createBy}, + #{createTime}, + #{updateBy}, + #{updateTime}, + + + + + update rule_product + + product_id = #{productId}, + rule_id = #{ruleId}, + rule_value = #{ruleValue}, + remark = #{remark}, + create_by = #{createBy}, + create_time = #{createTime}, + update_by = #{updateBy}, + update_time = #{updateTime}, + + where id = #{id} + + + + delete from rule_product where id = #{id} + + + + delete from rule_product where id in + + #{id} + + +