tianyun 2 年之前
父节点
当前提交
d50f463672
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      mybatis-plus/src/main/resources/templates/controller1.java.ftl

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

@@ -56,8 +56,8 @@ public class ${table.controllerName} {
     }
 
     @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")