controller模板调整
This commit is contained in:
@@ -74,10 +74,10 @@ public class ${table.controllerName} {
|
||||
<% } %>
|
||||
|
||||
<% if(isNotEmpty(controllerMethods.create)){ %>
|
||||
@PostMapping(value = "/insert")
|
||||
<% if(!restControllerStyle){ %>
|
||||
@ResponseBody
|
||||
<% } %>
|
||||
@PostMapping(value = "/insert")
|
||||
public CommonResult.Single<${table.entityName}> insert(${table.entityName} ${entityInstanceName}) {
|
||||
CommonResult.Single<${table.entityName}> single = CommonResult.Single.init();
|
||||
${serviceInstanceName}.save(${entityInstanceName});
|
||||
|
||||
@@ -73,10 +73,10 @@ public class ${table.controllerName} {
|
||||
<% } %>
|
||||
|
||||
<% if(isNotEmpty(controllerMethods.create)){ %>
|
||||
@PostMapping(value = "/insert")
|
||||
<% if(!restControllerStyle){ %>
|
||||
@ResponseBody
|
||||
<% } %>
|
||||
@PostMapping(value = "/insert")
|
||||
public R<${table.entityName}> insert(${table.entityName} ${entityInstanceName}) {
|
||||
R<${table.entityName}> result = R.ok();
|
||||
${serviceInstanceName}.save(${entityInstanceName});
|
||||
|
||||
Reference in New Issue
Block a user