fix product
This commit is contained in:
parent
d8b9202fb7
commit
ee42cc9acd
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user