Default Changelist

day_01
yuanjunzhe 2024-03-01 09:56:22 +08:00
parent db11f3d381
commit 7c0c4e8348
85 changed files with 6913 additions and 0 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,105 @@
package com.muyu.product.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.product.domain.Attribute;
import com.muyu.product.service.IAttributeService;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author 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));
}
}

View File

@ -0,0 +1,105 @@
package com.muyu.product.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.product.domain.AttributeGroup;
import com.muyu.product.service.IAttributeGroupService;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
import com.muyu.common.core.web.page.TableDataInfo;
/**
* Controller
*
* @author 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));
}
}

View File

@ -0,0 +1,105 @@
package com.muyu.product.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.product.domain.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));
}
}

View File

@ -0,0 +1,103 @@
package com.muyu.product.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.product.domain.CategoryInfo;
import com.muyu.product.service.ICategoryInfoService;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.utils.poi.ExcelUtil;
/**
* Controller
*
* @author 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));
}
}

View File

@ -0,0 +1,105 @@
package com.muyu.product.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.product.domain.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));
}
}

View File

@ -0,0 +1,105 @@
package com.muyu.product.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.product.domain.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));
}
}

View File

@ -0,0 +1,105 @@
package com.muyu.product.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.product.domain.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));
}
}

View File

@ -0,0 +1,105 @@
package com.muyu.product.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.product.domain.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));
}
}

View File

@ -0,0 +1,105 @@
package com.muyu.product.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.muyu.common.log.annotation.Log;
import com.muyu.common.log.enums.BusinessType;
import com.muyu.common.security.annotation.RequiresPermissions;
import com.muyu.product.domain.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));
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.AttributeGroupMapper;
import com.muyu.product.domain.AttributeGroup;
import com.muyu.product.service.IAttributeGroupService;
/**
* Service
*
* @author 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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.AttributeMapper;
import com.muyu.product.domain.Attribute;
import com.muyu.product.service.IAttributeService;
/**
* Service
*
* @author 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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.CategoryAttributeGroupMapper;
import com.muyu.product.domain.CategoryAttributeGroup;
import com.muyu.product.service.ICategoryAttributeGroupService;
/**
* Service
*
* @author 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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.CategoryAttributeMapper;
import com.muyu.product.domain.CategoryAttribute;
import com.muyu.product.service.ICategoryAttributeService;
/**
* Service
*
* @author 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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.CategoryInfoMapper;
import com.muyu.product.domain.CategoryInfo;
import com.muyu.product.service.ICategoryInfoService;
/**
* Service
*
* @author 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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.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);
}
}

View File

@ -0,0 +1,96 @@
package com.muyu.product.service.impl;
import java.util.List;
import com.muyu.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.muyu.product.mapper.RuleMapper;
import com.muyu.product.domain.Rule;
import com.muyu.product.service.IRuleService;
/**
* Service
*
* @author 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);
}
}

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.AttributeGroupMapper">
<resultMap type="com.muyu.product.domain.AttributeGroup" id="AttributeGroupResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="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>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.AttributeMapper">
<resultMap type="com.muyu.product.domain.Attribute" id="AttributeResult">
<result property="id" column="id" />
<result property="name" column="name" />
<result property="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>

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.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>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.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>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.CategoryAttributeGroupMapper">
<resultMap type="com.muyu.product.domain.CategoryAttributeGroup" id="CategoryAttributeGroupResult">
<result property="id" column="id" />
<result property="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>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.CategoryAttributeMapper">
<resultMap type="com.muyu.product.domain.CategoryAttribute" id="CategoryAttributeResult">
<result property="id" column="id" />
<result property="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>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.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>

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.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>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.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>

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.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>

View File

@ -0,0 +1,91 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.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>

View File

@ -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>

View File

@ -0,0 +1,96 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.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>

View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.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>

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.muyu.product.mapper.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>