Browse Source

fix: 装置检修

hsun 1 month ago
parent
commit
109e85f226
1 changed files with 7 additions and 0 deletions
  1. 7 0
      models/data_manage/supply_analysis/variety.go

+ 7 - 0
models/data_manage/supply_analysis/variety.go

@@ -5,6 +5,7 @@ import (
 	"eta/eta_api/global"
 	"eta/eta_api/utils"
 	"fmt"
+	"gorm.io/gorm"
 	"time"
 )
 
@@ -128,6 +129,12 @@ type VarietyItem struct {
 	Button                    VarietyButton `gorm:"-" description:"操作按钮权限"`
 }
 
+func (m *VarietyItem) AfterFind(db *gorm.DB) (err error) {
+	m.CreateTime = utils.GormDateStrToDateTimeStr(m.CreateTime)
+	m.ModifyTime = utils.GormDateStrToDateTimeStr(m.ModifyTime)
+	return
+}
+
 type VarietyButton struct {
 	Edit    bool `description:"操作权限"`
 	Delete  bool `description:"删除权限"`