ソースを参照

add admin controller

reghao 7 ヶ月 前
コミット
6bf30eddba

+ 36 - 0
content/content-service/src/main/java/cn/reghao/tnb/content/app/vod/controller/AdminVideoController.java

@@ -0,0 +1,36 @@
+package cn.reghao.tnb.content.app.vod.controller;
+
+import cn.reghao.jutil.web.WebResult;
+import cn.reghao.tnb.common.auth.AuthUser;
+import cn.reghao.tnb.content.api.iface.AdminVideoService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author reghao
+ * @date 2025-08-19 07:38:01
+ */
+@Tag(name = "视频管理接口")
+@RestController
+@RequestMapping("/api/content/admin/video")
+public class AdminVideoController {
+    private final AdminVideoService adminVideoService;
+
+    public AdminVideoController(AdminVideoService adminVideoService) {
+        this.adminVideoService = adminVideoService;
+    }
+
+    @Operation(summary = "点赞视频", description = "N")
+    @PostMapping("/thumb/{videoId}")
+    public String thumbUpVideo(@PathVariable("videoId") String videoId) {
+        return WebResult.success();
+    }
+
+    @AuthUser
+    @Operation(summary = "下载视频", description = "N")
+    @GetMapping("/download/{videoId}")
+    public String getDownloadUrl(@PathVariable("videoId") String videoId) {
+        return WebResult.success();
+    }
+}

+ 38 - 0
user/user-service/src/main/java/cn/reghao/tnb/user/app/controller/AdminUserController.java

@@ -0,0 +1,38 @@
+package cn.reghao.tnb.user.app.controller;
+
+import cn.reghao.jutil.web.WebResult;
+import cn.reghao.tnb.account.api.dto.CrawledUser;
+import cn.reghao.tnb.user.api.iface.AdminUserService;
+import cn.reghao.tnb.user.app.service.CrawledUserService;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.springframework.http.MediaType;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * @author reghao
+ * @date 2025-08-19 07:35:20
+ */
+@Tag(name = "用户管理接口")
+@RestController
+@RequestMapping("/api/user/admin")
+public class AdminUserController {
+    private AdminUserService adminUserService;
+
+    public AdminUserController(AdminUserService adminUserService) {
+        this.adminUserService = adminUserService;
+    }
+
+    @Operation(summary = "创建 bilibili 用户帐号", description = "N")
+    @PostMapping("/create/bili")
+    public String updateUserProfile(@RequestBody @Validated CrawledUser crawledUser) {
+        return WebResult.success();
+    }
+
+    @Operation(summary = "查找 bilibili 用户", description = "N")
+    @GetMapping(value = "/search", produces = MediaType.APPLICATION_JSON_VALUE)
+    public String searchUser(@RequestParam("username") String username) {
+        return WebResult.success();
+    }
+}