Przeglądaj źródła

媒体应用广告位

master
huangjiajun 4 miesięcy temu
rodzic
commit
c8cad18c59
7 zmienionych plików z 16 dodań i 7 usunięć
  1. +1
    -1
      src/model/applet_application_ad_space_list.go
  2. +1
    -1
      src/super/dao/medium_bank_info_dao.go
  3. +1
    -1
      src/super/dao/medium_contact_info_dao.go
  4. +1
    -1
      src/super/dao/medium_list_dao.go
  5. +4
    -1
      src/super/implement/medium_bank_info_db.go
  6. +4
    -1
      src/super/implement/medium_contact_info_db.go
  7. +4
    -1
      src/super/implement/medium_list_implement.go

+ 1
- 1
src/model/applet_application_ad_space_list.go Wyświetl plik

@@ -9,7 +9,7 @@ type AppletApplicationAdSpaceList struct {
Name string `json:"name" xorm:"default '' comment('广告位名称') VARCHAR(255)"`
AppId string `json:"app_id" xorm:"not null default '' comment('小程序appid') VARCHAR(255)"`
AdId string `json:"ad_id" xorm:"not null default '' comment('广告位id') VARCHAR(255)"`
Kind int `json:"kind" xorm:"not null default 1 comment('广告位类型(1:banner 2:激励视频 3:插屏广告 4:视频广告 5:视频贴片广告)') TINYINT(1)"`
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)"`
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"`


+ 1
- 1
src/super/dao/medium_bank_info_dao.go Wyświetl plik

@@ -4,7 +4,7 @@ import "code.fnuoos.com/zhimeng/model.git/src/super/model"

type MediumBankInfoDao interface {
GetMediumBankInfoList(MediumId int) (medium *model.MediumBankInfo, err error)
FindMediumBankInfoList(name, state string, page, limit int) (list []MediumBankInfoGroup, total int64, err error)
FindMediumBankInfoList(uuid, name, state string, page, limit int) (list []MediumBankInfoGroup, total int64, err error)
}
type MediumBankInfoGroup struct {
model.MediumList `xorm:"extends"`


+ 1
- 1
src/super/dao/medium_contact_info_dao.go Wyświetl plik

@@ -4,7 +4,7 @@ import "code.fnuoos.com/zhimeng/model.git/src/super/model"

type MediumContactInfoDao interface {
GetMediumContactInfoList(MediumId int) (medium *model.MediumContactInfo, err error)
FindMediumContactInfoList(name, state string, page, limit int) (list []MediumContactInfoGroup, total int64, err error)
FindMediumContactInfoList(uuid, name, state string, page, limit int) (list []MediumContactInfoGroup, total int64, err error)
}
type MediumContactInfoGroup struct {
model.MediumList `xorm:"extends"`


+ 1
- 1
src/super/dao/medium_list_dao.go Wyświetl plik

@@ -6,5 +6,5 @@ type MediumListDao interface {
GetMediumList(mediumId int) (medium *model.MediumList, err error)
MediumListInsert(m *model.MediumList) (int64, error)
UpdateMediumList(m *model.MediumList, columns ...string) (int64, error)
FindMediumList(name, state string, page, limit int) (list []model.MediumList, total int64, err error)
FindMediumList(uuid, name, state string, page, limit int) (list []model.MediumList, total int64, err error)
}

+ 4
- 1
src/super/implement/medium_bank_info_db.go Wyświetl plik

@@ -26,7 +26,7 @@ func (a MediumBankInfoDb) GetMediumBankInfoList(MediumId int) (medium *model.Med
}
return medium, nil
}
func (a MediumBankInfoDb) FindMediumBankInfoList(name, state string, page, limit int) (list []dao.MediumBankInfoGroup, total int64, err error) {
func (a MediumBankInfoDb) FindMediumBankInfoList(uuid, name, state string, page, limit int) (list []dao.MediumBankInfoGroup, total int64, err error) {
sess := a.Db.Where("medium_bank_info.state>0").Desc("medium_bank_info.id").Limit(limit, (page-1)*limit)
if name != "" {
sess.And("medium_list.company_name like ?", "%"+name+"%")
@@ -34,6 +34,9 @@ func (a MediumBankInfoDb) FindMediumBankInfoList(name, state string, page, limit
if state != "" {
sess.And("medium_bank_info.state = ?", state)
}
if uuid != "" {
sess.And("medium_bank_info.uuid = ?", uuid)
}
sess.Join("LEFT", "medium_list", "medium_list.medium_id = medium_bank_info.medium_id")
total, err = sess.FindAndCount(&list)
if err != nil {


+ 4
- 1
src/super/implement/medium_contact_info_db.go Wyświetl plik

@@ -26,7 +26,7 @@ func (a MediumContactInfoDb) GetMediumContactInfoList(MediumId int) (medium *mod
}
return medium, nil
}
func (a MediumContactInfoDb) FindMediumContactInfoList(name, state string, page, limit int) (list []dao.MediumContactInfoGroup, total int64, err error) {
func (a MediumContactInfoDb) FindMediumContactInfoList(uuid, name, state string, page, limit int) (list []dao.MediumContactInfoGroup, total int64, err error) {
sess := a.Db.Where("medium_contact_info.state>0").Desc("medium_contact_info.id").Limit(limit, (page-1)*limit)
if name != "" {
sess.And("medium_list.company_name like ?", "%"+name+"%")
@@ -34,6 +34,9 @@ func (a MediumContactInfoDb) FindMediumContactInfoList(name, state string, page,
if state != "" {
sess.And("medium_contact_info.state = ?", state)
}
if uuid != "" {
sess.And("medium_contact_info.uuid = ?", uuid)
}
sess.Join("LEFT", "medium_list", "medium_list.medium_id = medium_contact_info.medium_id")
total, err = sess.FindAndCount(&list)
if err != nil {


+ 4
- 1
src/super/implement/medium_list_implement.go Wyświetl plik

@@ -42,7 +42,7 @@ func (m MediumListDb) UpdateMediumList(medium *model.MediumList, columns ...stri
}
return affected, nil
}
func (m MediumListDb) FindMediumList(name, state string, page, limit int) (list []model.MediumList, total int64, err error) {
func (m MediumListDb) FindMediumList(uuid, name, state string, page, limit int) (list []model.MediumList, total int64, err error) {
sess := m.Db.Where("state>0").Desc("id").Limit(limit, (page-1)*limit)
if name != "" {
sess.And("company_name like ?", "%"+name+"%")
@@ -50,6 +50,9 @@ func (m MediumListDb) FindMediumList(name, state string, page, limit int) (list
if state != "" {
sess.And("state = ?", state)
}
if uuid != "" {
sess.And("uuid = ?", uuid)
}
total, err = sess.FindAndCount(&list)
if err != nil {
return nil, 0, err


Ładowanie…
Anuluj
Zapisz