Compare commits

...

5 Commits

Author SHA1 Message Date
ihsan 9af6f4f823 bug fixed 2025-03-26 15:17:56 +07:00
ihsan 5259fd89ef chnage version 2025-03-26 05:24:29 +07:00
ihsan 0e35368e22 handling max flag 255 2025-03-24 21:26:59 +07:00
ihsan 0fdc901193 change logic 2025-03-24 16:44:02 +07:00
ihsan c3a458313e bug fixed flag 0 auto clear 2025-03-24 09:24:51 +07:00
3 changed files with 10 additions and 5 deletions
@@ -746,7 +746,12 @@ const loadingBalanceRequest = async (req, res) => {
`${uniqueCode} [ RESPONSE LOADING-BALANCE-REQUEST DEBUG Y ]: ${card_number}`
);
if ((parseInt(lastFlag) <= parseInt(flag)) || (parseInt(lastFlag) == 255 && parseInt(flag) == 0)) {
// manipulasi last flag jika flag kartu sudah kembali ke 0
if (parseInt(lastFlag) == 255 && parseInt(flag) == 0) {
lastFlag = -1
}
if (parseInt(lastFlag) < parseInt(flag)) {
winston.logger.warn(
`${uniqueCode} [ RESPONSE LOADING-BALANCE-REQUEST DEBUG Z ]: ${card_number}`
@@ -2142,7 +2147,7 @@ const loadingBalanceUpdate = async (param) => {
// log info
winston.logger.info(
`${uniqueCode} [ RESPONSE LOADING-BALANCE-INSERT ]: ${JSON.stringify(
`${uniqueCode} [ RESPONSE LOADING-BALANCE-UPDATE ]: ${JSON.stringify(
result
)}`
);
@@ -132,7 +132,7 @@ const getReservationPendingWithFlagCounter = (cardNumber, time, flag) => {
)
.where('c_card_number', cardNumber)
.whereIn('c_status', ['P', 'I'])
.whereRaw('??::INT < ??', ['c_flag', parseInt(255)])
.whereRaw('??::INT <= ??', ['c_flag', parseInt(255)])
// .where("d_expired", ">=", time)
.where('c_flag', '!=', '-1');
} else {
+2 -2
View File
@@ -1,7 +1,7 @@
{
"name": "topuponline",
"version": "1.5.7",
"description": "change file rotate log from 90 days to 60 days",
"version": "1.6.0",
"description": "handling maximum flag 255",
"main": "index.js",
"scripts": {
"start": "nodemon index",