dev add stats for search check
Test Workflow / test (push) Successful in 3s

This commit is contained in:
vladp
2026-02-05 18:55:54 +07:00
parent adc978bea8
commit f90b8a0bce
15 changed files with 261 additions and 53 deletions
@@ -13,6 +13,9 @@ public class TariffConstants {
public static final Integer PRO_TOKENS = 300;
public static final Integer ENTERPRISE_TOKENS = 400;
public static final Integer TOKEN_VALUE = 3;
public static final Integer IMAGE_TOKEN_VALUE = 3;
public static final Integer VIDEO_TOKEN_VALUE = 16;
public static final Integer AUDIO_TOKEN_VALUE = 8;
public static final Integer PDF_TOKEN_VALUE = 6;
public static final Integer TOKEN_VALUE_FOR_SEARCH = 5;
}
@@ -54,7 +54,7 @@ public class TariffInfoService {
Integer tokens = activeTariffInfo.getTokens();
if (tokens - value > 0) {
activeTariffInfo.setTokens(activeTariffInfo.getTokens() - TariffConstants.TOKEN_VALUE);
activeTariffInfo.setTokens(activeTariffInfo.getTokens() - value);
tariffInfoRepository.save(activeTariffInfo);
} else {