feat: batch update - gift card breakdown spec, backend APIs, miniprogram pages, ETL finance recharge, docs & migrations

This commit is contained in:
Neo
2026-03-20 01:43:48 +08:00
parent 075caf067f
commit 79f9a0e1da
437 changed files with 118603 additions and 976 deletions

View File

@@ -0,0 +1,21 @@
/**
* 渲染辅助工具函数
* 纯函数,无 wx.* 依赖
*/
/**
* 从对象中提取指定字段,缺失字段填充 null
* @param item 数据对象
* @param fieldList 需要的字段名数组
* @returns 仅包含指定字段的新对象
*/
export function getRequiredFields(
item: Record<string, any>,
fieldList: string[]
): Record<string, any> {
const result: Record<string, any> = {}
for (const field of fieldList) {
result[field] = field in item ? item[field] : null
}
return result
}