活动:月卡过期奖品发放邮件

This commit is contained in:
qiaoxin
2021-05-27 16:17:44 +08:00
parent 9b80dae800
commit 068d6e1202
5 changed files with 60 additions and 7 deletions
+16 -1
View File
@@ -142,4 +142,19 @@ export function stringToConsumeParam(rewardStr: string): Array<ItemInter> {
result.push({ type: parseInt(type), id: parseInt(id), count: parseInt(count) });
}
return result
}
}
//数据格式转换'id&数量|id&数量|' ->> Array<RewardInter> 老资源格式
export function stringToRewardInter(rewardStr: string): Array<RewardInter> {
let result = new Array<{ id: number, count: number }>();
if (!rewardStr) return result;
let decodeArr = decodeArrayListStr(rewardStr);
for (let [type, id, count] of decodeArr) {
if (isNaN(parseInt(id)) || isNaN(parseInt(count))) {
throw new Error('data table format wrong');
}
result.push({ id: parseInt(id), count: parseInt(count) });
}
return result
}