团购:推送时下发当前所有次数
This commit is contained in:
@@ -92,7 +92,7 @@ export class GroupShopHandler {
|
|||||||
if(isRankUp) {
|
if(isRankUp) {
|
||||||
await ActivityGroupShopRecModel.addRecord(activityId, id, new GroupShopRecord(nextDiscount));
|
await ActivityGroupShopRecModel.addRecord(activityId, id, new GroupShopRecord(nextDiscount));
|
||||||
// 推送频道
|
// 推送频道
|
||||||
await sendMessageToGroupShopWithSuc(PUSH_ROUTE.GROUP_SHOP_UPDATE, { activityId, id, curDiscount: nextDiscount });
|
await sendMessageToGroupShopWithSuc(PUSH_ROUTE.GROUP_SHOP_UPDATE, { activityId, id, sum: item.sum, curDiscount: nextDiscount });
|
||||||
}
|
}
|
||||||
let reward = [{ id: item.gid, count: item.count * buyCnt }];
|
let reward = [{ id: item.gid, count: item.count * buyCnt }];
|
||||||
let goods = await addItems(roleId, roleName, sid, reward, ITEM_CHANGE_REASON.ACT_GROUP_SHOP_BUY);
|
let goods = await addItems(roleId, roleName, sid, reward, ITEM_CHANGE_REASON.ACT_GROUP_SHOP_BUY);
|
||||||
@@ -127,7 +127,7 @@ export class GroupShopHandler {
|
|||||||
if(!item) continue;
|
if(!item) continue;
|
||||||
let nextDiscount = item.getCurDiscount();
|
let nextDiscount = item.getCurDiscount();
|
||||||
// 推送频道
|
// 推送频道
|
||||||
await sendMessageToGroupShopWithSuc(PUSH_ROUTE.GROUP_SHOP_UPDATE, { activityId: activityData.activityId, id, curDiscount: nextDiscount });
|
await sendMessageToGroupShopWithSuc(PUSH_ROUTE.GROUP_SHOP_UPDATE, { activityId: activityData.activityId, id, sum: item.sum, curDiscount: nextDiscount });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let playerData = await getGroupShopDataShow(activities[0].activityId, roleId);
|
let playerData = await getGroupShopDataShow(activities[0].activityId, roleId);
|
||||||
|
|||||||
@@ -72,7 +72,7 @@ export async function setGroupShopToSetSum(arr: { activityId: number, itemId: nu
|
|||||||
let item = playerData.findItemById(itemId);
|
let item = playerData.findItemById(itemId);
|
||||||
let nextDiscount = item.getCurDiscount();
|
let nextDiscount = item.getCurDiscount();
|
||||||
// 推送频道
|
// 推送频道
|
||||||
await sendMessageToGroupShopWithSuc(PUSH_ROUTE.GROUP_SHOP_UPDATE, { activityId, id: itemId, curDiscount: nextDiscount });
|
await sendMessageToGroupShopWithSuc(PUSH_ROUTE.GROUP_SHOP_UPDATE, { activityId, sum, id: itemId, curDiscount: nextDiscount });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user