mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-05 11:06:28 +00:00
update query load balance if found flag has been 255
This commit is contained in:
@@ -130,7 +130,10 @@ const getReservationPendingWithFlagCounter = (cardNumber, time, flag) => {
|
||||
)
|
||||
.where('c_card_number', cardNumber)
|
||||
.whereIn('c_status', ['P', 'I'])
|
||||
.whereRaw('??::INT < ??', ['c_flag', parseInt(flag)])
|
||||
.where((builder) => {
|
||||
builder.whereRaw('??::INT < ?', ['c_flag', parseInt(flag)]).orWhere('c_flag', 255);
|
||||
})
|
||||
// .whereRaw('??::INT < ??', ['c_flag', parseInt(flag)])
|
||||
// .where("d_expired", ">=", time)
|
||||
.where('c_flag', '!=', '-1');
|
||||
return result;
|
||||
|
||||
Reference in New Issue
Block a user