From ad57f59bf3714ddde61201d4af6b368a3a2a84b3 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 14 五月 2025 09:28:46 +0800
Subject: [PATCH] 视频标签代码生成

---
 framework/src/main/resources/mapper/lmk/VideoTagMapper.xml                |    4 +-
 framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoTagForm.java |    4 --
 manager-api/src/main/java/cn/lili/controller/lmk/VideoTagController.java  |   76 ++++++++++++++++++++++++++++++++++++++
 3 files changed, 78 insertions(+), 6 deletions(-)

diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoTagForm.java b/framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoTagForm.java
index 00e9240..9273874 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoTagForm.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoTagForm.java
@@ -31,10 +31,6 @@
     @ApiModelProperty("鍒涘缓鏂瑰紡")
     private String createType;
 
-    @NotNull(message = "涓嶈兘涓虹┖", groups = {Add.class, Update.class})
-    @ApiModelProperty("")
-    private Date updateTime;
-
     public static VideoTag getEntityByForm(@NonNull VideoTagForm form, VideoTag entity) {
         if(entity == null) {
           entity = new VideoTag();
diff --git a/framework/src/main/resources/mapper/lmk/VideoTagMapper.xml b/framework/src/main/resources/mapper/lmk/VideoTagMapper.xml
index 6ed84e3..01cad27 100644
--- a/framework/src/main/resources/mapper/lmk/VideoTagMapper.xml
+++ b/framework/src/main/resources/mapper/lmk/VideoTagMapper.xml
@@ -24,7 +24,7 @@
         FROM
             lmk_video_tag LVT
         WHERE
-            LVT.id = #{id} AND LVT.deleted = 0
+            LVT.id = #{id} AND LVT.delete_flag = 0
     </select>
 
 
@@ -37,7 +37,7 @@
         FROM
             lmk_video_tag LVT
         WHERE
-            LVT.deleted = 0
+            LVT.delete_flag = 0
     </select>
 
 </mapper>
diff --git a/manager-api/src/main/java/cn/lili/controller/lmk/VideoTagController.java b/manager-api/src/main/java/cn/lili/controller/lmk/VideoTagController.java
new file mode 100644
index 0000000..c8c9a11
--- /dev/null
+++ b/manager-api/src/main/java/cn/lili/controller/lmk/VideoTagController.java
@@ -0,0 +1,76 @@
+package cn.lili.controller.lmk;
+
+import cn.lili.group.Update;
+import cn.lili.group.Add;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.security.access.prepost.PreAuthorize;
+import lombok.RequiredArgsConstructor;
+import java.util.List;
+import org.springframework.validation.annotation.Validated;
+import javax.validation.constraints.NotEmpty;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import cn.lili.modules.lmk.service.VideoTagService;
+import cn.lili.base.Result;
+import cn.lili.modules.lmk.domain.form.VideoTagForm;
+import cn.lili.modules.lmk.domain.query.VideoTagQuery;
+import lombok.RequiredArgsConstructor;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * 瑙嗛鏍囩 鍓嶇鎺у埗鍣�
+ *
+ * @author xp
+ * @since 2025-05-13
+ */
+@Validated
+@RequiredArgsConstructor
+@Api(value = "瑙嗛鏍囩", tags = "瑙嗛鏍囩绠$悊")
+@RestController
+@RequestMapping("/manager/lmk/video-tag")
+public class VideoTagController {
+
+    private final VideoTagService videoTagService;
+
+    @PostMapping
+    @ApiOperation(value = "娣诲姞", notes = "娣诲姞")
+    public Result add(@RequestBody @Validated(Add.class) VideoTagForm form) {
+        return videoTagService.add(form);
+    }
+
+    @PutMapping
+    @ApiOperation(value = "淇敼", notes = "淇敼")
+    public Result update(@RequestBody @Validated(Update.class) VideoTagForm form) {
+        return videoTagService.update(form);
+    }
+
+    @DeleteMapping("/{id}")
+    @ApiOperation(value = "ID鍒犻櫎", notes = "ID鍒犻櫎")
+    public Result removeById(@PathVariable("id") String id) {
+        return videoTagService.removeById(id);
+    }
+
+    @DeleteMapping("/batch")
+    @ApiOperation(value = "鎵归噺鍒犻櫎", notes = "鎵归噺鍒犻櫎")
+    public Result remove(@RequestBody @NotEmpty(message = "璇烽�夋嫨鏁版嵁") List<String> ids) {
+        return videoTagService.remove(ids);
+    }
+
+    @GetMapping("/page")
+    @ApiOperation(value = "鍒嗛〉", notes = "鍒嗛〉")
+    public Result page(VideoTagQuery query) {
+        return videoTagService.page(query);
+    }
+
+    @GetMapping("/{id}")
+    @ApiOperation(value = "璇︽儏", notes = "璇︽儏")
+    public Result detail(@PathVariable("id") Integer id) {
+        return videoTagService.detail(id);
+    }
+
+    @GetMapping("/list")
+    @ApiOperation(value = "鍒楄〃", notes = "鍒楄〃")
+    public Result list() {
+        return videoTagService.all();
+    }
+}

--
Gitblit v1.8.0