Files
service/erp/dict/currency.go
kanade aa877f91b1 refactor(erp): 重构字典服务中的货币功能模块
- 将货币相关结构体和方法独立为单独的currency模块
- 在Dict结构体中添加Currency字段以支持货币功能
- 移除原dict.go中的FunctionalCurrency方法实现
- 新增currency.go文件包含完整的货币字典项定义和本位币查询功能
2026-08-17 11:39:31 +08:00

39 lines
991 B
Go

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
}