diff --git a/app/md/md_advertising.go b/app/md/md_advertising.go index 21e3250..12d8d56 100644 --- a/app/md/md_advertising.go +++ b/app/md/md_advertising.go @@ -1,7 +1,8 @@ package md type AdvertisingReq struct { - Id string `json:"id"` + Id string `json:"id"` + Ecpm string `json:"ecpm"` } type AdvertisingResp struct { Basic AdvertisingBasic `json:"basic" ` diff --git a/app/svc/svc_advertising.go b/app/svc/svc_advertising.go index 8c7e199..db735e3 100644 --- a/app/svc/svc_advertising.go +++ b/app/svc/svc_advertising.go @@ -149,6 +149,9 @@ func AdvertisingState(c *gin.Context) { IsSuccess: isSuccess, Integral: integral, } + if utils.StrToFloat64(req.Ecpm) > 0 { + db.Db.Where("uniq_id=?", req.Id).Cols("custom_ecpm").Update(&model.AdvertisingCallback{CustomEcpm: req.Ecpm}) + } e.OutSuc(c, res, nil) return } diff --git a/go.mod b/go.mod index e4665ed..48391c1 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( ) require ( - code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241217110120-62a0f203ce90 + code.fnuoos.com/EggPlanet/egg_models.git v0.2.1-0.20241219070554-7d4bf7b5cbb2 code.fnuoos.com/EggPlanet/egg_system_rules.git v0.0.4-0.20241218155438-73db9904c556 code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.1-0.20241118083738-0f22da9ba0be code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.5