Default Changelist
parent
db11f3d381
commit
7c0c4e8348
|
@ -0,0 +1,70 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品属性对象 attribute
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class Attribute extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 属性名 */
|
||||
@Excel(name = "属性名")
|
||||
private String name;
|
||||
|
||||
/** 分组 */
|
||||
@Excel(name = "分组")
|
||||
private Long gruopId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setGruopId(Long gruopId)
|
||||
{
|
||||
this.gruopId = gruopId;
|
||||
}
|
||||
|
||||
public Long getGruopId()
|
||||
{
|
||||
return gruopId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("gruopId", getGruopId())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 属性组对象 attribute_group
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class AttributeGroup extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 组名称 */
|
||||
@Excel(name = "组名称")
|
||||
private String name;
|
||||
|
||||
/** 转态 */
|
||||
@Excel(name = "转态")
|
||||
private String status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品品牌对象 brand_info
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class BrandInfo extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 品牌名称 */
|
||||
@Excel(name = "品牌名称")
|
||||
private String name;
|
||||
|
||||
/** logo */
|
||||
@Excel(name = "logo")
|
||||
private String logo;
|
||||
|
||||
/** 介绍 */
|
||||
@Excel(name = "介绍")
|
||||
private String introduction;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setLogo(String logo)
|
||||
{
|
||||
this.logo = logo;
|
||||
}
|
||||
|
||||
public String getLogo()
|
||||
{
|
||||
return logo;
|
||||
}
|
||||
public void setIntroduction(String introduction)
|
||||
{
|
||||
this.introduction = introduction;
|
||||
}
|
||||
|
||||
public String getIntroduction()
|
||||
{
|
||||
return introduction;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("logo", getLogo())
|
||||
.append("introduction", getIntroduction())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 品牌商品中间对象 brand_product
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class BrandProduct extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 品牌id */
|
||||
@Excel(name = "品牌id")
|
||||
private Long brandId;
|
||||
|
||||
/** 商品id */
|
||||
@Excel(name = "商品id")
|
||||
private Long productId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setBrandId(Long brandId)
|
||||
{
|
||||
this.brandId = brandId;
|
||||
}
|
||||
|
||||
public Long getBrandId()
|
||||
{
|
||||
return brandId;
|
||||
}
|
||||
public void setProductId(Long productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Long getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("brandId", getBrandId())
|
||||
.append("productId", getProductId())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 品类对象 category_attribute
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class CategoryAttribute extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 品类 */
|
||||
@Excel(name = "品类")
|
||||
private Long categoryId;
|
||||
|
||||
/** 属性id */
|
||||
@Excel(name = "属性id")
|
||||
private Long attributeId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setAttributeId(Long attributeId)
|
||||
{
|
||||
this.attributeId = attributeId;
|
||||
}
|
||||
|
||||
public Long getAttributeId()
|
||||
{
|
||||
return attributeId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("attributeId", getAttributeId())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 品类对象 category_attribute_group
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class CategoryAttributeGroup extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 品类 */
|
||||
@Excel(name = "品类")
|
||||
private Long categoryId;
|
||||
|
||||
/** 属性组 */
|
||||
@Excel(name = "属性组")
|
||||
private Long attributeGroupId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setAttributeGroupId(Long attributeGroupId)
|
||||
{
|
||||
this.attributeGroupId = attributeGroupId;
|
||||
}
|
||||
|
||||
public Long getAttributeGroupId()
|
||||
{
|
||||
return attributeGroupId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("attributeGroupId", getAttributeGroupId())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 品类对象 category_brand
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class CategoryBrand extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 品类 */
|
||||
@Excel(name = "品类")
|
||||
private Long categoryId;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private Long brandId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCategoryId(Long categoryId)
|
||||
{
|
||||
this.categoryId = categoryId;
|
||||
}
|
||||
|
||||
public Long getCategoryId()
|
||||
{
|
||||
return categoryId;
|
||||
}
|
||||
public void setBrandId(Long brandId)
|
||||
{
|
||||
this.brandId = brandId;
|
||||
}
|
||||
|
||||
public Long getBrandId()
|
||||
{
|
||||
return brandId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("categoryId", getCategoryId())
|
||||
.append("brandId", getBrandId())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,99 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.TreeEntity;
|
||||
|
||||
/**
|
||||
* 品类信息对象 category_info
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class CategoryInfo extends TreeEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 品类信息 */
|
||||
@Excel(name = "品类信息")
|
||||
private String name;
|
||||
|
||||
/** 图片 */
|
||||
@Excel(name = "图片")
|
||||
private String image;
|
||||
|
||||
/** 是否启用 */
|
||||
@Excel(name = "是否启用")
|
||||
private String status;
|
||||
|
||||
/** 介绍 */
|
||||
@Excel(name = "介绍")
|
||||
private String introduction;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setImage(String image)
|
||||
{
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getImage()
|
||||
{
|
||||
return image;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setIntroduction(String introduction)
|
||||
{
|
||||
this.introduction = introduction;
|
||||
}
|
||||
|
||||
public String getIntroduction()
|
||||
{
|
||||
return introduction;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("image", getImage())
|
||||
.append("parentId", getParentId())
|
||||
.append("status", getStatus())
|
||||
.append("introduction", getIntroduction())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 评论点赞对象 comment_like
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class CommentLike extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 评论id */
|
||||
@Excel(name = "评论id")
|
||||
private Long commentId;
|
||||
|
||||
/** 点赞人id */
|
||||
@Excel(name = "点赞人id")
|
||||
private Long userId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setCommentId(Long commentId)
|
||||
{
|
||||
this.commentId = commentId;
|
||||
}
|
||||
|
||||
public Long getCommentId()
|
||||
{
|
||||
return commentId;
|
||||
}
|
||||
public void setUserId(Long userId)
|
||||
{
|
||||
this.userId = userId;
|
||||
}
|
||||
|
||||
public Long getUserId()
|
||||
{
|
||||
return userId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("commentId", getCommentId())
|
||||
.append("userId", getUserId())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,154 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品信息对象 product
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class Product extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 商品名称 */
|
||||
@Excel(name = "商品名称")
|
||||
private String name;
|
||||
|
||||
/** 描述 */
|
||||
@Excel(name = "描述")
|
||||
private String describe;
|
||||
|
||||
/** 类型 */
|
||||
@Excel(name = "类型")
|
||||
private String type;
|
||||
|
||||
/** 图片 */
|
||||
@Excel(name = "图片")
|
||||
private String image;
|
||||
|
||||
/** 轮播图片 */
|
||||
@Excel(name = "轮播图片")
|
||||
private String carouselImages;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/** 规格 */
|
||||
@Excel(name = "规格")
|
||||
private Long ruleId;
|
||||
|
||||
/** 品牌 */
|
||||
@Excel(name = "品牌")
|
||||
private Long brandId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setDescribe(String describe)
|
||||
{
|
||||
this.describe = describe;
|
||||
}
|
||||
|
||||
public String getDescribe()
|
||||
{
|
||||
return describe;
|
||||
}
|
||||
public void setType(String type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setImage(String image)
|
||||
{
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getImage()
|
||||
{
|
||||
return image;
|
||||
}
|
||||
public void setCarouselImages(String carouselImages)
|
||||
{
|
||||
this.carouselImages = carouselImages;
|
||||
}
|
||||
|
||||
public String getCarouselImages()
|
||||
{
|
||||
return carouselImages;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setRuleId(Long ruleId)
|
||||
{
|
||||
this.ruleId = ruleId;
|
||||
}
|
||||
|
||||
public Long getRuleId()
|
||||
{
|
||||
return ruleId;
|
||||
}
|
||||
public void setBrandId(Long brandId)
|
||||
{
|
||||
this.brandId = brandId;
|
||||
}
|
||||
|
||||
public Long getBrandId()
|
||||
{
|
||||
return brandId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("describe", getDescribe())
|
||||
.append("type", getType())
|
||||
.append("image", getImage())
|
||||
.append("carouselImages", getCarouselImages())
|
||||
.append("status", getStatus())
|
||||
.append("ruleId", getRuleId())
|
||||
.append("brandId", getBrandId())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品属性对象 product_attribute
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class ProductAttribute extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 商品 */
|
||||
@Excel(name = "商品")
|
||||
private Long productId;
|
||||
|
||||
/** 属性 */
|
||||
@Excel(name = "属性")
|
||||
private String attributeId;
|
||||
|
||||
/** 属性值 */
|
||||
@Excel(name = "属性值")
|
||||
private String value;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setProductId(Long productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Long getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
public void setAttributeId(String attributeId)
|
||||
{
|
||||
this.attributeId = attributeId;
|
||||
}
|
||||
|
||||
public String getAttributeId()
|
||||
{
|
||||
return attributeId;
|
||||
}
|
||||
public void setValue(String value)
|
||||
{
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue()
|
||||
{
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("productId", getProductId())
|
||||
.append("attributeId", getAttributeId())
|
||||
.append("value", getValue())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品评论对象 product_comment
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class ProductComment extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 商品id */
|
||||
@Excel(name = "商品id")
|
||||
private Long productId;
|
||||
|
||||
/** 评论 */
|
||||
@Excel(name = "评论")
|
||||
private String comment;
|
||||
|
||||
/** 图片 */
|
||||
@Excel(name = "图片")
|
||||
private String images;
|
||||
|
||||
/** 父级id */
|
||||
@Excel(name = "父级id")
|
||||
private String parentId;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setProductId(Long productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Long getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
public void setComment(String comment)
|
||||
{
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getComment()
|
||||
{
|
||||
return comment;
|
||||
}
|
||||
public void setImages(String images)
|
||||
{
|
||||
this.images = images;
|
||||
}
|
||||
|
||||
public String getImages()
|
||||
{
|
||||
return images;
|
||||
}
|
||||
public void setParentId(String parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public String getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("productId", getProductId())
|
||||
.append("comment", getComment())
|
||||
.append("images", getImages())
|
||||
.append("parentId", getParentId())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,113 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品sku对象 product_sku
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class ProductSku extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 商品id */
|
||||
@Excel(name = "商品id")
|
||||
private Long productId;
|
||||
|
||||
/** sku */
|
||||
@Excel(name = "sku")
|
||||
private String sku;
|
||||
|
||||
/** 库存 */
|
||||
@Excel(name = "库存")
|
||||
private Long stock;
|
||||
|
||||
/** 价格 */
|
||||
@Excel(name = "价格")
|
||||
private BigDecimal price;
|
||||
|
||||
/** 图片 */
|
||||
@Excel(name = "图片")
|
||||
private String image;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setProductId(Long productId)
|
||||
{
|
||||
this.productId = productId;
|
||||
}
|
||||
|
||||
public Long getProductId()
|
||||
{
|
||||
return productId;
|
||||
}
|
||||
public void setSku(String sku)
|
||||
{
|
||||
this.sku = sku;
|
||||
}
|
||||
|
||||
public String getSku()
|
||||
{
|
||||
return sku;
|
||||
}
|
||||
public void setStock(Long stock)
|
||||
{
|
||||
this.stock = stock;
|
||||
}
|
||||
|
||||
public Long getStock()
|
||||
{
|
||||
return stock;
|
||||
}
|
||||
public void setPrice(BigDecimal price)
|
||||
{
|
||||
this.price = price;
|
||||
}
|
||||
|
||||
public BigDecimal getPrice()
|
||||
{
|
||||
return price;
|
||||
}
|
||||
public void setImage(String image)
|
||||
{
|
||||
this.image = image;
|
||||
}
|
||||
|
||||
public String getImage()
|
||||
{
|
||||
return image;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("productId", getProductId())
|
||||
.append("sku", getSku())
|
||||
.append("stock", getStock())
|
||||
.append("price", getPrice())
|
||||
.append("image", getImage())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,70 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 商品规格对象 rule
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class Rule extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 规格名称 */
|
||||
@Excel(name = "规格名称")
|
||||
private String name;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setStatus(String status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("status", getStatus())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.muyu.common.core.annotation.Excel;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
|
||||
/**
|
||||
* 规格详情对象 rule_attr
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public class RuleAttr extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 规格id */
|
||||
@Excel(name = "规格id")
|
||||
private Long ruleId;
|
||||
|
||||
/** 类目名称 */
|
||||
@Excel(name = "类目名称")
|
||||
private String name;
|
||||
|
||||
/** 规格值 */
|
||||
@Excel(name = "规格值")
|
||||
private String attrValue;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setRuleId(Long ruleId)
|
||||
{
|
||||
this.ruleId = ruleId;
|
||||
}
|
||||
|
||||
public Long getRuleId()
|
||||
{
|
||||
return ruleId;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setAttrValue(String attrValue)
|
||||
{
|
||||
this.attrValue = attrValue;
|
||||
}
|
||||
|
||||
public String getAttrValue()
|
||||
{
|
||||
return attrValue;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("ruleId", getRuleId())
|
||||
.append("name", getName())
|
||||
.append("attrValue", getAttrValue())
|
||||
.append("remark", getRemark())
|
||||
.append("createBy", getCreateBy())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.Attribute;
|
||||
import com.muyu.product.service.IAttributeService;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品属性Controller
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/attribute")
|
||||
public class AttributeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAttributeService attributeService;
|
||||
|
||||
/**
|
||||
* 查询商品属性列表
|
||||
*/
|
||||
@RequiresPermissions("product:attribute:list")
|
||||
@GetMapping("/list")
|
||||
public Result<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 yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/attributeGroup")
|
||||
public class AttributeGroupController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IAttributeGroupService attributeGroupService;
|
||||
|
||||
/**
|
||||
* 查询属性组列表
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<AttributeGroup>> list(AttributeGroup attributeGroup)
|
||||
{
|
||||
startPage();
|
||||
List<AttributeGroup> list = attributeGroupService.selectAttributeGroupList(attributeGroup);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出属性组列表
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:export")
|
||||
@Log(title = "属性组", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, AttributeGroup attributeGroup)
|
||||
{
|
||||
List<AttributeGroup> list = attributeGroupService.selectAttributeGroupList(attributeGroup);
|
||||
ExcelUtil<AttributeGroup> util = new ExcelUtil<AttributeGroup>(AttributeGroup.class);
|
||||
util.exportExcel(response, list, "属性组数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取属性组详细信息
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(attributeGroupService.selectAttributeGroupById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增属性组
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:add")
|
||||
@Log(title = "属性组", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody AttributeGroup attributeGroup)
|
||||
{
|
||||
return toAjax(attributeGroupService.insertAttributeGroup(attributeGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改属性组
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:edit")
|
||||
@Log(title = "属性组", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody AttributeGroup attributeGroup)
|
||||
{
|
||||
return toAjax(attributeGroupService.updateAttributeGroup(attributeGroup));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除属性组
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:remove")
|
||||
@Log(title = "属性组", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(attributeGroupService.deleteAttributeGroupByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.BrandInfo;
|
||||
import com.muyu.product.service.IBrandInfoService;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品品牌Controller
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/brand")
|
||||
public class BrandInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBrandInfoService brandInfoService;
|
||||
|
||||
/**
|
||||
* 查询商品品牌列表
|
||||
*/
|
||||
@RequiresPermissions("product:brand:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<BrandInfo>> list(BrandInfo brandInfo)
|
||||
{
|
||||
startPage();
|
||||
List<BrandInfo> list = brandInfoService.selectBrandInfoList(brandInfo);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品品牌列表
|
||||
*/
|
||||
@RequiresPermissions("product:brand:export")
|
||||
@Log(title = "商品品牌", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, BrandInfo brandInfo)
|
||||
{
|
||||
List<BrandInfo> list = brandInfoService.selectBrandInfoList(brandInfo);
|
||||
ExcelUtil<BrandInfo> util = new ExcelUtil<BrandInfo>(BrandInfo.class);
|
||||
util.exportExcel(response, list, "商品品牌数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品品牌详细信息
|
||||
*/
|
||||
@RequiresPermissions("product:brand:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(brandInfoService.selectBrandInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品品牌
|
||||
*/
|
||||
@RequiresPermissions("product:brand:add")
|
||||
@Log(title = "商品品牌", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody BrandInfo brandInfo)
|
||||
{
|
||||
return toAjax(brandInfoService.insertBrandInfo(brandInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品品牌
|
||||
*/
|
||||
@RequiresPermissions("product:brand:edit")
|
||||
@Log(title = "商品品牌", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody BrandInfo brandInfo)
|
||||
{
|
||||
return toAjax(brandInfoService.updateBrandInfo(brandInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品品牌
|
||||
*/
|
||||
@RequiresPermissions("product:brand:remove")
|
||||
@Log(title = "商品品牌", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(brandInfoService.deleteBrandInfoByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.CategoryInfo;
|
||||
import com.muyu.product.service.ICategoryInfoService;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
|
||||
/**
|
||||
* 品类信息Controller
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/category")
|
||||
public class CategoryInfoController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICategoryInfoService categoryInfoService;
|
||||
|
||||
/**
|
||||
* 查询品类信息列表
|
||||
*/
|
||||
@RequiresPermissions("product:category:list")
|
||||
@GetMapping("/list")
|
||||
public Result list(CategoryInfo categoryInfo)
|
||||
{
|
||||
List<CategoryInfo> list = categoryInfoService.selectCategoryInfoList(categoryInfo);
|
||||
return success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出品类信息列表
|
||||
*/
|
||||
@RequiresPermissions("product:category:export")
|
||||
@Log(title = "品类信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CategoryInfo categoryInfo)
|
||||
{
|
||||
List<CategoryInfo> list = categoryInfoService.selectCategoryInfoList(categoryInfo);
|
||||
ExcelUtil<CategoryInfo> util = new ExcelUtil<CategoryInfo>(CategoryInfo.class);
|
||||
util.exportExcel(response, list, "品类信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取品类信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("product:category:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(categoryInfoService.selectCategoryInfoById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增品类信息
|
||||
*/
|
||||
@RequiresPermissions("product:category:add")
|
||||
@Log(title = "品类信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody CategoryInfo categoryInfo)
|
||||
{
|
||||
return toAjax(categoryInfoService.insertCategoryInfo(categoryInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改品类信息
|
||||
*/
|
||||
@RequiresPermissions("product:category:edit")
|
||||
@Log(title = "品类信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody CategoryInfo categoryInfo)
|
||||
{
|
||||
return toAjax(categoryInfoService.updateCategoryInfo(categoryInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除品类信息
|
||||
*/
|
||||
@RequiresPermissions("product:category:remove")
|
||||
@Log(title = "品类信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(categoryInfoService.deleteCategoryInfoByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.CommentLike;
|
||||
import com.muyu.product.service.ICommentLikeService;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 评论点赞Controller
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/commentLike")
|
||||
public class CommentLikeController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private ICommentLikeService commentLikeService;
|
||||
|
||||
/**
|
||||
* 查询评论点赞列表
|
||||
*/
|
||||
@RequiresPermissions("product:commentLike:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<CommentLike>> list(CommentLike commentLike)
|
||||
{
|
||||
startPage();
|
||||
List<CommentLike> list = commentLikeService.selectCommentLikeList(commentLike);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出评论点赞列表
|
||||
*/
|
||||
@RequiresPermissions("product:commentLike:export")
|
||||
@Log(title = "评论点赞", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, CommentLike commentLike)
|
||||
{
|
||||
List<CommentLike> list = commentLikeService.selectCommentLikeList(commentLike);
|
||||
ExcelUtil<CommentLike> util = new ExcelUtil<CommentLike>(CommentLike.class);
|
||||
util.exportExcel(response, list, "评论点赞数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取评论点赞详细信息
|
||||
*/
|
||||
@RequiresPermissions("product:commentLike:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(commentLikeService.selectCommentLikeById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增评论点赞
|
||||
*/
|
||||
@RequiresPermissions("product:commentLike:add")
|
||||
@Log(title = "评论点赞", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody CommentLike commentLike)
|
||||
{
|
||||
return toAjax(commentLikeService.insertCommentLike(commentLike));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改评论点赞
|
||||
*/
|
||||
@RequiresPermissions("product:commentLike:edit")
|
||||
@Log(title = "评论点赞", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody CommentLike commentLike)
|
||||
{
|
||||
return toAjax(commentLikeService.updateCommentLike(commentLike));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除评论点赞
|
||||
*/
|
||||
@RequiresPermissions("product:commentLike:remove")
|
||||
@Log(title = "评论点赞", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(commentLikeService.deleteCommentLikeByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.ProductComment;
|
||||
import com.muyu.product.service.IProductCommentService;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品评论Controller
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/productComment")
|
||||
public class ProductCommentController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IProductCommentService productCommentService;
|
||||
|
||||
/**
|
||||
* 查询商品评论列表
|
||||
*/
|
||||
@RequiresPermissions("product:productComment:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<ProductComment>> list(ProductComment productComment)
|
||||
{
|
||||
startPage();
|
||||
List<ProductComment> list = productCommentService.selectProductCommentList(productComment);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品评论列表
|
||||
*/
|
||||
@RequiresPermissions("product:productComment:export")
|
||||
@Log(title = "商品评论", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ProductComment productComment)
|
||||
{
|
||||
List<ProductComment> list = productCommentService.selectProductCommentList(productComment);
|
||||
ExcelUtil<ProductComment> util = new ExcelUtil<ProductComment>(ProductComment.class);
|
||||
util.exportExcel(response, list, "商品评论数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品评论详细信息
|
||||
*/
|
||||
@RequiresPermissions("product:productComment:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(productCommentService.selectProductCommentById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品评论
|
||||
*/
|
||||
@RequiresPermissions("product:productComment:add")
|
||||
@Log(title = "商品评论", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody ProductComment productComment)
|
||||
{
|
||||
return toAjax(productCommentService.insertProductComment(productComment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品评论
|
||||
*/
|
||||
@RequiresPermissions("product:productComment:edit")
|
||||
@Log(title = "商品评论", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody ProductComment productComment)
|
||||
{
|
||||
return toAjax(productCommentService.updateProductComment(productComment));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品评论
|
||||
*/
|
||||
@RequiresPermissions("product:productComment:remove")
|
||||
@Log(title = "商品评论", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(productCommentService.deleteProductCommentByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.Product;
|
||||
import com.muyu.product.service.IProductService;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品信息Controller
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/product")
|
||||
public class ProductController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IProductService productService;
|
||||
|
||||
/**
|
||||
* 查询商品信息列表
|
||||
*/
|
||||
@RequiresPermissions("product:product:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<Product>> list(Product product)
|
||||
{
|
||||
startPage();
|
||||
List<Product> list = productService.selectProductList(product);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品信息列表
|
||||
*/
|
||||
@RequiresPermissions("product:product:export")
|
||||
@Log(title = "商品信息", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, Product product)
|
||||
{
|
||||
List<Product> list = productService.selectProductList(product);
|
||||
ExcelUtil<Product> util = new ExcelUtil<Product>(Product.class);
|
||||
util.exportExcel(response, list, "商品信息数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品信息详细信息
|
||||
*/
|
||||
@RequiresPermissions("product:product:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(productService.selectProductById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品信息
|
||||
*/
|
||||
@RequiresPermissions("product:product:add")
|
||||
@Log(title = "商品信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody Product product)
|
||||
{
|
||||
return toAjax(productService.insertProduct(product));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品信息
|
||||
*/
|
||||
@RequiresPermissions("product:product:edit")
|
||||
@Log(title = "商品信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody Product product)
|
||||
{
|
||||
return toAjax(productService.updateProduct(product));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品信息
|
||||
*/
|
||||
@RequiresPermissions("product:product:remove")
|
||||
@Log(title = "商品信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(productService.deleteProductByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.ProductSku;
|
||||
import com.muyu.product.service.IProductSkuService;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品skuController
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/SKU")
|
||||
public class ProductSkuController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IProductSkuService productSkuService;
|
||||
|
||||
/**
|
||||
* 查询商品sku列表
|
||||
*/
|
||||
@RequiresPermissions("product:SKU:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<ProductSku>> list(ProductSku productSku)
|
||||
{
|
||||
startPage();
|
||||
List<ProductSku> list = productSkuService.selectProductSkuList(productSku);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出商品sku列表
|
||||
*/
|
||||
@RequiresPermissions("product:SKU:export")
|
||||
@Log(title = "商品sku", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ProductSku productSku)
|
||||
{
|
||||
List<ProductSku> list = productSkuService.selectProductSkuList(productSku);
|
||||
ExcelUtil<ProductSku> util = new ExcelUtil<ProductSku>(ProductSku.class);
|
||||
util.exportExcel(response, list, "商品sku数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取商品sku详细信息
|
||||
*/
|
||||
@RequiresPermissions("product:SKU:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(productSkuService.selectProductSkuById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品sku
|
||||
*/
|
||||
@RequiresPermissions("product:SKU:add")
|
||||
@Log(title = "商品sku", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody ProductSku productSku)
|
||||
{
|
||||
return toAjax(productSkuService.insertProductSku(productSku));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品sku
|
||||
*/
|
||||
@RequiresPermissions("product:SKU:edit")
|
||||
@Log(title = "商品sku", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody ProductSku productSku)
|
||||
{
|
||||
return toAjax(productSkuService.updateProductSku(productSku));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品sku
|
||||
*/
|
||||
@RequiresPermissions("product:SKU:remove")
|
||||
@Log(title = "商品sku", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(productSkuService.deleteProductSkuByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.RuleAttr;
|
||||
import com.muyu.product.service.IRuleAttrService;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 规格详情Controller
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/ruleAttr")
|
||||
public class RuleAttrController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRuleAttrService ruleAttrService;
|
||||
|
||||
/**
|
||||
* 查询规格详情列表
|
||||
*/
|
||||
@RequiresPermissions("product:ruleAttr:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<RuleAttr>> list(RuleAttr ruleAttr)
|
||||
{
|
||||
startPage();
|
||||
List<RuleAttr> list = ruleAttrService.selectRuleAttrList(ruleAttr);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出规格详情列表
|
||||
*/
|
||||
@RequiresPermissions("product:ruleAttr:export")
|
||||
@Log(title = "规格详情", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RuleAttr ruleAttr)
|
||||
{
|
||||
List<RuleAttr> list = ruleAttrService.selectRuleAttrList(ruleAttr);
|
||||
ExcelUtil<RuleAttr> util = new ExcelUtil<RuleAttr>(RuleAttr.class);
|
||||
util.exportExcel(response, list, "规格详情数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取规格详情详细信息
|
||||
*/
|
||||
@RequiresPermissions("product:ruleAttr:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
public Result getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return success(ruleAttrService.selectRuleAttrById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增规格详情
|
||||
*/
|
||||
@RequiresPermissions("product:ruleAttr:add")
|
||||
@Log(title = "规格详情", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public Result add(@RequestBody RuleAttr ruleAttr)
|
||||
{
|
||||
return toAjax(ruleAttrService.insertRuleAttr(ruleAttr));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改规格详情
|
||||
*/
|
||||
@RequiresPermissions("product:ruleAttr:edit")
|
||||
@Log(title = "规格详情", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public Result edit(@RequestBody RuleAttr ruleAttr)
|
||||
{
|
||||
return toAjax(ruleAttrService.updateRuleAttr(ruleAttr));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除规格详情
|
||||
*/
|
||||
@RequiresPermissions("product:ruleAttr:remove")
|
||||
@Log(title = "规格详情", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public Result remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(ruleAttrService.deleteRuleAttrByIds(ids));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,105 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.muyu.common.log.annotation.Log;
|
||||
import com.muyu.common.log.enums.BusinessType;
|
||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||
import com.muyu.product.domain.Rule;
|
||||
import com.muyu.product.service.IRuleService;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 商品规格Controller
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/rule")
|
||||
public class RuleController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IRuleService ruleService;
|
||||
|
||||
/**
|
||||
* 查询商品规格列表
|
||||
*/
|
||||
@RequiresPermissions("product:rule:list")
|
||||
@GetMapping("/list")
|
||||
public Result<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,61 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.AttributeGroup;
|
||||
|
||||
/**
|
||||
* 属性组Mapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface AttributeGroupMapper
|
||||
{
|
||||
/**
|
||||
* 查询属性组
|
||||
*
|
||||
* @param id 属性组主键
|
||||
* @return 属性组
|
||||
*/
|
||||
public AttributeGroup selectAttributeGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询属性组列表
|
||||
*
|
||||
* @param attributeGroup 属性组
|
||||
* @return 属性组集合
|
||||
*/
|
||||
public List<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 yuanjunzhe
|
||||
* @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.BrandInfo;
|
||||
|
||||
/**
|
||||
* 商品品牌Mapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface BrandInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询商品品牌
|
||||
*
|
||||
* @param id 商品品牌主键
|
||||
* @return 商品品牌
|
||||
*/
|
||||
public BrandInfo selectBrandInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商品品牌列表
|
||||
*
|
||||
* @param brandInfo 商品品牌
|
||||
* @return 商品品牌集合
|
||||
*/
|
||||
public List<BrandInfo> selectBrandInfoList(BrandInfo brandInfo);
|
||||
|
||||
/**
|
||||
* 新增商品品牌
|
||||
*
|
||||
* @param brandInfo 商品品牌
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBrandInfo(BrandInfo brandInfo);
|
||||
|
||||
/**
|
||||
* 修改商品品牌
|
||||
*
|
||||
* @param brandInfo 商品品牌
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBrandInfo(BrandInfo brandInfo);
|
||||
|
||||
/**
|
||||
* 删除商品品牌
|
||||
*
|
||||
* @param id 商品品牌主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBrandInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除商品品牌
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBrandInfoByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.BrandProduct;
|
||||
|
||||
/**
|
||||
* 品牌商品中间Mapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface BrandProductMapper
|
||||
{
|
||||
/**
|
||||
* 查询品牌商品中间
|
||||
*
|
||||
* @param id 品牌商品中间主键
|
||||
* @return 品牌商品中间
|
||||
*/
|
||||
public BrandProduct selectBrandProductById(Long id);
|
||||
|
||||
/**
|
||||
* 查询品牌商品中间列表
|
||||
*
|
||||
* @param brandProduct 品牌商品中间
|
||||
* @return 品牌商品中间集合
|
||||
*/
|
||||
public List<BrandProduct> selectBrandProductList(BrandProduct brandProduct);
|
||||
|
||||
/**
|
||||
* 新增品牌商品中间
|
||||
*
|
||||
* @param brandProduct 品牌商品中间
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBrandProduct(BrandProduct brandProduct);
|
||||
|
||||
/**
|
||||
* 修改品牌商品中间
|
||||
*
|
||||
* @param brandProduct 品牌商品中间
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBrandProduct(BrandProduct brandProduct);
|
||||
|
||||
/**
|
||||
* 删除品牌商品中间
|
||||
*
|
||||
* @param id 品牌商品中间主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBrandProductById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除品牌商品中间
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBrandProductByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.CategoryAttributeGroup;
|
||||
|
||||
/**
|
||||
* 品类Mapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface CategoryAttributeGroupMapper
|
||||
{
|
||||
/**
|
||||
* 查询品类
|
||||
*
|
||||
* @param id 品类主键
|
||||
* @return 品类
|
||||
*/
|
||||
public CategoryAttributeGroup selectCategoryAttributeGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询品类列表
|
||||
*
|
||||
* @param categoryAttributeGroup 品类
|
||||
* @return 品类集合
|
||||
*/
|
||||
public List<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 yuanjunzhe
|
||||
* @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.CategoryBrand;
|
||||
|
||||
/**
|
||||
* 品类Mapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface CategoryBrandMapper
|
||||
{
|
||||
/**
|
||||
* 查询品类
|
||||
*
|
||||
* @param id 品类主键
|
||||
* @return 品类
|
||||
*/
|
||||
public CategoryBrand selectCategoryBrandById(Long id);
|
||||
|
||||
/**
|
||||
* 查询品类列表
|
||||
*
|
||||
* @param categoryBrand 品类
|
||||
* @return 品类集合
|
||||
*/
|
||||
public List<CategoryBrand> selectCategoryBrandList(CategoryBrand categoryBrand);
|
||||
|
||||
/**
|
||||
* 新增品类
|
||||
*
|
||||
* @param categoryBrand 品类
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCategoryBrand(CategoryBrand categoryBrand);
|
||||
|
||||
/**
|
||||
* 修改品类
|
||||
*
|
||||
* @param categoryBrand 品类
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCategoryBrand(CategoryBrand categoryBrand);
|
||||
|
||||
/**
|
||||
* 删除品类
|
||||
*
|
||||
* @param id 品类主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCategoryBrandById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除品类
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCategoryBrandByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.CategoryInfo;
|
||||
|
||||
/**
|
||||
* 品类信息Mapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface CategoryInfoMapper
|
||||
{
|
||||
/**
|
||||
* 查询品类信息
|
||||
*
|
||||
* @param id 品类信息主键
|
||||
* @return 品类信息
|
||||
*/
|
||||
public CategoryInfo selectCategoryInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询品类信息列表
|
||||
*
|
||||
* @param categoryInfo 品类信息
|
||||
* @return 品类信息集合
|
||||
*/
|
||||
public List<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.CommentLike;
|
||||
|
||||
/**
|
||||
* 评论点赞Mapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface CommentLikeMapper
|
||||
{
|
||||
/**
|
||||
* 查询评论点赞
|
||||
*
|
||||
* @param id 评论点赞主键
|
||||
* @return 评论点赞
|
||||
*/
|
||||
public CommentLike selectCommentLikeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询评论点赞列表
|
||||
*
|
||||
* @param commentLike 评论点赞
|
||||
* @return 评论点赞集合
|
||||
*/
|
||||
public List<CommentLike> selectCommentLikeList(CommentLike commentLike);
|
||||
|
||||
/**
|
||||
* 新增评论点赞
|
||||
*
|
||||
* @param commentLike 评论点赞
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommentLike(CommentLike commentLike);
|
||||
|
||||
/**
|
||||
* 修改评论点赞
|
||||
*
|
||||
* @param commentLike 评论点赞
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommentLike(CommentLike commentLike);
|
||||
|
||||
/**
|
||||
* 删除评论点赞
|
||||
*
|
||||
* @param id 评论点赞主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommentLikeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除评论点赞
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommentLikeByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.ProductAttribute;
|
||||
|
||||
/**
|
||||
* 商品属性Mapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface ProductAttributeMapper
|
||||
{
|
||||
/**
|
||||
* 查询商品属性
|
||||
*
|
||||
* @param id 商品属性主键
|
||||
* @return 商品属性
|
||||
*/
|
||||
public ProductAttribute selectProductAttributeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商品属性列表
|
||||
*
|
||||
* @param productAttribute 商品属性
|
||||
* @return 商品属性集合
|
||||
*/
|
||||
public List<ProductAttribute> selectProductAttributeList(ProductAttribute productAttribute);
|
||||
|
||||
/**
|
||||
* 新增商品属性
|
||||
*
|
||||
* @param productAttribute 商品属性
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProductAttribute(ProductAttribute productAttribute);
|
||||
|
||||
/**
|
||||
* 修改商品属性
|
||||
*
|
||||
* @param productAttribute 商品属性
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProductAttribute(ProductAttribute productAttribute);
|
||||
|
||||
/**
|
||||
* 删除商品属性
|
||||
*
|
||||
* @param id 商品属性主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductAttributeById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除商品属性
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductAttributeByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.ProductComment;
|
||||
|
||||
/**
|
||||
* 商品评论Mapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface ProductCommentMapper
|
||||
{
|
||||
/**
|
||||
* 查询商品评论
|
||||
*
|
||||
* @param id 商品评论主键
|
||||
* @return 商品评论
|
||||
*/
|
||||
public ProductComment selectProductCommentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商品评论列表
|
||||
*
|
||||
* @param productComment 商品评论
|
||||
* @return 商品评论集合
|
||||
*/
|
||||
public List<ProductComment> selectProductCommentList(ProductComment productComment);
|
||||
|
||||
/**
|
||||
* 新增商品评论
|
||||
*
|
||||
* @param productComment 商品评论
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProductComment(ProductComment productComment);
|
||||
|
||||
/**
|
||||
* 修改商品评论
|
||||
*
|
||||
* @param productComment 商品评论
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProductComment(ProductComment productComment);
|
||||
|
||||
/**
|
||||
* 删除商品评论
|
||||
*
|
||||
* @param id 商品评论主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductCommentById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除商品评论
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductCommentByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.Product;
|
||||
|
||||
/**
|
||||
* 商品信息Mapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface ProductMapper
|
||||
{
|
||||
/**
|
||||
* 查询商品信息
|
||||
*
|
||||
* @param id 商品信息主键
|
||||
* @return 商品信息
|
||||
*/
|
||||
public Product selectProductById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商品信息列表
|
||||
*
|
||||
* @param product 商品信息
|
||||
* @return 商品信息集合
|
||||
*/
|
||||
public List<Product> selectProductList(Product product);
|
||||
|
||||
/**
|
||||
* 新增商品信息
|
||||
*
|
||||
* @param product 商品信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProduct(Product product);
|
||||
|
||||
/**
|
||||
* 修改商品信息
|
||||
*
|
||||
* @param product 商品信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProduct(Product product);
|
||||
|
||||
/**
|
||||
* 删除商品信息
|
||||
*
|
||||
* @param id 商品信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除商品信息
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.ProductSku;
|
||||
|
||||
/**
|
||||
* 商品skuMapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface ProductSkuMapper
|
||||
{
|
||||
/**
|
||||
* 查询商品sku
|
||||
*
|
||||
* @param id 商品sku主键
|
||||
* @return 商品sku
|
||||
*/
|
||||
public ProductSku selectProductSkuById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商品sku列表
|
||||
*
|
||||
* @param productSku 商品sku
|
||||
* @return 商品sku集合
|
||||
*/
|
||||
public List<ProductSku> selectProductSkuList(ProductSku productSku);
|
||||
|
||||
/**
|
||||
* 新增商品sku
|
||||
*
|
||||
* @param productSku 商品sku
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProductSku(ProductSku productSku);
|
||||
|
||||
/**
|
||||
* 修改商品sku
|
||||
*
|
||||
* @param productSku 商品sku
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProductSku(ProductSku productSku);
|
||||
|
||||
/**
|
||||
* 删除商品sku
|
||||
*
|
||||
* @param id 商品sku主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductSkuById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除商品sku
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductSkuByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.RuleAttr;
|
||||
|
||||
/**
|
||||
* 规格详情Mapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface RuleAttrMapper
|
||||
{
|
||||
/**
|
||||
* 查询规格详情
|
||||
*
|
||||
* @param id 规格详情主键
|
||||
* @return 规格详情
|
||||
*/
|
||||
public RuleAttr selectRuleAttrById(Long id);
|
||||
|
||||
/**
|
||||
* 查询规格详情列表
|
||||
*
|
||||
* @param ruleAttr 规格详情
|
||||
* @return 规格详情集合
|
||||
*/
|
||||
public List<RuleAttr> selectRuleAttrList(RuleAttr ruleAttr);
|
||||
|
||||
/**
|
||||
* 新增规格详情
|
||||
*
|
||||
* @param ruleAttr 规格详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRuleAttr(RuleAttr ruleAttr);
|
||||
|
||||
/**
|
||||
* 修改规格详情
|
||||
*
|
||||
* @param ruleAttr 规格详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRuleAttr(RuleAttr ruleAttr);
|
||||
|
||||
/**
|
||||
* 删除规格详情
|
||||
*
|
||||
* @param id 规格详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRuleAttrById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除规格详情
|
||||
*
|
||||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRuleAttrByIds(Long[] ids);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.Rule;
|
||||
|
||||
/**
|
||||
* 商品规格Mapper接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface RuleMapper
|
||||
{
|
||||
/**
|
||||
* 查询商品规格
|
||||
*
|
||||
* @param id 商品规格主键
|
||||
* @return 商品规格
|
||||
*/
|
||||
public Rule selectRuleById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商品规格列表
|
||||
*
|
||||
* @param rule 商品规格
|
||||
* @return 商品规格集合
|
||||
*/
|
||||
public List<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.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.AttributeGroup;
|
||||
|
||||
/**
|
||||
* 属性组Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface IAttributeGroupService
|
||||
{
|
||||
/**
|
||||
* 查询属性组
|
||||
*
|
||||
* @param id 属性组主键
|
||||
* @return 属性组
|
||||
*/
|
||||
public AttributeGroup selectAttributeGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询属性组列表
|
||||
*
|
||||
* @param attributeGroup 属性组
|
||||
* @return 属性组集合
|
||||
*/
|
||||
public List<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.Attribute;
|
||||
|
||||
/**
|
||||
* 商品属性Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @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.BrandInfo;
|
||||
|
||||
/**
|
||||
* 商品品牌Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface IBrandInfoService
|
||||
{
|
||||
/**
|
||||
* 查询商品品牌
|
||||
*
|
||||
* @param id 商品品牌主键
|
||||
* @return 商品品牌
|
||||
*/
|
||||
public BrandInfo selectBrandInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商品品牌列表
|
||||
*
|
||||
* @param brandInfo 商品品牌
|
||||
* @return 商品品牌集合
|
||||
*/
|
||||
public List<BrandInfo> selectBrandInfoList(BrandInfo brandInfo);
|
||||
|
||||
/**
|
||||
* 新增商品品牌
|
||||
*
|
||||
* @param brandInfo 商品品牌
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBrandInfo(BrandInfo brandInfo);
|
||||
|
||||
/**
|
||||
* 修改商品品牌
|
||||
*
|
||||
* @param brandInfo 商品品牌
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBrandInfo(BrandInfo brandInfo);
|
||||
|
||||
/**
|
||||
* 批量删除商品品牌
|
||||
*
|
||||
* @param ids 需要删除的商品品牌主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBrandInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除商品品牌信息
|
||||
*
|
||||
* @param id 商品品牌主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBrandInfoById(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.BrandProduct;
|
||||
|
||||
/**
|
||||
* 品牌商品中间Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface IBrandProductService
|
||||
{
|
||||
/**
|
||||
* 查询品牌商品中间
|
||||
*
|
||||
* @param id 品牌商品中间主键
|
||||
* @return 品牌商品中间
|
||||
*/
|
||||
public BrandProduct selectBrandProductById(Long id);
|
||||
|
||||
/**
|
||||
* 查询品牌商品中间列表
|
||||
*
|
||||
* @param brandProduct 品牌商品中间
|
||||
* @return 品牌商品中间集合
|
||||
*/
|
||||
public List<BrandProduct> selectBrandProductList(BrandProduct brandProduct);
|
||||
|
||||
/**
|
||||
* 新增品牌商品中间
|
||||
*
|
||||
* @param brandProduct 品牌商品中间
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBrandProduct(BrandProduct brandProduct);
|
||||
|
||||
/**
|
||||
* 修改品牌商品中间
|
||||
*
|
||||
* @param brandProduct 品牌商品中间
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBrandProduct(BrandProduct brandProduct);
|
||||
|
||||
/**
|
||||
* 批量删除品牌商品中间
|
||||
*
|
||||
* @param ids 需要删除的品牌商品中间主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBrandProductByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除品牌商品中间信息
|
||||
*
|
||||
* @param id 品牌商品中间主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBrandProductById(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.CategoryAttributeGroup;
|
||||
|
||||
/**
|
||||
* 品类Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface ICategoryAttributeGroupService
|
||||
{
|
||||
/**
|
||||
* 查询品类
|
||||
*
|
||||
* @param id 品类主键
|
||||
* @return 品类
|
||||
*/
|
||||
public CategoryAttributeGroup selectCategoryAttributeGroupById(Long id);
|
||||
|
||||
/**
|
||||
* 查询品类列表
|
||||
*
|
||||
* @param categoryAttributeGroup 品类
|
||||
* @return 品类集合
|
||||
*/
|
||||
public List<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 yuanjunzhe
|
||||
* @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.CategoryBrand;
|
||||
|
||||
/**
|
||||
* 品类Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface ICategoryBrandService
|
||||
{
|
||||
/**
|
||||
* 查询品类
|
||||
*
|
||||
* @param id 品类主键
|
||||
* @return 品类
|
||||
*/
|
||||
public CategoryBrand selectCategoryBrandById(Long id);
|
||||
|
||||
/**
|
||||
* 查询品类列表
|
||||
*
|
||||
* @param categoryBrand 品类
|
||||
* @return 品类集合
|
||||
*/
|
||||
public List<CategoryBrand> selectCategoryBrandList(CategoryBrand categoryBrand);
|
||||
|
||||
/**
|
||||
* 新增品类
|
||||
*
|
||||
* @param categoryBrand 品类
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCategoryBrand(CategoryBrand categoryBrand);
|
||||
|
||||
/**
|
||||
* 修改品类
|
||||
*
|
||||
* @param categoryBrand 品类
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCategoryBrand(CategoryBrand categoryBrand);
|
||||
|
||||
/**
|
||||
* 批量删除品类
|
||||
*
|
||||
* @param ids 需要删除的品类主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCategoryBrandByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除品类信息
|
||||
*
|
||||
* @param id 品类主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCategoryBrandById(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.CategoryInfo;
|
||||
|
||||
/**
|
||||
* 品类信息Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface ICategoryInfoService
|
||||
{
|
||||
/**
|
||||
* 查询品类信息
|
||||
*
|
||||
* @param id 品类信息主键
|
||||
* @return 品类信息
|
||||
*/
|
||||
public CategoryInfo selectCategoryInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询品类信息列表
|
||||
*
|
||||
* @param categoryInfo 品类信息
|
||||
* @return 品类信息集合
|
||||
*/
|
||||
public List<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.CommentLike;
|
||||
|
||||
/**
|
||||
* 评论点赞Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface ICommentLikeService
|
||||
{
|
||||
/**
|
||||
* 查询评论点赞
|
||||
*
|
||||
* @param id 评论点赞主键
|
||||
* @return 评论点赞
|
||||
*/
|
||||
public CommentLike selectCommentLikeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询评论点赞列表
|
||||
*
|
||||
* @param commentLike 评论点赞
|
||||
* @return 评论点赞集合
|
||||
*/
|
||||
public List<CommentLike> selectCommentLikeList(CommentLike commentLike);
|
||||
|
||||
/**
|
||||
* 新增评论点赞
|
||||
*
|
||||
* @param commentLike 评论点赞
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertCommentLike(CommentLike commentLike);
|
||||
|
||||
/**
|
||||
* 修改评论点赞
|
||||
*
|
||||
* @param commentLike 评论点赞
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateCommentLike(CommentLike commentLike);
|
||||
|
||||
/**
|
||||
* 批量删除评论点赞
|
||||
*
|
||||
* @param ids 需要删除的评论点赞主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommentLikeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除评论点赞信息
|
||||
*
|
||||
* @param id 评论点赞主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteCommentLikeById(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.ProductAttribute;
|
||||
|
||||
/**
|
||||
* 商品属性Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface IProductAttributeService
|
||||
{
|
||||
/**
|
||||
* 查询商品属性
|
||||
*
|
||||
* @param id 商品属性主键
|
||||
* @return 商品属性
|
||||
*/
|
||||
public ProductAttribute selectProductAttributeById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商品属性列表
|
||||
*
|
||||
* @param productAttribute 商品属性
|
||||
* @return 商品属性集合
|
||||
*/
|
||||
public List<ProductAttribute> selectProductAttributeList(ProductAttribute productAttribute);
|
||||
|
||||
/**
|
||||
* 新增商品属性
|
||||
*
|
||||
* @param productAttribute 商品属性
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProductAttribute(ProductAttribute productAttribute);
|
||||
|
||||
/**
|
||||
* 修改商品属性
|
||||
*
|
||||
* @param productAttribute 商品属性
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProductAttribute(ProductAttribute productAttribute);
|
||||
|
||||
/**
|
||||
* 批量删除商品属性
|
||||
*
|
||||
* @param ids 需要删除的商品属性主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductAttributeByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除商品属性信息
|
||||
*
|
||||
* @param id 商品属性主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductAttributeById(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.ProductComment;
|
||||
|
||||
/**
|
||||
* 商品评论Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface IProductCommentService
|
||||
{
|
||||
/**
|
||||
* 查询商品评论
|
||||
*
|
||||
* @param id 商品评论主键
|
||||
* @return 商品评论
|
||||
*/
|
||||
public ProductComment selectProductCommentById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商品评论列表
|
||||
*
|
||||
* @param productComment 商品评论
|
||||
* @return 商品评论集合
|
||||
*/
|
||||
public List<ProductComment> selectProductCommentList(ProductComment productComment);
|
||||
|
||||
/**
|
||||
* 新增商品评论
|
||||
*
|
||||
* @param productComment 商品评论
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProductComment(ProductComment productComment);
|
||||
|
||||
/**
|
||||
* 修改商品评论
|
||||
*
|
||||
* @param productComment 商品评论
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProductComment(ProductComment productComment);
|
||||
|
||||
/**
|
||||
* 批量删除商品评论
|
||||
*
|
||||
* @param ids 需要删除的商品评论主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductCommentByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除商品评论信息
|
||||
*
|
||||
* @param id 商品评论主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductCommentById(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.Product;
|
||||
|
||||
/**
|
||||
* 商品信息Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface IProductService
|
||||
{
|
||||
/**
|
||||
* 查询商品信息
|
||||
*
|
||||
* @param id 商品信息主键
|
||||
* @return 商品信息
|
||||
*/
|
||||
public Product selectProductById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商品信息列表
|
||||
*
|
||||
* @param product 商品信息
|
||||
* @return 商品信息集合
|
||||
*/
|
||||
public List<Product> selectProductList(Product product);
|
||||
|
||||
/**
|
||||
* 新增商品信息
|
||||
*
|
||||
* @param product 商品信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProduct(Product product);
|
||||
|
||||
/**
|
||||
* 修改商品信息
|
||||
*
|
||||
* @param product 商品信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProduct(Product product);
|
||||
|
||||
/**
|
||||
* 批量删除商品信息
|
||||
*
|
||||
* @param ids 需要删除的商品信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除商品信息信息
|
||||
*
|
||||
* @param id 商品信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductById(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.ProductSku;
|
||||
|
||||
/**
|
||||
* 商品skuService接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface IProductSkuService
|
||||
{
|
||||
/**
|
||||
* 查询商品sku
|
||||
*
|
||||
* @param id 商品sku主键
|
||||
* @return 商品sku
|
||||
*/
|
||||
public ProductSku selectProductSkuById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商品sku列表
|
||||
*
|
||||
* @param productSku 商品sku
|
||||
* @return 商品sku集合
|
||||
*/
|
||||
public List<ProductSku> selectProductSkuList(ProductSku productSku);
|
||||
|
||||
/**
|
||||
* 新增商品sku
|
||||
*
|
||||
* @param productSku 商品sku
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertProductSku(ProductSku productSku);
|
||||
|
||||
/**
|
||||
* 修改商品sku
|
||||
*
|
||||
* @param productSku 商品sku
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateProductSku(ProductSku productSku);
|
||||
|
||||
/**
|
||||
* 批量删除商品sku
|
||||
*
|
||||
* @param ids 需要删除的商品sku主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductSkuByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除商品sku信息
|
||||
*
|
||||
* @param id 商品sku主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteProductSkuById(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.RuleAttr;
|
||||
|
||||
/**
|
||||
* 规格详情Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface IRuleAttrService
|
||||
{
|
||||
/**
|
||||
* 查询规格详情
|
||||
*
|
||||
* @param id 规格详情主键
|
||||
* @return 规格详情
|
||||
*/
|
||||
public RuleAttr selectRuleAttrById(Long id);
|
||||
|
||||
/**
|
||||
* 查询规格详情列表
|
||||
*
|
||||
* @param ruleAttr 规格详情
|
||||
* @return 规格详情集合
|
||||
*/
|
||||
public List<RuleAttr> selectRuleAttrList(RuleAttr ruleAttr);
|
||||
|
||||
/**
|
||||
* 新增规格详情
|
||||
*
|
||||
* @param ruleAttr 规格详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRuleAttr(RuleAttr ruleAttr);
|
||||
|
||||
/**
|
||||
* 修改规格详情
|
||||
*
|
||||
* @param ruleAttr 规格详情
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRuleAttr(RuleAttr ruleAttr);
|
||||
|
||||
/**
|
||||
* 批量删除规格详情
|
||||
*
|
||||
* @param ids 需要删除的规格详情主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRuleAttrByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除规格详情信息
|
||||
*
|
||||
* @param id 规格详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRuleAttrById(Long id);
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
package com.muyu.product.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.product.domain.Rule;
|
||||
|
||||
/**
|
||||
* 商品规格Service接口
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
public interface IRuleService
|
||||
{
|
||||
/**
|
||||
* 查询商品规格
|
||||
*
|
||||
* @param id 商品规格主键
|
||||
* @return 商品规格
|
||||
*/
|
||||
public Rule selectRuleById(Long id);
|
||||
|
||||
/**
|
||||
* 查询商品规格列表
|
||||
*
|
||||
* @param rule 商品规格
|
||||
* @return 商品规格集合
|
||||
*/
|
||||
public List<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.AttributeGroupMapper;
|
||||
import com.muyu.product.domain.AttributeGroup;
|
||||
import com.muyu.product.service.IAttributeGroupService;
|
||||
|
||||
/**
|
||||
* 属性组Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class AttributeGroupServiceImpl implements IAttributeGroupService
|
||||
{
|
||||
@Autowired
|
||||
private AttributeGroupMapper attributeGroupMapper;
|
||||
|
||||
/**
|
||||
* 查询属性组
|
||||
*
|
||||
* @param id 属性组主键
|
||||
* @return 属性组
|
||||
*/
|
||||
@Override
|
||||
public AttributeGroup selectAttributeGroupById(Long id)
|
||||
{
|
||||
return attributeGroupMapper.selectAttributeGroupById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询属性组列表
|
||||
*
|
||||
* @param attributeGroup 属性组
|
||||
* @return 属性组
|
||||
*/
|
||||
@Override
|
||||
public List<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.AttributeMapper;
|
||||
import com.muyu.product.domain.Attribute;
|
||||
import com.muyu.product.service.IAttributeService;
|
||||
|
||||
/**
|
||||
* 商品属性Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class AttributeServiceImpl implements IAttributeService
|
||||
{
|
||||
@Autowired
|
||||
private AttributeMapper attributeMapper;
|
||||
|
||||
/**
|
||||
* 查询商品属性
|
||||
*
|
||||
* @param id 商品属性主键
|
||||
* @return 商品属性
|
||||
*/
|
||||
@Override
|
||||
public Attribute selectAttributeById(Long id)
|
||||
{
|
||||
return attributeMapper.selectAttributeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品属性列表
|
||||
*
|
||||
* @param attribute 商品属性
|
||||
* @return 商品属性
|
||||
*/
|
||||
@Override
|
||||
public List<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.BrandInfoMapper;
|
||||
import com.muyu.product.domain.BrandInfo;
|
||||
import com.muyu.product.service.IBrandInfoService;
|
||||
|
||||
/**
|
||||
* 商品品牌Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class BrandInfoServiceImpl implements IBrandInfoService
|
||||
{
|
||||
@Autowired
|
||||
private BrandInfoMapper brandInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询商品品牌
|
||||
*
|
||||
* @param id 商品品牌主键
|
||||
* @return 商品品牌
|
||||
*/
|
||||
@Override
|
||||
public BrandInfo selectBrandInfoById(Long id)
|
||||
{
|
||||
return brandInfoMapper.selectBrandInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品品牌列表
|
||||
*
|
||||
* @param brandInfo 商品品牌
|
||||
* @return 商品品牌
|
||||
*/
|
||||
@Override
|
||||
public List<BrandInfo> selectBrandInfoList(BrandInfo brandInfo)
|
||||
{
|
||||
return brandInfoMapper.selectBrandInfoList(brandInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品品牌
|
||||
*
|
||||
* @param brandInfo 商品品牌
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBrandInfo(BrandInfo brandInfo)
|
||||
{
|
||||
brandInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return brandInfoMapper.insertBrandInfo(brandInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品品牌
|
||||
*
|
||||
* @param brandInfo 商品品牌
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBrandInfo(BrandInfo brandInfo)
|
||||
{
|
||||
brandInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return brandInfoMapper.updateBrandInfo(brandInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商品品牌
|
||||
*
|
||||
* @param ids 需要删除的商品品牌主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBrandInfoByIds(Long[] ids)
|
||||
{
|
||||
return brandInfoMapper.deleteBrandInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品品牌信息
|
||||
*
|
||||
* @param id 商品品牌主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBrandInfoById(Long id)
|
||||
{
|
||||
return brandInfoMapper.deleteBrandInfoById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package com.muyu.product.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.product.mapper.BrandProductMapper;
|
||||
import com.muyu.product.domain.BrandProduct;
|
||||
import com.muyu.product.service.IBrandProductService;
|
||||
|
||||
/**
|
||||
* 品牌商品中间Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class BrandProductServiceImpl implements IBrandProductService
|
||||
{
|
||||
@Autowired
|
||||
private BrandProductMapper brandProductMapper;
|
||||
|
||||
/**
|
||||
* 查询品牌商品中间
|
||||
*
|
||||
* @param id 品牌商品中间主键
|
||||
* @return 品牌商品中间
|
||||
*/
|
||||
@Override
|
||||
public BrandProduct selectBrandProductById(Long id)
|
||||
{
|
||||
return brandProductMapper.selectBrandProductById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询品牌商品中间列表
|
||||
*
|
||||
* @param brandProduct 品牌商品中间
|
||||
* @return 品牌商品中间
|
||||
*/
|
||||
@Override
|
||||
public List<BrandProduct> selectBrandProductList(BrandProduct brandProduct)
|
||||
{
|
||||
return brandProductMapper.selectBrandProductList(brandProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增品牌商品中间
|
||||
*
|
||||
* @param brandProduct 品牌商品中间
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBrandProduct(BrandProduct brandProduct)
|
||||
{
|
||||
brandProduct.setCreateTime(DateUtils.getNowDate());
|
||||
return brandProductMapper.insertBrandProduct(brandProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改品牌商品中间
|
||||
*
|
||||
* @param brandProduct 品牌商品中间
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBrandProduct(BrandProduct brandProduct)
|
||||
{
|
||||
brandProduct.setUpdateTime(DateUtils.getNowDate());
|
||||
return brandProductMapper.updateBrandProduct(brandProduct);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除品牌商品中间
|
||||
*
|
||||
* @param ids 需要删除的品牌商品中间主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBrandProductByIds(Long[] ids)
|
||||
{
|
||||
return brandProductMapper.deleteBrandProductByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除品牌商品中间信息
|
||||
*
|
||||
* @param id 品牌商品中间主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBrandProductById(Long id)
|
||||
{
|
||||
return brandProductMapper.deleteBrandProductById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package com.muyu.product.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.product.mapper.CategoryAttributeGroupMapper;
|
||||
import com.muyu.product.domain.CategoryAttributeGroup;
|
||||
import com.muyu.product.service.ICategoryAttributeGroupService;
|
||||
|
||||
/**
|
||||
* 品类Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class CategoryAttributeGroupServiceImpl implements ICategoryAttributeGroupService
|
||||
{
|
||||
@Autowired
|
||||
private CategoryAttributeGroupMapper categoryAttributeGroupMapper;
|
||||
|
||||
/**
|
||||
* 查询品类
|
||||
*
|
||||
* @param id 品类主键
|
||||
* @return 品类
|
||||
*/
|
||||
@Override
|
||||
public CategoryAttributeGroup selectCategoryAttributeGroupById(Long id)
|
||||
{
|
||||
return categoryAttributeGroupMapper.selectCategoryAttributeGroupById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询品类列表
|
||||
*
|
||||
* @param categoryAttributeGroup 品类
|
||||
* @return 品类
|
||||
*/
|
||||
@Override
|
||||
public List<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 yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class CategoryAttributeServiceImpl implements ICategoryAttributeService
|
||||
{
|
||||
@Autowired
|
||||
private CategoryAttributeMapper categoryAttributeMapper;
|
||||
|
||||
/**
|
||||
* 查询品类
|
||||
*
|
||||
* @param id 品类主键
|
||||
* @return 品类
|
||||
*/
|
||||
@Override
|
||||
public CategoryAttribute selectCategoryAttributeById(Long id)
|
||||
{
|
||||
return categoryAttributeMapper.selectCategoryAttributeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询品类列表
|
||||
*
|
||||
* @param categoryAttribute 品类
|
||||
* @return 品类
|
||||
*/
|
||||
@Override
|
||||
public List<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.CategoryBrandMapper;
|
||||
import com.muyu.product.domain.CategoryBrand;
|
||||
import com.muyu.product.service.ICategoryBrandService;
|
||||
|
||||
/**
|
||||
* 品类Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class CategoryBrandServiceImpl implements ICategoryBrandService
|
||||
{
|
||||
@Autowired
|
||||
private CategoryBrandMapper categoryBrandMapper;
|
||||
|
||||
/**
|
||||
* 查询品类
|
||||
*
|
||||
* @param id 品类主键
|
||||
* @return 品类
|
||||
*/
|
||||
@Override
|
||||
public CategoryBrand selectCategoryBrandById(Long id)
|
||||
{
|
||||
return categoryBrandMapper.selectCategoryBrandById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询品类列表
|
||||
*
|
||||
* @param categoryBrand 品类
|
||||
* @return 品类
|
||||
*/
|
||||
@Override
|
||||
public List<CategoryBrand> selectCategoryBrandList(CategoryBrand categoryBrand)
|
||||
{
|
||||
return categoryBrandMapper.selectCategoryBrandList(categoryBrand);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增品类
|
||||
*
|
||||
* @param categoryBrand 品类
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCategoryBrand(CategoryBrand categoryBrand)
|
||||
{
|
||||
categoryBrand.setCreateTime(DateUtils.getNowDate());
|
||||
return categoryBrandMapper.insertCategoryBrand(categoryBrand);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改品类
|
||||
*
|
||||
* @param categoryBrand 品类
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCategoryBrand(CategoryBrand categoryBrand)
|
||||
{
|
||||
categoryBrand.setUpdateTime(DateUtils.getNowDate());
|
||||
return categoryBrandMapper.updateCategoryBrand(categoryBrand);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除品类
|
||||
*
|
||||
* @param ids 需要删除的品类主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCategoryBrandByIds(Long[] ids)
|
||||
{
|
||||
return categoryBrandMapper.deleteCategoryBrandByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除品类信息
|
||||
*
|
||||
* @param id 品类主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCategoryBrandById(Long id)
|
||||
{
|
||||
return categoryBrandMapper.deleteCategoryBrandById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package com.muyu.product.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.product.mapper.CategoryInfoMapper;
|
||||
import com.muyu.product.domain.CategoryInfo;
|
||||
import com.muyu.product.service.ICategoryInfoService;
|
||||
|
||||
/**
|
||||
* 品类信息Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class CategoryInfoServiceImpl implements ICategoryInfoService
|
||||
{
|
||||
@Autowired
|
||||
private CategoryInfoMapper categoryInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询品类信息
|
||||
*
|
||||
* @param id 品类信息主键
|
||||
* @return 品类信息
|
||||
*/
|
||||
@Override
|
||||
public CategoryInfo selectCategoryInfoById(Long id)
|
||||
{
|
||||
return categoryInfoMapper.selectCategoryInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询品类信息列表
|
||||
*
|
||||
* @param categoryInfo 品类信息
|
||||
* @return 品类信息
|
||||
*/
|
||||
@Override
|
||||
public List<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.CommentLikeMapper;
|
||||
import com.muyu.product.domain.CommentLike;
|
||||
import com.muyu.product.service.ICommentLikeService;
|
||||
|
||||
/**
|
||||
* 评论点赞Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class CommentLikeServiceImpl implements ICommentLikeService
|
||||
{
|
||||
@Autowired
|
||||
private CommentLikeMapper commentLikeMapper;
|
||||
|
||||
/**
|
||||
* 查询评论点赞
|
||||
*
|
||||
* @param id 评论点赞主键
|
||||
* @return 评论点赞
|
||||
*/
|
||||
@Override
|
||||
public CommentLike selectCommentLikeById(Long id)
|
||||
{
|
||||
return commentLikeMapper.selectCommentLikeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询评论点赞列表
|
||||
*
|
||||
* @param commentLike 评论点赞
|
||||
* @return 评论点赞
|
||||
*/
|
||||
@Override
|
||||
public List<CommentLike> selectCommentLikeList(CommentLike commentLike)
|
||||
{
|
||||
return commentLikeMapper.selectCommentLikeList(commentLike);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增评论点赞
|
||||
*
|
||||
* @param commentLike 评论点赞
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertCommentLike(CommentLike commentLike)
|
||||
{
|
||||
commentLike.setCreateTime(DateUtils.getNowDate());
|
||||
return commentLikeMapper.insertCommentLike(commentLike);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改评论点赞
|
||||
*
|
||||
* @param commentLike 评论点赞
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateCommentLike(CommentLike commentLike)
|
||||
{
|
||||
commentLike.setUpdateTime(DateUtils.getNowDate());
|
||||
return commentLikeMapper.updateCommentLike(commentLike);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除评论点赞
|
||||
*
|
||||
* @param ids 需要删除的评论点赞主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommentLikeByIds(Long[] ids)
|
||||
{
|
||||
return commentLikeMapper.deleteCommentLikeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除评论点赞信息
|
||||
*
|
||||
* @param id 评论点赞主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteCommentLikeById(Long id)
|
||||
{
|
||||
return commentLikeMapper.deleteCommentLikeById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package com.muyu.product.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.product.mapper.ProductAttributeMapper;
|
||||
import com.muyu.product.domain.ProductAttribute;
|
||||
import com.muyu.product.service.IProductAttributeService;
|
||||
|
||||
/**
|
||||
* 商品属性Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class ProductAttributeServiceImpl implements IProductAttributeService
|
||||
{
|
||||
@Autowired
|
||||
private ProductAttributeMapper productAttributeMapper;
|
||||
|
||||
/**
|
||||
* 查询商品属性
|
||||
*
|
||||
* @param id 商品属性主键
|
||||
* @return 商品属性
|
||||
*/
|
||||
@Override
|
||||
public ProductAttribute selectProductAttributeById(Long id)
|
||||
{
|
||||
return productAttributeMapper.selectProductAttributeById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品属性列表
|
||||
*
|
||||
* @param productAttribute 商品属性
|
||||
* @return 商品属性
|
||||
*/
|
||||
@Override
|
||||
public List<ProductAttribute> selectProductAttributeList(ProductAttribute productAttribute)
|
||||
{
|
||||
return productAttributeMapper.selectProductAttributeList(productAttribute);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品属性
|
||||
*
|
||||
* @param productAttribute 商品属性
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProductAttribute(ProductAttribute productAttribute)
|
||||
{
|
||||
productAttribute.setCreateTime(DateUtils.getNowDate());
|
||||
return productAttributeMapper.insertProductAttribute(productAttribute);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品属性
|
||||
*
|
||||
* @param productAttribute 商品属性
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProductAttribute(ProductAttribute productAttribute)
|
||||
{
|
||||
productAttribute.setUpdateTime(DateUtils.getNowDate());
|
||||
return productAttributeMapper.updateProductAttribute(productAttribute);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商品属性
|
||||
*
|
||||
* @param ids 需要删除的商品属性主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProductAttributeByIds(Long[] ids)
|
||||
{
|
||||
return productAttributeMapper.deleteProductAttributeByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品属性信息
|
||||
*
|
||||
* @param id 商品属性主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProductAttributeById(Long id)
|
||||
{
|
||||
return productAttributeMapper.deleteProductAttributeById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package com.muyu.product.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.product.mapper.ProductCommentMapper;
|
||||
import com.muyu.product.domain.ProductComment;
|
||||
import com.muyu.product.service.IProductCommentService;
|
||||
|
||||
/**
|
||||
* 商品评论Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class ProductCommentServiceImpl implements IProductCommentService
|
||||
{
|
||||
@Autowired
|
||||
private ProductCommentMapper productCommentMapper;
|
||||
|
||||
/**
|
||||
* 查询商品评论
|
||||
*
|
||||
* @param id 商品评论主键
|
||||
* @return 商品评论
|
||||
*/
|
||||
@Override
|
||||
public ProductComment selectProductCommentById(Long id)
|
||||
{
|
||||
return productCommentMapper.selectProductCommentById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品评论列表
|
||||
*
|
||||
* @param productComment 商品评论
|
||||
* @return 商品评论
|
||||
*/
|
||||
@Override
|
||||
public List<ProductComment> selectProductCommentList(ProductComment productComment)
|
||||
{
|
||||
return productCommentMapper.selectProductCommentList(productComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品评论
|
||||
*
|
||||
* @param productComment 商品评论
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProductComment(ProductComment productComment)
|
||||
{
|
||||
productComment.setCreateTime(DateUtils.getNowDate());
|
||||
return productCommentMapper.insertProductComment(productComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品评论
|
||||
*
|
||||
* @param productComment 商品评论
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProductComment(ProductComment productComment)
|
||||
{
|
||||
productComment.setUpdateTime(DateUtils.getNowDate());
|
||||
return productCommentMapper.updateProductComment(productComment);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商品评论
|
||||
*
|
||||
* @param ids 需要删除的商品评论主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProductCommentByIds(Long[] ids)
|
||||
{
|
||||
return productCommentMapper.deleteProductCommentByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品评论信息
|
||||
*
|
||||
* @param id 商品评论主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProductCommentById(Long id)
|
||||
{
|
||||
return productCommentMapper.deleteProductCommentById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package com.muyu.product.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.product.mapper.ProductMapper;
|
||||
import com.muyu.product.domain.Product;
|
||||
import com.muyu.product.service.IProductService;
|
||||
|
||||
/**
|
||||
* 商品信息Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class ProductServiceImpl implements IProductService
|
||||
{
|
||||
@Autowired
|
||||
private ProductMapper productMapper;
|
||||
|
||||
/**
|
||||
* 查询商品信息
|
||||
*
|
||||
* @param id 商品信息主键
|
||||
* @return 商品信息
|
||||
*/
|
||||
@Override
|
||||
public Product selectProductById(Long id)
|
||||
{
|
||||
return productMapper.selectProductById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品信息列表
|
||||
*
|
||||
* @param product 商品信息
|
||||
* @return 商品信息
|
||||
*/
|
||||
@Override
|
||||
public List<Product> selectProductList(Product product)
|
||||
{
|
||||
return productMapper.selectProductList(product);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品信息
|
||||
*
|
||||
* @param product 商品信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProduct(Product product)
|
||||
{
|
||||
product.setCreateTime(DateUtils.getNowDate());
|
||||
return productMapper.insertProduct(product);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品信息
|
||||
*
|
||||
* @param product 商品信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProduct(Product product)
|
||||
{
|
||||
product.setUpdateTime(DateUtils.getNowDate());
|
||||
return productMapper.updateProduct(product);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商品信息
|
||||
*
|
||||
* @param ids 需要删除的商品信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProductByIds(Long[] ids)
|
||||
{
|
||||
return productMapper.deleteProductByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品信息信息
|
||||
*
|
||||
* @param id 商品信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProductById(Long id)
|
||||
{
|
||||
return productMapper.deleteProductById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package com.muyu.product.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.product.mapper.ProductSkuMapper;
|
||||
import com.muyu.product.domain.ProductSku;
|
||||
import com.muyu.product.service.IProductSkuService;
|
||||
|
||||
/**
|
||||
* 商品skuService业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class ProductSkuServiceImpl implements IProductSkuService
|
||||
{
|
||||
@Autowired
|
||||
private ProductSkuMapper productSkuMapper;
|
||||
|
||||
/**
|
||||
* 查询商品sku
|
||||
*
|
||||
* @param id 商品sku主键
|
||||
* @return 商品sku
|
||||
*/
|
||||
@Override
|
||||
public ProductSku selectProductSkuById(Long id)
|
||||
{
|
||||
return productSkuMapper.selectProductSkuById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品sku列表
|
||||
*
|
||||
* @param productSku 商品sku
|
||||
* @return 商品sku
|
||||
*/
|
||||
@Override
|
||||
public List<ProductSku> selectProductSkuList(ProductSku productSku)
|
||||
{
|
||||
return productSkuMapper.selectProductSkuList(productSku);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增商品sku
|
||||
*
|
||||
* @param productSku 商品sku
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertProductSku(ProductSku productSku)
|
||||
{
|
||||
productSku.setCreateTime(DateUtils.getNowDate());
|
||||
return productSkuMapper.insertProductSku(productSku);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品sku
|
||||
*
|
||||
* @param productSku 商品sku
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateProductSku(ProductSku productSku)
|
||||
{
|
||||
productSku.setUpdateTime(DateUtils.getNowDate());
|
||||
return productSkuMapper.updateProductSku(productSku);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除商品sku
|
||||
*
|
||||
* @param ids 需要删除的商品sku主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProductSkuByIds(Long[] ids)
|
||||
{
|
||||
return productSkuMapper.deleteProductSkuByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除商品sku信息
|
||||
*
|
||||
* @param id 商品sku主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteProductSkuById(Long id)
|
||||
{
|
||||
return productSkuMapper.deleteProductSkuById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package com.muyu.product.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.product.mapper.RuleAttrMapper;
|
||||
import com.muyu.product.domain.RuleAttr;
|
||||
import com.muyu.product.service.IRuleAttrService;
|
||||
|
||||
/**
|
||||
* 规格详情Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class RuleAttrServiceImpl implements IRuleAttrService
|
||||
{
|
||||
@Autowired
|
||||
private RuleAttrMapper ruleAttrMapper;
|
||||
|
||||
/**
|
||||
* 查询规格详情
|
||||
*
|
||||
* @param id 规格详情主键
|
||||
* @return 规格详情
|
||||
*/
|
||||
@Override
|
||||
public RuleAttr selectRuleAttrById(Long id)
|
||||
{
|
||||
return ruleAttrMapper.selectRuleAttrById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询规格详情列表
|
||||
*
|
||||
* @param ruleAttr 规格详情
|
||||
* @return 规格详情
|
||||
*/
|
||||
@Override
|
||||
public List<RuleAttr> selectRuleAttrList(RuleAttr ruleAttr)
|
||||
{
|
||||
return ruleAttrMapper.selectRuleAttrList(ruleAttr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增规格详情
|
||||
*
|
||||
* @param ruleAttr 规格详情
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertRuleAttr(RuleAttr ruleAttr)
|
||||
{
|
||||
ruleAttr.setCreateTime(DateUtils.getNowDate());
|
||||
return ruleAttrMapper.insertRuleAttr(ruleAttr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改规格详情
|
||||
*
|
||||
* @param ruleAttr 规格详情
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateRuleAttr(RuleAttr ruleAttr)
|
||||
{
|
||||
ruleAttr.setUpdateTime(DateUtils.getNowDate());
|
||||
return ruleAttrMapper.updateRuleAttr(ruleAttr);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除规格详情
|
||||
*
|
||||
* @param ids 需要删除的规格详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRuleAttrByIds(Long[] ids)
|
||||
{
|
||||
return ruleAttrMapper.deleteRuleAttrByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除规格详情信息
|
||||
*
|
||||
* @param id 规格详情主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteRuleAttrById(Long id)
|
||||
{
|
||||
return ruleAttrMapper.deleteRuleAttrById(id);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,96 @@
|
|||
package com.muyu.product.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.muyu.common.core.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.product.mapper.RuleMapper;
|
||||
import com.muyu.product.domain.Rule;
|
||||
import com.muyu.product.service.IRuleService;
|
||||
|
||||
/**
|
||||
* 商品规格Service业务层处理
|
||||
*
|
||||
* @author yuanjunzhe
|
||||
* @date 2024-02-29
|
||||
*/
|
||||
@Service
|
||||
public class RuleServiceImpl implements IRuleService
|
||||
{
|
||||
@Autowired
|
||||
private RuleMapper ruleMapper;
|
||||
|
||||
/**
|
||||
* 查询商品规格
|
||||
*
|
||||
* @param id 商品规格主键
|
||||
* @return 商品规格
|
||||
*/
|
||||
@Override
|
||||
public Rule selectRuleById(Long id)
|
||||
{
|
||||
return ruleMapper.selectRuleById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询商品规格列表
|
||||
*
|
||||
* @param rule 商品规格
|
||||
* @return 商品规格
|
||||
*/
|
||||
@Override
|
||||
public List<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,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="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="selectAttributeGroupVo">
|
||||
select id, name, status, 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="status != null and status != ''"> and status = #{status}</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">name,</if>
|
||||
<if test="status != null">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">#{name},</if>
|
||||
<if test="status != null">#{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="updateAttributeGroup" parameterType="com.muyu.product.domain.AttributeGroup">
|
||||
update attribute_group
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="status != null">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="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="gruopId" column="gruop_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, gruop_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="gruopId != null "> and gruop_id = #{gruopId}</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">name,</if>
|
||||
<if test="gruopId != null">gruop_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">#{name},</if>
|
||||
<if test="gruopId != null">#{gruopId},</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">name = #{name},</if>
|
||||
<if test="gruopId != null">gruop_id = #{gruopId},</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,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.BrandInfoMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.BrandInfo" id="BrandInfoResult">
|
||||
<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="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="selectBrandInfoVo">
|
||||
select id, name, logo, introduction, status, remark, create_by, create_time, update_by, update_time from brand_info
|
||||
</sql>
|
||||
|
||||
<select id="selectBrandInfoList" parameterType="com.muyu.product.domain.BrandInfo" resultMap="BrandInfoResult">
|
||||
<include refid="selectBrandInfoVo"/>
|
||||
<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>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBrandInfoById" parameterType="Long" resultMap="BrandInfoResult">
|
||||
<include refid="selectBrandInfoVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBrandInfo" parameterType="com.muyu.product.domain.BrandInfo" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into brand_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="logo != null">logo,</if>
|
||||
<if test="introduction != null">introduction,</if>
|
||||
<if test="status != null">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">#{name},</if>
|
||||
<if test="logo != null">#{logo},</if>
|
||||
<if test="introduction != null">#{introduction},</if>
|
||||
<if test="status != null">#{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="updateBrandInfo" parameterType="com.muyu.product.domain.BrandInfo">
|
||||
update brand_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="logo != null">logo = #{logo},</if>
|
||||
<if test="introduction != null">introduction = #{introduction},</if>
|
||||
<if test="status != null">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="deleteBrandInfoById" parameterType="Long">
|
||||
delete from brand_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBrandInfoByIds" parameterType="String">
|
||||
delete from brand_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.BrandProductMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.BrandProduct" id="BrandProductResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="brandId" column="brand_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="selectBrandProductVo">
|
||||
select id, brand_id, product_id, remark, create_by, create_time, update_by, update_time from brand_product
|
||||
</sql>
|
||||
|
||||
<select id="selectBrandProductList" parameterType="com.muyu.product.domain.BrandProduct" resultMap="BrandProductResult">
|
||||
<include refid="selectBrandProductVo"/>
|
||||
<where>
|
||||
<if test="brandId != null "> and brand_id = #{brandId}</if>
|
||||
<if test="productId != null "> and product_id = #{productId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBrandProductById" parameterType="Long" resultMap="BrandProductResult">
|
||||
<include refid="selectBrandProductVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBrandProduct" parameterType="com.muyu.product.domain.BrandProduct" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into brand_product
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="brandId != null">brand_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="brandId != null">#{brandId},</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="updateBrandProduct" parameterType="com.muyu.product.domain.BrandProduct">
|
||||
update brand_product
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="brandId != null">brand_id = #{brandId},</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="deleteBrandProductById" parameterType="Long">
|
||||
delete from brand_product where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBrandProductByIds" parameterType="String">
|
||||
delete from brand_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.CategoryAttributeGroupMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.CategoryAttributeGroup" id="CategoryAttributeGroupResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="categoryId" column="category_id" />
|
||||
<result property="attributeGroupId" column="attribute_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="selectCategoryAttributeGroupVo">
|
||||
select id, category_id, attribute_group_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="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
<if test="attributeGroupId != null "> and attribute_group_id = #{attributeGroupId}</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="categoryId != null">category_id,</if>
|
||||
<if test="attributeGroupId != null">attribute_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="categoryId != null">#{categoryId},</if>
|
||||
<if test="attributeGroupId != null">#{attributeGroupId},</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="categoryId != null">category_id = #{categoryId},</if>
|
||||
<if test="attributeGroupId != null">attribute_group_id = #{attributeGroupId},</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="categoryId" column="category_id" />
|
||||
<result property="attributeId" column="attribute_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, category_id, attribute_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="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
<if test="attributeId != null "> and attribute_id = #{attributeId}</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="categoryId != null">category_id,</if>
|
||||
<if test="attributeId != null">attribute_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="attributeId != null">#{attributeId},</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="categoryId != null">category_id = #{categoryId},</if>
|
||||
<if test="attributeId != null">attribute_id = #{attributeId},</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,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.CategoryBrandMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.CategoryBrand" id="CategoryBrandResult">
|
||||
<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="selectCategoryBrandVo">
|
||||
select id, category_id, brand_id, remark, create_by, create_time, update_by, update_time from category_brand
|
||||
</sql>
|
||||
|
||||
<select id="selectCategoryBrandList" parameterType="com.muyu.product.domain.CategoryBrand" resultMap="CategoryBrandResult">
|
||||
<include refid="selectCategoryBrandVo"/>
|
||||
<where>
|
||||
<if test="categoryId != null "> and category_id = #{categoryId}</if>
|
||||
<if test="brandId != null "> and brand_id = #{brandId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCategoryBrandById" parameterType="Long" resultMap="CategoryBrandResult">
|
||||
<include refid="selectCategoryBrandVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCategoryBrand" parameterType="com.muyu.product.domain.CategoryBrand" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into category_brand
|
||||
<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">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">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateCategoryBrand" parameterType="com.muyu.product.domain.CategoryBrand">
|
||||
update category_brand
|
||||
<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">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="deleteCategoryBrandById" parameterType="Long">
|
||||
delete from category_brand where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCategoryBrandByIds" parameterType="String">
|
||||
delete from category_brand 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.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="introduction" column="introduction" />
|
||||
<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, introduction, 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>
|
||||
<if test="introduction != null and introduction != ''"> and introduction = #{introduction}</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">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="introduction != null">introduction,</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">#{name},</if>
|
||||
<if test="image != null">#{image},</if>
|
||||
<if test="parentId != null">#{parentId},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="introduction != null">#{introduction},</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">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="introduction != null">introduction = #{introduction},</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.CommentLikeMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.CommentLike" id="CommentLikeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="commentId" column="comment_id" />
|
||||
<result property="userId" column="user_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="selectCommentLikeVo">
|
||||
select id, comment_id, user_id, remark, create_by, create_time, update_by, update_time from comment_like
|
||||
</sql>
|
||||
|
||||
<select id="selectCommentLikeList" parameterType="com.muyu.product.domain.CommentLike" resultMap="CommentLikeResult">
|
||||
<include refid="selectCommentLikeVo"/>
|
||||
<where>
|
||||
<if test="commentId != null "> and comment_id = #{commentId}</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCommentLikeById" parameterType="Long" resultMap="CommentLikeResult">
|
||||
<include refid="selectCommentLikeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertCommentLike" parameterType="com.muyu.product.domain.CommentLike" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into comment_like
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="commentId != null">comment_id,</if>
|
||||
<if test="userId != null">user_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="commentId != null">#{commentId},</if>
|
||||
<if test="userId != null">#{userId},</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="updateCommentLike" parameterType="com.muyu.product.domain.CommentLike">
|
||||
update comment_like
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="commentId != null">comment_id = #{commentId},</if>
|
||||
<if test="userId != null">user_id = #{userId},</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="deleteCommentLikeById" parameterType="Long">
|
||||
delete from comment_like where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteCommentLikeByIds" parameterType="String">
|
||||
delete from comment_like 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.ProductAttributeMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.ProductAttribute" id="ProductAttributeResult">
|
||||
<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="selectProductAttributeVo">
|
||||
select id, product_id, attribute_id, value, remark, create_by, create_time, update_by, update_time from product_attribute
|
||||
</sql>
|
||||
|
||||
<select id="selectProductAttributeList" parameterType="com.muyu.product.domain.ProductAttribute" resultMap="ProductAttributeResult">
|
||||
<include refid="selectProductAttributeVo"/>
|
||||
<where>
|
||||
<if test="productId != null "> and product_id = #{productId}</if>
|
||||
<if test="attributeId != null and attributeId != ''"> and attribute_id = #{attributeId}</if>
|
||||
<if test="value != null and value != ''"> and value = #{value}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProductAttributeById" parameterType="Long" resultMap="ProductAttributeResult">
|
||||
<include refid="selectProductAttributeVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProductAttribute" parameterType="com.muyu.product.domain.ProductAttribute" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into product_attribute
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="attributeId != null and attributeId != ''">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 and attributeId != ''">#{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="updateProductAttribute" parameterType="com.muyu.product.domain.ProductAttribute">
|
||||
update product_attribute
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="attributeId != null and attributeId != ''">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="deleteProductAttributeById" parameterType="Long">
|
||||
delete from product_attribute where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProductAttributeByIds" parameterType="String">
|
||||
delete from product_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.ProductCommentMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.ProductComment" id="ProductCommentResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="images" column="images" />
|
||||
<result property="parentId" column="parent_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="selectProductCommentVo">
|
||||
select id, product_id, comment, images, parent_id, remark, create_by, create_time, update_by, update_time from product_comment
|
||||
</sql>
|
||||
|
||||
<select id="selectProductCommentList" parameterType="com.muyu.product.domain.ProductComment" resultMap="ProductCommentResult">
|
||||
<include refid="selectProductCommentVo"/>
|
||||
<where>
|
||||
<if test="productId != null "> and product_id = #{productId}</if>
|
||||
<if test="comment != null and comment != ''"> and comment = #{comment}</if>
|
||||
<if test="images != null and images != ''"> and images = #{images}</if>
|
||||
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProductCommentById" parameterType="Long" resultMap="ProductCommentResult">
|
||||
<include refid="selectProductCommentVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProductComment" parameterType="com.muyu.product.domain.ProductComment" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into product_comment
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="comment != null">comment,</if>
|
||||
<if test="images != null">images,</if>
|
||||
<if test="parentId != null">parent_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="productId != null">#{productId},</if>
|
||||
<if test="comment != null">#{comment},</if>
|
||||
<if test="images != null">#{images},</if>
|
||||
<if test="parentId != null">#{parentId},</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="updateProductComment" parameterType="com.muyu.product.domain.ProductComment">
|
||||
update product_comment
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="comment != null">comment = #{comment},</if>
|
||||
<if test="images != null">images = #{images},</if>
|
||||
<if test="parentId != null">parent_id = #{parentId},</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="deleteProductCommentById" parameterType="Long">
|
||||
delete from product_comment where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProductCommentByIds" parameterType="String">
|
||||
delete from product_comment where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
|
@ -0,0 +1,111 @@
|
|||
<?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.ProductMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.Product" id="ProductResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="describe" column="describe" />
|
||||
<result property="type" column="type" />
|
||||
<result property="image" column="image" />
|
||||
<result property="carouselImages" column="carousel_images" />
|
||||
<result property="status" column="status" />
|
||||
<result property="ruleId" column="rule_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="selectProductVo">
|
||||
select id, name, describe, type, image, carousel_images, status, rule_id, brand_id, remark, create_by, create_time, update_by, update_time from product
|
||||
</sql>
|
||||
|
||||
<select id="selectProductList" parameterType="com.muyu.product.domain.Product" resultMap="ProductResult">
|
||||
<include refid="selectProductVo"/>
|
||||
<where>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="describe != null and describe != ''"> and describe = #{describe}</if>
|
||||
<if test="type != null and type != ''"> and type = #{type}</if>
|
||||
<if test="image != null and image != ''"> and image = #{image}</if>
|
||||
<if test="carouselImages != null and carouselImages != ''"> and carousel_images = #{carouselImages}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="ruleId != null "> and rule_id = #{ruleId}</if>
|
||||
<if test="brandId != null "> and brand_id = #{brandId}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProductById" parameterType="Long" resultMap="ProductResult">
|
||||
<include refid="selectProductVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProduct" parameterType="com.muyu.product.domain.Product" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into product
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="name != null">name,</if>
|
||||
<if test="describe != null">describe,</if>
|
||||
<if test="type != null">type,</if>
|
||||
<if test="image != null">image,</if>
|
||||
<if test="carouselImages != null">carousel_images,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="ruleId != null">rule_id,</if>
|
||||
<if test="brandId != null">brand_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">#{name},</if>
|
||||
<if test="describe != null">#{describe},</if>
|
||||
<if test="type != null">#{type},</if>
|
||||
<if test="image != null">#{image},</if>
|
||||
<if test="carouselImages != null">#{carouselImages},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="ruleId != null">#{ruleId},</if>
|
||||
<if test="brandId != null">#{brandId},</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="updateProduct" parameterType="com.muyu.product.domain.Product">
|
||||
update product
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="describe != null">describe = #{describe},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="image != null">image = #{image},</if>
|
||||
<if test="carouselImages != null">carousel_images = #{carouselImages},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="ruleId != null">rule_id = #{ruleId},</if>
|
||||
<if test="brandId != null">brand_id = #{brandId},</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="deleteProductById" parameterType="Long">
|
||||
delete from product where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProductByIds" parameterType="String">
|
||||
delete from product 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.ProductSkuMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.ProductSku" id="ProductSkuResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="productId" column="product_id" />
|
||||
<result property="sku" column="sku" />
|
||||
<result property="stock" column="stock" />
|
||||
<result property="price" column="price" />
|
||||
<result property="image" column="image" />
|
||||
<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="selectProductSkuVo">
|
||||
select id, product_id, sku, stock, price, image, remark, create_by, create_time, update_by, update_time from product_sku
|
||||
</sql>
|
||||
|
||||
<select id="selectProductSkuList" parameterType="com.muyu.product.domain.ProductSku" resultMap="ProductSkuResult">
|
||||
<include refid="selectProductSkuVo"/>
|
||||
<where>
|
||||
<if test="productId != null "> and product_id = #{productId}</if>
|
||||
<if test="sku != null and sku != ''"> and sku = #{sku}</if>
|
||||
<if test="stock != null "> and stock = #{stock}</if>
|
||||
<if test="price != null "> and price = #{price}</if>
|
||||
<if test="image != null and image != ''"> and image = #{image}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectProductSkuById" parameterType="Long" resultMap="ProductSkuResult">
|
||||
<include refid="selectProductSkuVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertProductSku" parameterType="com.muyu.product.domain.ProductSku" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into product_sku
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="productId != null">product_id,</if>
|
||||
<if test="sku != null">sku,</if>
|
||||
<if test="stock != null">stock,</if>
|
||||
<if test="price != null">price,</if>
|
||||
<if test="image != null">image,</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="sku != null">#{sku},</if>
|
||||
<if test="stock != null">#{stock},</if>
|
||||
<if test="price != null">#{price},</if>
|
||||
<if test="image != null">#{image},</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="updateProductSku" parameterType="com.muyu.product.domain.ProductSku">
|
||||
update product_sku
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="productId != null">product_id = #{productId},</if>
|
||||
<if test="sku != null">sku = #{sku},</if>
|
||||
<if test="stock != null">stock = #{stock},</if>
|
||||
<if test="price != null">price = #{price},</if>
|
||||
<if test="image != null">image = #{image},</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="deleteProductSkuById" parameterType="Long">
|
||||
delete from product_sku where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteProductSkuByIds" parameterType="String">
|
||||
delete from product_sku 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.RuleAttrMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.RuleAttr" id="RuleAttrResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="ruleId" column="rule_id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="attrValue" column="attr_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="selectRuleAttrVo">
|
||||
select id, rule_id, name, attr_value, remark, create_by, create_time, update_by, update_time from rule_attr
|
||||
</sql>
|
||||
|
||||
<select id="selectRuleAttrList" parameterType="com.muyu.product.domain.RuleAttr" resultMap="RuleAttrResult">
|
||||
<include refid="selectRuleAttrVo"/>
|
||||
<where>
|
||||
<if test="ruleId != null "> and rule_id = #{ruleId}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="attrValue != null and attrValue != ''"> and attr_value = #{attrValue}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectRuleAttrById" parameterType="Long" resultMap="RuleAttrResult">
|
||||
<include refid="selectRuleAttrVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertRuleAttr" parameterType="com.muyu.product.domain.RuleAttr" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into rule_attr
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="ruleId != null">rule_id,</if>
|
||||
<if test="name != null">name,</if>
|
||||
<if test="attrValue != null">attr_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="ruleId != null">#{ruleId},</if>
|
||||
<if test="name != null">#{name},</if>
|
||||
<if test="attrValue != null">#{attrValue},</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="updateRuleAttr" parameterType="com.muyu.product.domain.RuleAttr">
|
||||
update rule_attr
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="ruleId != null">rule_id = #{ruleId},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="attrValue != null">attr_value = #{attrValue},</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="deleteRuleAttrById" parameterType="Long">
|
||||
delete from rule_attr where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRuleAttrByIds" parameterType="String">
|
||||
delete from rule_attr 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.RuleMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.Rule" id="RuleResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<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="selectRuleVo">
|
||||
select id, name, status, 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>
|
||||
<if test="status != null and status != ''"> and status = #{status}</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">name,</if>
|
||||
<if test="status != null">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">#{name},</if>
|
||||
<if test="status != null">#{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="updateRule" parameterType="com.muyu.product.domain.Rule">
|
||||
update rule
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="status != null">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="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>
|
Loading…
Reference in New Issue