商品属性
parent
5e22c230d6
commit
3d2c517729
|
@ -24,6 +24,14 @@
|
||||||
<groupId>com.muyu</groupId>
|
<groupId>com.muyu</groupId>
|
||||||
<artifactId>muyu-common-core</artifactId>
|
<artifactId>muyu-common-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-security</artifactId>
|
||||||
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.muyu</groupId>
|
||||||
|
<artifactId>muyu-common-security</artifactId>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性与组中间对象 as_attribute_group
|
||||||
|
*
|
||||||
|
* @author CuiShiYu
|
||||||
|
* @date 2024-03-01
|
||||||
|
*/
|
||||||
|
public class AsAttributeGroup extends BaseEntity
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 主键 */
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/** 组id */
|
||||||
|
@Excel(name = "组id")
|
||||||
|
private Long groupId;
|
||||||
|
|
||||||
|
/** 属性id */
|
||||||
|
@Excel(name = "属性id")
|
||||||
|
private Long attributeId;
|
||||||
|
|
||||||
|
public void setId(Long id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
public void setGroupId(Long groupId)
|
||||||
|
{
|
||||||
|
this.groupId = groupId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getGroupId()
|
||||||
|
{
|
||||||
|
return groupId;
|
||||||
|
}
|
||||||
|
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("groupId", getGroupId())
|
||||||
|
.append("attributeId", getAttributeId())
|
||||||
|
.append("remark", getRemark())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createTime", getCreateTime())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateTime", getUpdateTime())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
@ -61,7 +62,7 @@ public class AsBrandProject extends BaseEntity
|
||||||
.append("brandId", getBrandId())
|
.append("brandId", getBrandId())
|
||||||
.append("projectId", getProjectId())
|
.append("projectId", getProjectId())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.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())
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -9,7 +9,7 @@ import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
* 商品属性对象 attribute_info
|
* 商品属性对象 attribute_info
|
||||||
*
|
*
|
||||||
* @author CuiShiYu
|
* @author CuiShiYu
|
||||||
* @date 2024-02-29
|
* @date 2024-03-01
|
||||||
*/
|
*/
|
||||||
public class AttributeInfo extends BaseEntity
|
public class AttributeInfo extends BaseEntity
|
||||||
{
|
{
|
||||||
|
@ -18,14 +18,14 @@ public class AttributeInfo extends BaseEntity
|
||||||
/** 属性编号 */
|
/** 属性编号 */
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
/** 属性编码 */
|
||||||
|
@Excel(name = "属性编码")
|
||||||
|
private String code;
|
||||||
|
|
||||||
/** 属性名称 */
|
/** 属性名称 */
|
||||||
@Excel(name = "属性名称")
|
@Excel(name = "属性名称")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
/** 分组 */
|
|
||||||
@Excel(name = "分组")
|
|
||||||
private Long groupId;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -35,6 +35,15 @@ public class AttributeInfo extends BaseEntity
|
||||||
{
|
{
|
||||||
return id;
|
return id;
|
||||||
}
|
}
|
||||||
|
public void setCode(String code)
|
||||||
|
{
|
||||||
|
this.code = code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode()
|
||||||
|
{
|
||||||
|
return code;
|
||||||
|
}
|
||||||
public void setName(String name)
|
public void setName(String name)
|
||||||
{
|
{
|
||||||
this.name = name;
|
this.name = name;
|
||||||
|
@ -44,22 +53,13 @@ public class AttributeInfo extends BaseEntity
|
||||||
{
|
{
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
public void setGroupId(Long groupId)
|
|
||||||
{
|
|
||||||
this.groupId = groupId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getGroupId()
|
|
||||||
{
|
|
||||||
return groupId;
|
|
||||||
}
|
|
||||||
|
|
||||||
@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("code", getCode())
|
||||||
.append("name", getName())
|
.append("name", getName())
|
||||||
.append("groupId", getGroupId())
|
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
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 com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.muyu.product.mapper;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.muyu.product.domain.AsAttributeGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性与组中间Mapper接口
|
||||||
|
*
|
||||||
|
* @author CuiShiYu
|
||||||
|
* @date 2024-03-01
|
||||||
|
*/
|
||||||
|
public interface AsAttributeGroupMapper
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询属性与组中间
|
||||||
|
*
|
||||||
|
* @param id 属性与组中间主键
|
||||||
|
* @return 属性与组中间
|
||||||
|
*/
|
||||||
|
public AsAttributeGroup selectAsAttributeGroupById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询属性与组中间列表
|
||||||
|
*
|
||||||
|
* @param asAttributeGroup 属性与组中间
|
||||||
|
* @return 属性与组中间集合
|
||||||
|
*/
|
||||||
|
public List<AsAttributeGroup> selectAsAttributeGroupList(AsAttributeGroup asAttributeGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增属性与组中间
|
||||||
|
*
|
||||||
|
* @param asAttributeGroup 属性与组中间
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertAsAttributeGroup(AsAttributeGroup asAttributeGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改属性与组中间
|
||||||
|
*
|
||||||
|
* @param asAttributeGroup 属性与组中间
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateAsAttributeGroup(AsAttributeGroup asAttributeGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除属性与组中间
|
||||||
|
*
|
||||||
|
* @param id 属性与组中间主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteAsAttributeGroupById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除属性与组中间
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的数据主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteAsAttributeGroupByIds(Long[] ids);
|
||||||
|
}
|
|
@ -0,0 +1,61 @@
|
||||||
|
package com.muyu.product.service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.muyu.product.domain.AsAttributeGroup;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性与组中间Service接口
|
||||||
|
*
|
||||||
|
* @author CuiShiYu
|
||||||
|
* @date 2024-03-01
|
||||||
|
*/
|
||||||
|
public interface IAsAttributeGroupService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询属性与组中间
|
||||||
|
*
|
||||||
|
* @param id 属性与组中间主键
|
||||||
|
* @return 属性与组中间
|
||||||
|
*/
|
||||||
|
public AsAttributeGroup selectAsAttributeGroupById(Long id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询属性与组中间列表
|
||||||
|
*
|
||||||
|
* @param asAttributeGroup 属性与组中间
|
||||||
|
* @return 属性与组中间集合
|
||||||
|
*/
|
||||||
|
public List<AsAttributeGroup> selectAsAttributeGroupList(AsAttributeGroup asAttributeGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增属性与组中间
|
||||||
|
*
|
||||||
|
* @param asAttributeGroup 属性与组中间
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int insertAsAttributeGroup(AsAttributeGroup asAttributeGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改属性与组中间
|
||||||
|
*
|
||||||
|
* @param asAttributeGroup 属性与组中间
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateAsAttributeGroup(AsAttributeGroup asAttributeGroup);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除属性与组中间
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的属性与组中间主键集合
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteAsAttributeGroupByIds(Long[] ids);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除属性与组中间信息
|
||||||
|
*
|
||||||
|
* @param id 属性与组中间主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int deleteAsAttributeGroupById(Long id);
|
||||||
|
}
|
|
@ -0,0 +1,99 @@
|
||||||
|
package com.muyu.product.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import com.muyu.common.core.utils.DateUtils;
|
||||||
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.muyu.product.mapper.AsAttributeGroupMapper;
|
||||||
|
import com.muyu.product.domain.AsAttributeGroup;
|
||||||
|
import com.muyu.product.service.IAsAttributeGroupService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 属性与组中间Service业务层处理
|
||||||
|
*
|
||||||
|
* @author CuiShiYu
|
||||||
|
* @date 2024-03-01
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class AsAttributeGroupServiceImpl implements IAsAttributeGroupService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private AsAttributeGroupMapper asAttributeGroupMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询属性与组中间
|
||||||
|
*
|
||||||
|
* @param id 属性与组中间主键
|
||||||
|
* @return 属性与组中间
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AsAttributeGroup selectAsAttributeGroupById(Long id)
|
||||||
|
{
|
||||||
|
return asAttributeGroupMapper.selectAsAttributeGroupById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询属性与组中间列表
|
||||||
|
*
|
||||||
|
* @param asAttributeGroup 属性与组中间
|
||||||
|
* @return 属性与组中间
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<AsAttributeGroup> selectAsAttributeGroupList(AsAttributeGroup asAttributeGroup)
|
||||||
|
{
|
||||||
|
return asAttributeGroupMapper.selectAsAttributeGroupList(asAttributeGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增属性与组中间
|
||||||
|
*
|
||||||
|
* @param asAttributeGroup 属性与组中间
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int insertAsAttributeGroup(AsAttributeGroup asAttributeGroup)
|
||||||
|
{
|
||||||
|
asAttributeGroup.setCreateTime(DateUtils.getNowDate());
|
||||||
|
asAttributeGroup.setCreateBy(SecurityUtils.getUsername());
|
||||||
|
return asAttributeGroupMapper.insertAsAttributeGroup(asAttributeGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改属性与组中间
|
||||||
|
*
|
||||||
|
* @param asAttributeGroup 属性与组中间
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int updateAsAttributeGroup(AsAttributeGroup asAttributeGroup)
|
||||||
|
{
|
||||||
|
asAttributeGroup.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
asAttributeGroup.setUpdateBy(SecurityUtils.getUsername());
|
||||||
|
return asAttributeGroupMapper.updateAsAttributeGroup(asAttributeGroup);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 批量删除属性与组中间
|
||||||
|
*
|
||||||
|
* @param ids 需要删除的属性与组中间主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteAsAttributeGroupByIds(Long[] ids)
|
||||||
|
{
|
||||||
|
return asAttributeGroupMapper.deleteAsAttributeGroupByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除属性与组中间信息
|
||||||
|
*
|
||||||
|
* @param id 属性与组中间主键
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int deleteAsAttributeGroupById(Long id)
|
||||||
|
{
|
||||||
|
return asAttributeGroupMapper.deleteAsAttributeGroupById(id);
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,6 +2,7 @@ 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.common.security.utils.SecurityUtils;
|
||||||
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;
|
||||||
|
@ -54,6 +55,7 @@ public class AttributeGroupServiceImpl implements IAttributeGroupService
|
||||||
public int insertAttributeGroup(AttributeGroup attributeGroup)
|
public int insertAttributeGroup(AttributeGroup attributeGroup)
|
||||||
{
|
{
|
||||||
attributeGroup.setCreateTime(DateUtils.getNowDate());
|
attributeGroup.setCreateTime(DateUtils.getNowDate());
|
||||||
|
attributeGroup.setCreateBy(SecurityUtils.getUsername());
|
||||||
return attributeGroupMapper.insertAttributeGroup(attributeGroup);
|
return attributeGroupMapper.insertAttributeGroup(attributeGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +69,7 @@ public class AttributeGroupServiceImpl implements IAttributeGroupService
|
||||||
public int updateAttributeGroup(AttributeGroup attributeGroup)
|
public int updateAttributeGroup(AttributeGroup attributeGroup)
|
||||||
{
|
{
|
||||||
attributeGroup.setUpdateTime(DateUtils.getNowDate());
|
attributeGroup.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
attributeGroup.setUpdateBy(SecurityUtils.getUsername());
|
||||||
return attributeGroupMapper.updateAttributeGroup(attributeGroup);
|
return attributeGroupMapper.updateAttributeGroup(attributeGroup);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ 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.common.security.utils.SecurityUtils;
|
||||||
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.AttributeInfoMapper;
|
import com.muyu.product.mapper.AttributeInfoMapper;
|
||||||
|
@ -54,6 +55,7 @@ public class AttributeInfoServiceImpl implements IAttributeInfoService
|
||||||
public int insertAttributeInfo(AttributeInfo attributeInfo)
|
public int insertAttributeInfo(AttributeInfo attributeInfo)
|
||||||
{
|
{
|
||||||
attributeInfo.setCreateTime(DateUtils.getNowDate());
|
attributeInfo.setCreateTime(DateUtils.getNowDate());
|
||||||
|
attributeInfo.setCreateBy(SecurityUtils.getUsername());
|
||||||
return attributeInfoMapper.insertAttributeInfo(attributeInfo);
|
return attributeInfoMapper.insertAttributeInfo(attributeInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +69,7 @@ public class AttributeInfoServiceImpl implements IAttributeInfoService
|
||||||
public int updateAttributeInfo(AttributeInfo attributeInfo)
|
public int updateAttributeInfo(AttributeInfo attributeInfo)
|
||||||
{
|
{
|
||||||
attributeInfo.setUpdateTime(DateUtils.getNowDate());
|
attributeInfo.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
attributeInfo.setUpdateBy(SecurityUtils.getUsername());
|
||||||
return attributeInfoMapper.updateAttributeInfo(attributeInfo);
|
return attributeInfoMapper.updateAttributeInfo(attributeInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
package com.muyu.product.service.impl;
|
package com.muyu.product.service.impl;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
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.common.security.utils.SecurityUtils;
|
||||||
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.BrandInfoMapper;
|
import com.muyu.product.mapper.BrandInfoMapper;
|
||||||
|
@ -32,6 +34,7 @@ public class BrandInfoServiceImpl implements IBrandInfoService
|
||||||
return brandInfoMapper.selectBrandInfoById(id);
|
return brandInfoMapper.selectBrandInfoById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询商品品牌列表
|
* 查询商品品牌列表
|
||||||
*
|
*
|
||||||
|
@ -54,6 +57,7 @@ public class BrandInfoServiceImpl implements IBrandInfoService
|
||||||
public int insertBrandInfo(BrandInfo brandInfo)
|
public int insertBrandInfo(BrandInfo brandInfo)
|
||||||
{
|
{
|
||||||
brandInfo.setCreateTime(DateUtils.getNowDate());
|
brandInfo.setCreateTime(DateUtils.getNowDate());
|
||||||
|
brandInfo.setCreateBy(SecurityUtils.getUsername());
|
||||||
return brandInfoMapper.insertBrandInfo(brandInfo);
|
return brandInfoMapper.insertBrandInfo(brandInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,6 +71,7 @@ public class BrandInfoServiceImpl implements IBrandInfoService
|
||||||
public int updateBrandInfo(BrandInfo brandInfo)
|
public int updateBrandInfo(BrandInfo brandInfo)
|
||||||
{
|
{
|
||||||
brandInfo.setUpdateTime(DateUtils.getNowDate());
|
brandInfo.setUpdateTime(DateUtils.getNowDate());
|
||||||
|
brandInfo.setUpdateBy(SecurityUtils.getUsername());
|
||||||
return brandInfoMapper.updateBrandInfo(brandInfo);
|
return brandInfoMapper.updateBrandInfo(brandInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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.AsAttributeGroupMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.muyu.product.domain.AsAttributeGroup" id="AsAttributeGroupResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="groupId" column="group_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="selectAsAttributeGroupVo">
|
||||||
|
select id, group_id, attribute_id, remark, create_by, create_time, update_by, update_time from as_attribute_group
|
||||||
|
</sql>
|
||||||
|
|
||||||
|
<select id="selectAsAttributeGroupList" parameterType="com.muyu.product.domain.AsAttributeGroup" resultMap="AsAttributeGroupResult">
|
||||||
|
<include refid="selectAsAttributeGroupVo"/>
|
||||||
|
<where>
|
||||||
|
<if test="groupId != null "> and group_id = #{groupId}</if>
|
||||||
|
<if test="attributeId != null "> and attribute_id = #{attributeId}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectAsAttributeGroupById" parameterType="Long" resultMap="AsAttributeGroupResult">
|
||||||
|
<include refid="selectAsAttributeGroupVo"/>
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<insert id="insertAsAttributeGroup" parameterType="com.muyu.product.domain.AsAttributeGroup" useGeneratedKeys="true" keyProperty="id">
|
||||||
|
insert into as_attribute_group
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="groupId != null">group_id,</if>
|
||||||
|
<if test="attributeId != null">attribute_id,</if>
|
||||||
|
<if test="remark != null">remark,</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
<if test="createTime != null">create_time,</if>
|
||||||
|
<if test="updateBy != null">update_by,</if>
|
||||||
|
<if test="updateTime != null">update_time,</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="groupId != null">#{groupId},</if>
|
||||||
|
<if test="attributeId != null">#{attributeId},</if>
|
||||||
|
<if test="remark != null">#{remark},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateAsAttributeGroup" parameterType="com.muyu.product.domain.AsAttributeGroup">
|
||||||
|
update as_attribute_group
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="groupId != null">group_id = #{groupId},</if>
|
||||||
|
<if test="attributeId != null">attribute_id = #{attributeId},</if>
|
||||||
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||||
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||||
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||||
|
</trim>
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<delete id="deleteAsAttributeGroupById" parameterType="Long">
|
||||||
|
delete from as_attribute_group where id = #{id}
|
||||||
|
</delete>
|
||||||
|
|
||||||
|
<delete id="deleteAsAttributeGroupByIds" parameterType="String">
|
||||||
|
delete from as_attribute_group where id in
|
||||||
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||||
|
#{id}
|
||||||
|
</foreach>
|
||||||
|
</delete>
|
||||||
|
</mapper>
|
|
@ -6,8 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<resultMap type="com.muyu.product.domain.AttributeInfo" id="AttributeInfoResult">
|
<resultMap type="com.muyu.product.domain.AttributeInfo" id="AttributeInfoResult">
|
||||||
<result property="id" column="id" />
|
<result property="id" column="id" />
|
||||||
|
<result property="code" column="code" />
|
||||||
<result property="name" column="name" />
|
<result property="name" column="name" />
|
||||||
<result property="groupId" column="group_id" />
|
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark" />
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by" />
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
|
@ -16,14 +16,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectAttributeInfoVo">
|
<sql id="selectAttributeInfoVo">
|
||||||
select id, name, group_id, remark, create_by, create_time, update_by, update_time from attribute_info
|
select id, code, name, remark, create_by, create_time, update_by, update_time from attribute_info
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectAttributeInfoList" parameterType="com.muyu.product.domain.AttributeInfo" resultMap="AttributeInfoResult">
|
<select id="selectAttributeInfoList" parameterType="com.muyu.product.domain.AttributeInfo" resultMap="AttributeInfoResult">
|
||||||
<include refid="selectAttributeInfoVo"/>
|
<include refid="selectAttributeInfoVo"/>
|
||||||
<where>
|
<where>
|
||||||
|
<if test="code != null and code != ''"> and code = #{code}</if>
|
||||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||||
<if test="groupId != null "> and group_id = #{groupId}</if>
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<insert id="insertAttributeInfo" parameterType="com.muyu.product.domain.AttributeInfo" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertAttributeInfo" parameterType="com.muyu.product.domain.AttributeInfo" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into attribute_info
|
insert into attribute_info
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="code != null">code,</if>
|
||||||
<if test="name != null">name,</if>
|
<if test="name != null">name,</if>
|
||||||
<if test="groupId != null">group_id,</if>
|
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
|
@ -44,8 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="updateTime != null">update_time,</if>
|
<if test="updateTime != null">update_time,</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="code != null">#{code},</if>
|
||||||
<if test="name != null">#{name},</if>
|
<if test="name != null">#{name},</if>
|
||||||
<if test="groupId != null">#{groupId},</if>
|
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
|
@ -57,8 +57,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<update id="updateAttributeInfo" parameterType="com.muyu.product.domain.AttributeInfo">
|
<update id="updateAttributeInfo" parameterType="com.muyu.product.domain.AttributeInfo">
|
||||||
update attribute_info
|
update attribute_info
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="code != null">code = #{code},</if>
|
||||||
<if test="name != null">name = #{name},</if>
|
<if test="name != null">name = #{name},</if>
|
||||||
<if test="groupId != null">group_id = #{groupId},</if>
|
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
<modules>
|
<modules>
|
||||||
<module>muyu-product-remote</module>
|
<module>muyu-product-remote</module>
|
||||||
<module>muyu-product-server</module>
|
<module>muyu-product-server</module>
|
||||||
|
<module>muyu-product-common </module>
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
|
|
@ -14,7 +14,6 @@
|
||||||
<module>muyu-job</module>
|
<module>muyu-job</module>
|
||||||
<module>muyu-file</module>
|
<module>muyu-file</module>
|
||||||
<module>muyu-product</module>
|
<module>muyu-product</module>
|
||||||
<module>muyu-product/muyu-product-common</module>
|
|
||||||
</modules>
|
</modules>
|
||||||
|
|
||||||
<artifactId>muyu-modules</artifactId>
|
<artifactId>muyu-modules</artifactId>
|
||||||
|
|
Loading…
Reference in New Issue