feat: increase item limit to 1000 and enhance query for time group filtering

pull/147/head 1.6.8-alpha.2
shancheas 2025-06-09 17:26:57 +07:00
parent d4d605d168
commit 3661d9d171
2 changed files with 3 additions and 1 deletions

View File

@ -21,6 +21,7 @@ export class ItemController {
async index(
@Query() params: FilterItemDto,
): Promise<PaginationResponse<ItemEntity>> {
params.limit = 1000;
params.show_to_booking = true;
this.indexManager.setFilterParam(params);
this.indexManager.setService(this.serviceData, TABLE_NAME.ITEM);

View File

@ -53,6 +53,7 @@ export class IndexItemManager extends BaseIndexManager<ItemEntity> {
`${this.tableName}.share_profit`,
`${this.tableName}.breakdown_bundling`,
`${this.tableName}.play_estimation`,
`${this.tableName}.show_to_booking`,
`item_category.id`,
`item_category.name`,
@ -108,7 +109,7 @@ export class IndexItemManager extends BaseIndexManager<ItemEntity> {
if (this.filterParam.time_group_ids?.length) {
queryBuilder.andWhere(
`${this.tableName}.time_group_id In (:...timeGroupIds)`,
`${this.tableName}.time_group_id In (:...timeGroupIds) OR ${this.tableName}.time_group_id Is Null`,
{
timeGroupIds: this.filterParam.time_group_ids,
},