属性组2
parent
143623924d
commit
c04448a42d
|
@ -90,6 +90,14 @@ public class AttributeGroupController extends BaseController {
|
|||
return Result.success(attributeGroupService.getById(id));
|
||||
}
|
||||
|
||||
@ApiOperation("获取属性组详细信息")
|
||||
@RequiresPermissions("product:attributeGroup:query")
|
||||
@GetMapping("/{id}")
|
||||
@ApiImplicitParam(name = "id",value ="id",required = true,dataType = "Long",paramType = "path",dataTypeClass = Long.class)
|
||||
public Result<AttributeGroup> getInfo1(@PathVariable Long id){
|
||||
return Result.success(attributeGroupService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增属性组
|
||||
*/
|
||||
|
@ -102,6 +110,17 @@ public class AttributeGroupController extends BaseController {
|
|||
attributeGroupService.save(AttributeGroupSaveModel.saveReqBuild(attributeGroupSaveReq))
|
||||
);
|
||||
}
|
||||
/**
|
||||
* 新增属性组
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:add")
|
||||
@Log(title = "属性组",businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
@ApiOperation("新增属性组")
|
||||
public Result<String> addAttributeGroup(@RequestBody AttributeGroupSaveReq attributeGroupSaveReq){
|
||||
return toAjax(attributeGroupService.save(AttributeGroupSaveModel.saveReqBuild(attributeGroupSaveReq)));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改属性组
|
||||
|
@ -114,6 +133,17 @@ public class AttributeGroupController extends BaseController {
|
|||
return toAjax(attributeGroupService.updateById(AttributeGroup.editBuild(id,attributeGroupEditReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改属性组
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:edit")
|
||||
@Log(title = "属性组",businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改属性组")
|
||||
public Result<String> editUpdate(@PathVariable Long id,@RequestBody AttributeGroupEditReq attributeGroupEditReq){
|
||||
return toAjax(attributeGroupService.updateById(AttributeGroup.editBuild(id,attributeGroupEditReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除属性组
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue