diff --git a/erp/dict.go b/erp/dict.go index 7eebc4c..7701f8c 100644 --- a/erp/dict.go +++ b/erp/dict.go @@ -104,13 +104,3 @@ func (d *dict) Delete(ctx context.Context, dictIds []int64) (err error) { err = xClient.Call(ctx, "Delete", dictIds, &reply) return } - -// FunctionalCurrency @TITLE 本位币 -func (d *dict) FunctionalCurrency(ctx context.Context) (reply DictItem, err error) { - xClient, err := client2.GetClient(d) - if err != nil { - return - } - err = xClient.Call(ctx, "FunctionalCurrency", 0, &reply) - return -} diff --git a/erp/dict/currency.go b/erp/dict/currency.go new file mode 100644 index 0000000..5d2593b --- /dev/null +++ b/erp/dict/currency.go @@ -0,0 +1,38 @@ +package dict + +import ( + "context" + "time" + + client2 "git.kumo.work/shama/service/client" +) + +type currency struct { +} + +type DictItem struct { + Id int64 `json:"id"` + CategoryId int64 `json:"categoryId"` + CategoryCode string `json:"categoryCode"` + Sort int64 `json:"sort"` + Value1 string `json:"value1"` + Value2 string `json:"value2"` + Value3 string `json:"value3"` + Value4 string `json:"value4"` + Value5 string `json:"value5"` + Value6 string `json:"value6"` + Value7 string `json:"value7"` + Value8 string `json:"value8"` + CreatedAt *time.Time `json:"createdAt"` + UpdatedAt *time.Time `json:"updatedAt"` +} + +// FunctionalCurrency @TITLE 本位币 +func (c *currency) FunctionalCurrency(ctx context.Context) (reply DictItem, err error) { + xClient, err := client2.GetClient(c) + if err != nil { + return + } + err = xClient.Call(ctx, "FunctionalCurrency", 0, &reply) + return +} diff --git a/erp/dict/dict.go b/erp/dict/dict.go index 9a4f7a5..a077082 100644 --- a/erp/dict/dict.go +++ b/erp/dict/dict.go @@ -3,4 +3,5 @@ package dict type Dict struct { Font font Category category + Currency currency }