Merge branch 'development' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend into devops-staging

This commit is contained in:
Muhammad Fadli 2023-05-10 14:15:19 +07:00
commit cf899abbc2
2 changed files with 12 additions and 0 deletions

View File

@ -186,6 +186,7 @@ export class TransactionController {
@Query('start') startDate: string,
@Query('end') endDate: string,
@Query('trxId') trxId: string,
@Query('partnerTrxId') partnerTrxId: string,
@Request() req,
) {
const data = await this.transactionService.transactionHistoryByUser(
@ -194,6 +195,7 @@ export class TransactionController {
startDate == 'null' ? null : startDate,
endDate == 'null' ? null : endDate,
trxId == 'null' ? null : trxId,
partnerTrxId == 'null' ? null : partnerTrxId,
pageSize,
);
@ -232,6 +234,7 @@ export class TransactionController {
@Query('start') startDate: string,
@Query('end') endDate: string,
@Query('trxId') trxId: string,
@Query('partnerTrxId') partnerTrxId: string,
@Param('id', ParseUUIDPipe) id: string,
) {
const data = await this.transactionService.transactionHistoryByUser(
@ -240,6 +243,7 @@ export class TransactionController {
startDate == 'null' ? null : startDate,
endDate == 'null' ? null : endDate,
trxId == 'null' ? null : trxId,
partnerTrxId == 'null' ? null : partnerTrxId,
pageSize,
);

View File

@ -1886,6 +1886,7 @@ export class TransactionService {
startDate: string,
endDate: string,
trxId: string,
partnerTrxId: string,
pageSize?: number,
) {
const userData = await this.userService.findExist(user);
@ -1966,6 +1967,13 @@ export class TransactionService {
trxId: trxId
},
);
} else if (partnerTrxId != null) {
baseQuery.andWhere(
'transaction.partner_trx_id = :partnerTrxId',
{
partnerTrxId: partnerTrxId
},
);
}
const data = await baseQuery