From d0b9cfec5972e4eca3b8da0a01c61b01bace74cc Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 24 Oct 2024 11:06:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/svc/svc_applet_application.go | 8 ++++++++ app/svc/svc_applet_application_ad_space.go | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/app/svc/svc_applet_application.go b/app/svc/svc_applet_application.go index 87a6423..51a914a 100644 --- a/app/svc/svc_applet_application.go +++ b/app/svc/svc_applet_application.go @@ -47,6 +47,14 @@ func AppletApplicationMediumList(c *gin.Context) { tmp.ContactName = infoList.Name tmp.Phone = infoList.Phone } + NewMediumListDb := implement2.NewMediumListDb(db.Db) + GetMediumList, _ := NewMediumListDb.GetMediumList(v.MediumId) + if GetMediumList != nil { + tmp.Name = GetMediumList.CompanyName + if GetMediumList.CompanyAbbreviation != "" { + tmp.Name = GetMediumList.CompanyAbbreviation + } + } count, _ := engine.Where("medium_id=?", v.MediumId).Count(&model.AppletApplication{}) tmp.Count = utils.Int64ToStr(count) data = append(data, tmp) diff --git a/app/svc/svc_applet_application_ad_space.go b/app/svc/svc_applet_application_ad_space.go index 0c3a375..b110e7d 100644 --- a/app/svc/svc_applet_application_ad_space.go +++ b/app/svc/svc_applet_application_ad_space.go @@ -46,6 +46,14 @@ func AppletApplicationAdSpaceMediumList(c *gin.Context) { tmp.ContactName = infoList.Name tmp.Phone = infoList.Phone } + NewMediumListDb := implement2.NewMediumListDb(db.Db) + GetMediumList, _ := NewMediumListDb.GetMediumList(v.MediumId) + if GetMediumList != nil { + tmp.Name = GetMediumList.CompanyName + if GetMediumList.CompanyAbbreviation != "" { + tmp.Name = GetMediumList.CompanyAbbreviation + } + } count, _ := engine.Where("medium_id=?", v.MediumId).Count(&model.AppletApplicationAdSpaceList{}) tmp.Count = utils.Int64ToStr(count) data = append(data, tmp)