From a9535ffe5edc624ed222539dc93a10e1942ec799 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Tue, 26 Nov 2024 10:17:38 +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_ad_space.go | 2 +- app/svc/svc_data_center_original_data.go | 9 +++++++-- go.mod | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/svc/svc_applet_application_ad_space.go b/app/svc/svc_applet_application_ad_space.go index c2a6e22..6b5b419 100644 --- a/app/svc/svc_applet_application_ad_space.go +++ b/app/svc/svc_applet_application_ad_space.go @@ -80,7 +80,7 @@ func AppletApplicationAdSpaceList(c *gin.Context) { } engine := MasterDb(c) NewAppletApplicationDb := implement.NewAppletApplicationAdSpaceListDb(engine) - appletApplicationList, total, _ := NewAppletApplicationDb.FindAppletApplicationAdSpaceList(req.Name, req.Platform, req.AdType, req.CooperateState, utils.StrToInt(req.MediumId), utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + appletApplicationList, total, _ := NewAppletApplicationDb.FindAppletApplicationAdSpaceList(req.Name, req.Platform, req.AdType, req.CooperateState, req.MediumId, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) data := make([]md.AppletApplicationAdSpaceListData, 0) if len(appletApplicationList) > 0 { for _, v := range appletApplicationList { diff --git a/app/svc/svc_data_center_original_data.go b/app/svc/svc_data_center_original_data.go index 38a23e7..4ffce47 100644 --- a/app/svc/svc_data_center_original_data.go +++ b/app/svc/svc_data_center_original_data.go @@ -83,7 +83,10 @@ func DataCenterOriginalDataDel(c *gin.Context, req md.DataCenterOriginalDataComm func OriginalDataMoreApplication(c *gin.Context, req md.DataCenterOriginalDataMoreApplicationReq) md.DataCenterOriginalDataMoreApplicationRes { engine := MasterDb(c) NewAppletApplicationAdSpaceListDb := implement2.NewAppletApplicationAdSpaceListDb(engine) - MediumList, total, _ := NewAppletApplicationAdSpaceListDb.FindAppletApplicationAdSpaceList(req.Name, "", "", "", 0, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) + user := GetUser(c) + appId := GetAppletIdByAdminId(c, user.AdmId, req.Name, "", "") + + MediumList, total, _ := NewAppletApplicationAdSpaceListDb.FindAppletApplicationAdSpaceList(req.Name, "", "", "", appId, utils.StrToInt(req.Page), utils.StrToInt(req.Limit)) data := make([]md.DataCenterOriginalDataMoreApplicationData, 0) if len(MediumList) > 0 { for _, v := range MediumList { @@ -109,7 +112,9 @@ func OriginalDataMoreApplication(c *gin.Context, req md.DataCenterOriginalDataMo func OriginalDataOneApplication(c *gin.Context) { list := make([]md.DataCenterOriginalDataOneApplicationData, 0) NewAppletApplicationDb := implement2.NewAppletApplicationDb(MasterDb(c)) - applicationList, _ := NewAppletApplicationDb.FindAllAppletApplicationList() + user := GetUser(c) + appId := GetAppletIdByAdminId(c, user.AdmId, "", "", "") + applicationList, _ := NewAppletApplicationDb.FindAllAppletApplicationListByMediumId(appId) for _, v := range applicationList { tmp := md.DataCenterOriginalDataOneApplicationData{ Id: utils.IntToStr(v.Id), diff --git a/go.mod b/go.mod index 1d49fa8..1828789 100644 --- a/go.mod +++ b/go.mod @@ -35,7 +35,7 @@ require ( require ( code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5 code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git v1.1.21-0.20240830072333-a1980ffb256e - code.fnuoos.com/zhimeng/model.git v0.0.3-0.20241126015955-4cad07333980 + code.fnuoos.com/zhimeng/model.git v0.0.3-0.20241126021550-33ea9c4c90f2 github.com/360EntSecGroup-Skylar/excelize v1.4.1 github.com/gin-contrib/cors v1.7.2 github.com/jinzhu/copier v0.4.0