tianyun 2 vuotta sitten
vanhempi
commit
d50f463672

+ 2 - 2
mybatis-plus/src/main/resources/templates/controller1.java.ftl

@@ -56,8 +56,8 @@ public class ${table.controllerName} {
     }
     }
 
 
     @GetMapping("/{id}")
     @GetMapping("/{id}")
-    public List<${entity}> findOne(@PathVariable Integer id) {
-    return ${table.entityPath}Service.list();
+    public ${entity} findOne(@PathVariable Integer id) {
+    return ${table.entityPath}Service.getById(id);
     }
     }
 
 
     @GetMapping("/page")
     @GetMapping("/page")