属性功能完善
parent
fd28a8fbc8
commit
8cee0c4e43
|
@ -26,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName}
|
select#foreach($column in $columns) $column.columnName#if($foreach.count != $columns.size()),#end#end from ${tableName}
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="select${ClassName}List" parameterType="${ClassName}" resultMap="${ClassName}Result">
|
<select id="select${ClassName}List" parameterType="${packageName}.${ClassName}" resultMap="${ClassName}Result">
|
||||||
<include refid="select${ClassName}Vo"/>
|
<include refid="select${ClassName}Vo"/>
|
||||||
<where>
|
<where>
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
|
@ -72,7 +72,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
#end
|
#end
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insert${ClassName}" parameterType="${ClassName}"#if($pkColumn.increment) useGeneratedKeys="true" keyProperty="$pkColumn.javaField"#end>
|
<insert id="insert${ClassName}" parameterType="${packageName}.${ClassName}"#if($pkColumn.increment) useGeneratedKeys="true" keyProperty="$pkColumn.javaField"#end>
|
||||||
insert into ${tableName}
|
insert into ${tableName}
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
|
@ -90,7 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="update${ClassName}" parameterType="${ClassName}">
|
<update id="update${ClassName}" parameterType="${packageName}.${ClassName}">
|
||||||
update ${tableName}
|
update ${tableName}
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
#foreach($column in $columns)
|
#foreach($column in $columns)
|
||||||
|
|
|
@ -23,5 +23,9 @@
|
||||||
<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>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
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.TreeEntity;
|
import com.muyu.common.core.web.domain.TreeEntity;
|
||||||
|
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;
|
||||||
|
|
||||||
|
@ -62,7 +64,7 @@ public class Address extends TreeEntity
|
||||||
.append("sonId", getSonId())
|
.append("sonId", getSonId())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
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 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;
|
||||||
|
|
||||||
|
@ -63,7 +65,7 @@ public class AsAttributeGroup extends BaseEntity
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
package com.muyu.product.domain;
|
package com.muyu.product.domain;
|
||||||
|
|
||||||
import com.muyu.common.core.annotation.Excel;
|
import com.muyu.common.security.utils.SecurityUtils;
|
||||||
import com.muyu.common.core.web.domain.BaseEntity;
|
|
||||||
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.security.utils.SecurityUtils;
|
||||||
|
import com.muyu.common.core.annotation.Excel;
|
||||||
|
import com.muyu.common.core.web.domain.BaseEntity;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 属性对象 attribute
|
* 属性对象 attribute
|
||||||
*
|
*
|
||||||
* @author Saisai
|
* @author saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
public class Attribute extends BaseEntity
|
public class Attribute extends BaseEntity
|
||||||
|
@ -18,14 +20,14 @@ public class Attribute 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 String groupId;
|
|
||||||
|
|
||||||
public void setId(Long id)
|
public void setId(Long id)
|
||||||
{
|
{
|
||||||
this.id = id;
|
this.id = id;
|
||||||
|
@ -35,6 +37,15 @@ public class Attribute 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,27 +55,18 @@ public class Attribute extends BaseEntity
|
||||||
{
|
{
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
public void setGroupId(String groupId)
|
|
||||||
{
|
|
||||||
this.groupId = groupId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String 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("name", getName())
|
.append("code", getCode())
|
||||||
.append("groupId", getGroupId())
|
.append("name", getName())
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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 org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
@ -63,7 +64,7 @@ public class AttributeGroup extends BaseEntity
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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 org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
@ -77,7 +78,7 @@ public class AttributeProduct extends BaseEntity
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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 org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
@ -105,7 +106,7 @@ public class Brand extends BaseEntity
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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 org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
@ -63,7 +64,7 @@ public class BrandCategory extends BaseEntity
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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 org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
@ -63,7 +64,7 @@ public class CategoryAttribute extends BaseEntity
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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 org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
@ -63,7 +64,7 @@ public class CategoryAttributeGroup extends BaseEntity
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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.TreeEntity;
|
import com.muyu.common.core.web.domain.TreeEntity;
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
@ -78,7 +79,7 @@ public class CategoryInfo extends TreeEntity
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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 org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
@ -63,7 +64,7 @@ public class ProductCategory extends BaseEntity
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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 org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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 org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
@ -49,7 +50,7 @@ public class Rule extends BaseEntity
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
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 org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
@ -77,7 +78,7 @@ public class RuleProduct extends BaseEntity
|
||||||
.append("remark", getRemark())
|
.append("remark", getRemark())
|
||||||
.append("createBy", getCreateBy())
|
.append("createBy", getCreateBy())
|
||||||
.append("createTime", getCreateTime())
|
.append("createTime", getCreateTime())
|
||||||
.append("updateBy", getUpdateBy())
|
.append("updateBy", SecurityUtils.getUsername())
|
||||||
.append("updateTime", getUpdateTime())
|
.append("updateTime", getUpdateTime())
|
||||||
.toString();
|
.toString();
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
||||||
/**
|
/**
|
||||||
* 属性Controller
|
* 属性Controller
|
||||||
*
|
*
|
||||||
* @author Saisai
|
* @author saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
|
@ -97,7 +97,7 @@ public class AttributeController extends BaseController
|
||||||
*/
|
*/
|
||||||
@RequiresPermissions("product:attribute:remove")
|
@RequiresPermissions("product:attribute:remove")
|
||||||
@Log(title = "属性", businessType = BusinessType.DELETE)
|
@Log(title = "属性", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public Result remove(@PathVariable Long[] ids)
|
public Result remove(@PathVariable Long[] ids)
|
||||||
{
|
{
|
||||||
return toAjax(attributeService.deleteAttributeByIds(ids));
|
return toAjax(attributeService.deleteAttributeByIds(ids));
|
||||||
|
|
|
@ -5,15 +5,15 @@ import com.muyu.product.domain.Attribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 属性Mapper接口
|
* 属性Mapper接口
|
||||||
*
|
*
|
||||||
* @author Saisai
|
* @author saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
public interface AttributeMapper
|
public interface AttributeMapper
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询属性
|
* 查询属性
|
||||||
*
|
*
|
||||||
* @param id 属性主键
|
* @param id 属性主键
|
||||||
* @return 属性
|
* @return 属性
|
||||||
*/
|
*/
|
||||||
|
@ -21,7 +21,7 @@ public interface AttributeMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询属性列表
|
* 查询属性列表
|
||||||
*
|
*
|
||||||
* @param attribute 属性
|
* @param attribute 属性
|
||||||
* @return 属性集合
|
* @return 属性集合
|
||||||
*/
|
*/
|
||||||
|
@ -29,7 +29,7 @@ public interface AttributeMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增属性
|
* 新增属性
|
||||||
*
|
*
|
||||||
* @param attribute 属性
|
* @param attribute 属性
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -37,7 +37,7 @@ public interface AttributeMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改属性
|
* 修改属性
|
||||||
*
|
*
|
||||||
* @param attribute 属性
|
* @param attribute 属性
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -45,7 +45,7 @@ public interface AttributeMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除属性
|
* 删除属性
|
||||||
*
|
*
|
||||||
* @param id 属性主键
|
* @param id 属性主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -53,7 +53,7 @@ public interface AttributeMapper
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除属性
|
* 批量删除属性
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据主键集合
|
* @param ids 需要删除的数据主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,15 +5,15 @@ import com.muyu.product.domain.Attribute;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 属性Service接口
|
* 属性Service接口
|
||||||
*
|
*
|
||||||
* @author Saisai
|
* @author saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
public interface IAttributeService
|
public interface IAttributeService
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* 查询属性
|
* 查询属性
|
||||||
*
|
*
|
||||||
* @param id 属性主键
|
* @param id 属性主键
|
||||||
* @return 属性
|
* @return 属性
|
||||||
*/
|
*/
|
||||||
|
@ -21,7 +21,7 @@ public interface IAttributeService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询属性列表
|
* 查询属性列表
|
||||||
*
|
*
|
||||||
* @param attribute 属性
|
* @param attribute 属性
|
||||||
* @return 属性集合
|
* @return 属性集合
|
||||||
*/
|
*/
|
||||||
|
@ -29,7 +29,7 @@ public interface IAttributeService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增属性
|
* 新增属性
|
||||||
*
|
*
|
||||||
* @param attribute 属性
|
* @param attribute 属性
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -37,7 +37,7 @@ public interface IAttributeService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改属性
|
* 修改属性
|
||||||
*
|
*
|
||||||
* @param attribute 属性
|
* @param attribute 属性
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -45,7 +45,7 @@ public interface IAttributeService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除属性
|
* 批量删除属性
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的属性主键集合
|
* @param ids 需要删除的属性主键集合
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -53,7 +53,7 @@ public interface IAttributeService
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除属性信息
|
* 删除属性信息
|
||||||
*
|
*
|
||||||
* @param id 属性主键
|
* @param id 属性主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -11,7 +11,7 @@ import com.muyu.product.service.IAttributeService;
|
||||||
/**
|
/**
|
||||||
* 属性Service业务层处理
|
* 属性Service业务层处理
|
||||||
*
|
*
|
||||||
* @author Saisai
|
* @author saisai
|
||||||
* @date 2024-02-29
|
* @date 2024-02-29
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.muyu.product.mapper.AttributeMapper">
|
<mapper namespace="com.muyu.product.mapper.AttributeMapper">
|
||||||
|
|
||||||
<resultMap type="com.muyu.product.domain.Attribute" id="AttributeResult">
|
<resultMap type="com.muyu.product.domain.Attribute" id="AttributeResult">
|
||||||
<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="selectAttributeVo">
|
<sql id="selectAttributeVo">
|
||||||
select id, name, group_id, remark, create_by, create_time, update_by, update_time from attribute
|
select id, code, name, remark, create_by, create_time, update_by, update_time from attribute
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectAttributeList" parameterType="com.muyu.product.domain.Attribute" resultMap="AttributeResult">
|
<select id="selectAttributeList" parameterType="com.muyu.product.domain.Attribute" resultMap="AttributeResult">
|
||||||
<include refid="selectAttributeVo"/>
|
<include refid="selectAttributeVo"/>
|
||||||
<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 groupId != ''"> and group_id = #{groupId}</if>
|
|
||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -35,30 +35,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<insert id="insertAttribute" parameterType="com.muyu.product.domain.Attribute" useGeneratedKeys="true" keyProperty="id">
|
<insert id="insertAttribute" parameterType="com.muyu.product.domain.Attribute" useGeneratedKeys="true" keyProperty="id">
|
||||||
insert into attribute
|
insert into attribute
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="code != null and code != ''">code,</if>
|
||||||
<if test="name != null and name != ''">name,</if>
|
<if test="name != null and name != ''">name,</if>
|
||||||
<if test="groupId != null and groupId != ''">group_id,</if>
|
|
||||||
<if test="remark != null">remark,</if>
|
<if test="remark != null">remark,</if>
|
||||||
<if test="createBy != null">create_by,</if>
|
<if test="createBy != null">create_by,</if>
|
||||||
<if test="createTime != null">create_time,</if>
|
<if test="createTime != null">create_time,</if>
|
||||||
<if test="updateBy != null">update_by,</if>
|
<if test="updateBy != null">update_by,</if>
|
||||||
<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 and code != ''">#{code},</if>
|
||||||
<if test="name != null and name != ''">#{name},</if>
|
<if test="name != null and name != ''">#{name},</if>
|
||||||
<if test="groupId != null and groupId != ''">#{groupId},</if>
|
|
||||||
<if test="remark != null">#{remark},</if>
|
<if test="remark != null">#{remark},</if>
|
||||||
<if test="createBy != null">#{createBy},</if>
|
<if test="createBy != null">#{createBy},</if>
|
||||||
<if test="createTime != null">#{createTime},</if>
|
<if test="createTime != null">#{createTime},</if>
|
||||||
<if test="updateBy != null">#{updateBy},</if>
|
<if test="updateBy != null">#{updateBy},</if>
|
||||||
<if test="updateTime != null">#{updateTime},</if>
|
<if test="updateTime != null">#{updateTime},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<update id="updateAttribute" parameterType="com.muyu.product.domain.Attribute">
|
<update id="updateAttribute" parameterType="com.muyu.product.domain.Attribute">
|
||||||
update attribute
|
update attribute
|
||||||
<trim prefix="SET" suffixOverrides=",">
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
<if test="code != null and code != ''">code = #{code},</if>
|
||||||
<if test="name != null and name != ''">name = #{name},</if>
|
<if test="name != null and name != ''">name = #{name},</if>
|
||||||
<if test="groupId != null and groupId != ''">group_id = #{groupId},</if>
|
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="createBy != null">create_by = #{createBy},</if>
|
<if test="createBy != null">create_by = #{createBy},</if>
|
||||||
<if test="createTime != null">create_time = #{createTime},</if>
|
<if test="createTime != null">create_time = #{createTime},</if>
|
||||||
|
|
Loading…
Reference in New Issue