团购:修改字段
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user