feat:新增活动日志模块,包括控制器、服务、模型及数据传输对象,更新应用模块以引入新模块,并在打卡和训练计划模块中集成活动日志记录功能。

This commit is contained in:
richarjiang
2025-08-14 15:43:29 +08:00
parent 24924e5d81
commit bc8a52852d
15 changed files with 373 additions and 20 deletions

View File

@@ -7,8 +7,8 @@ export enum RecommendationType {
}
export class GetRecommendationsQueryDto {
@ApiProperty({ required: false, description: '数量默认10' })
limit?: number = 10;
// @ApiProperty({ required: false, description: '数量默认10' })
// limit?: number = 10;
}
export interface RecommendationCard {

View File

@@ -11,7 +11,7 @@ export class RecommendationsService {
// 为你推荐:混合文章与每日打卡卡片
async list(query: GetRecommendationsQueryDto): Promise<GetRecommendationsResponseDto> {
const limit = Math.min(50, Math.max(1, Number(query.limit || 10)));
const limit = 10
// 取最新文章若干
const articlesRes = await this.articlesService.query({ page: 1, pageSize: limit } as any);