feat: increase item limit to 1000 and enhance query for time group filtering
parent
d4d605d168
commit
3661d9d171
|
@ -21,6 +21,7 @@ export class ItemController {
|
||||||
async index(
|
async index(
|
||||||
@Query() params: FilterItemDto,
|
@Query() params: FilterItemDto,
|
||||||
): Promise<PaginationResponse<ItemEntity>> {
|
): Promise<PaginationResponse<ItemEntity>> {
|
||||||
|
params.limit = 1000;
|
||||||
params.show_to_booking = true;
|
params.show_to_booking = true;
|
||||||
this.indexManager.setFilterParam(params);
|
this.indexManager.setFilterParam(params);
|
||||||
this.indexManager.setService(this.serviceData, TABLE_NAME.ITEM);
|
this.indexManager.setService(this.serviceData, TABLE_NAME.ITEM);
|
||||||
|
|
|
@ -53,6 +53,7 @@ export class IndexItemManager extends BaseIndexManager<ItemEntity> {
|
||||||
`${this.tableName}.share_profit`,
|
`${this.tableName}.share_profit`,
|
||||||
`${this.tableName}.breakdown_bundling`,
|
`${this.tableName}.breakdown_bundling`,
|
||||||
`${this.tableName}.play_estimation`,
|
`${this.tableName}.play_estimation`,
|
||||||
|
`${this.tableName}.show_to_booking`,
|
||||||
|
|
||||||
`item_category.id`,
|
`item_category.id`,
|
||||||
`item_category.name`,
|
`item_category.name`,
|
||||||
|
@ -108,7 +109,7 @@ export class IndexItemManager extends BaseIndexManager<ItemEntity> {
|
||||||
|
|
||||||
if (this.filterParam.time_group_ids?.length) {
|
if (this.filterParam.time_group_ids?.length) {
|
||||||
queryBuilder.andWhere(
|
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,
|
timeGroupIds: this.filterParam.time_group_ids,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue