跟项目,生成器文件带入服务

day-06
Saisai Liu 2024-02-29 09:46:33 +08:00
parent bf7239464e
commit fd28a8fbc8
88 changed files with 6857 additions and 19 deletions

View File

@ -97,7 +97,7 @@
<select id="selectDbTableList" parameterType="com.muyu.gen.domain.GenTable" resultMap="GenTableResult">
select table_name, table_comment, create_time, update_time from information_schema.tables
where (table_schema = (select database()) or table_schema = 'ten-product')
where table_schema = (select database())
AND table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%'
AND table_name NOT IN (select table_name from gen_table)
<if test="tableName != null and tableName != ''">
@ -119,7 +119,7 @@
select table_name, table_comment, create_time, update_time from information_schema.tables
where table_name NOT LIKE 'qrtz_%'
and table_name NOT LIKE 'gen_%'
and (table_schema = (select database()) or table_schema = 'ten-product')
and table_schema = (select database())
and table_name in
<foreach collection="array" item="name" open="(" separator="," close=")">
#{name}

View File

@ -44,7 +44,7 @@ public class ${ClassName}Controller extends BaseController
@RequiresPermissions("${permissionPrefix}:list")
@GetMapping("/list")
#if($table.crud || $table.sub)
public Result<TableDataInfo> list(${ClassName} ${className})
public Result<TableDataInfo<${ClassName}>> list(${ClassName} ${className})
{
startPage();
List<${ClassName}> list = ${className}Service.select${ClassName}List(${className});

View File

@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="${packageName}.mapper.${ClassName}Mapper">
<resultMap type="${ClassName}" id="${ClassName}Result">
<resultMap type="${packageName}.${ClassName}" id="${ClassName}Result">
#foreach ($column in $columns)
<result property="${column.javaField}" column="${column.columnName}" />
#end

View File

@ -1,7 +0,0 @@
package com.muyu;
public class Main {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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();
}
}

View File

@ -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<Address> 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<Address> list = addressService.selectAddressList(address);
ExcelUtil<Address> util = new ExcelUtil<Address>(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));
}
}

View File

@ -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<TableDataInfo<AsAttributeGroup>> list(AsAttributeGroup asAttributeGroup)
{
startPage();
List<AsAttributeGroup> 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<AsAttributeGroup> list = asAttributeGroupService.selectAsAttributeGroupList(asAttributeGroup);
ExcelUtil<AsAttributeGroup> util = new ExcelUtil<AsAttributeGroup>(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));
}
}

View File

@ -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<TableDataInfo<Attribute>> list(Attribute attribute)
{
startPage();
List<Attribute> 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<Attribute> list = attributeService.selectAttributeList(attribute);
ExcelUtil<Attribute> util = new ExcelUtil<Attribute>(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));
}
}

View File

@ -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<TableDataInfo<AttributeGroup>> list(AttributeGroup attributeGroup)
{
startPage();
List<AttributeGroup> 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<AttributeGroup> list = attributeGroupService.selectAttributeGroupList(attributeGroup);
ExcelUtil<AttributeGroup> util = new ExcelUtil<AttributeGroup>(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));
}
}

View File

@ -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<TableDataInfo<AttributeProduct>> list(AttributeProduct attributeProduct)
{
startPage();
List<AttributeProduct> 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<AttributeProduct> list = attributeProductService.selectAttributeProductList(attributeProduct);
ExcelUtil<AttributeProduct> util = new ExcelUtil<AttributeProduct>(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));
}
}

View File

@ -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<TableDataInfo<BrandCategory>> list(BrandCategory brandCategory)
{
startPage();
List<BrandCategory> 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<BrandCategory> list = brandCategoryService.selectBrandCategoryList(brandCategory);
ExcelUtil<BrandCategory> util = new ExcelUtil<BrandCategory>(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));
}
}

View File

@ -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<TableDataInfo<Brand>> list(Brand brand)
{
startPage();
List<Brand> 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<Brand> list = brandService.selectBrandList(brand);
ExcelUtil<Brand> util = new ExcelUtil<Brand>(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));
}
}

View File

