feat: 支持京东白条账单上传和清洗
This commit is contained in:
@@ -13,14 +13,14 @@ type CleanOptions struct {
|
||||
|
||||
// CleanResult 清洗结果
|
||||
type CleanResult struct {
|
||||
BillType string // 检测到的账单类型: alipay/wechat
|
||||
BillType string // 检测到的账单类型: alipay/wechat/jd
|
||||
Output string // 脚本输出信息
|
||||
}
|
||||
|
||||
// ConvertResult 格式转换结果
|
||||
type ConvertResult struct {
|
||||
OutputPath string // 转换后的文件路径
|
||||
BillType string // 检测到的账单类型: alipay/wechat
|
||||
BillType string // 检测到的账单类型: alipay/wechat/jd
|
||||
}
|
||||
|
||||
// Cleaner 账单清洗器接口
|
||||
|
||||
@@ -87,6 +87,9 @@ func detectBillTypeFromOutput(output string) string {
|
||||
if strings.Contains(output, "微信") {
|
||||
return "wechat"
|
||||
}
|
||||
if strings.Contains(output, "京东") {
|
||||
return "jd"
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user