feat(themes): 新增查询用户已购主题接口

在 KeyboardThemePurchaseService 及其实现中增加 getUserPurchasedThemes 方法,
通过用户ID获取已支付主题列表;同步新增 /themes/purchased 接口并放行鉴权。
补充 KeyboardThemesRespVO 缺失的 themePreviewImageUrl 字段。
This commit is contained in:
2025-12-10 20:19:47 +08:00
parent 1a6fb944b2
commit 03dc005b38
5 changed files with 66 additions and 0 deletions

View File

@@ -67,4 +67,12 @@ public class ThemesController {
return ResultUtils.success(result);
}
@GetMapping("/purchased")
@Operation(summary = "查询已购买的主题", description = "查询当前用户已购买的主题列表")
public BaseResponse<List<KeyboardThemesRespVO>> getPurchasedThemes() {
Long userId = StpUtil.getLoginIdAsLong();
List<KeyboardThemesRespVO> result = themePurchaseService.getUserPurchasedThemes(userId);
return ResultUtils.success(result);
}
}