From 3d2c517729d87b6ef90b86c0aa5f4710012649ee Mon Sep 17 00:00:00 2001
From: csy <435732439@qq.com>
Date: Fri, 1 Mar 2024 17:12:46 +0800
Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E5=B1=9E=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../muyu-product/muyu-product-common/pom.xml | 10 +-
.../muyu/product/domain/AsAttributeGroup.java | 70 +++++++++++++
.../muyu/product/domain/AsBrandProject.java | 3 +-
.../product/domain/AsCategoryAttribute.java | 1 +
.../domain/AsCategoryAttributeGroup.java | 1 +
.../muyu/product/domain/AsCategoryBrand.java | 1 +
.../product/domain/AsProdutAttributeInfo.java | 1 +
.../muyu/product/domain/AttributeGroup.java | 1 +
.../muyu/product/domain/AttributeInfo.java | 46 ++++-----
.../com/muyu/product/domain/BrandInfo.java | 1 +
.../com/muyu/product/domain/CategoryInfo.java | 1 +
.../com/muyu/product/domain/CommentInfo.java | 1 +
.../muyu/product/domain/CommentLikeInfo.java | 1 +
.../com/muyu/product/domain/ProjectInfo.java | 1 +
.../muyu/product/domain/ProjectSkuInfo.java | 1 +
.../com/muyu/product/domain/RuleAttrInfo.java | 1 +
.../com/muyu/product/domain/RuleInfo.java | 1 +
.../mapper/AsAttributeGroupMapper.java | 61 ++++++++++++
.../service/IAsAttributeGroupService.java | 61 ++++++++++++
.../impl/AsAttributeGroupServiceImpl.java | 99 +++++++++++++++++++
.../impl/AttributeGroupServiceImpl.java | 3 +
.../impl/AttributeInfoServiceImpl.java | 3 +
.../service/impl/BrandInfoServiceImpl.java | 5 +
.../mapper/product/AsAttributeGroupMapper.xml | 81 +++++++++++++++
.../mapper/product/AttributeInfoMapper.xml | 20 ++--
muyu-modules/muyu-product/pom.xml | 1 +
muyu-modules/pom.xml | 1 -
27 files changed, 441 insertions(+), 36 deletions(-)
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-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/service/IAsAttributeGroupService.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/resources/mapper/product/AsAttributeGroupMapper.xml
diff --git a/muyu-modules/muyu-product/muyu-product-common/pom.xml b/muyu-modules/muyu-product/muyu-product-common/pom.xml
index 2247c48..627bb6f 100644
--- a/muyu-modules/muyu-product/muyu-product-common/pom.xml
+++ b/muyu-modules/muyu-product/muyu-product-common/pom.xml
@@ -19,11 +19,19 @@
-
+
com.muyu
muyu-common-core
+
+ com.muyu
+ muyu-common-security
+
+
+ com.muyu
+ muyu-common-security
+
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..b3c947f
--- /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 org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.muyu.common.core.annotation.Excel;
+import com.muyu.common.core.web.domain.BaseEntity;
+
+/**
+ * 属性与组中间对象 as_attribute_group
+ *
+ * @author CuiShiYu
+ * @date 2024-03-01
+ */
+public class AsAttributeGroup extends BaseEntity
+{
+ private static final long serialVersionUID = 1L;
+
+ /** 主键 */
+ private Long id;
+
+ /** 组id */
+ @Excel(name = "组id")
+ private Long groupId;
+
+ /** 属性id */
+ @Excel(name = "属性id")
+ private Long attributeId;
+
+ public void setId(Long id)
+ {
+ this.id = id;
+ }
+
+ public Long getId()
+ {
+ return id;
+ }
+ public void setGroupId(Long groupId)
+ {
+ this.groupId = groupId;
+ }
+
+ public Long getGroupId()
+ {
+ return groupId;
+ }
+ public void setAttributeId(Long attributeId)
+ {
+ this.attributeId = attributeId;
+ }
+
+ public Long getAttributeId()
+ {
+ return attributeId;
+ }
+
+ @Override
+ public String toString() {
+ return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+ .append("id", getId())
+ .append("groupId", getGroupId())
+ .append("attributeId", getAttributeId())
+ .append("remark", getRemark())
+ .append("createBy", getCreateBy())
+ .append("createTime", getCreateTime())
+ .append("updateBy", getUpdateBy())
+ .append("updateTime", getUpdateTime())
+ .toString();
+ }
+}
diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsBrandProject.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsBrandProject.java
index e5846a8..ebce523 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsBrandProject.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsBrandProject.java
@@ -1,5 +1,6 @@
package com.muyu.product.domain;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
@@ -61,7 +62,7 @@ public class AsBrandProject extends BaseEntity
.append("brandId", getBrandId())
.append("projectId", getProjectId())
.append("remark", getRemark())
- .append("createBy", getCreateBy())
+ .append("createBy", SecurityUtils.getUsername())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
.append("updateTime", getUpdateTime())
diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsCategoryAttribute.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsCategoryAttribute.java
index 9778a1d..4ce8edb 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsCategoryAttribute.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsCategoryAttribute.java
@@ -1,5 +1,6 @@
package com.muyu.product.domain;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsCategoryAttributeGroup.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsCategoryAttributeGroup.java
index 87bf84a..2b25894 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsCategoryAttributeGroup.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsCategoryAttributeGroup.java
@@ -1,5 +1,6 @@
package com.muyu.product.domain;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsCategoryBrand.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsCategoryBrand.java
index cfd2c93..ce716ed 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsCategoryBrand.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsCategoryBrand.java
@@ -1,5 +1,6 @@
package com.muyu.product.domain;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsProdutAttributeInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsProdutAttributeInfo.java
index 0bcd4d6..ad9056e 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsProdutAttributeInfo.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AsProdutAttributeInfo.java
@@ -1,5 +1,6 @@
package com.muyu.product.domain;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
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
index d6071b3..369017a 100644
--- 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
@@ -1,5 +1,6 @@
package com.muyu.product.domain;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeInfo.java
index 05ba58d..104b959 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeInfo.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeInfo.java
@@ -9,7 +9,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
* 商品属性对象 attribute_info
*
* @author CuiShiYu
- * @date 2024-02-29
+ * @date 2024-03-01
*/
public class AttributeInfo extends BaseEntity
{
@@ -18,14 +18,14 @@ public class AttributeInfo extends BaseEntity
/** 属性编号 */
private Long id;
+ /** 属性编码 */
+ @Excel(name = "属性编码")
+ private String code;
+
/** 属性名称 */
@Excel(name = "属性名称")
private String name;
- /** 分组 */
- @Excel(name = "分组")
- private Long groupId;
-
public void setId(Long id)
{
this.id = id;
@@ -35,6 +35,15 @@ public class AttributeInfo extends BaseEntity
{
return id;
}
+ public void setCode(String code)
+ {
+ this.code = code;
+ }
+
+ public String getCode()
+ {
+ return code;
+ }
public void setName(String name)
{
this.name = name;
@@ -44,27 +53,18 @@ public class AttributeInfo extends BaseEntity
{
return name;
}
- 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("name", getName())
- .append("groupId", getGroupId())
- .append("remark", getRemark())
- .append("createBy", getCreateBy())
- .append("createTime", getCreateTime())
- .append("updateBy", getUpdateBy())
- .append("updateTime", getUpdateTime())
- .toString();
+ .append("id", getId())
+ .append("code", getCode())
+ .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/BrandInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandInfo.java
index 90e13ef..a50e65e 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandInfo.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/BrandInfo.java
@@ -1,5 +1,6 @@
package com.muyu.product.domain;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
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
index 2b7d562..ed7b1e0 100644
--- 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
@@ -1,5 +1,6 @@
package com.muyu.product.domain;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentInfo.java
index 3f6e1ae..93e1a1e 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentInfo.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentInfo.java
@@ -1,5 +1,6 @@
package com.muyu.product.domain;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentLikeInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentLikeInfo.java
index 503e0ba..9874b8b 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentLikeInfo.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CommentLikeInfo.java
@@ -1,5 +1,6 @@
package com.muyu.product.domain;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProjectInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProjectInfo.java
index 49f3eb2..9892bd4 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProjectInfo.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProjectInfo.java
@@ -1,6 +1,7 @@
package com.muyu.product.domain;
import java.math.BigDecimal;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProjectSkuInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProjectSkuInfo.java
index acb73a6..06ddbac 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProjectSkuInfo.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/ProjectSkuInfo.java
@@ -1,6 +1,7 @@
package com.muyu.product.domain;
import java.math.BigDecimal;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleAttrInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleAttrInfo.java
index e9df600..2798777 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleAttrInfo.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleAttrInfo.java
@@ -1,5 +1,6 @@
package com.muyu.product.domain;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleInfo.java
index bdf7e03..9f3d00b 100644
--- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleInfo.java
+++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleInfo.java
@@ -1,5 +1,6 @@
package com.muyu.product.domain;
+import com.muyu.common.security.utils.SecurityUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.muyu.common.core.annotation.Excel;
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..f06b2dc
--- /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 CuiShiYu
+ * @date 2024-03-01
+ */
+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/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..ec4c769
--- /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 CuiShiYu
+ * @date 2024-03-01
+ */
+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/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..b7d9ac2
--- /dev/null
+++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AsAttributeGroupServiceImpl.java
@@ -0,0 +1,99 @@
+package com.muyu.product.service.impl;
+
+import java.util.List;
+import com.muyu.common.core.utils.DateUtils;
+import com.muyu.common.security.utils.SecurityUtils;
+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 CuiShiYu
+ * @date 2024-03-01
+ */
+@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());
+ asAttributeGroup.setCreateBy(SecurityUtils.getUsername());
+ return asAttributeGroupMapper.insertAsAttributeGroup(asAttributeGroup);
+ }
+
+ /**
+ * 修改属性与组中间
+ *
+ * @param asAttributeGroup 属性与组中间
+ * @return 结果
+ */
+ @Override
+ public int updateAsAttributeGroup(AsAttributeGroup asAttributeGroup)
+ {
+ asAttributeGroup.setUpdateTime(DateUtils.getNowDate());
+ asAttributeGroup.setUpdateBy(SecurityUtils.getUsername());
+ 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
index 8632f20..a505013 100644
--- 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
@@ -2,6 +2,7 @@ package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
+import com.muyu.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.AttributeGroupMapper;
@@ -54,6 +55,7 @@ public class AttributeGroupServiceImpl implements IAttributeGroupService
public int insertAttributeGroup(AttributeGroup attributeGroup)
{
attributeGroup.setCreateTime(DateUtils.getNowDate());
+ attributeGroup.setCreateBy(SecurityUtils.getUsername());
return attributeGroupMapper.insertAttributeGroup(attributeGroup);
}
@@ -67,6 +69,7 @@ public class AttributeGroupServiceImpl implements IAttributeGroupService
public int updateAttributeGroup(AttributeGroup attributeGroup)
{
attributeGroup.setUpdateTime(DateUtils.getNowDate());
+ attributeGroup.setUpdateBy(SecurityUtils.getUsername());
return attributeGroupMapper.updateAttributeGroup(attributeGroup);
}
diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeInfoServiceImpl.java
index 2cac85d..c4f73a6 100644
--- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeInfoServiceImpl.java
+++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeInfoServiceImpl.java
@@ -2,6 +2,7 @@ package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
+import com.muyu.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.AttributeInfoMapper;
@@ -54,6 +55,7 @@ public class AttributeInfoServiceImpl implements IAttributeInfoService
public int insertAttributeInfo(AttributeInfo attributeInfo)
{
attributeInfo.setCreateTime(DateUtils.getNowDate());
+ attributeInfo.setCreateBy(SecurityUtils.getUsername());
return attributeInfoMapper.insertAttributeInfo(attributeInfo);
}
@@ -67,6 +69,7 @@ public class AttributeInfoServiceImpl implements IAttributeInfoService
public int updateAttributeInfo(AttributeInfo attributeInfo)
{
attributeInfo.setUpdateTime(DateUtils.getNowDate());
+ attributeInfo.setUpdateBy(SecurityUtils.getUsername());
return attributeInfoMapper.updateAttributeInfo(attributeInfo);
}
diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandInfoServiceImpl.java
index 3a85d49..91639dc 100644
--- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandInfoServiceImpl.java
+++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandInfoServiceImpl.java
@@ -1,7 +1,9 @@
package com.muyu.product.service.impl;
+import java.util.Date;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
+import com.muyu.common.security.utils.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.BrandInfoMapper;
@@ -32,6 +34,7 @@ public class BrandInfoServiceImpl implements IBrandInfoService
return brandInfoMapper.selectBrandInfoById(id);
}
+
/**
* 查询商品品牌列表
*
@@ -54,6 +57,7 @@ public class BrandInfoServiceImpl implements IBrandInfoService
public int insertBrandInfo(BrandInfo brandInfo)
{
brandInfo.setCreateTime(DateUtils.getNowDate());
+ brandInfo.setCreateBy(SecurityUtils.getUsername());
return brandInfoMapper.insertBrandInfo(brandInfo);
}
@@ -67,6 +71,7 @@ public class BrandInfoServiceImpl implements IBrandInfoService
public int updateBrandInfo(BrandInfo brandInfo)
{
brandInfo.setUpdateTime(DateUtils.getNowDate());
+ brandInfo.setUpdateBy(SecurityUtils.getUsername());
return brandInfoMapper.updateBrandInfo(brandInfo);
}
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..d29fbde
--- /dev/null
+++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsAttributeGroupMapper.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ select id, group_id, attribute_id, remark, create_by, create_time, update_by, update_time from as_attribute_group
+
+
+
+
+
+
+
+ insert into as_attribute_group
+
+ group_id,
+ attribute_id,
+ remark,
+ create_by,
+ create_time,
+ update_by,
+ update_time,
+
+
+ #{groupId},
+ #{attributeId},
+ #{remark},
+ #{createBy},
+ #{createTime},
+ #{updateBy},
+ #{updateTime},
+
+
+
+
+ update as_attribute_group
+
+ group_id = #{groupId},
+ attribute_id = #{attributeId},
+ 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/AttributeInfoMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeInfoMapper.xml
index 11a14b4..ac380d5 100644
--- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeInfoMapper.xml
+++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AttributeInfoMapper.xml
@@ -1,13 +1,13 @@
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+
-
@@ -16,14 +16,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select id, name, group_id, remark, create_by, create_time, update_by, update_time from attribute_info
+ select id, code, name, remark, create_by, create_time, update_by, update_time from attribute_info
@@ -35,30 +35,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into attribute_info
+ code,
name,
- group_id,
remark,
create_by,
create_time,
update_by,
update_time,
-
+
+ #{code},
#{name},
- #{groupId},
#{remark},
#{createBy},
#{createTime},
#{updateBy},
#{updateTime},
-
+
update attribute_info
+ code = #{code},
name = #{name},
- group_id = #{groupId},
remark = #{remark},
create_by = #{createBy},
create_time = #{createTime},
diff --git a/muyu-modules/muyu-product/pom.xml b/muyu-modules/muyu-product/pom.xml
index 7594442..98f3b2a 100644
--- a/muyu-modules/muyu-product/pom.xml
+++ b/muyu-modules/muyu-product/pom.xml
@@ -14,6 +14,7 @@
muyu-product-remote
muyu-product-server
+ muyu-product-common
diff --git a/muyu-modules/pom.xml b/muyu-modules/pom.xml
index bc07ea9..760c5c2 100644
--- a/muyu-modules/pom.xml
+++ b/muyu-modules/pom.xml
@@ -14,7 +14,6 @@
muyu-job
muyu-file
muyu-product
- muyu-product/muyu-product-common
muyu-modules