Browse Source

修正汇率比较逻辑和消息内容

将条件判断从 `rowthRate > currRate` 更改为 `cacheRate.Rate > currRate`,以确保在比较存储汇率和实时汇率时使用正确的值。同时,更新了消息内容,确保显示的存储汇率为 `cacheRate.Rate`。
Lyyyi 5 days ago
parent
commit
7d5919f5f2
1 changed files with 2 additions and 2 deletions
  1. 2 2
      OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

+ 2 - 2
OASystem/OASystem.Api/OAMethodLib/GeneralMethod.cs

@@ -4339,11 +4339,11 @@ namespace OASystem.API.OAMethodLib
                     if (liveRate == null) continue;
 
                     var currRate = (rowthRate * liveRate.Rate).TruncDecimals(4);
-                    if (rowthRate > currRate)
+                    if (cacheRate.Rate > currRate)
                     {
                         isSendMsg = true;
                         //>团组归属:<font color='info'>{groupName}</font>
-                        msgContent.Append($">- {cacheRate.CurrencyName}:存储汇率超过实时汇率,请注意!!!(存储汇率:{rowthRate.ToString("#0.0000")}  聚合API实时汇率:{currRate.ToString("#0.0000")}(已计算涨幅比例1.0350))");
+                        msgContent.AppendLine($">- {cacheRate.CurrencyName}:存储汇率超过实时汇率,请注意!!!(存储汇率:{cacheRate.Rate.ToString("#0.0000")}  聚合API实时汇率:{currRate.ToString("#0.0000")}(已计算涨幅比例1.0350))");
                     }
                 }
                 return (isSendMsg, msgContent.ToString());