活动:首充增加页签
This commit is contained in:
@@ -28,6 +28,7 @@ import { getRoleOnlineInfo } from './redisService';
|
||||
import { PayCallback37Data } from '../domain/sdk';
|
||||
import { reportTAEvent, reportTAUserSet } from './sdkService';
|
||||
import { savePayLog } from '../pubUtils/logUtil';
|
||||
import { recordFirstGift } from './activity/firstGiftService';
|
||||
|
||||
|
||||
/**
|
||||
@@ -49,16 +50,6 @@ export async function makeOrder(orderInfo: UserOrderModelType, sid: string) {
|
||||
|
||||
let rewardResult: any = { code: 0, data: null };
|
||||
|
||||
//首冲礼包
|
||||
{
|
||||
let { activityGroupId } = await ServerlistModel.findByServerId(orderInfo.serverId);
|
||||
let activityArray: ActivityModelType[] = await ActivityModel.findOpenActivityByType(activityGroupId, ACTIVITY_TYPE.FIRST_GIFT, new Date())
|
||||
for (let obj of activityArray) {
|
||||
await ActivityFirstGiftModel.begin(obj.activityId, roleId);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
switch (productType) {
|
||||
case ACTIVITY_TYPE.SIGN_IN_VIP:
|
||||
{
|
||||
@@ -144,6 +135,11 @@ export async function makeOrder(orderInfo: UserOrderModelType, sid: string) {
|
||||
rewardResult = STATUS.ERROR_TYPE;
|
||||
break;
|
||||
}
|
||||
|
||||
if(rewardResult.code == 0) {
|
||||
await recordFirstGift(roleInfo, orderInfo.serverId);
|
||||
}
|
||||
|
||||
pinus.app.get('channelService').pushMessageByUids('onPlayerDataChange', resResult(STATUS.SUCCESS, {
|
||||
totalPay: roleInfo.totalPay
|
||||
}), [{ uid: roleId, sid }]);
|
||||
|
||||
Reference in New Issue
Block a user