diff --git a/app/http/entities/backend/corn_report_channel.go b/app/http/entities/backend/corn_report_channel.go index 128d770..f7e0d0c 100644 --- a/app/http/entities/backend/corn_report_channel.go +++ b/app/http/entities/backend/corn_report_channel.go @@ -64,6 +64,7 @@ type ReportChannelListResponse struct { Config string `json:"config"` CreateTime string `json:"create_time"` Status int `json:"status"` + UpdateTime string `json:"update_time"` } func (this *ReportChannelListResponse) FromDb(in cronreportchannelmodel.CronReportChannel) { @@ -73,6 +74,7 @@ func (this *ReportChannelListResponse) FromDb(in cronreportchannelmodel.CronRepo this.Config = in.Config this.CreateTime = in.CreateTime.Format("2006-01-02 15:04:05") this.Status = in.Status + this.UpdateTime = in.UpdateTime.Format("2006-01-02 15:04:05") } type ReportChannelCreateRequest struct { diff --git a/app/services/cron_report_channel_service.go b/app/services/cron_report_channel_service.go index 8dd3844..8fa4a2a 100644 --- a/app/services/cron_report_channel_service.go +++ b/app/services/cron_report_channel_service.go @@ -22,7 +22,7 @@ func ReportChannelList(param backend.ReportChannelList) (list []cronreportchanne repo = repository.NewReportChannelRepo() opts = make([]repository.DBOption, 0) ) - + opts = append(opts, repo.WithDesc("report_channel_id")) if param.ReportChannelId > 0 { opts = append(opts, repo.WithByID(uint(param.ReportChannelId))) }