mirror of
https://github.com/mohamadihsan/topuponline.git
synced 2026-12-05 17:46:28 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9af6f4f823 | |||
| 5259fd89ef | |||
| 0e35368e22 | |||
| 0fdc901193 | |||
| c3a458313e |
@@ -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
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user