fix: 🎨修改controller的vm模版
This commit is contained in:
parent
f154d361a8
commit
d3e337d622
@ -68,26 +68,26 @@ public class ${table.controllerName} {
|
|||||||
@ApiOperation("保存")
|
@ApiOperation("保存")
|
||||||
@LogOperation("保存")
|
@LogOperation("保存")
|
||||||
@PreAuthorize("@ex.hasAuthority('${package.ModuleName}:${table.entityPath}:save')")
|
@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);
|
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class);
|
||||||
|
|
||||||
${table.entityPath}Service.save(dto);
|
${table.entityPath}Service.save(dto);
|
||||||
|
|
||||||
return new Result();
|
return new Result<Long>().ok(dto.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping
|
@PutMapping
|
||||||
@ApiOperation("修改")
|
@ApiOperation("修改")
|
||||||
@LogOperation("修改")
|
@LogOperation("修改")
|
||||||
@PreAuthorize("@ex.hasAuthority('${package.ModuleName}:${table.entityPath}:update')")
|
@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);
|
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class);
|
||||||
|
|
||||||
${table.entityPath}Service.update(dto);
|
${table.entityPath}Service.update(dto);
|
||||||
|
|
||||||
return new Result();
|
return new Result<Long>().ok(dto.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping
|
@DeleteMapping
|
||||||
|
Loading…
Reference in New Issue
Block a user