ソースを参照

优化策略差异判断

flyzto 3 ヶ月 前
コミット
d3557a1635
1 ファイル変更4 行追加2 行削除
  1. 4 2
      server/models/GamesPs.js

+ 4 - 2
server/models/GamesPs.js

@@ -689,7 +689,7 @@ const updateSolutions = (solutions, eventsLogsMap) => {
     const solutionsHistory = GAMES.Solutions;
     const updateIds = { add: [], update: [], retain: [], remove: [] }
     solutions.forEach(item => {
-      const { sid, cpr, sol: { win_average } } = item;
+      const { sid, cpr, sol: { win_average, win_profit_rate } } = item;
 
       if (!solutionsHistory[sid]) {
         solutionsHistory[sid] = item;
@@ -698,7 +698,9 @@ const updateSolutions = (solutions, eventsLogsMap) => {
       }
 
       const historySolution = solutionsHistory[sid];
-      if (historySolution.sol.win_average !== win_average || !compareCpr(historySolution.cpr, cpr)) {
+      if (historySolution.sol.win_average !== win_average ||
+        historySolution.sol.win_profit_rate !== win_profit_rate ||
+        !compareCpr(historySolution.cpr, cpr)) {
         solutionsHistory[sid] = item;
         updateIds.update.push(sid);
         return;