|
|
@@ -465,15 +465,15 @@ const syncBaseEvents = ({ mk, games, outrights }) => {
|
|
|
const { eventId, originId, stage, retime, score, wm, evtime, events } = game;
|
|
|
const baseGame = baseMap.get(eventId);
|
|
|
if (baseGame) {
|
|
|
- OddsHistory.recordGameOdds({ game: { ...baseGame, originId }, events, platform: 'pc' })
|
|
|
- .catch(err => {
|
|
|
- Logs.out('record odds history failed, eventId %s, %s', eventId, err.message);
|
|
|
- });
|
|
|
+ // OddsHistory.recordGameOdds({ game: { ...baseGame, originId }, events, platform: 'pc' })
|
|
|
+ // .catch(err => {
|
|
|
+ // Logs.out('record odds history failed, eventId %s, %s', eventId, err.message);
|
|
|
+ // });
|
|
|
const adjustedEvents = rouMaxAdjust(events);
|
|
|
Object.keys(adjustedEvents).forEach(ior => {
|
|
|
const regWm = /^ior_(wm|mn)/;
|
|
|
const regOu = /^ior_ou/;
|
|
|
- const regOt = /^ior_ot/;
|
|
|
+ // const regOt = /^ior_ot/;
|
|
|
// 平局/让平调水(%)
|
|
|
if (regWm.test(ior) && innerWmSubsidyRatio) {
|
|
|
const sourceOdds = adjustedEvents[ior].v;
|
|
|
@@ -481,11 +481,11 @@ const syncBaseEvents = ({ mk, games, outrights }) => {
|
|
|
adjustedEvents[ior].s = sourceOdds;
|
|
|
}
|
|
|
// 进球数调水(%)
|
|
|
- else if (regOt.test(ior) && innerOtSubsidyRatio) {
|
|
|
- const sourceOdds = adjustedEvents[ior].v;
|
|
|
- adjustedEvents[ior].v = fixFloat(sourceOdds * (1 + innerOtSubsidyRatio / 100), 3);
|
|
|
- adjustedEvents[ior].s = sourceOdds;
|
|
|
- }
|
|
|
+ // else if (regOt.test(ior) && innerOtSubsidyRatio) {
|
|
|
+ // const sourceOdds = adjustedEvents[ior].v;
|
|
|
+ // adjustedEvents[ior].v = fixFloat(sourceOdds * (1 + innerOtSubsidyRatio / 100), 3);
|
|
|
+ // adjustedEvents[ior].s = sourceOdds;
|
|
|
+ // }
|
|
|
// 大小球最低赔率
|
|
|
if (regOu.test(ior) && innerOuMinValue) {
|
|
|
const sourceOdds = adjustedEvents[ior].s ?? adjustedEvents[ior].v ?? 1;
|
|
|
@@ -504,7 +504,43 @@ const syncBaseEvents = ({ mk, games, outrights }) => {
|
|
|
}
|
|
|
});
|
|
|
|
|
|
- if (games?.length) {
|
|
|
+ // 浏览器采集特殊盘口用的
|
|
|
+ outrights?.forEach(outright => {
|
|
|
+ const { parentId, sptime, special } = outright;
|
|
|
+ const baseGame = baseMap.get(parentId);
|
|
|
+ Object.keys(special).forEach(ior => {
|
|
|
+ const regWm = /^ior_(wm|mn)/;
|
|
|
+ const regOt = /^ior_ot/;
|
|
|
+ // 平局/让平调水(%)
|
|
|
+ if (regWm.test(ior) && innerWmSubsidyRatio) {
|
|
|
+ const sourceOdds = special[ior].v;
|
|
|
+ special[ior].v = fixFloat(sourceOdds * (1 + innerWmSubsidyRatio / 100), 3);
|
|
|
+ special[ior].s = sourceOdds;
|
|
|
+ }
|
|
|
+ // 进球数调水(%)
|
|
|
+ else if (regOt.test(ior) && innerOtSubsidyRatio) {
|
|
|
+ const sourceOdds = special[ior].v;
|
|
|
+ special[ior].v = fixFloat(sourceOdds * (1 + innerOtSubsidyRatio / 100), 3);
|
|
|
+ special[ior].s = sourceOdds;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (baseGame) {
|
|
|
+ // 赛前特殊盘口
|
|
|
+ baseGame.sptime = sptime;
|
|
|
+ baseGame.special = special;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ const originBaseMap = new Map(baseList[marketType].map(item => [item.originId, item]));
|
|
|
+ const originBaseGame = originBaseMap.get(parentId);
|
|
|
+ if (originBaseGame) {
|
|
|
+ // 滚球特殊盘口
|
|
|
+ originBaseGame.sptime = sptime;
|
|
|
+ originBaseGame.special = special;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ if (games?.length || outrights?.length) {
|
|
|
const gamesList = baseList[marketType]?.map(game => {
|
|
|
const { evtime, events, sptime, special, ...gameInfo } = game;
|
|
|
const expireTimeEv = nowTime - expireTimeEvents;
|
|
|
@@ -1785,7 +1821,7 @@ process.on('SIGUSR2', () => {
|
|
|
});
|
|
|
|
|
|
|
|
|
-const GamesPs = {
|
|
|
+const Games = {
|
|
|
updateLeaguesList, getFilteredLeagues,
|
|
|
updateGamesList, updateGamesEvents, updateBaseEvents,
|
|
|
getGamesRelation,
|
|
|
@@ -1809,4 +1845,4 @@ export {
|
|
|
notifyException,
|
|
|
};
|
|
|
|
|
|
-export default GamesPs;
|
|
|
+export default Games;
|