|
@@ -4,6 +4,7 @@ import (
|
|
"eta/eta_api/global"
|
|
"eta/eta_api/global"
|
|
"eta/eta_api/utils"
|
|
"eta/eta_api/utils"
|
|
"fmt"
|
|
"fmt"
|
|
|
|
+ "gorm.io/gorm"
|
|
"time"
|
|
"time"
|
|
|
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
@@ -404,10 +405,43 @@ type BaseFromSmmIndexItem struct {
|
|
TypeAll string
|
|
TypeAll string
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+func (item *BaseFromSmmIndexItem) AfterFind(tx *gorm.DB) (err error) {
|
|
|
|
+ if utils.NeedDateOrTimeFormat(utils.DbDriverName) {
|
|
|
|
+ if item.CreateTime != "" {
|
|
|
|
+ item.CreateTime = utils.GormDateStrToDateTimeStr(item.CreateTime)
|
|
|
|
+ }
|
|
|
|
+ if item.ModifyTime != "" {
|
|
|
|
+ item.ModifyTime = utils.GormDateStrToDateTimeStr(item.ModifyTime)
|
|
|
|
+ }
|
|
|
|
+ if item.StartDate != "" {
|
|
|
|
+ item.StartDate = utils.GormDateStrToDateStr(item.StartDate)
|
|
|
|
+ }
|
|
|
|
+ if item.EndDate != "" {
|
|
|
|
+ item.EndDate = utils.GormDateStrToDateStr(item.EndDate)
|
|
|
|
+ }
|
|
|
|
+ if item.ApiStartTime != "" {
|
|
|
|
+ item.ApiStartTime = utils.GormDateStrToDateTimeStr(item.ApiStartTime)
|
|
|
|
+ }
|
|
|
|
+ if item.ApiUpdateTime != "" {
|
|
|
|
+ item.ApiUpdateTime = utils.GormDateStrToDateTimeStr(item.ApiUpdateTime)
|
|
|
|
+ }
|
|
|
|
+ if item.StartTime != "" {
|
|
|
|
+ item.StartTime = utils.GormDateStrToDateTimeStr(item.StartTime)
|
|
|
|
+ }
|
|
|
|
+ if item.FinishTime != "" {
|
|
|
|
+ item.FinishTime = utils.GormDateStrToDateTimeStr(item.FinishTime)
|
|
|
|
+ }
|
|
|
|
+ if item.ReleaseTime != "" {
|
|
|
|
+ item.ReleaseTime = utils.GormDateStrToDateTimeStr(item.ReleaseTime)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return
|
|
|
|
+}
|
|
|
|
+
|
|
type BaseFromSmmIndexTypeList struct {
|
|
type BaseFromSmmIndexTypeList struct {
|
|
- Type1 string `orm:"column(type_1)"`
|
|
|
|
- Type2 string `orm:"column(type_2)"`
|
|
|
|
- Type3 string `orm:"column(type_3)"`
|
|
|
|
|
|
+ Type1 string `gorm:"column:type_1"`
|
|
|
|
+ Type2 string `gorm:"column:type_2"`
|
|
|
|
+ Type3 string `gorm:"column:type_3"`
|
|
}
|
|
}
|
|
|
|
|
|
// GetBaseFromSmmIndexTypeList
|
|
// GetBaseFromSmmIndexTypeList
|