feat(37需求): 修改返利逻辑

This commit is contained in:
luying
2023-04-07 17:57:15 +08:00
parent b84e89dff0
commit f0a5809104
10 changed files with 275 additions and 46 deletions

View File

@@ -20,7 +20,6 @@ import { calculateCeWithRole } from './playerCeService';
import { sendMessageToUserWithSuc } from './pushService';
import { ActionPointModel } from '../db/ActionPoint';
import { GK_MAIN, GK_MAINELITE, RECHARGE } from '../pubUtils/dicParam';
import { rebateHistoryOrder } from './orderService';
import { updateGVGBattleRoleInfo } from './gvg/gvgTeamService';
export async function roleLevelup(type: KING_EXP_RATIO_TYPE, roleId: string, kingExp: number = 0, session: BackendSession) {
@@ -53,10 +52,6 @@ export async function roleLevelup(type: KING_EXP_RATIO_TYPE, roleId: string, kin
// await calculateCeWithRole(HERO_SYSTEM_TYPE.ROLE_LV, roleId, serverId, sid, { lv: newLv });
await updateRoleOnlineInfo(roleId, { lv: newLv });
// 达到等级返利
if(lv < RECHARGE.RECHARGE_RMB_RETURN_LEVEL_LIMITED && newLv >= RECHARGE.RECHARGE_RMB_RETURN_LEVEL_LIMITED) {
rebateHistoryOrder(roleId, role.userInfo?.uid);
}
await updateGVGBattleRoleInfo(serverId, roleId, { lv });
}