diff --git a/src/product/product.service.ts b/src/product/product.service.ts index a850649..5077910 100644 --- a/src/product/product.service.ts +++ b/src/product/product.service.ts @@ -77,9 +77,9 @@ export class ProductService { 'product.code', 'sub_categories.name', 'category.name', - ]); - // .addSelect('current_price.price') - // .addSelect('(current_price.price + current_price.mark_up_price) as mark_up_price'); + ]) + .addSelect('current_price.price') + .addSelect('(current_price.price + current_price.mark_up_price) as mark_up_price'); if (subCategories != 'null' && subCategories) { baseQuery.andWhere('product.sub_categories_id = :id', { @@ -94,9 +94,9 @@ export class ProductService { // } const data = await baseQuery - .skip(page * 10) - .take(10) - .getMany(); + .offset(page * 10) + .limit(10) + .getRawMany(); const totalData = await baseQuery.getCount();