From 484b5343222070c1258c4f00b06524aec436d8ce Mon Sep 17 00:00:00 2001 From: ilham Date: Sun, 27 Feb 2022 09:10:54 +0700 Subject: [PATCH] add: orderby in product --- src/product/product.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/product/product.service.ts b/src/product/product.service.ts index 0a29b68..9ec8bac 100644 --- a/src/product/product.service.ts +++ b/src/product/product.service.ts @@ -181,7 +181,8 @@ export class ProductService { .addSelect('current_price.price') .addSelect( '(current_price.price + current_price.mark_up_price) as mark_up_price', - ); + ) + .orderBy('product.code'); if (subCategories && filterSubCategories.length > 0) { baseQuery.where('product.sub_categories_id IN (:...subCategoryId)', {