商品管理初始化
parent
6b8fc1c19b
commit
ac8eecb4fe
|
@ -0,0 +1,35 @@
|
||||||
|
package com.muyu.product.domain.demo;
|
||||||
|
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
|
@ToString
|
||||||
|
public class ShiTi {
|
||||||
|
//属性组id
|
||||||
|
private Integer id;
|
||||||
|
|
||||||
|
//属性集合id
|
||||||
|
private Integer ids;
|
||||||
|
|
||||||
|
//属性组名称
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
//属性集合里面的属性名称
|
||||||
|
private String names;
|
||||||
|
|
||||||
|
//编码
|
||||||
|
private Integer code;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -5,6 +5,9 @@ import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.muyu.product.domain.domain.req.AsProductAttributeInfoEditReq;
|
||||||
|
import com.muyu.product.domain.domain.req.AsProductAttributeInfoQueryReq;
|
||||||
|
import com.muyu.product.domain.domain.req.AsProductAttributeInfoSaveReq;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.EqualsAndHashCode;
|
import lombok.EqualsAndHashCode;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
@ -36,11 +39,13 @@ public class AsProductAttributeInfo extends BaseEntity {
|
||||||
@ApiModelProperty(name = "属性编号", value = "属性编号")
|
@ApiModelProperty(name = "属性编号", value = "属性编号")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
|
||||||
/** 商品 */
|
/** 商品 */
|
||||||
@Excel(name = "商品")
|
@Excel(name = "商品")
|
||||||
@ApiModelProperty(name = "商品", value = "商品", required = true)
|
@ApiModelProperty(name = "商品", value = "商品", required = true)
|
||||||
private Long productId;
|
private Long productId;
|
||||||
|
|
||||||
|
|
||||||
/** 属性 */
|
/** 属性 */
|
||||||
@Excel(name = "属性")
|
@Excel(name = "属性")
|
||||||
@ApiModelProperty(name = "属性", value = "属性", required = true)
|
@ApiModelProperty(name = "属性", value = "属性", required = true)
|
||||||
|
|
|
@ -70,11 +70,14 @@ public class AttributeGroupController extends BaseController {
|
||||||
@ApiOperation("获取属性组详细信息")
|
@ApiOperation("获取属性组详细信息")
|
||||||
@RequiresPermissions("product:attributeGroup:query")
|
@RequiresPermissions("product:attributeGroup:query")
|
||||||
@GetMapping(value = "/{id}")
|
@GetMapping(value = "/{id}")
|
||||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long",
|
||||||
|
paramType = "path", dataTypeClass = Long.class)
|
||||||
public Result<AttributeGroup> getInfo(@PathVariable("id") Long id) {
|
public Result<AttributeGroup> getInfo(@PathVariable("id") Long id) {
|
||||||
return Result.success(attributeGroupService.getById(id));
|
return Result.success(attributeGroupService.getById(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增属性组
|
* 新增属性组
|
||||||
*/
|
*/
|
||||||
|
@ -93,10 +96,15 @@ public class AttributeGroupController extends BaseController {
|
||||||
@Log(title = "属性组", businessType = BusinessType.UPDATE)
|
@Log(title = "属性组", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping("/{id}")
|
@PutMapping("/{id}")
|
||||||
@ApiOperation("修改属性组")
|
@ApiOperation("修改属性组")
|
||||||
public Result<String> edit(@PathVariable Long id, @RequestBody AttributeGroupEditReq attributeGroupEditReq) {
|
public Result<String> edit(@PathVariable Long id,
|
||||||
|
@RequestBody AttributeGroupEditReq attributeGroupEditReq) {
|
||||||
return toAjax(attributeGroupService.updateById(AttributeGroup.editBuild(id,attributeGroupEditReq)));
|
return toAjax(attributeGroupService.updateById(AttributeGroup.editBuild(id,attributeGroupEditReq)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除属性组
|
* 删除属性组
|
||||||
*/
|
*/
|
||||||
|
@ -104,8 +112,10 @@ public class AttributeGroupController extends BaseController {
|
||||||
@Log(title = "属性组", businessType = BusinessType.DELETE)
|
@Log(title = "属性组", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
@ApiOperation("删除属性组")
|
@ApiOperation("删除属性组")
|
||||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
@ApiImplicitParam(name = "id",
|
||||||
|
value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||||
return toAjax(attributeGroupService.removeBatchByIds(ids));
|
return toAjax(attributeGroupService.removeBatchByIds(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue