feat(themes): 新增查询用户已购主题接口
在 KeyboardThemePurchaseService 及其实现中增加 getUserPurchasedThemes 方法, 通过用户ID获取已支付主题列表;同步新增 /themes/purchased 接口并放行鉴权。 补充 KeyboardThemesRespVO 缺失的 themePreviewImageUrl 字段。
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user