Compare commits

...

2 Commits

2 changed files with 15 additions and 0 deletions

View File

@ -106,6 +106,15 @@ export class IndexItemManager extends BaseIndexManager<ItemEntity> {
queryBuilder.andWhere(`${this.tableName}.tenant_id Is Null`); queryBuilder.andWhere(`${this.tableName}.tenant_id Is Null`);
} }
if (this.filterParam.time_group_ids?.length) {
queryBuilder.andWhere(
`${this.tableName}.time_group_id In (:...timeGroupIds)`,
{
timeGroupIds: this.filterParam.time_group_ids,
},
);
}
if (this.filterParam.show_to_booking) { if (this.filterParam.show_to_booking) {
queryBuilder.andWhere(`${this.tableName}.show_to_booking = true`); queryBuilder.andWhere(`${this.tableName}.show_to_booking = true`);
} }

View File

@ -16,6 +16,12 @@ export class FilterItemDto extends BaseFilterDto implements FilterItemEntity {
}) })
season_period_ids: string[]; season_period_ids: string[];
@ApiProperty({ type: ['string'], required: false })
@Transform((body) => {
return Array.isArray(body.value) ? body.value : [body.value];
})
time_group_ids: string[];
@ApiProperty({ type: ['string'], required: false }) @ApiProperty({ type: ['string'], required: false })
@Transform((body) => { @Transform((body) => {
return Array.isArray(body.value) ? body.value : [body.value]; return Array.isArray(body.value) ? body.value : [body.value];