|
@@ -0,0 +1,27 @@
|
|
|
+package com.hb.proj.well.controller;
|
|
|
+
|
|
|
+import cn.hutool.core.util.IdUtil;
|
|
|
+import com.hb.proj.model.Well;
|
|
|
+import com.hb.proj.well.service.WellService;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+@RestController
|
|
|
+@RequestMapping("/api/well")
|
|
|
+@Validated
|
|
|
+public class WellController {
|
|
|
+ @Autowired
|
|
|
+ private WellService wellService;
|
|
|
+ @RequestMapping("/save")
|
|
|
+ public void save(){
|
|
|
+ Well well = new Well();
|
|
|
+ System.out.println("--------------------id:"+IdUtil.fastSimpleUUID());
|
|
|
+ well.setWellId(IdUtil.fastSimpleUUID());
|
|
|
+ well.setWellName("井名");
|
|
|
+ well.setWellSort("测试井");
|
|
|
+ wellService.insert(well);
|
|
|
+
|
|
|
+ }
|
|
|
+}
|