Parcourir la source

媒体应用广告位

master
huangjiajun il y a 4 mois
Parent
révision
f18aa08f09
3 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. +1
    -0
      src/dao/applet_application_ad_space_list_dao.go
  2. +9
    -0
      src/implement/applet_application_ad_space_list_implement.go
  3. +1
    -0
      src/model/applet_application_ad_space_list.go

+ 1
- 0
src/dao/applet_application_ad_space_list_dao.go Voir le fichier

@@ -3,6 +3,7 @@ package dao
import "code.fnuoos.com/zhimeng/model.git/src/model"

type AppletApplicationAdSpaceListDao interface {
FindAppletApplicationAdSpaceListByMediumId(mediumId int) (medium *[]model.AppletApplicationAdSpaceList, err error)
FindAppletApplicationAdSpaceListByIds(id []string) (medium *[]model.AppletApplicationAdSpaceList, err error)
FindAppletApplicationAdSpaceList(name, platform string, state string, mediumId, page, limit int) (list []AppletApplicationAdSpaceListGroup, total int64, err error)
}


+ 9
- 0
src/implement/applet_application_ad_space_list_implement.go Voir le fichier

@@ -23,6 +23,15 @@ func (a AppletApplicationAdSpaceListDb) FindAppletApplicationAdSpaceListByIds(id
}
return medium, nil
}
func (a AppletApplicationAdSpaceListDb) FindAppletApplicationAdSpaceListByMediumId(mediumId int) (medium *[]model.AppletApplicationAdSpaceList, err error) {

medium = new([]model.AppletApplicationAdSpaceList)
err = a.Db.Where("medium_id=?", mediumId).Find(medium)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
return medium, nil
}
func (a AppletApplicationAdSpaceListDb) FindAppletApplicationAdSpaceList(name, platform string, state string, mediumId, page, limit int) (list []dao.AppletApplicationAdSpaceListGroup, total int64, err error) {
sess := a.Db.Where("applet_application_ad_space_list.id>0").Desc("applet_application_ad_space_list.id")
if page > 0 {


+ 1
- 0
src/model/applet_application_ad_space_list.go Voir le fichier

@@ -11,6 +11,7 @@ type AppletApplicationAdSpaceList struct {
AdId string `json:"ad_id" xorm:"not null default '' comment('广告位id') VARCHAR(255)"`
Kind string `json:"kind" xorm:"not null default '' comment('广告位类型(SLOT_ID_WEAPP_BANNER:banner SLOT_ID_WEAPP_REWARD_VIDEO:激励视频 SLOT_ID_WEAPP_INTERSTITIAL:插屏广告 SLOT_ID_WEAPP_VIDEO_FEEDS:视频广告 SLOT_ID_WEAPP_VIDEO_BEGIN:视频贴片广告)') VARCHAR(255)"`
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 1:审核通过 2:审核拒绝 3:封禁中)') TINYINT(1)"`
UseState int `json:"use_state" xorm:"not null default 1 comment('广告位微信平台状态(1开通 2关闭)') TINYINT(1)"`
CreateAt time.Time `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt time.Time `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
MediumId int `json:"medium_id" xorm:"not null comment('媒体id') default '0' INT(10)"`


Chargement…
Annuler
Enregistrer