feat(themes): 为主题列表接口增加用户购买状态标记
在 KeyboardThemesRespVO 中新增 isPurchased 字段; selectThemesByStyle 方法增加 userId 参数并查询用户已购主题 ID, 返回结果标记当前用户是否已购买。
This commit is contained in:
@@ -42,8 +42,8 @@ public class ThemesController {
|
||||
@GetMapping("/listByStyle")
|
||||
@Operation(summary = "按风格查询主题", description = "按主题风格查询主题列表接口")
|
||||
public BaseResponse<List<KeyboardThemesRespVO>> listByStyle(@RequestParam("themeStyle") Long themeStyleId) {
|
||||
return ResultUtils.success(themesService.selectThemesByStyle(themeStyleId));
|
||||
}
|
||||
Long userId = StpUtil.getLoginIdAsLong();
|
||||
return ResultUtils.success(themesService.selectThemesByStyle(themeStyleId,userId));}
|
||||
|
||||
@GetMapping("/listAllStyles")
|
||||
@Operation(summary = "查询所有主题风格", description = "查询所有主题风格列表接口")
|
||||
|
||||
Reference in New Issue
Block a user