属性组2

master
hbr 2024-03-03 09:14:46 +08:00
parent 143623924d
commit c04448a42d
1 changed files with 30 additions and 0 deletions

View File

@ -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)));
}
/**
*
*/