|
@@ -7,8 +7,8 @@ import (
|
|
|
"eta/eta_api/utils"
|
|
|
"strings"
|
|
|
|
|
|
- "github.com/beego/beego/v2/client/orm"
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
|
+ "gorm.io/gorm"
|
|
|
)
|
|
|
|
|
|
type BaseFromLyData struct {
|
|
@@ -21,8 +21,11 @@ type BaseFromLyData struct {
|
|
|
Value float64 `orm:"column(value)" description:"数据值"`
|
|
|
}
|
|
|
|
|
|
-func init() {
|
|
|
- orm.RegisterModel(new(BaseFromLyData))
|
|
|
+func (b *BaseFromLyData) AfterFind(db *gorm.DB) (err error) {
|
|
|
+ b.CreateTime = utils.GormDateStrToDateTimeStr(b.CreateTime)
|
|
|
+ b.ModifyTime = utils.GormDateStrToDateTimeStr(b.ModifyTime)
|
|
|
+ b.DataTime = utils.GormDateStrToDateStr(b.DataTime)
|
|
|
+ return
|
|
|
}
|
|
|
|
|
|
type BaseFromLyDataPage struct {
|