浏览代码

smart-doc文档注释修改

hbjzws 2 年之前
父节点
当前提交
c0eb92c0cb

+ 3 - 0
src/main/java/com/hb/proj/model/Well.java

@@ -2,6 +2,8 @@ package com.hb.proj.model;
 
 import lombok.Data;
 
+import java.util.Date;
+
 @Data
 public class Well {
     private String wellId;
@@ -9,4 +11,5 @@ public class Well {
     private String wellName;
 
     private String wellSort;
+    private Date createTime;
 }

+ 11 - 2
src/main/java/com/hb/proj/well/controller/WellController.java

@@ -8,20 +8,29 @@ import org.springframework.validation.annotation.Validated;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Date;
+
+/**
+ * 井相关接口
+ */
 @RestController
 @RequestMapping("/api/well")
 @Validated
 public class WellController {
     @Autowired
     private WellService wellService;
+    /**
+     * 井保存
+     * @apiNote 通过传入对象保存
+     * @return 无
+     */
     @RequestMapping("/save")
     public void save(){
         Well well = new Well();
-        System.out.println("--------------------id:"+IdUtil.fastSimpleUUID());
         well.setWellId(IdUtil.fastSimpleUUID());
         well.setWellName("井名");
         well.setWellSort("测试井");
+        well.setCreateTime(new Date());
         wellService.insert(well);
-
     }
 }

+ 0 - 1
src/main/java/com/hb/proj/well/service/WellService.java

@@ -12,7 +12,6 @@ public class WellService {
     private SpringJdbcDAO springDAO;
     private String tabName="tzl_well";
     public void insert(Well well) {
-
           springDAO.insert(well, tabName);
     }
 }

+ 1 - 1
src/main/resources/smart-doc.json

@@ -1,5 +1,5 @@
 {
-	"serverUrl":"http://127.0.0.1:8080/myproj",
+	"serverUrl":"http://127.0.0.1:8080/zl",
 	
 	"outPath": "src/main/resources/static/doc",
 	"allInOne":true,