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")