fix: 🎨修改controller的vm模版

This commit is contained in:
weihongyang 2022-07-05 15:25:50 +08:00
parent f154d361a8
commit d3e337d622

View File

@ -68,26 +68,26 @@ public class ${table.controllerName} {
@ApiOperation("保存")
@LogOperation("保存")
@PreAuthorize("@ex.hasAuthority('${package.ModuleName}:${table.entityPath}:save')")
public Result save(@RequestBody ${entity}DTO dto){
public Result<Long> save(@RequestBody ${entity}DTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
${table.entityPath}Service.save(dto);
return new Result();
return new Result<Long>().ok(dto.getId());
}
@PutMapping
@ApiOperation("修改")
@LogOperation("修改")
@PreAuthorize("@ex.hasAuthority('${package.ModuleName}:${table.entityPath}:update')")
public Result update(@RequestBody ${entity}DTO dto){
public Result<Long> update(@RequestBody ${entity}DTO dto){
//效验数据
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
${table.entityPath}Service.update(dto);
return new Result();
return new Result<Long>().ok(dto.getId());
}
@DeleteMapping