fix building error: account.account was incorect for id < 100
This commit is contained in:
parent
f345145135
commit
73f2ed8650
1 changed files with 2 additions and 1 deletions
|
|
@ -316,6 +316,7 @@ public class InformationAccountService extends QueueConsumer implements Initiali
|
||||||
* @return infoCounter++
|
* @return infoCounter++
|
||||||
*/
|
*/
|
||||||
public synchronized Long accountNextId(String currency, Long currencyCodeId) {
|
public synchronized Long accountNextId(String currency, Long currencyCodeId) {
|
||||||
|
String idWithTrailingZero = String.format("%03d", currencyCodeId);
|
||||||
if (currency == null)
|
if (currency == null)
|
||||||
currency = CurrencyCode.RUB.getKey(); // default
|
currency = CurrencyCode.RUB.getKey(); // default
|
||||||
AtomicLong infoCounter = infoCounterByCurrency.get(currency);
|
AtomicLong infoCounter = infoCounterByCurrency.get(currency);
|
||||||
|
|
@ -338,7 +339,7 @@ public class InformationAccountService extends QueueConsumer implements Initiali
|
||||||
infoCounter = new AtomicLong(1);
|
infoCounter = new AtomicLong(1);
|
||||||
log.debug("No account information on map. n={}", infoCounter.get());
|
log.debug("No account information on map. n={}", infoCounter.get());
|
||||||
} else {
|
} else {
|
||||||
Pattern accPattern = Pattern.compile("39911%d([0-9]{8})7000".formatted(currencyCodeId));
|
Pattern accPattern = Pattern.compile("39911%s([0-9]{8})7000".formatted(idWithTrailingZero));
|
||||||
int maxN = 1;
|
int maxN = 1;
|
||||||
int parsedCount = 0;
|
int parsedCount = 0;
|
||||||
String lastAccount = null; // for debug
|
String lastAccount = null; // for debug
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue