diff --git a/src/modules/network_data/model/kpi_c_report.go b/src/modules/network_data/model/kpi_c_report.go index 9cd6aedf..a5ac43e2 100644 --- a/src/modules/network_data/model/kpi_c_report.go +++ b/src/modules/network_data/model/kpi_c_report.go @@ -11,7 +11,7 @@ type KpiCTitle struct { Status string `json:"status" gorm:"column:status"` // 0-Inactive/1-Active/2-Deleted Description string `json:"description" gorm:"column:description"` CreatedBy string `json:"createdBy" gorm:"column:created_by"` - UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at"` + UpdatedAt string `json:"updatedAt" gorm:"column:updated_at"` } // TableName 表名称 diff --git a/src/modules/network_data/repository/kpi_c_report.go b/src/modules/network_data/repository/kpi_c_report.go index f87a7c51..f2d6bdeb 100644 --- a/src/modules/network_data/repository/kpi_c_report.go +++ b/src/modules/network_data/repository/kpi_c_report.go @@ -208,7 +208,7 @@ func (r KpiCReport) TitleSelect(param model.KpiCTitle) []model.KpiCTitle { // TitleInsert 新增信息 func (r KpiCReport) TitleInsert(param model.KpiCTitle) int64 { if param.CreatedBy != "" { - param.UpdatedAt = time.Now().UnixMilli() + param.UpdatedAt = time.Now().Format(time.DateTime) } param.Status = "1" tx := db.DB("").Create(¶m) @@ -223,7 +223,7 @@ func (r KpiCReport) TitleUpdate(param model.KpiCTitle) int64 { if param.ID <= 0 { return 0 } - param.UpdatedAt = time.Now().UnixMilli() + param.UpdatedAt = time.Now().Format(time.DateTime) tx := db.DB("").Model(&model.KpiCTitle{}) // 构建查询条件 tx = tx.Where("id = ?", param.ID)