feat:属性组管理页面把状态改为选择器

master
崔福波 2024-11-15 16:28:30 +08:00
parent 70223a4d04
commit 1aade37771
2 changed files with 19 additions and 0 deletions

View File

@ -81,5 +81,14 @@ public class AttributeGroup extends BaseEntity {
.states(attributeGroupEditReq.getStates()) .states(attributeGroupEditReq.getStates())
.build(); .build();
} }
/**
*
*/
public static AttributeGroup editUpBuild(Long id, String states){
return AttributeGroup.builder()
.id(id)
.states(states)
.build();
}
} }

View File

@ -105,6 +105,16 @@ public class AttributeGroupController extends BaseController {
return Result.success("修改成功"); return Result.success("修改成功");
} }
@RequiresPermissions("product:attributeGroup:edit")
@Log(title = "属性组", businessType = BusinessType.UPDATE)
@PutMapping("/{id}/{states}")
@ApiOperation("修改属性状态")
public Result<String> updateStates(@PathVariable Long id,@PathVariable String states) {
return toAjax(attributeGroupService.updateById(AttributeGroup.editUpBuild(id,states)));
}
/** /**