数数:埋点
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { DividendModel } from './../db/Dividend';
|
||||
import { LOT_CODE_LEN, AUCTION_STAGE, AUCTION_TIME, DIVIDEND_CODE_LEN, DIVIDEND_STATUS, LOT_STATUS, MAIL_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, DIVIDENDMAXRATIO, DIVIDENDPOSITIONMAXRATIO, ROLE_RECEIVE_STATUS, AUCTION_BID_STATUS, DEBUG_MAGIC_WORD, AUCTION_SOURCE } from './../consts';
|
||||
import { LOT_CODE_LEN, AUCTION_STAGE, AUCTION_TIME, DIVIDEND_CODE_LEN, DIVIDEND_STATUS, LOT_STATUS, MAIL_TYPE, CURRENCY_BY_TYPE, CURRENCY_TYPE, DIVIDENDMAXRATIO, DIVIDENDPOSITIONMAXRATIO, ROLE_RECEIVE_STATUS, AUCTION_BID_STATUS, DEBUG_MAGIC_WORD, AUCTION_SOURCE, TA_EVENT, getAuctionSourceTypeName } from './../consts';
|
||||
import { DividendRec, ItemReward } from "../domain/dbGeneral";
|
||||
import { genCode, getRandSingleEelm } from '../pubUtils/util';
|
||||
import { LotModel, LotParam, LotType } from '../db/Lot';
|
||||
@@ -13,6 +13,7 @@ import { Member } from '../domain/battleField/guildActivity';
|
||||
import * as dicParam from '../pubUtils/dicParam';
|
||||
import { RewardInter } from '../pubUtils/interface';
|
||||
import { getGuildAuctionChannelSid, getGuildChannelSid, getWorldAuctionChannelSid, pushCurrentTime } from './chatService';
|
||||
import { reportTAEvent } from './sdkService';
|
||||
|
||||
// ! 获取底价,假数据
|
||||
export function getBasePrice(gid: number, count: number) {
|
||||
@@ -298,15 +299,19 @@ export async function startGuildAuction() {
|
||||
}
|
||||
|
||||
export async function sendLotsRewardToMlail(lots: LotType[]) {
|
||||
let lotByRole = new Map<string, RewardInter[]>();
|
||||
let lotByRole = new Map<string, (RewardInter&{price: number})[]>();
|
||||
for(let lot of lots) {
|
||||
if(!lotByRole.has(lot.curBuyer)) {
|
||||
lotByRole.set(lot.curBuyer, []);
|
||||
}
|
||||
lotByRole.get(lot.curBuyer).push({ id: lot.gid, count: lot.count });
|
||||
lotByRole.get(lot.curBuyer).push({ id: lot.gid, count: lot.count, price: lot.curPrice });
|
||||
}
|
||||
for(let [roleId, goods ] of lotByRole) {
|
||||
await sendMailByContent(MAIL_TYPE.AUTION_REWARD, roleId, { goods });
|
||||
for(let { id, count, price } of goods) {
|
||||
let dicGoods = gameData.goods.get(id);
|
||||
reportTAEvent(roleId, TA_EVENT.AUCTION_ITEM_GET, { item_name: dicGoods?.name, item_count: count, deel_price: price });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -411,6 +416,7 @@ export async function sendUngotDividend(debug = false) {
|
||||
if (dividendRec.status === ROLE_RECEIVE_STATUS.YES) continue;
|
||||
const sum = rewards.get(dividendRec.roleId) || 0;
|
||||
rewards.set(dividendRec.roleId, sum + dividendRec.total);
|
||||
reportTAEvent(dividendRec.roleId, TA_EVENT.AUCTION_DIVIDEND, { type: getAuctionSourceTypeName(dividend.sourceType), count: dividendRec.total })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user