From d3e337d622b826aabef98246f8aea13d9d0302da Mon Sep 17 00:00:00 2001 From: weihongyang <1075331873@qq.com> Date: Tue, 5 Jul 2022 15:25:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20:art:=E4=BF=AE=E6=94=B9controller?= =?UTF-8?q?=E7=9A=84vm=E6=A8=A1=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/templates/controller.java.vm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ym-generator/src/main/resources/templates/controller.java.vm b/ym-generator/src/main/resources/templates/controller.java.vm index fc2f2b1..ebd19b7 100644 --- a/ym-generator/src/main/resources/templates/controller.java.vm +++ b/ym-generator/src/main/resources/templates/controller.java.vm @@ -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 save(@RequestBody ${entity}DTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); ${table.entityPath}Service.save(dto); - return new Result(); + return new Result().ok(dto.getId()); } @PutMapping @ApiOperation("修改") @LogOperation("修改") @PreAuthorize("@ex.hasAuthority('${package.ModuleName}:${table.entityPath}:update')") - public Result update(@RequestBody ${entity}DTO dto){ + public Result update(@RequestBody ${entity}DTO dto){ //效验数据 ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); ${table.entityPath}Service.update(dto); - return new Result(); + return new Result().ok(dto.getId()); } @DeleteMapping