feat:新增活动日志模块,包括控制器、服务、模型及数据传输对象,更新应用模块以引入新模块,并在打卡和训练计划模块中集成活动日志记录功能。
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user