Bladeren bron

修改date的问题和id改为参数形式

nahida 1 jaar geleden
bovenliggende
commit
c28744ef2e

+ 2 - 2
park-overview-service/src/main/java/com/zksy/park/controller/ParkInfoController.java

@@ -28,9 +28,9 @@ public class ParkInfoController {
     @Autowired
     private ParkInfoService service;
 
-    @GetMapping("/getById/{id}")
+    @GetMapping("/getById")
     @ApiOperation(value = "园区信息搜索getById")
-    public Result getById(@PathVariable String id) {
+    public Result getById(String id) {
         return service.getByIdWithFile(id);
     }
 

+ 7 - 6
park-overview-service/src/main/java/com/zksy/park/controller/ParkVisualVideoController.java

@@ -14,6 +14,7 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.ArrayList;
 import java.util.List;
 
 /**
@@ -53,8 +54,8 @@ public class ParkVisualVideoController {
     @ApiOperation(value = "园区可视化视频新增")
     @Log(title = "新增园区信息", businessType = BusinessType.INSERT)
     public Result<Object> save(@RequestBody ParkVisualVideo entity) {
-        entity.setCreateTime(new DateTime());
-        entity.setUpdateTime(new DateTime());
+        entity.setCreateTime(new DateTime().toLocalDateTime());
+        entity.setUpdateTime(new DateTime().toLocalDateTime());
         return Result.ok(service.save(entity));
     }
 
@@ -63,8 +64,8 @@ public class ParkVisualVideoController {
     @Log(title = "批量新增园区信息", businessType = BusinessType.INSERT)
     public Result<Object> saveBatch(@RequestBody List<ParkVisualVideo> entityList) {
         entityList.forEach(q->{
-            q.setUpdateTime(new DateTime());
-            q.setCreateTime(new DateTime());
+            q.setUpdateTime(new DateTime().toLocalDateTime());
+            q.setCreateTime(new DateTime().toLocalDateTime());
         });
         return Result.ok(service.saveBatch(entityList));
     }
@@ -73,7 +74,7 @@ public class ParkVisualVideoController {
     @ApiOperation(value = "园区可视化视频修改")
     @Log(title = "园区可视化视频信息", businessType = BusinessType.UPDATE)
     public Result<Object> updateById(@RequestBody ParkVisualVideo entity) {
-        entity.setUpdateTime(new DateTime());
+        entity.setUpdateTime(new DateTime().toLocalDateTime());
         return Result.ok(service.updateById(entity));
     }
 
@@ -87,7 +88,7 @@ public class ParkVisualVideoController {
     @DeleteMapping("/deleteBatchById")
     @ApiOperation(value = "园区可视化视频批量删除")
     @Log(title = "园区可视化视频批量删除", businessType = BusinessType.DELETE)
-    public Result<Object> deleteBatchById(List<String> ids) {
+    public Result<Object> deleteBatchById(@RequestParam List<String> ids) {
         return Result.ok(service.removeByIds(ids));
     }
 }

+ 17 - 3
park-overview-service/src/main/java/com/zksy/park/domain/ParkVisualVideo.java

@@ -4,8 +4,13 @@ import cn.hutool.core.date.DateTime;
 import com.baomidou.mybatisplus.annotation.IdType;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
 import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
 import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.time.LocalDateTime;
 
 /**
  * @author Administrator
@@ -15,6 +20,9 @@ import lombok.Data;
  * @date 2024/12/27 14:17:18
  */
 @Data
+@AllArgsConstructor
+@NoArgsConstructor
+@TableName("park_visual_video")
 public class ParkVisualVideo {
     @ApiModelProperty(value = "主键")
     @TableId(value = "id", type = IdType.ASSIGN_UUID)
@@ -27,14 +35,20 @@ public class ParkVisualVideo {
     private String token;
 
     @ApiModelProperty(value = "区域")
-    private String area;
+    private Integer area;
 
     @ApiModelProperty(value = "排序")
     private Integer sort;
 
+    @ApiModelProperty(value = "通道编码")
+    private String channelId;
+
+    @ApiModelProperty(value = "属于的tab栏")
+    private Integer belong;
+
     @ApiModelProperty(value = "修改时间")
-    private DateTime updateTime;
+    private LocalDateTime updateTime;
 
     @ApiModelProperty(value = "创建时间")
-    private DateTime createTime;
+    private LocalDateTime createTime;
 }