feat: 支持京东白条账单上传和清洗

This commit is contained in:
CHE LIANG ZHAO
2026-01-26 13:44:22 +08:00
parent 7b2d6a9fbb
commit 3cf39b4664
17 changed files with 383 additions and 27 deletions

View File

@@ -105,6 +105,8 @@ func ExtractZip(zipPath, destDir, password string) (*ExtractResult, error) {
result.BillType = "alipay"
} else if strings.Contains(fileName, "微信") || strings.Contains(strings.ToLower(fileName), "wechat") {
result.BillType = "wechat"
} else if strings.Contains(fileName, "京东") || strings.Contains(strings.ToLower(fileName), "jd") {
result.BillType = "jd"
}
}
}

View File

@@ -150,6 +150,10 @@ func detectBillTypeAndIdField(header []string) (billType string, idFieldIdx int)
if col == "交易类型" || col == "金额(元)" {
billType = "wechat"
}
// 京东特征
if col == "商户名称" || col == "交易说明" {
billType = "jd"
}
// 查找去重字段(优先使用交易订单号/交易号)
if col == "交易订单号" || col == "交易号" || col == "交易单号" {

View File

@@ -36,6 +36,9 @@ func DetectBillTypeFromOutput(output string) string {
if containsSubstring(output, "微信") {
return "wechat"
}
if containsSubstring(output, "京东") {
return "jd"
}
return ""
}