@ -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<TableDataInfo<CategoryAttribute>> list(CategoryAttribute categoryAttribute)
{
startPage();
List<CategoryAttribute> 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<CategoryAttribute> list = categoryAttributeService.selectCategoryAttributeList(categoryAttribute);
ExcelUtil<CategoryAttribute> util = new ExcelUtil<CategoryAttribute>(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));
}
}

View File

@ -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<TableDataInfo<CategoryAttributeGroup>> list(CategoryAttributeGroup categoryAttributeGroup)
{
startPage();
List<CategoryAttributeGroup> 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<CategoryAttributeGroup> list = categoryAttributeGroupService.selectCategoryAttributeGroupList(categoryAttributeGroup);
ExcelUtil<CategoryAttributeGroup> util = new ExcelUtil<CategoryAttributeGroup>(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));
}
}

View File

@ -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<CategoryInfo> 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<CategoryInfo> list = categoryInfoService.selectCategoryInfoList(categoryInfo);
ExcelUtil<CategoryInfo> util = new ExcelUtil<CategoryInfo>(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));
}
}

View File

@ -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<TableDataInfo<ProductCategory>> list(ProductCategory productCategory)
{
startPage();
List<ProductCategory> 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<ProductCategory> list = productCategoryService.selectProductCategoryList(productCategory);
ExcelUtil<ProductCategory> util = new ExcelUtil<ProductCategory>(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));
}
}

View File

@ -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<TableDataInfo<ProductInfo>> list(ProductInfo productInfo)
{
startPage();
List<ProductInfo> 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<ProductInfo> list = productInfoService.selectProductInfoList(productInfo);
ExcelUtil<ProductInfo> util = new ExcelUtil<ProductInfo>(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));
}
}

View File

@ -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<TableDataInfo<Rule>> list(Rule rule)
{
startPage();
List<Rule> 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<Rule> list = ruleService.selectRuleList(rule);
ExcelUtil<Rule> util = new ExcelUtil<Rule>(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));
}
}

View File

@ -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<TableDataInfo<RuleProduct>> list(RuleProduct ruleProduct)
{
startPage();
List<RuleProduct> 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<RuleProduct> list = ruleProductService.selectRuleProductList(ruleProduct);
ExcelUtil<RuleProduct> util = new ExcelUtil<RuleProduct>(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));
}
}

View File

@ -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<Address> 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);
}

View File

@ -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<AsAttributeGroup> 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);
}

View File

@ -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<AttributeGroup> 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);
}

View File

@ -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<Attribute> 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);
}

View File

@ -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<AttributeProduct> 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);
}

View File

@ -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<BrandCategory> 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);
}

View File

@ -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<Brand> 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);
}

View File

@ -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<CategoryAttributeGroup> 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);
}

View File

@ -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<CategoryAttribute> 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);
}

View File

@ -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<CategoryInfo> 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);
}

View File

@ -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<ProductCategory> 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);
}

View File

@ -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<ProductInfo> 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);
}

View File

@ -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<Rule> 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);
}

View File

@ -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<RuleProduct> 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);
}

View File

@ -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<Address> 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);
}

View File

@ -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<AsAttributeGroup> 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);
}

View File

@ -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<AttributeGroup> 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);
}

View File

@ -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<AttributeProduct> 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);
}

View File

@ -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<Attribute> 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);
}

View File

@ -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<BrandCategory> 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);
}

View File

@ -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<Brand> 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);
}

View File

@ -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<CategoryAttributeGroup> 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);
}

View File

@ -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<CategoryAttribute> 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);
}

View File

@ -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<CategoryInfo> 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);
}

View File

@ -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<ProductCategory> 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);
}

View File

@ -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<ProductInfo> 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);
}

View File

@ -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<RuleProduct> 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);
}

View File

@ -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<Rule> 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);
}

View File

@ -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<Address> 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);
}
}

View File

@ -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<AsAttributeGroup> 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);
}
}

View File

@ -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<AttributeGroup> 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);
}
}

View File

@ -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<AttributeProduct> 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);
}
}

View File

@ -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<Attribute> 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);
}
}

View File

@ -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<BrandCategory> 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);
}
}

View File

@ -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<Brand> 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);
}
}

View File

@ -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<CategoryAttributeGroup> 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);
}
}

View File

@ -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<CategoryAttribute> 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);
}
}

