From 0365a24685f10e4d7b9cd26369c68839759a2981 Mon Sep 17 00:00:00 2001 From: wolter Date: Thu, 28 Nov 2024 15:59:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=B6=88=E6=81=AF=E6=B8=A0=E9=81=93fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/http/entities/backend/corn_report_channel.go | 2 ++ app/services/cron_report_channel_service.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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))) }