fix: deploy

This commit is contained in:
ilham
2022-01-05 22:56:23 +07:00
parent 7162bc34dd
commit 36d53b2f5f
2 changed files with 28 additions and 13 deletions

View File

@@ -19,6 +19,17 @@ export class ProductHistoryPriceService {
return result;
}
async getAllActivePriceByProduct(productId: string) {
const result = await this.productHistoryPriceRepository
.createQueryBuilder('product_history_price')
.leftJoin('product_history_price.product', 'product')
.where({ product: productId })
.andWhere('product_history_price.endDate IS NULL')
.getMany();
return result;
}
async updateEndDate(idProduct: string) {
try {
const dataPrice = await this.productHistoryPriceRepository