View File

@ -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<CategoryInfo> 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);
}
}

View File

@ -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<ProductCategory> 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);
}
}

View File

@ -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<ProductInfo> 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);
}
}

View File

@ -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<RuleProduct> 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);
}
}

View File

@ -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<Rule> 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);
}
}

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.AddressMapper">
<resultMap type="com.muyu.product.domain.Address" id="AddressResult">
<result property="id" column="id" />
<result property="addressName" column="address_name" />
<result property="sonId" column="son_id" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectAddressVo">
select id, address_name, son_id, create_by, create_time, update_by, update_time from address
</sql>
<select id="selectAddressList" parameterType="com.muyu.product.domain.Address" resultMap="AddressResult">
<include refid="selectAddressVo"/>
<where>
<if test="addressName != null and addressName != ''"> and address_name like concat('%', #{addressName}, '%')</if>
<if test="sonId != null "> and son_id = #{sonId}</if>
</where>
</select>
<select id="selectAddressById" parameterType="Long" resultMap="AddressResult">
<include refid="selectAddressVo"/>
where id = #{id}
</select>
<insert id="insertAddress" parameterType="com.muyu.product.domain.Address" useGeneratedKeys="true" keyProperty="id">
insert into address
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="addressName != null and addressName != ''">address_name,</if>
<if test="sonId != null">son_id,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="addressName != null and addressName != ''">#{addressName},</if>
<if test="sonId != null">#{sonId},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateAddress" parameterType="com.muyu.product.domain.Address">
update address
<trim prefix="SET" suffixOverrides=",">
<if test="addressName != null and addressName != ''">address_name = #{addressName},</if>
<if test="sonId != null">son_id = #{sonId},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAddressById" parameterType="Long">
delete from address where id = #{id}
</delete>
<delete id="deleteAddressByIds" parameterType="String">
delete from address where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,83 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.AsAttributeGroupMapper">
<resultMap type="com.muyu.product.domain.AsAttributeGroup" id="AsAttributeGroupResult">
<result property="id" column="id" />
<result property="attributeId" column="attribute_id" />
<result property="groupId" column="group_id" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectAsAttributeGroupVo">
select id, attribute_id, group_id, remark, create_by, create_time, update_by, update_time from as_attribute_group
</sql>
<select id="selectAsAttributeGroupList" parameterType="com.muyu.product.domain.AsAttributeGroup" resultMap="AsAttributeGroupResult">
<include refid="selectAsAttributeGroupVo"/>
<where>
<if test="attributeId != null "> and attribute_id = #{attributeId}</if>
<if test="groupId != null "> and group_id = #{groupId}</if>
</where>
</select>
<select id="selectAsAttributeGroupById" parameterType="Long" resultMap="AsAttributeGroupResult">
<include refid="selectAsAttributeGroupVo"/>
where id = #{id}
</select>
<insert id="insertAsAttributeGroup" parameterType="com.muyu.product.domain.AsAttributeGroup">
insert into as_attribute_group
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">id,</if>
<if test="attributeId != null">attribute_id,</if>
<if test="groupId != null">group_id,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if>
<if test="attributeId != null">#{attributeId},</if>
<if test="groupId != null">#{groupId},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateAsAttributeGroup" parameterType="com.muyu.product.domain.AsAttributeGroup">
update as_attribute_group
<trim prefix="SET" suffixOverrides=",">
<if test="attributeId != null">attribute_id = #{attributeId},</if>
<if test="groupId != null">group_id = #{groupId},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAsAttributeGroupById" parameterType="Long">
delete from as_attribute_group where id = #{id}
</delete>
<delete id="deleteAsAttributeGroupByIds" parameterType="String">
delete from as_attribute_group where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.AttributeGroupMapper">
<resultMap type="com.muyu.product.domain.AttributeGroup" id="AttributeGroupResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="states" column="states" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectAttributeGroupVo">
select id, name, states, remark, create_by, create_time, update_by, update_time from attribute_group
</sql>
<select id="selectAttributeGroupList" parameterType="com.muyu.product.domain.AttributeGroup" resultMap="AttributeGroupResult">
<include refid="selectAttributeGroupVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="states != null and states != ''"> and states = #{states}</if>
</where>
</select>
<select id="selectAttributeGroupById" parameterType="Long" resultMap="AttributeGroupResult">
<include refid="selectAttributeGroupVo"/>
where id = #{id}
</select>
<insert id="insertAttributeGroup" parameterType="com.muyu.product.domain.AttributeGroup" useGeneratedKeys="true" keyProperty="id">
insert into attribute_group
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
<if test="states != null and states != ''">states,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="states != null and states != ''">#{states},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateAttributeGroup" parameterType="com.muyu.product.domain.AttributeGroup">
update attribute_group
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="states != null and states != ''">states = #{states},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAttributeGroupById" parameterType="Long">
delete from attribute_group where id = #{id}
</delete>
<delete id="deleteAttributeGroupByIds" parameterType="String">
delete from attribute_group where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.AttributeMapper">
<resultMap type="com.muyu.product.domain.Attribute" id="AttributeResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="groupId" column="group_id" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectAttributeVo">
select id, name, group_id, remark, create_by, create_time, update_by, update_time from attribute
</sql>
<select id="selectAttributeList" parameterType="com.muyu.product.domain.Attribute" resultMap="AttributeResult">
<include refid="selectAttributeVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="groupId != null and groupId != ''"> and group_id = #{groupId}</if>
</where>
</select>
<select id="selectAttributeById" parameterType="Long" resultMap="AttributeResult">
<include refid="selectAttributeVo"/>
where id = #{id}
</select>
<insert id="insertAttribute" parameterType="com.muyu.product.domain.Attribute" useGeneratedKeys="true" keyProperty="id">
insert into attribute
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
<if test="groupId != null and groupId != ''">group_id,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="groupId != null and groupId != ''">#{groupId},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateAttribute" parameterType="com.muyu.product.domain.Attribute">
update attribute
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="groupId != null and groupId != ''">group_id = #{groupId},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAttributeById" parameterType="Long">
delete from attribute where id = #{id}
</delete>
<delete id="deleteAttributeByIds" parameterType="String">
delete from attribute where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.AttributeProductMapper">
<resultMap type="com.muyu.product.domain.AttributeProduct" id="AttributeProductResult">
<result property="id" column="id" />
<result property="productId" column="product_id" />
<result property="attributeId" column="attribute_id" />
<result property="value" column="value" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectAttributeProductVo">
select id, product_id, attribute_id, value, remark, create_by, create_time, update_by, update_time from attribute_product
</sql>
<select id="selectAttributeProductList" parameterType="com.muyu.product.domain.AttributeProduct" resultMap="AttributeProductResult">
<include refid="selectAttributeProductVo"/>
<where>
<if test="productId != null "> and product_id = #{productId}</if>
<if test="attributeId != null "> and attribute_id = #{attributeId}</if>
<if test="value != null and value != ''"> and value = #{value}</if>
</where>
</select>
<select id="selectAttributeProductById" parameterType="Long" resultMap="AttributeProductResult">
<include refid="selectAttributeProductVo"/>
where id = #{id}
</select>
<insert id="insertAttributeProduct" parameterType="com.muyu.product.domain.AttributeProduct" useGeneratedKeys="true" keyProperty="id">
insert into attribute_product
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="productId != null">product_id,</if>
<if test="attributeId != null">attribute_id,</if>
<if test="value != null and value != ''">value,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productId != null">#{productId},</if>
<if test="attributeId != null">#{attributeId},</if>
<if test="value != null and value != ''">#{value},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateAttributeProduct" parameterType="com.muyu.product.domain.AttributeProduct">
update attribute_product
<trim prefix="SET" suffixOverrides=",">
<if test="productId != null">product_id = #{productId},</if>
<if test="attributeId != null">attribute_id = #{attributeId},</if>
<if test="value != null and value != ''">value = #{value},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteAttributeProductById" parameterType="Long">
delete from attribute_product where id = #{id}
</delete>
<delete id="deleteAttributeProductByIds" parameterType="String">
delete from attribute_product where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.BrandCategoryMapper">
<resultMap type="com.muyu.product.domain.BrandCategory" id="BrandCategoryResult">
<result property="id" column="id" />
<result property="categoryId" column="category_id" />
<result property="brandId" column="brand_id" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectBrandCategoryVo">
select id, category_id, brand_id, remark, create_by, create_time, update_by, update_time from brand_category
</sql>
<select id="selectBrandCategoryList" parameterType="com.muyu.product.domain.BrandCategory" resultMap="BrandCategoryResult">
<include refid="selectBrandCategoryVo"/>
<where>
<if test="categoryId != null "> and category_id = #{categoryId}</if>
<if test="brandId != null "> and brand_id = #{brandId}</if>
</where>
</select>
<select id="selectBrandCategoryById" parameterType="Long" resultMap="BrandCategoryResult">
<include refid="selectBrandCategoryVo"/>
where id = #{id}
</select>
<insert id="insertBrandCategory" parameterType="com.muyu.product.domain.BrandCategory" useGeneratedKeys="true" keyProperty="id">
insert into brand_category
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="categoryId != null">category_id,</if>
<if test="brandId != null">brand_id,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="categoryId != null">#{categoryId},</if>
<if test="brandId != null">#{brandId},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateBrandCategory" parameterType="com.muyu.product.domain.BrandCategory">
update brand_category
<trim prefix="SET" suffixOverrides=",">
<if test="categoryId != null">category_id = #{categoryId},</if>
<if test="brandId != null">brand_id = #{brandId},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBrandCategoryById" parameterType="Long">
delete from brand_category where id = #{id}
</delete>
<delete id="deleteBrandCategoryByIds" parameterType="String">
delete from brand_category where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.BrandMapper">
<resultMap type="com.muyu.product.domain.Brand" id="BrandResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="logo" column="logo" />
<result property="introduction" column="introduction" />
<result property="status" column="status" />
<result property="addressName" column="address_name" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectBrandVo">
select id, name, logo, introduction, status, address_name, remark, create_by, create_time, update_by, update_time from brand
</sql>
<select id="selectBrandList" parameterType="com.muyu.product.domain.Brand" resultMap="BrandResult">
<include refid="selectBrandVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="logo != null and logo != ''"> and logo = #{logo}</if>
<if test="introduction != null and introduction != ''"> and introduction = #{introduction}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
<if test="addressName != null and addressName != ''"> and address_name like concat('%', #{addressName}, '%')</if>
</where>
</select>
<select id="selectBrandById" parameterType="Long" resultMap="BrandResult">
<include refid="selectBrandVo"/>
where id = #{id}
</select>
<insert id="insertBrand" parameterType="com.muyu.product.domain.Brand" useGeneratedKeys="true" keyProperty="id">
insert into brand
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
<if test="logo != null and logo != ''">logo,</if>
<if test="introduction != null">introduction,</if>
<if test="status != null and status != ''">status,</if>
<if test="addressName != null">address_name,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="logo != null and logo != ''">#{logo},</if>
<if test="introduction != null">#{introduction},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="addressName != null">#{addressName},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateBrand" parameterType="com.muyu.product.domain.Brand">
update brand
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="logo != null and logo != ''">logo = #{logo},</if>
<if test="introduction != null">introduction = #{introduction},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="addressName != null">address_name = #{addressName},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteBrandById" parameterType="Long">
delete from brand where id = #{id}
</delete>
<delete id="deleteBrandByIds" parameterType="String">
delete from brand where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.CategoryAttributeGroupMapper">
<resultMap type="com.muyu.product.domain.CategoryAttributeGroup" id="CategoryAttributeGroupResult">
<result property="id" column="id" />
<result property="attributeGroupId" column="attribute_group_id" />
<result property="categoryId" column="category_id" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectCategoryAttributeGroupVo">
select id, attribute_group_id, category_id, remark, create_by, create_time, update_by, update_time from category_attribute_group
</sql>
<select id="selectCategoryAttributeGroupList" parameterType="com.muyu.product.domain.CategoryAttributeGroup" resultMap="CategoryAttributeGroupResult">
<include refid="selectCategoryAttributeGroupVo"/>
<where>
<if test="attributeGroupId != null "> and attribute_group_id = #{attributeGroupId}</if>
<if test="categoryId != null "> and category_id = #{categoryId}</if>
</where>
</select>
<select id="selectCategoryAttributeGroupById" parameterType="Long" resultMap="CategoryAttributeGroupResult">
<include refid="selectCategoryAttributeGroupVo"/>
where id = #{id}
</select>
<insert id="insertCategoryAttributeGroup" parameterType="com.muyu.product.domain.CategoryAttributeGroup" useGeneratedKeys="true" keyProperty="id">
insert into category_attribute_group
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="attributeGroupId != null">attribute_group_id,</if>
<if test="categoryId != null">category_id,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="attributeGroupId != null">#{attributeGroupId},</if>
<if test="categoryId != null">#{categoryId},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateCategoryAttributeGroup" parameterType="com.muyu.product.domain.CategoryAttributeGroup">
update category_attribute_group
<trim prefix="SET" suffixOverrides=",">
<if test="attributeGroupId != null">attribute_group_id = #{attributeGroupId},</if>
<if test="categoryId != null">category_id = #{categoryId},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCategoryAttributeGroupById" parameterType="Long">
delete from category_attribute_group where id = #{id}
</delete>
<delete id="deleteCategoryAttributeGroupByIds" parameterType="String">
delete from category_attribute_group where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.CategoryAttributeMapper">
<resultMap type="com.muyu.product.domain.CategoryAttribute" id="CategoryAttributeResult">
<result property="id" column="id" />
<result property="attributeId" column="attribute_id" />
<result property="categoryId" column="category_id" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectCategoryAttributeVo">
select id, attribute_id, category_id, remark, create_by, create_time, update_by, update_time from category_attribute
</sql>
<select id="selectCategoryAttributeList" parameterType="com.muyu.product.domain.CategoryAttribute" resultMap="CategoryAttributeResult">
<include refid="selectCategoryAttributeVo"/>
<where>
<if test="attributeId != null "> and attribute_id = #{attributeId}</if>
<if test="categoryId != null "> and category_id = #{categoryId}</if>
</where>
</select>
<select id="selectCategoryAttributeById" parameterType="Long" resultMap="CategoryAttributeResult">
<include refid="selectCategoryAttributeVo"/>
where id = #{id}
</select>
<insert id="insertCategoryAttribute" parameterType="com.muyu.product.domain.CategoryAttribute" useGeneratedKeys="true" keyProperty="id">
insert into category_attribute
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="attributeId != null">attribute_id,</if>
<if test="categoryId != null">category_id,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="attributeId != null">#{attributeId},</if>
<if test="categoryId != null">#{categoryId},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateCategoryAttribute" parameterType="com.muyu.product.domain.CategoryAttribute">
update category_attribute
<trim prefix="SET" suffixOverrides=",">
<if test="attributeId != null">attribute_id = #{attributeId},</if>
<if test="categoryId != null">category_id = #{categoryId},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCategoryAttributeById" parameterType="Long">
delete from category_attribute where id = #{id}
</delete>
<delete id="deleteCategoryAttributeByIds" parameterType="String">
delete from category_attribute where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.CategoryInfoMapper">
<resultMap type="com.muyu.product.domain.CategoryInfo" id="CategoryInfoResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="image" column="image" />
<result property="parentId" column="parent_id" />
<result property="status" column="status" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectCategoryInfoVo">
select id, name, image, parent_id, status, remark, create_by, create_time, update_by, update_time from category_info
</sql>
<select id="selectCategoryInfoList" parameterType="com.muyu.product.domain.CategoryInfo" resultMap="CategoryInfoResult">
<include refid="selectCategoryInfoVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="image != null and image != ''"> and image = #{image}</if>
<if test="parentId != null "> and parent_id = #{parentId}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
<select id="selectCategoryInfoById" parameterType="Long" resultMap="CategoryInfoResult">
<include refid="selectCategoryInfoVo"/>
where id = #{id}
</select>
<insert id="insertCategoryInfo" parameterType="com.muyu.product.domain.CategoryInfo" useGeneratedKeys="true" keyProperty="id">
insert into category_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
<if test="image != null">image,</if>
<if test="parentId != null">parent_id,</if>
<if test="status != null and status != ''">status,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="image != null">#{image},</if>
<if test="parentId != null">#{parentId},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateCategoryInfo" parameterType="com.muyu.product.domain.CategoryInfo">
update category_info
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="image != null">image = #{image},</if>
<if test="parentId != null">parent_id = #{parentId},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteCategoryInfoById" parameterType="Long">
delete from category_info where id = #{id}
</delete>
<delete id="deleteCategoryInfoByIds" parameterType="String">
delete from category_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.ProductCategoryMapper">
<resultMap type="com.muyu.product.domain.ProductCategory" id="ProductCategoryResult">
<result property="id" column="id" />
<result property="categoryId" column="category_id" />
<result property="productId" column="product_id" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectProductCategoryVo">
select id, category_id, product_id, remark, create_by, create_time, update_by, update_time from product_category
</sql>
<select id="selectProductCategoryList" parameterType="com.muyu.product.domain.ProductCategory" resultMap="ProductCategoryResult">
<include refid="selectProductCategoryVo"/>
<where>
<if test="categoryId != null "> and category_id = #{categoryId}</if>
<if test="productId != null "> and product_id = #{productId}</if>
</where>
</select>
<select id="selectProductCategoryById" parameterType="Long" resultMap="ProductCategoryResult">
<include refid="selectProductCategoryVo"/>
where id = #{id}
</select>
<insert id="insertProductCategory" parameterType="com.muyu.product.domain.ProductCategory" useGeneratedKeys="true" keyProperty="id">
insert into product_category
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="categoryId != null">category_id,</if>
<if test="productId != null">product_id,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="categoryId != null">#{categoryId},</if>
<if test="productId != null">#{productId},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateProductCategory" parameterType="com.muyu.product.domain.ProductCategory">
update product_category
<trim prefix="SET" suffixOverrides=",">
<if test="categoryId != null">category_id = #{categoryId},</if>
<if test="productId != null">product_id = #{productId},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteProductCategoryById" parameterType="Long">
delete from product_category where id = #{id}
</delete>
<delete id="deleteProductCategoryByIds" parameterType="String">
delete from product_category where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.ProductInfoMapper">
<resultMap type="com.muyu.product.domain.ProductInfo" id="ProductInfoResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="introduction" column="introduction" />
<result property="brandId" column="brand_id" />
<result property="images" column="images" />
<result property="addressSend" column="address_send" />
<result property="status" column="status" />
<result property="remark" column="remark" />
<result property="createdBy" column="created_by" />
<result property="createdTime" column="created_time" />
<result property="updatedBy" column="updated_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectProductInfoVo">
select id, name, introduction, brand_id, images, address_send, status, remark, created_by, created_time, updated_by, update_time from product_info
</sql>
<select id="selectProductInfoList" parameterType="com.muyu.product.domain.ProductInfo" resultMap="ProductInfoResult">
<include refid="selectProductInfoVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
<if test="introduction != null and introduction != ''"> and introduction = #{introduction}</if>
<if test="brandId != null "> and brand_id = #{brandId}</if>
<if test="images != null and images != ''"> and images = #{images}</if>
<if test="addressSend != null and addressSend != ''"> and address_send = #{addressSend}</if>
<if test="status != null and status != ''"> and status = #{status}</if>
</where>
</select>
<select id="selectProductInfoById" parameterType="Long" resultMap="ProductInfoResult">
<include refid="selectProductInfoVo"/>
where id = #{id}
</select>
<insert id="insertProductInfo" parameterType="com.muyu.product.domain.ProductInfo" useGeneratedKeys="true" keyProperty="id">
insert into product_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
<if test="introduction != null and introduction != ''">introduction,</if>
<if test="brandId != null">brand_id,</if>
<if test="images != null">images,</if>
<if test="addressSend != null">address_send,</if>
<if test="status != null and status != ''">status,</if>
<if test="remark != null">remark,</if>
<if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="introduction != null and introduction != ''">#{introduction},</if>
<if test="brandId != null">#{brandId},</if>
<if test="images != null">#{images},</if>
<if test="addressSend != null">#{addressSend},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="remark != null">#{remark},</if>
<if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateProductInfo" parameterType="com.muyu.product.domain.ProductInfo">
update product_info
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="introduction != null and introduction != ''">introduction = #{introduction},</if>
<if test="brandId != null">brand_id = #{brandId},</if>
<if test="images != null">images = #{images},</if>
<if test="addressSend != null">address_send = #{addressSend},</if>
<if test="status != null and status != ''">status = #{status},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteProductInfoById" parameterType="Long">
delete from product_info where id = #{id}
</delete>
<delete id="deleteProductInfoByIds" parameterType="String">
delete from product_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.RuleMapper">
<resultMap type="com.muyu.product.domain.Rule" id="RuleResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectRuleVo">
select id, name, remark, create_by, create_time, update_by, update_time from rule
</sql>
<select id="selectRuleList" parameterType="com.muyu.product.domain.Rule" resultMap="RuleResult">
<include refid="selectRuleVo"/>
<where>
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
</where>
</select>
<select id="selectRuleById" parameterType="Long" resultMap="RuleResult">
<include refid="selectRuleVo"/>
where id = #{id}
</select>
<insert id="insertRule" parameterType="com.muyu.product.domain.Rule" useGeneratedKeys="true" keyProperty="id">
insert into rule
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">name,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null and name != ''">#{name},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateRule" parameterType="com.muyu.product.domain.Rule">
update rule
<trim prefix="SET" suffixOverrides=",">
<if test="name != null and name != ''">name = #{name},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteRuleById" parameterType="Long">
delete from rule where id = #{id}
</delete>
<delete id="deleteRuleByIds" parameterType="String">
delete from rule where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.RuleProductMapper">
<resultMap type="com.muyu.product.domain.RuleProduct" id="RuleProductResult">
<result property="id" column="id" />
<result property="productId" column="product_id" />
<result property="ruleId" column="rule_id" />
<result property="ruleValue" column="rule_value" />
<result property="remark" column="remark" />
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
</resultMap>
<sql id="selectRuleProductVo">
select id, product_id, rule_id, rule_value, remark, create_by, create_time, update_by, update_time from rule_product
</sql>
<select id="selectRuleProductList" parameterType="com.muyu.product.domain.RuleProduct" resultMap="RuleProductResult">
<include refid="selectRuleProductVo"/>
<where>
<if test="productId != null "> and product_id = #{productId}</if>
<if test="ruleId != null "> and rule_id = #{ruleId}</if>
<if test="ruleValue != null and ruleValue != ''"> and rule_value = #{ruleValue}</if>
</where>
</select>
<select id="selectRuleProductById" parameterType="Long" resultMap="RuleProductResult">
<include refid="selectRuleProductVo"/>
where id = #{id}
</select>
<insert id="insertRuleProduct" parameterType="com.muyu.product.domain.RuleProduct" useGeneratedKeys="true" keyProperty="id">
insert into rule_product
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="productId != null">product_id,</if>
<if test="ruleId != null">rule_id,</if>
<if test="ruleValue != null and ruleValue != ''">rule_value,</if>
<if test="remark != null">remark,</if>
<if test="createBy != null">create_by,</if>
<if test="createTime != null">create_time,</if>
<if test="updateBy != null">update_by,</if>
<if test="updateTime != null">update_time,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="productId != null">#{productId},</if>
<if test="ruleId != null">#{ruleId},</if>
<if test="ruleValue != null and ruleValue != ''">#{ruleValue},</if>
<if test="remark != null">#{remark},</if>
<if test="createBy != null">#{createBy},</if>
<if test="createTime != null">#{createTime},</if>
<if test="updateBy != null">#{updateBy},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateRuleProduct" parameterType="com.muyu.product.domain.RuleProduct">
update rule_product
<trim prefix="SET" suffixOverrides=",">
<if test="productId != null">product_id = #{productId},</if>
<if test="ruleId != null">rule_id = #{ruleId},</if>
<if test="ruleValue != null and ruleValue != ''">rule_value = #{ruleValue},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="createBy != null">create_by = #{createBy},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="updateBy != null">update_by = #{updateBy},</if>
<if test="updateTime != null">update_time = #{updateTime},</if>
</trim>
where id = #{id}
</update>
<delete id="deleteRuleProductById" parameterType="Long">
delete from rule_product where id = #{id}
</delete>
<delete id="deleteRuleProductByIds" parameterType="String">
delete from rule_product where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</delete>
</mapper>