Browse Source

边缘设备增删改

Huhu 2 years ago
parent
commit
57478ed2b9

+ 5 - 0
src/main/java/io/renren/modules/generator/controller/EdgenodesController.java

@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
 import java.util.Arrays;
+import java.util.Date;
 import java.util.Map;
 
 /**
@@ -51,6 +52,8 @@ public class EdgenodesController {
     @RequestMapping("/save")
     @RequiresPermissions("generator:edgenodes:save")
     public R save(@RequestBody EdgenodesEntity edgenodes) {
+        Date date = new Date();
+        edgenodes.setCreatedTime(date);
         edgenodesService.save(edgenodes);
 
         return R.ok();
@@ -62,6 +65,8 @@ public class EdgenodesController {
     @RequestMapping("/update")
     @RequiresPermissions("generator:edgenodes:update")
     public R update(@RequestBody EdgenodesEntity edgenodes) {
+        Date date = new Date();
+        edgenodes.setCreatedTime(date);
         edgenodesService.updateById(edgenodes);
 
         return R.ok();