|
|
@ -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(); |
|
|
|
} |
|
|
|
} |
|
|
|