|
@@ -7,10 +7,14 @@ const { eventSolutions } = require('./eventSolutions');
|
|
|
/**
|
|
/**
|
|
|
* 筛选最优赔率
|
|
* 筛选最优赔率
|
|
|
*/
|
|
*/
|
|
|
-const oddRebateValue = (odds, platform) => {
|
|
|
|
|
|
|
+const oddRebateValue = (odds, platform, key) => {
|
|
|
const setting = getSetting();
|
|
const setting = getSetting();
|
|
|
- const rebateRatio = setting[`${platform}RebateRatio`] ?? 0;
|
|
|
|
|
- const rebateType = setting[`${platform}RebateType`] ?? 0;
|
|
|
|
|
|
|
+ let rebateRatio = setting[`${platform}RebateRatio`] ?? 0;
|
|
|
|
|
+ let rebateType = setting[`${platform}RebateType`] ?? 0;
|
|
|
|
|
+
|
|
|
|
|
+ if (platform == 'hg' && key.startsWith('ior_m')) {
|
|
|
|
|
+ rebateRatio -= 0.75;
|
|
|
|
|
+ }
|
|
|
if (rebateType == 0) {
|
|
if (rebateType == 0) {
|
|
|
return odds * (1 + rebateRatio / 100);
|
|
return odds * (1 + rebateRatio / 100);
|
|
|
}
|
|
}
|
|
@@ -58,8 +62,8 @@ const getOptimalSelections = (odds, rules) => {
|
|
|
}
|
|
}
|
|
|
// Logs.out('candidates', candidates)
|
|
// Logs.out('candidates', candidates)
|
|
|
const best = candidates.reduce((a, b) => {
|
|
const best = candidates.reduce((a, b) => {
|
|
|
- const aValue = oddRebateValue(item[a].v-1, a);
|
|
|
|
|
- const bValue = oddRebateValue(item[b].v-1, b);
|
|
|
|
|
|
|
+ const aValue = oddRebateValue(item[a].v-1, a, key);
|
|
|
|
|
+ const bValue = oddRebateValue(item[b].v-1, b, key);
|
|
|
const seletcted = aValue > bValue ? a : b;
|
|
const seletcted = aValue > bValue ? a : b;
|
|
|
return seletcted;
|
|
return seletcted;
|
|
|
});
|
|
});
|