380 Star 2.5K Fork 615

GVPJohn / gf

 / 详情

orm scan字段映射到自定义的类型

待办的
创建于  
2021-08-19 18:21

1. 您当前使用的Go版本,及系统版本、系统架构?

type CrowdSchedules struct {
Id uint orm:"id,primary" json:"id" //
NumberBili decimal.Decimal orm:"number_bili" json:"numberBili" // 数量比例
Status uint orm:"status" json:"status" // 0:关闭 1:执行中 2:废弃
CreatedAt *gtime.Time orm:"created_at" json:"createdAt" //
UpdatedAt *gtime.Time orm:"updated_at" json:"updatedAt" //
}
decimal 是使用的一个包,查询数据时
reflect.Value.Convert: value of type *gvar.Var cannot be converted to type decimal.Decimal

评论 (0)

秦凯 创建了任务
秦凯 关联仓库设置为John/gf
展开全部操作日志

登录 后才可以发表评论

状态
负责人
里程碑
Pull Requests
关联的 Pull Requests 被合并后可能会关闭此 issue
分支
开始日期   -   截止日期
-
置顶选项
优先级
参与者(1)
1238060 echo love 1578947110
Go
1
https://gitee.com/johng/gf.git
git@gitee.com:johng/gf.git
johng
gf
gf

搜索帮助