support importing transaction data from alipay export file

This commit is contained in:
MaysWind
2024-09-22 19:27:20 +08:00
parent 732fa3b9de
commit 52b37c2a13
19 changed files with 826 additions and 79 deletions
+1
View File
@@ -3,4 +3,5 @@ package core
// Context is the base context of ezBookkeeping
type Context interface {
GetContextId() string
GetClientLocale() string
}
+5
View File
@@ -14,6 +14,11 @@ func (c *CliContext) GetContextId() string {
return ""
}
// GetClientLocale returns the client locale name
func (c *CliContext) GetClientLocale() string {
return ""
}
// WrapCliContext returns a context wrapped by this file
func WrapCilContext(cliCtx *cli.Context) *CliContext {
return &CliContext{
+5
View File
@@ -19,6 +19,11 @@ func (c *CronContext) GetContextId() string {
return c.contextId
}
// GetClientLocale returns the client locale name
func (c *CronContext) GetClientLocale() string {
return ""
}
// GetInterval returns the current cron job interval
func (c *CronContext) GetInterval() time.Duration {
return c.cronJobInterval
+5
View File
@@ -14,6 +14,11 @@ func (c *NullContext) GetContextId() string {
return nullContextId
}
// GetClientLocale returns the client locale name
func (c *NullContext) GetClientLocale() string {
return ""
}
// NewCronJobContext returns a new null context
func NewNullContext() *NullContext {
return &NullContext{