builder构建体
parent
8cee0c4e43
commit
d3c9aeee59
|
@ -204,7 +204,7 @@ public class SysDept extends BaseEntity {
|
||||||
.append("email", getEmail())
|
.append("email", getEmail())
|
||||||
.append("status", getStatus())
|
.append("status", getStatus())
|
||||||
.append("delFlag", getDelFlag())
|
.append("delFlag", getDelFlag())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", getUpdateBy())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -175,7 +175,7 @@ public class SysDictData extends BaseEntity {
|
||||||
.append("listClass", getListClass())
|
.append("listClass", getListClass())
|
||||||
.append("isDefault", getIsDefault())
|
.append("isDefault", getIsDefault())
|
||||||
.append("status", getStatus())
|
.append("status", getStatus())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", getUpdateBy())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class SysDictType extends BaseEntity {
|
||||||
.append("dictName", getDictName())
|
.append("dictName", getDictName())
|
||||||
.append("dictType", getDictType())
|
.append("dictType", getDictType())
|
||||||
.append("status", getStatus())
|
.append("status", getStatus())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", getUpdateBy())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -234,7 +234,7 @@ public class SysRole extends BaseEntity {
|
||||||
.append("deptCheckStrictly", isDeptCheckStrictly())
|
.append("deptCheckStrictly", isDeptCheckStrictly())
|
||||||
.append("status", getStatus())
|
.append("status", getStatus())
|
||||||
.append("delFlag", getDelFlag())
|
.append("delFlag", getDelFlag())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", getUpdateBy())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -317,7 +317,7 @@ public class SysUser extends BaseEntity {
|
||||||
.append("delFlag", getDelFlag())
|
.append("delFlag", getDelFlag())
|
||||||
.append("loginIp", getLoginIp())
|
.append("loginIp", getLoginIp())
|
||||||
.append("loginDate", getLoginDate())
|
.append("loginDate", getLoginDate())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", getUpdateBy())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -4,6 +4,11 @@ import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.TreeEntity;
|
import com.muyu.common.core.web.domain.TreeEntity;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
@ -13,6 +18,11 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @author Saisai
|
* @author Saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class Address extends TreeEntity
|
public class Address extends TreeEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -62,7 +72,7 @@ public class Address extends TreeEntity
|
||||||
.append("id", getId())
|
.append("id", getId())
|
||||||
.append("addressName", getAddressName())
|
.append("addressName", getAddressName())
|
||||||
.append("sonId", getSonId())
|
.append("sonId", getSonId())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -4,6 +4,11 @@ import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
@ -13,6 +18,11 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @author Saisai
|
* @author Saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class AsAttributeGroup extends BaseEntity
|
public class AsAttributeGroup extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -63,7 +73,7 @@ public class AsAttributeGroup extends BaseEntity
|
||||||
.append("attributeId", getAttributeId())
|
.append("attributeId", getAttributeId())
|
||||||
.append("groupId", getGroupId())
|
.append("groupId", getGroupId())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -63,7 +63,7 @@ public class Attribute extends BaseEntity
|
||||||
.append("code", getCode())
|
.append("code", getCode())
|
||||||
.append("name", getName())
|
.append("name", getName())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -1,17 +1,30 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 属性组对象 attribute_group
|
* 属性组对象 attribute_group
|
||||||
*
|
*
|
||||||
* @author muyu
|
* @author muyu
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class AttributeGroup extends BaseEntity
|
public class AttributeGroup extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -23,6 +36,8 @@ public class AttributeGroup extends BaseEntity
|
||||||
@Excel(name = "组名")
|
@Excel(name = "组名")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
|
private List<Long> checkedAttributeIds;
|
||||||
|
|
||||||
/** 状态 */
|
/** 状态 */
|
||||||
@Excel(name = "状态")
|
@Excel(name = "状态")
|
||||||
private String states;
|
private String states;
|
||||||
|
@ -62,10 +77,19 @@ public class AttributeGroup extends BaseEntity
|
||||||
.append("name", getName())
|
.append("name", getName())
|
||||||
.append("states", getStates())
|
.append("states", getStates())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// public static AttributeGroup queryBuilder (AttributeGroupReq attributeGroupReq) {
|
||||||
|
// return AttributeGroup.builder()
|
||||||
|
// .createBy(attributeGroupReq)
|
||||||
|
// .createTime(new Date())
|
||||||
|
// .build().
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
@ -12,6 +17,11 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @author Saisai
|
* @author Saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class AttributeProduct extends BaseEntity
|
public class AttributeProduct extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -76,7 +86,7 @@ public class AttributeProduct extends BaseEntity
|
||||||
.append("attributeId", getAttributeId())
|
.append("attributeId", getAttributeId())
|
||||||
.append("value", getValue())
|
.append("value", getValue())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -1,113 +1,145 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import com.muyu.product.domain.req.BrandReq;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 品牌对象 brand
|
* 品牌对象 brand
|
||||||
*
|
*
|
||||||
* @author Saisai
|
* @author Saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
public class Brand extends BaseEntity
|
|
||||||
{
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class Brand extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** 主键 */
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 品牌名称 */
|
/**
|
||||||
|
* 品牌名称
|
||||||
|
*/
|
||||||
@Excel(name = "品牌名称")
|
@Excel(name = "品牌名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/** 图像标识 */
|
/**
|
||||||
|
* 图像标识
|
||||||
|
*/
|
||||||
@Excel(name = "图像标识")
|
@Excel(name = "图像标识")
|
||||||
private String logo;
|
private String logo;
|
||||||
|
|
||||||
/** 描述 */
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
@Excel(name = "描述")
|
@Excel(name = "描述")
|
||||||
private String introduction;
|
private String introduction;
|
||||||
|
|
||||||
/** 品牌启用 */
|
/**
|
||||||
|
* 品牌启用
|
||||||
|
*/
|
||||||
@Excel(name = "品牌启用")
|
@Excel(name = "品牌启用")
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
/** 公司地址 */
|
/**
|
||||||
|
* 公司地址
|
||||||
|
*/
|
||||||
@Excel(name = "公司地址")
|
@Excel(name = "公司地址")
|
||||||
private String addressName;
|
private String addressName;
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id) {
|
||||||
{
|
|
||||||
this.id = id;
|
this.id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getId()
|
public Long getId() {
|
||||||
{
|
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
public void setName(String name)
|
|
||||||
{
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getName()
|
public String getName() {
|
||||||
{
|
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
public void setLogo(String logo)
|
|
||||||
{
|
public void setLogo(String logo) {
|
||||||
this.logo = logo;
|
this.logo = logo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getLogo()
|
public String getLogo() {
|
||||||
{
|
|
||||||
return logo;
|
return logo;
|
||||||
}
|
}
|
||||||
public void setIntroduction(String introduction)
|
|
||||||
{
|
public void setIntroduction(String introduction) {
|
||||||
this.introduction = introduction;
|
this.introduction = introduction;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getIntroduction()
|
public String getIntroduction() {
|
||||||
{
|
|
||||||
return introduction;
|
return introduction;
|
||||||
}
|
}
|
||||||
public void setStatus(String status)
|
|
||||||
{
|
public void setStatus(String status) {
|
||||||
this.status = status;
|
this.status = status;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStatus()
|
public String getStatus() {
|
||||||
{
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
public void setAddressName(String addressName)
|
|
||||||
{
|
public void setAddressName(String addressName) {
|
||||||
this.addressName = addressName;
|
this.addressName = addressName;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getAddressName()
|
public String getAddressName() {
|
||||||
{
|
|
||||||
return addressName;
|
return addressName;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||||
.append("id", getId())
|
.append("id", getId())
|
||||||
.append("name", getName())
|
.append("name", getName())
|
||||||
.append("logo", getLogo())
|
.append("logo", getLogo())
|
||||||
.append("introduction", getIntroduction())
|
.append("introduction", getIntroduction())
|
||||||
.append("status", getStatus())
|
.append("status", getStatus())
|
||||||
.append("addressName", getAddressName())
|
.append("addressName", getAddressName())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//添加数据构造体
|
||||||
|
public static Brand saveBuilder(BrandReq brandReq) {
|
||||||
|
return Brand.builder()
|
||||||
|
.id(brandReq.getId())
|
||||||
|
.name(brandReq.getName())
|
||||||
|
.logo(brandReq.getLogo())
|
||||||
|
.introduction(brandReq.getIntroduction())
|
||||||
|
.status(brandReq.getStatus())
|
||||||
|
.createBy(SecurityUtils.getUsername())
|
||||||
|
.createTime(new Date())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
@ -12,6 +17,11 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @author Saisai
|
* @author Saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class BrandCategory extends BaseEntity
|
public class BrandCategory extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -62,7 +72,7 @@ public class BrandCategory extends BaseEntity
|
||||||
.append("categoryId", getCategoryId())
|
.append("categoryId", getCategoryId())
|
||||||
.append("brandId", getBrandId())
|
.append("brandId", getBrandId())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
@ -12,6 +17,11 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @author Saisai
|
* @author Saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class CategoryAttribute extends BaseEntity
|
public class CategoryAttribute extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -62,7 +72,7 @@ public class CategoryAttribute extends BaseEntity
|
||||||
.append("attributeId", getAttributeId())
|
.append("attributeId", getAttributeId())
|
||||||
.append("categoryId", getCategoryId())
|
.append("categoryId", getCategoryId())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
@ -12,6 +17,11 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @author saisai
|
* @author saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class CategoryAttributeGroup extends BaseEntity
|
public class CategoryAttributeGroup extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -62,7 +72,7 @@ public class CategoryAttributeGroup extends BaseEntity
|
||||||
.append("attributeGroupId", getAttributeGroupId())
|
.append("attributeGroupId", getAttributeGroupId())
|
||||||
.append("categoryId", getCategoryId())
|
.append("categoryId", getCategoryId())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -3,6 +3,11 @@ package com.muyu.product.domain;
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.TreeEntity;
|
import com.muyu.common.core.web.domain.TreeEntity;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
@ -12,6 +17,11 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @author Saisai
|
* @author Saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class CategoryInfo extends TreeEntity
|
public class CategoryInfo extends TreeEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -77,7 +87,7 @@ public class CategoryInfo extends TreeEntity
|
||||||
.append("parentId", getParentId())
|
.append("parentId", getParentId())
|
||||||
.append("status", getStatus())
|
.append("status", getStatus())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
@ -12,6 +17,11 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @author Saisai
|
* @author Saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class ProductCategory extends BaseEntity
|
public class ProductCategory extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -62,7 +72,7 @@ public class ProductCategory extends BaseEntity
|
||||||
.append("categoryId", getCategoryId())
|
.append("categoryId", getCategoryId())
|
||||||
.append("productId", getProductId())
|
.append("productId", getProductId())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
@ -14,6 +19,11 @@ import java.util.Date;
|
||||||
* @author Saisai
|
* @author Saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class ProductInfo extends BaseEntity
|
public class ProductInfo extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
@ -12,6 +17,11 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @author saisai
|
* @author saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class Rule extends BaseEntity
|
public class Rule extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -48,7 +58,7 @@ public class Rule extends BaseEntity
|
||||||
.append("id", getId())
|
.append("id", getId())
|
||||||
.append("name", getName())
|
.append("name", getName())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -1,8 +1,13 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import com.muyu.common.security.utils.SecurityUtils;
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
@ -12,6 +17,11 @@ import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
* @author saisai
|
* @author saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class RuleProduct extends BaseEntity
|
public class RuleProduct extends BaseEntity
|
||||||
{
|
{
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
@ -76,7 +86,7 @@ public class RuleProduct extends BaseEntity
|
||||||
.append("ruleId", getRuleId())
|
.append("ruleId", getRuleId())
|
||||||
.append("ruleValue", getRuleValue())
|
.append("ruleValue", getRuleValue())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", SecurityUtils.getUsername())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", SecurityUtils.getUsername())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
|
|
|
@ -0,0 +1,48 @@
|
||||||
|
package com.muyu.product.domain.req;
|
||||||
|
|
||||||
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性组对象 attribute_group
|
||||||
|
*
|
||||||
|
* @author muyu
|
||||||
|
* @date 2024-02-29
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
public class AttributeGroupReq extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 组名 */
|
||||||
|
@Excel(name = "组名")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
private List<Long> checkedAttributeIds;
|
||||||
|
|
||||||
|
/** 状态 */
|
||||||
|
@Excel(name = "状态")
|
||||||
|
private String states;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,69 @@
|
||||||
|
package com.muyu.product.domain.req;
|
||||||
|
|
||||||
|
import lombok.AccessLevel;
|
||||||
|
import lombok.Builder;
|
||||||
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.experimental.SuperBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
|
||||||
|
import java.lang.annotation.Annotation;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ClassName BrandReq
|
||||||
|
* @Description 描述
|
||||||
|
* @Author SaiSai.Liu
|
||||||
|
* @Date 2024/3/1/0001 9:59
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@SuperBuilder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
public class BrandReq {
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键
|
||||||
|
*/
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 品牌名称
|
||||||
|
*/
|
||||||
|
@Excel(name = "品牌名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图像标识
|
||||||
|
*/
|
||||||
|
@Excel(name = "图像标识")
|
||||||
|
private String logo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 描述
|
||||||
|
*/
|
||||||
|
@Excel(name = "描述")
|
||||||
|
private String introduction;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 品牌启用
|
||||||
|
*/
|
||||||
|
@Excel(name = "品牌启用")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 公司地址
|
||||||
|
*/
|
||||||
|
@Excel(name = "公司地址")
|
||||||
|
private String addressName;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -1,26 +1,20 @@
|
||||||
package com.muyu.product.controller;
|
package com.muyu.product.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import com.muyu.common.core.domain.Result;
|
||||||
import java.io.IOException;
|
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import com.muyu.common.core.web.controller.BaseController;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
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.annotation.Log;
|
||||||
import com.muyu.common.log.enums.BusinessType;
|
import com.muyu.common.log.enums.BusinessType;
|
||||||
import com.muyu.common.security.annotation.RequiresPermissions;
|
import com.muyu.common.security.annotation.RequiresPermissions;
|
||||||
import com.muyu.product.domain.Brand;
|
import com.muyu.product.domain.Brand;
|
||||||
|
import com.muyu.product.domain.req.BrandReq;
|
||||||
import com.muyu.product.service.IBrandService;
|
import com.muyu.product.service.IBrandService;
|
||||||
import com.muyu.common.core.web.controller.BaseController;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import com.muyu.common.core.domain.Result;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
|
||||||
import com.muyu.common.core.web.page.TableDataInfo;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 品牌Controller
|
* 品牌Controller
|
||||||
|
@ -76,9 +70,9 @@ public class BrandController extends BaseController
|
||||||
@RequiresPermissions("product:brand:add")
|
@RequiresPermissions("product:brand:add")
|
||||||
@Log(title = "品牌", businessType = BusinessType.INSERT)
|
@Log(title = "品牌", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public Result add(@RequestBody Brand brand)
|
public Result add(@RequestBody BrandReq brandReq)
|
||||||
{
|
{
|
||||||
return toAjax(brandService.insertBrand(brand));
|
return toAjax(brandService.insertBrand(Brand.saveBuilder(brandReq)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -87,9 +81,9 @@ public class BrandController extends BaseController
|
||||||
@RequiresPermissions("product:brand:edit")
|
@RequiresPermissions("product:brand:edit")
|
||||||
@Log(title = "品牌", businessType = BusinessType.UPDATE)
|
@Log(title = "品牌", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public Result edit(@RequestBody Brand brand)
|
public Result edit(@RequestBody BrandReq brandReq)
|
||||||
{
|
{
|
||||||
return toAjax(brandService.updateBrand(brand));
|
return toAjax(brandService.updateBrand(Brand.saveBuilder(brandReq)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -2,18 +2,19 @@ package com.muyu.product.service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.muyu.product.domain.Brand;
|
import com.muyu.product.domain.Brand;
|
||||||
|
import com.muyu.product.domain.req.BrandReq;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 品牌Service接口
|
* 品牌Service接口
|
||||||
*
|
*
|
||||||
* @author Saisai
|
* @author Saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
public interface IBrandService
|
public interface IBrandService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询品牌
|
* 查询品牌
|
||||||
*
|
*
|
||||||
* @param id 品牌主键
|
* @param id 品牌主键
|
||||||
* @return 品牌
|
* @return 品牌
|
||||||
*/
|
*/
|
||||||
|
@ -21,7 +22,7 @@ public interface IBrandService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询品牌列表
|
* 查询品牌列表
|
||||||
*
|
*
|
||||||
* @param brand 品牌
|
* @param brand 品牌
|
||||||
* @return 品牌集合
|
* @return 品牌集合
|
||||||
*/
|
*/
|
||||||
|
@ -29,7 +30,7 @@ public interface IBrandService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增品牌
|
* 新增品牌
|
||||||
*
|
*
|
||||||
* @param brand 品牌
|
* @param brand 品牌
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -37,7 +38,7 @@ public interface IBrandService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改品牌
|
* 修改品牌
|
||||||
*
|
*
|
||||||
* @param brand 品牌
|
* @param brand 品牌
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -45,7 +46,7 @@ public interface IBrandService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除品牌
|
* 批量删除品牌
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的品牌主键集合
|
* @param ids 需要删除的品牌主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -53,7 +54,7 @@ public interface IBrandService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除品牌信息
|
* 删除品牌信息
|
||||||
*
|
*
|
||||||
* @param id 品牌主键
|
* @param id 品牌主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,6 +2,8 @@ package com.muyu.product.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.muyu.common.core.utils.DateUtils;
|
import com.muyu.common.core.utils.DateUtils;
|
||||||
|
import com.muyu.product.domain.AsAttributeGroup;
|
||||||
|
import com.muyu.product.mapper.AsAttributeGroupMapper;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.muyu.product.mapper.AttributeGroupMapper;
|
import com.muyu.product.mapper.AttributeGroupMapper;
|
||||||
|
@ -20,6 +22,9 @@ public class AttributeGroupServiceImpl implements IAttributeGroupService
|
||||||
@Autowired
|
@Autowired
|
||||||
private AttributeGroupMapper attributeGroupMapper;
|
private AttributeGroupMapper attributeGroupMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private AsAttributeGroupMapper asAttributeGroupMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询属性组
|
* 查询属性组
|
||||||
*
|
*
|
||||||
|
@ -54,6 +59,11 @@ public class AttributeGroupServiceImpl implements IAttributeGroupService
|
||||||
public int insertAttributeGroup(AttributeGroup attributeGroup)
|
public int insertAttributeGroup(AttributeGroup attributeGroup)
|
||||||
{
|
{
|
||||||
attributeGroup.setCreateTime(DateUtils.getNowDate());
|
attributeGroup.setCreateTime(DateUtils.getNowDate());
|
||||||
|
int i = attributeGroupMapper.insertAttributeGroup(attributeGroup);
|
||||||
|
AsAttributeGroup asAttributeGroup = new AsAttributeGroup();
|
||||||
|
|
||||||
|
// asAttributeGroupMapper.insertAsAttributeGroup();
|
||||||
|
|
||||||
return attributeGroupMapper.insertAttributeGroup(attributeGroup);
|
return attributeGroupMapper.insertAttributeGroup(attributeGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue