modified template

master
laileon 7 years ago
parent 905234a999
commit ecc7e14acd
  1. 4
      src/test/resources/generator/template/controller-restful.ftl

@ -21,7 +21,7 @@ public class ${modelNameUpperCamel}Controller {
private ${modelNameUpperCamel}Service ${modelNameLowerCamel}Service; private ${modelNameUpperCamel}Service ${modelNameLowerCamel}Service;
@PostMapping @PostMapping
public Result add(${modelNameUpperCamel} ${modelNameLowerCamel}) { public Result add(@RequestBody ${modelNameUpperCamel} ${modelNameLowerCamel}) {
${modelNameLowerCamel}Service.save(${modelNameLowerCamel}); ${modelNameLowerCamel}Service.save(${modelNameLowerCamel});
return ResultGenerator.genSuccessResult(); return ResultGenerator.genSuccessResult();
} }
@ -33,7 +33,7 @@ public class ${modelNameUpperCamel}Controller {
} }
@PutMapping @PutMapping
public Result update(${modelNameUpperCamel} ${modelNameLowerCamel}) { public Result update(@RequestBody ${modelNameUpperCamel} ${modelNameLowerCamel}) {
${modelNameLowerCamel}Service.update(${modelNameLowerCamel}); ${modelNameLowerCamel}Service.update(${modelNameLowerCamel});
return ResultGenerator.genSuccessResult(); return ResultGenerator.genSuccessResult();
} }

Loading…
Cancel
Save