|
@@ -317,21 +317,24 @@ const syncBaseEvents = ({ mk, games, outrights }) => {
|
|
|
if (isRb && (ior.startsWith('ior_r') || ior.startsWith('ior_m') || ior.startsWith('ior_wm')) && subsidyRbWmAmount) {
|
|
if (isRb && (ior.startsWith('ior_r') || ior.startsWith('ior_m') || ior.startsWith('ior_wm')) && subsidyRbWmAmount) {
|
|
|
const sourceOdds = events[ior].v;
|
|
const sourceOdds = events[ior].v;
|
|
|
events[ior].v = fixFloat(sourceOdds * (1 + subsidyRbWmAmount), 3);
|
|
events[ior].v = fixFloat(sourceOdds * (1 + subsidyRbWmAmount), 3);
|
|
|
- events[ior].s = sourceOdds
|
|
|
|
|
|
|
+ events[ior].s = sourceOdds;
|
|
|
}
|
|
}
|
|
|
// 滚球进球数补水
|
|
// 滚球进球数补水
|
|
|
// API采集特殊盘口用
|
|
// API采集特殊盘口用
|
|
|
else if (isRb && ior.startsWith('ior_ot') && subsidyRbOtAmount) {
|
|
else if (isRb && ior.startsWith('ior_ot') && subsidyRbOtAmount) {
|
|
|
const sourceOdds = events[ior].v;
|
|
const sourceOdds = events[ior].v;
|
|
|
events[ior].v = fixFloat(sourceOdds * (1 + subsidyRbOtAmount), 3);
|
|
events[ior].v = fixFloat(sourceOdds * (1 + subsidyRbOtAmount), 3);
|
|
|
- events[ior].s = sourceOdds
|
|
|
|
|
|
|
+ events[ior].s = sourceOdds;
|
|
|
}
|
|
}
|
|
|
// 赛前进球数补水
|
|
// 赛前进球数补水
|
|
|
// API采集特殊盘口用
|
|
// API采集特殊盘口用
|
|
|
else if (!isRb && isSubsidy && ior.startsWith('ior_ot') && subsidyAmount) {
|
|
else if (!isRb && isSubsidy && ior.startsWith('ior_ot') && subsidyAmount) {
|
|
|
const sourceOdds = events[ior].v;
|
|
const sourceOdds = events[ior].v;
|
|
|
events[ior].v = fixFloat(sourceOdds * (1 + subsidyAmount), 3);
|
|
events[ior].v = fixFloat(sourceOdds * (1 + subsidyAmount), 3);
|
|
|
- events[ior].s = sourceOdds
|
|
|
|
|
|
|
+ events[ior].s = sourceOdds;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (ior.startsWith('ior_r') || ior.startsWith('ior_ou')) {
|
|
|
|
|
+ events[ior].q = events[ior]?.v < innerOuMinValue ? 0 : 1;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
baseGame.originId = originId;
|
|
baseGame.originId = originId;
|
|
@@ -400,14 +403,12 @@ const syncBaseEvents = ({ mk, games, outrights }) => {
|
|
|
const matches = PS_IOR_KEYS.map(([label, ...keys]) => {
|
|
const matches = PS_IOR_KEYS.map(([label, ...keys]) => {
|
|
|
let match = keys.map(key => {
|
|
let match = keys.map(key => {
|
|
|
let value = odds[key]?.v ?? 0;
|
|
let value = odds[key]?.v ?? 0;
|
|
|
- if (key.startsWith('ior_ou') && value < innerOuMinValue) {
|
|
|
|
|
- value = 0;
|
|
|
|
|
- }
|
|
|
|
|
return {
|
|
return {
|
|
|
key, value,
|
|
key, value,
|
|
|
origin: odds[key]?.r,
|
|
origin: odds[key]?.r,
|
|
|
source: odds[key]?.s,
|
|
source: odds[key]?.s,
|
|
|
- }
|
|
|
|
|
|
|
+ quality: odds[key]?.q ?? 1,
|
|
|
|
|
+ };
|
|
|
});
|
|
});
|
|
|
if (label == 'jqs' || label == 'ou') {
|
|
if (label == 'jqs' || label == 'ou') {
|
|
|
match = match.filter(item => item.value !== 0);
|
|
match = match.filter(item => item.value !== 0);
|
|
@@ -457,11 +458,12 @@ const syncBaseEvents = ({ mk, games, outrights }) => {
|
|
|
if (relatedGame) {
|
|
if (relatedGame) {
|
|
|
const events = {};
|
|
const events = {};
|
|
|
matches.forEach(({ label, match }) => {
|
|
matches.forEach(({ label, match }) => {
|
|
|
- match.forEach(({ key, value, origin, source }) => {
|
|
|
|
|
|
|
+ match.forEach(({ key, value, origin, source, quality }) => {
|
|
|
events[key] = {
|
|
events[key] = {
|
|
|
v: value,
|
|
v: value,
|
|
|
r: origin,
|
|
r: origin,
|
|
|
- s: source
|
|
|
|
|
|
|
+ s: source,
|
|
|
|
|
+ q: quality,
|
|
|
};
|
|
};
|
|
|
});
|
|
});
|
|
|
});
|
|
});
|