|
@@ -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);
|
|
|
-
|
|
|
}
|
|
|
}
|