Browse Source

广告

master
huangjiajun 1 month ago
parent
commit
4ff06d1516
3 changed files with 10 additions and 5 deletions
  1. +6
    -0
      app/md/md_advertising.go
  2. +2
    -4
      app/svc/advertising/svc_base.go
  3. +2
    -1
      app/svc/advertising/svc_list.go

+ 6
- 0
app/md/md_advertising.go View File

@@ -1,5 +1,10 @@
package md

var AdvertisingPlatform = []map[string]string{
{"name": "穿山甲", "value": "chuanshanjia"},
{"name": "优量汇", "value": "youlianghui"},
}

type AdvertisingBase struct {
AndroidAdIsOpen string `json:"android_ad_is_open" example:"安卓广告是否开启(1:开启 0:不开启)"`
IosAdIsOpen string `json:"ios_ad_is_open" example:"ios广告是否开启(1:开启 0:不开启)"`
@@ -20,6 +25,7 @@ type AdvertisingListReq struct {
Kind string `json:"kind"`
}
type AdvertisingListResp struct {
AdvData []map[string]string `json:"adv_data"`
SelectData []map[string]string `json:"select_data"`
Total int64 `json:"total"`
List []AdvertisingList `json:"list"`


+ 2
- 4
app/svc/advertising/svc_base.go View File

@@ -18,10 +18,8 @@ func GetBasic(c *gin.Context) {
data = &model.AdvertisingBasic{}
db.Db.Insert(data)
}
selsctData := []map[string]string{
{"name": "穿山甲", "value": "chuanshanjia"},
{"name": "优量汇", "value": "youlianghui"},
}
selsctData := md.AdvertisingPlatform

AdvertisingBase := md.AdvertisingBase{
AndroidAdIsOpen: utils.IntToStr(data.AndroidAdIsOpen),
IosAdIsOpen: utils.IntToStr(data.IosAdIsOpen),


+ 2
- 1
app/svc/advertising/svc_list.go View File

@@ -18,13 +18,14 @@ func List(c *gin.Context) {
}
var resp md.AdvertisingListResp
noticeList := make([]md.AdvertisingList, 0)
resp.SelectData = []map[string]string{
resp.AdvData = []map[string]string{
{"name": "开屏广告", "value": "1"},
{"name": "插屏广告", "value": "2"},
{"name": "激励视频", "value": "3"},
{"name": "信息流广告", "value": "4"},
{"name": "全屏视频", "value": "5"},
}
resp.SelectData = md.AdvertisingPlatform
NewJpushNoticeDb := implement.NewAdvertisingSpaceDb(db.Db)
notice, total, _ := NewJpushNoticeDb.FindUserFeedbackCateAndTotal(req.Page, req.Limit, req.Name, req.Kind)
resp.Total = total


Loading…
Cancel
Save