|
|
|
@ -423,6 +423,86 @@ public class ExcelHeaderTranslator { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取用户金币余额的Excel表头映射 |
|
|
|
* 返回 Map<字段名, 中文表头> |
|
|
|
*/ |
|
|
|
public Map<String, String> getUserHeaders(String lang) { |
|
|
|
Map<String, String> headers = new LinkedHashMap<>(); |
|
|
|
|
|
|
|
// 定义所有表头的原始中文名称(对应 User 类的字段) |
|
|
|
headers.put("id", "客户id"); |
|
|
|
headers.put("jwcode", "精网号"); |
|
|
|
headers.put("name", "姓名"); |
|
|
|
headers.put("market", "所属地区"); |
|
|
|
headers.put("sumGold", "金币总数"); |
|
|
|
headers.put("currentPermanentGold", "当前永久金币"); |
|
|
|
headers.put("currentFreeJune", "当前六月到期免费金币"); |
|
|
|
headers.put("currentFreeDecember", "当前十二月到期免费金币"); |
|
|
|
headers.put("currentTaskGold", "当前任务金币"); |
|
|
|
headers.put("rechargeNum", "充值次数(25年起)"); |
|
|
|
headers.put("consumeNum", "消费次数(25年起)"); |
|
|
|
headers.put("firstRecharge", "首充日期"); |
|
|
|
headers.put("createTime", "创建时间"); |
|
|
|
headers.put("updateTime", "更新时间"); |
|
|
|
|
|
|
|
// 如果需要翻译,则翻译表头 |
|
|
|
if (!isChineseLanguage(lang)) { |
|
|
|
return translateHeaders(headers, lang); |
|
|
|
} |
|
|
|
|
|
|
|
return headers; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取用户金币余额表头顺序 |
|
|
|
*/ |
|
|
|
public List<String> getUserColumnOrder() { |
|
|
|
return Arrays.asList( |
|
|
|
"id", "jwcode", "name", "market", "sumGold", "currentPermanentGold", |
|
|
|
"currentFreeJune", "currentFreeDecember", "currentTaskGold", "rechargeNum", |
|
|
|
"consumeNum", "firstRecharge", "createTime", "updateTime" |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取金币明细的Excel表头映射 |
|
|
|
* 返回 Map<字段名, 中文表头> |
|
|
|
*/ |
|
|
|
public Map<String, String> getGoldDetailHeaders(String lang) { |
|
|
|
Map<String, String> headers = new LinkedHashMap<>(); |
|
|
|
|
|
|
|
// 定义所有表头的原始中文名称(对应 GoldDetail 类的字段) |
|
|
|
headers.put("name", "姓名"); |
|
|
|
headers.put("jwcode", "精网号"); |
|
|
|
headers.put("market", "所属地区"); |
|
|
|
headers.put("payPlatform", "平台信息"); |
|
|
|
headers.put("typeDesc", "更新类型"); |
|
|
|
headers.put("sumGold", "金币数量"); |
|
|
|
headers.put("permanentGold", "永久金币"); |
|
|
|
headers.put("freeGold", "免费金币"); |
|
|
|
headers.put("taskGold", "任务金币"); |
|
|
|
headers.put("adminName", "提交人"); |
|
|
|
headers.put("auditTime", "更新时间"); |
|
|
|
|
|
|
|
// 如果需要翻译,则翻译表头 |
|
|
|
if (!isChineseLanguage(lang)) { |
|
|
|
return translateHeaders(headers, lang); |
|
|
|
} |
|
|
|
|
|
|
|
return headers; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取金币明细表头顺序 |
|
|
|
*/ |
|
|
|
public List<String> getGoldDetailColumnOrder() { |
|
|
|
return Arrays.asList( |
|
|
|
"name", "jwcode", "market", "payPlatform", "typeDesc", "sumGold", |
|
|
|
"permanentGold", "freeGold", "taskGold", "adminName", "auditTime" |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* 翻译表头 |
|
|
|
*/ |
|
|
|
private Map<String, String> translateHeaders(Map<String, String> headers, String lang) { |
|
|
|
|