同步历史版本代码

This commit is contained in:
2026-03-03 09:32:22 -08:00
parent 7d46b31866
commit 4d8516b2e1
140 changed files with 8399 additions and 489 deletions
+8
View File
@@ -32,9 +32,17 @@ func (l *RateLogic) ProcessTask(ctx context.Context, _ *asynq.Task) error {
CurrencyUnit string
CurrencySymbol string
AccessKey string
FixedRate float64
}{}
tool.SystemConfigSliceReflectToStruct(currency, &configs)
// Check if fixed rate is enabled (greater than 0)
if configs.FixedRate > 0 {
l.svcCtx.ExchangeRate = configs.FixedRate
logger.WithContext(ctx).Infof("[RateLogic] Use Fixed Exchange Rate: %f", configs.FixedRate)
return nil
}
// Skip conversion if no exchange rate API key configured
if configs.AccessKey == "" {
logger.Debugf("[RateLogic] skip exchange rate, no access key configured")