跟项目,生成器文件带入服务
parent
bf7239464e
commit
fd28a8fbc8
|
@ -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}
|
||||
|
|
|
@ -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});
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,7 +0,0 @@
|
|||
package com.muyu;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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();
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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));
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
|
@ -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>
|
Loading…
Reference in New Issue