团购:修改字段

This commit is contained in:
luying
2022-10-12 14:33:19 +08:00
parent 9f5771e923
commit 575680b9a8
2 changed files with 7 additions and 7 deletions

View File

@@ -143,15 +143,15 @@ export class GroupShopData extends ActivityBase {
}
public setRecords(data: ActivityGroupShopRecType[]) {
for(let { id, sum } of data) {
let item = this.findItemById(id);
for(let { itemId, sum } of data) {
let item = this.findItemById(itemId);
if(item) item.setSum(sum);
}
}
public incAllRecord(data: ActivityGroupShopRecType) {
if(!data) return false;
let item = this.findItemById(data.id);
let item = this.findItemById(data.itemId);
let oldDiscountId = item.getCurDiscount().id;
item.setSum(data.sum);
let newDiscountId = item.getCurDiscount().id;
@@ -160,8 +160,8 @@ export class GroupShopData extends ActivityBase {
public setPlayerRecord(data: ActivityGroupShopUserRecType[]) {
for(let { id, buyCnt } of data) {
let item = this.findItemById(id);
for(let { itemId, buyCnt } of data) {
let item = this.findItemById(itemId);
if(item) item.setPlayerCnt(buyCnt);
}
}