Browse Source

update

master
dengbiao 2 months ago
parent
commit
c124d0031b
37 changed files with 528 additions and 72 deletions
  1. +1
    -1
      cmd_db.bat
  2. +5
    -0
      src/dao/generate_wx_ad_data_dao.go
  3. +5
    -0
      src/dao/original_wx_ad_data_dao.go
  4. +14
    -0
      src/implement/generate_wx_ad_data_implement.go
  5. +14
    -0
      src/implement/original_wx_ad_data_implement.go
  6. +5
    -0
      src/super/dao/agent_settlement_dao.go
  7. +5
    -0
      src/super/dao/agent_settlement_with_flow_dao.go
  8. +10
    -0
      src/super/dao/generate_wx_ad_data_dao.go
  9. +11
    -0
      src/super/dao/generate_wx_ad_data_with_agent_flow_dao.go
  10. +7
    -0
      src/super/dao/medium_division_strategy_dao.go
  11. +7
    -0
      src/super/dao/medium_division_strategy_with_agent_flow_dao.go
  12. +5
    -0
      src/super/dao/medium_settlement_dao.go
  13. +5
    -0
      src/super/dao/medium_settlement_with_flow_dao.go
  14. +12
    -0
      src/super/dao/original_wx_ad_data_dao.go
  15. +14
    -0
      src/super/implement/agent_settlement_implement.go
  16. +14
    -0
      src/super/implement/agent_settlement_with_flow_implement.go
  17. +23
    -0
      src/super/implement/generate_wx_ad_data_implement.go
  18. +32
    -0
      src/super/implement/generate_wx_ad_data_with_agent_flow_implement.go
  19. +28
    -0
      src/super/implement/medium_division_strategy_implement.go
  20. +24
    -0
      src/super/implement/medium_division_strategy_with_agent_flow_implement.go
  21. +14
    -0
      src/super/implement/medium_settlement_implement.go
  22. +14
    -0
      src/super/implement/medium_settlement_with_flow_implement.go
  23. +44
    -0
      src/super/implement/original_wx_ad_data_implement.go
  24. +12
    -16
      src/super/model/agent_bank_info.go
  25. +11
    -15
      src/super/model/agent_contact_info.go
  26. +19
    -0
      src/super/model/agent_settlement.go
  27. +14
    -0
      src/super/model/agent_settlement_with_flow.go
  28. +5
    -9
      src/super/model/agent_with_medium.go
  29. +34
    -0
      src/super/model/generate_wx_ad_data.go
  30. +18
    -0
      src/super/model/generate_wx_ad_data_with_agent_flow.go
  31. +12
    -16
      src/super/model/medium_bank_info.go
  32. +11
    -15
      src/super/model/medium_contact_info.go
  33. +15
    -0
      src/super/model/medium_division_strategy.go
  34. +11
    -0
      src/super/model/medium_division_strategy_with_agent_flow.go
  35. +18
    -0
      src/super/model/medium_settlement.go
  36. +14
    -0
      src/super/model/medium_settlement_with_flow.go
  37. +21
    -0
      src/super/model/original_wx_ad_data.go

+ 1
- 1
cmd_db.bat View File

@@ -12,7 +12,7 @@ if "%one%" NEQ "" (
set BasePath="./"
set DBUSER="root"
set DBPSW="Fnuo123com@"
set DBNAME="advertisement"
set DBNAME="super_advertisement"
set DBHOST="119.23.182.117"
set DBPORT="3306"



+ 5
- 0
src/dao/generate_wx_ad_data_dao.go View File

@@ -0,0 +1,5 @@
package dao

type GenerateWxAdDataDao interface {
//TODO:: You can add specific method definitions here
}

+ 5
- 0
src/dao/original_wx_ad_data_dao.go View File

@@ -0,0 +1,5 @@
package dao

type OriginalWxAdDataDao interface {
//TODO:: You can add specific method definitions here
}

+ 14
- 0
src/implement/generate_wx_ad_data_implement.go View File

@@ -0,0 +1,14 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/dao"
"xorm.io/xorm"
)

func NewGenerateWxAdDataDb(engine *xorm.Engine) dao.GenerateWxAdDataDao {
return &GenerateWxAdDataDb{Db: engine}
}

type GenerateWxAdDataDb struct {
Db *xorm.Engine
}

+ 14
- 0
src/implement/original_wx_ad_data_implement.go View File

@@ -0,0 +1,14 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/dao"
"xorm.io/xorm"
)

func NewOriginalWxAdDataDb(engine *xorm.Engine) dao.OriginalWxAdDataDao {
return &OriginalWxAdDataDb{Db: engine}
}

type OriginalWxAdDataDb struct {
Db *xorm.Engine
}

+ 5
- 0
src/super/dao/agent_settlement_dao.go View File

@@ -0,0 +1,5 @@
package dao

type AgentSettlementDao interface {
//TODO:: You can add specific method definitions here
}

+ 5
- 0
src/super/dao/agent_settlement_with_flow_dao.go View File

@@ -0,0 +1,5 @@
package dao

type AgentSettlementWithFlowDao interface {
//TODO:: You can add specific method definitions here
}

+ 10
- 0
src/super/dao/generate_wx_ad_data_dao.go View File

@@ -0,0 +1,10 @@
package dao

import (
"code.fnuoos.com/zhimeng/model.git/src/super/model"
"xorm.io/xorm"
)

type GenerateWxAdDataDao interface {
GenerateWxAdDataInsertBySession(session *xorm.Session, m *model.GenerateWxAdData) (int64, error)
}

+ 11
- 0
src/super/dao/generate_wx_ad_data_with_agent_flow_dao.go View File

@@ -0,0 +1,11 @@
package dao

import (
"code.fnuoos.com/zhimeng/model.git/src/super/model"
"xorm.io/xorm"
)

type GenerateWxAdDataWithAgentFlowDao interface {
FindGenerateWxAdDataWithAgentFlowByStrategyId(strategyId int) (*[]model.GenerateWxAdDataWithAgentFlow, error)
BatchAddGenerateWxAdDataWithAgentFlow(session *xorm.Session, mm []*model.GenerateWxAdDataWithAgentFlow) (int64, error)
}

+ 7
- 0
src/super/dao/medium_division_strategy_dao.go View File

@@ -0,0 +1,7 @@
package dao

import "code.fnuoos.com/zhimeng/model.git/src/super/model"

type MediumDivisionStrategyDao interface {
GetOriginalWxAdDataByMediumId(mediumId int) (data *model.MediumDivisionStrategy, err error)
}

+ 7
- 0
src/super/dao/medium_division_strategy_with_agent_flow_dao.go View File

@@ -0,0 +1,7 @@
package dao

import "code.fnuoos.com/zhimeng/model.git/src/super/model"

type MediumDivisionStrategyWithAgentFlowDao interface {
FindMediumDivisionStrategyWithAgentFlowByStrategyId(strategyId int) (*[]model.MediumDivisionStrategyWithAgentFlow, error)
}

+ 5
- 0
src/super/dao/medium_settlement_dao.go View File

@@ -0,0 +1,5 @@
package dao

type MediumSettlementDao interface {
//TODO:: You can add specific method definitions here
}

+ 5
- 0
src/super/dao/medium_settlement_with_flow_dao.go View File

@@ -0,0 +1,5 @@
package dao

type MediumSettlementWithFlowDao interface {
//TODO:: You can add specific method definitions here
}

+ 12
- 0
src/super/dao/original_wx_ad_data_dao.go View File

@@ -0,0 +1,12 @@
package dao

import (
"code.fnuoos.com/zhimeng/model.git/src/super/model"
"xorm.io/xorm"
)

type OriginalWxAdDataDao interface {
GetOriginalWxAdData(id int) (data *model.OriginalWxAdData, err error)
UpdateOriginalWxAdData(m *model.OriginalWxAdData, columns ...string) (int64, error)
UpdateOriginalWxAdDataBySession(session *xorm.Session, m *model.OriginalWxAdData, columns ...string) (int64, error)
}

+ 14
- 0
src/super/implement/agent_settlement_implement.go View File

@@ -0,0 +1,14 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"xorm.io/xorm"
)

func NewAgentSettlementDb(engine *xorm.Engine) dao.AgentSettlementDao {
return &AgentSettlementDb{Db: engine}
}

type AgentSettlementDb struct {
Db *xorm.Engine
}

+ 14
- 0
src/super/implement/agent_settlement_with_flow_implement.go View File

@@ -0,0 +1,14 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"xorm.io/xorm"
)

func NewAgentSettlementWithFlowDb(engine *xorm.Engine) dao.AgentSettlementWithFlowDao {
return &AgentSettlementWithFlowDb{Db: engine}
}

type AgentSettlementWithFlowDb struct {
Db *xorm.Engine
}

+ 23
- 0
src/super/implement/generate_wx_ad_data_implement.go View File

@@ -0,0 +1,23 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"code.fnuoos.com/zhimeng/model.git/src/super/model"
"xorm.io/xorm"
)

func NewGenerateWxAdDataDb(engine *xorm.Engine) dao.GenerateWxAdDataDao {
return &GenerateWxAdDataDb{Db: engine}
}

type GenerateWxAdDataDb struct {
Db *xorm.Engine
}

func (g GenerateWxAdDataDb) GenerateWxAdDataInsertBySession(session *xorm.Session, m *model.GenerateWxAdData) (int64, error) {
insertAffected, err := session.InsertOne(m)
if err != nil {
return 0, err
}
return insertAffected, nil
}

+ 32
- 0
src/super/implement/generate_wx_ad_data_with_agent_flow_implement.go View File

@@ -0,0 +1,32 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"code.fnuoos.com/zhimeng/model.git/src/super/model"
zhios_order_relate_logx "code.fnuoos.com/zhimeng/model.git/utils/logx"
"xorm.io/xorm"
)

func NewGenerateWxAdDataWithAgentFlowDb(engine *xorm.Engine) dao.GenerateWxAdDataWithAgentFlowDao {
return &GenerateWxAdDataWithAgentFlowDb{Db: engine}
}

type GenerateWxAdDataWithAgentFlowDb struct {
Db *xorm.Engine
}

func (g GenerateWxAdDataWithAgentFlowDb) BatchAddGenerateWxAdDataWithAgentFlow(session *xorm.Session, mm []*model.GenerateWxAdDataWithAgentFlow) (int64, error) {
affected, err := session.Insert(mm)
if err != nil {
return 0, err
}
return affected, nil
}

func (g GenerateWxAdDataWithAgentFlowDb) FindGenerateWxAdDataWithAgentFlowByStrategyId(strategyId int) (*[]model.GenerateWxAdDataWithAgentFlow, error) {
var m []model.GenerateWxAdDataWithAgentFlow
if err := g.Db.Where("strategy_id = ?", strategyId).Asc("id").Find(&m); err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
return &m, nil
}

+ 28
- 0
src/super/implement/medium_division_strategy_implement.go View File

@@ -0,0 +1,28 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"code.fnuoos.com/zhimeng/model.git/src/super/model"
zhios_order_relate_logx "code.fnuoos.com/zhimeng/model.git/utils/logx"
"xorm.io/xorm"
)

func NewMediumDivisionStrategyDb(engine *xorm.Engine) dao.MediumDivisionStrategyDao {
return &MediumDivisionStrategyDb{Db: engine}
}

type MediumDivisionStrategyDb struct {
Db *xorm.Engine
}

func (m MediumDivisionStrategyDb) GetOriginalWxAdDataByMediumId(mediumId int) (data *model.MediumDivisionStrategy, err error) {
data = new(model.MediumDivisionStrategy)
has, err := m.Db.Where("medium_id =?", mediumId).Get(data)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return data, nil
}

+ 24
- 0
src/super/implement/medium_division_strategy_with_agent_flow_implement.go View File

@@ -0,0 +1,24 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"code.fnuoos.com/zhimeng/model.git/src/super/model"
zhios_order_relate_logx "code.fnuoos.com/zhimeng/model.git/utils/logx"
"xorm.io/xorm"
)

func NewMediumDivisionStrategyWithAgentFlowDb(engine *xorm.Engine) dao.MediumDivisionStrategyWithAgentFlowDao {
return &MediumDivisionStrategyWithAgentFlowDb{Db: engine}
}

type MediumDivisionStrategyWithAgentFlowDb struct {
Db *xorm.Engine
}

func (m MediumDivisionStrategyWithAgentFlowDb) FindMediumDivisionStrategyWithAgentFlowByStrategyId(strategyId int) (*[]model.MediumDivisionStrategyWithAgentFlow, error) {
var mm []model.MediumDivisionStrategyWithAgentFlow
if err := m.Db.Where("strategy_id = ?", strategyId).Asc("id").Find(&mm); err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
return &mm, nil
}

+ 14
- 0
src/super/implement/medium_settlement_implement.go View File

@@ -0,0 +1,14 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"xorm.io/xorm"
)

func NewMediumSettlementDb(engine *xorm.Engine) dao.MediumSettlementDao {
return &MediumSettlementDb{Db: engine}
}

type MediumSettlementDb struct {
Db *xorm.Engine
}

+ 14
- 0
src/super/implement/medium_settlement_with_flow_implement.go View File

@@ -0,0 +1,14 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"xorm.io/xorm"
)

func NewMediumSettlementWithFlowDb(engine *xorm.Engine) dao.MediumSettlementWithFlowDao {
return &MediumSettlementWithFlowDb{Db: engine}
}

type MediumSettlementWithFlowDb struct {
Db *xorm.Engine
}

+ 44
- 0
src/super/implement/original_wx_ad_data_implement.go View File

@@ -0,0 +1,44 @@
package implement

import (
"code.fnuoos.com/zhimeng/model.git/src/super/dao"
"code.fnuoos.com/zhimeng/model.git/src/super/model"
zhios_order_relate_logx "code.fnuoos.com/zhimeng/model.git/utils/logx"
"xorm.io/xorm"
)

func NewOriginalWxAdDataDb(engine *xorm.Engine) dao.OriginalWxAdDataDao {
return &OriginalWxAdDataDb{Db: engine}
}

type OriginalWxAdDataDb struct {
Db *xorm.Engine
}

func (o OriginalWxAdDataDb) UpdateOriginalWxAdDataBySession(session *xorm.Session, m *model.OriginalWxAdData, columns ...string) (int64, error) {
affected, err := session.Where("id =?", m.Id).Cols(columns...).Update(m)
if err != nil {
return 0, err
}
return affected, nil
}

func (o OriginalWxAdDataDb) UpdateOriginalWxAdData(m *model.OriginalWxAdData, columns ...string) (int64, error) {
affected, err := o.Db.Where("id =?", m.Id).Cols(columns...).Update(m)
if err != nil {
return 0, err
}
return affected, nil
}

func (o OriginalWxAdDataDb) GetOriginalWxAdData(id int) (data *model.OriginalWxAdData, err error) {
data = new(model.OriginalWxAdData)
has, err := o.Db.Where("id =?", id).Get(data)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return data, nil
}

+ 12
- 16
src/super/model/agent_bank_info.go View File

@@ -1,20 +1,16 @@
package model

import (
"time"
)

type AgentBankInfo struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"`
AgentId int `json:"agent_id" xorm:"not null comment('代理id') unique(IDX_UUID_TYPE) INT(11)"`
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 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"`
Memo string `json:"memo" xorm:"comment('备注 审核时填写的') VARCHAR(255)"`
CurrencyConf int `json:"currency_conf" xorm:"default 0 comment('结算币种 1人民币') TINYINT(1)"`
Bank string `json:"bank" xorm:"comment('开户银行') VARCHAR(255)"`
BankBranch string `json:"bank_branch" xorm:"comment('开户银行分行') VARCHAR(255)"`
BankNo string `json:"bank_no" xorm:"comment('银行卡号') VARCHAR(255)"`
Licence string `json:"licence" xorm:"comment('开户许可证') VARCHAR(255)"`
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"`
AgentId int `json:"agent_id" xorm:"not null comment('代理id') unique(IDX_UUID_TYPE) INT(11)"`
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 1:审核通过 2:审核拒绝)') TINYINT(1)"`
CreateAt string `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"`
Memo string `json:"memo" xorm:"comment('备注 审核时填写的') VARCHAR(255)"`
CurrencyConf int `json:"currency_conf" xorm:"default 0 comment('结算币种 1人民币') TINYINT(1)"`
Bank string `json:"bank" xorm:"comment('开户银行') VARCHAR(255)"`
BankBranch string `json:"bank_branch" xorm:"comment('开户银行分行') VARCHAR(255)"`
BankNo string `json:"bank_no" xorm:"comment('银行卡号') VARCHAR(255)"`
Licence string `json:"licence" xorm:"comment('开户许可证') VARCHAR(255)"`
}

+ 11
- 15
src/super/model/agent_contact_info.go View File

@@ -1,19 +1,15 @@
package model

import (
"time"
)

type AgentContactInfo struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"`
AgentId int `json:"agent_id" xorm:"not null comment('代理id') unique(IDX_UUID_TYPE) INT(11)"`
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 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"`
Memo string `json:"memo" xorm:"comment('备注 审核时填写的') VARCHAR(255)"`
Name string `json:"name" xorm:"comment('联系人') VARCHAR(255)"`
Email string `json:"email" xorm:"comment('邮箱地址') VARCHAR(255)"`
Phone string `json:"phone" xorm:"comment('联系电话') VARCHAR(255)"`
Address string `json:"address" xorm:"comment('联系地址') VARCHAR(255)"`
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"`
AgentId int `json:"agent_id" xorm:"not null comment('代理id') unique(IDX_UUID_TYPE) INT(11)"`
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 1:审核通过 2:审核拒绝)') TINYINT(1)"`
CreateAt string `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"`
Memo string `json:"memo" xorm:"comment('备注 审核时填写的') VARCHAR(255)"`
Name string `json:"name" xorm:"comment('联系人') VARCHAR(255)"`
Email string `json:"email" xorm:"comment('邮箱地址') VARCHAR(255)"`
Phone string `json:"phone" xorm:"comment('联系电话') VARCHAR(255)"`
Address string `json:"address" xorm:"comment('联系地址') VARCHAR(255)"`
}

+ 19
- 0
src/super/model/agent_settlement.go View File

@@ -0,0 +1,19 @@
package model

type AgentSettlement struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null default 0 comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"`
AgentId int `json:"agent_id" xorm:"not null default 0 comment('代理id') INT(11)"`
MediumId int `json:"medium_id" xorm:"not null default 0 comment('媒体id') unique(IDX_UUID_TYPE) INT(11)"`
AppId string `json:"app_id" xorm:"not null default '' comment('小程序id') VARCHAR(255)"`
BusinessKind int `json:"business_kind" xorm:"not null default 1 comment('业务类型(1:广告合作)') TINYINT(1)"`
Kind int `json:"kind" xorm:"not null default 1 comment('结算单类型(1:日结 2:周结 3:月结 4:预付)') TINYINT(1)"`
BasicIncome int `json:"basic_income" xorm:"not null default 0 comment('基础收益(分)') INT(11)"`
OtherIncome int `json:"other_income" xorm:"not null default 0 comment('其他收益(分)') INT(11)"`
State int `json:"state" xorm:"not null default 0 comment('结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)') TINYINT(1)"`
PayState int `json:"pay_state" xorm:"not null default 0 comment('结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)') TINYINT(1)"`
StartDate string `json:"start_date" xorm:"not null default '0000-00-00' comment('开始时间') CHAR(50)"`
EndDate string `json:"end_date" xorm:"not null default '0000-00-00' comment('结束时间') CHAR(50)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 14
- 0
src/super/model/agent_settlement_with_flow.go View File

@@ -0,0 +1,14 @@
package model

type AgentSettlementWithFlow struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
SettlementId int `json:"settlement_id" xorm:"not null default 0 comment('结算id') index unique(IDX_UUID_TYPE) INT(11)"`
Amount int `json:"amount" xorm:"not null default 0 comment('变动金额(分)') unique(IDX_UUID_TYPE) INT(11)"`
BasicIncomeBefore int `json:"basic_income_before" xorm:"not null default 0 comment('基础收益(分)-变更前') INT(11)"`
BasicIncomeAfter int `json:"basic_income_after" xorm:"not null default 0 comment('基础收益(分)-变更后') INT(11)"`
OtherIncomeBefore int `json:"other_income_before" xorm:"not null default 0 comment('其他收益(分)-变更前') INT(11)"`
OtherIncomeAfter int `json:"other_income_after" xorm:"not null default 0 comment('其他收益(分)-变更后') INT(11)"`
Kind int `json:"kind" xorm:"not null default 0 comment('类型(1:基础收益 2:其他收益 3:管理员增加其他收益 4:管理员减少其他收益)') TINYINT(3)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 5
- 9
src/super/model/agent_with_medium.go View File

@@ -1,13 +1,9 @@
package model

import (
"time"
)

type AgentWithMedium struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
AgentId int `json:"agent_id" xorm:"not null default 0 comment('代理id') INT(11)"`
MediumId int `json:"medium_id" xorm:"not null default 0 comment('媒体id') INT(11)"`
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"`
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
AgentId int `json:"agent_id" xorm:"not null default 0 comment('代理id') INT(11)"`
MediumId int `json:"medium_id" xorm:"not null default 0 comment('媒体id') INT(11)"`
CreateAt string `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"`
}

+ 34
- 0
src/super/model/generate_wx_ad_data.go View File

@@ -0,0 +1,34 @@
package model

type GenerateWxAdData struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null comment('站长id') index INT(10)"`
AppId string `json:"app_id" xorm:"not null default '' comment('小程序id') VARCHAR(255)"`
GenerateDataId int `json:"generate_data_id" xorm:"not null default 0 comment('原始数据id') INT(11)"`
SlotId string `json:"slot_id" xorm:"not null default '' comment('广告位id') index unique(SLOT_ID_UNIQUE) VARCHAR(255)"`
AdSlot string `json:"ad_slot" xorm:"not null default '' comment('广告位类型') CHAR(50)"`
Date string `json:"date" xorm:"not null default '' comment('日期') unique(SLOT_ID_UNIQUE) CHAR(50)"`
ReqSuccCount int `json:"req_succ_count" xorm:"not null default 0 comment('拉取量') INT(11)"`
ExposureCount int `json:"exposure_count" xorm:"not null default 0 comment('曝光量') INT(11)"`
ExposureRate string `json:"exposure_rate" xorm:"not null default '0.00' comment('曝光率') CHAR(50)"`
ClickCount int `json:"click_count" xorm:"not null default 0 comment('点击量') INT(11)"`
ClickRate string `json:"click_rate" xorm:"not null default '0.00' comment('点击率') CHAR(50)"`
Ecpm string `json:"ecpm" xorm:"not null default '0.00' comment('广告千次曝光收益(分)') CHAR(50)"`
PlatformRetention int `json:"platform_retention" xorm:"not null default 0 comment('平台留存(分)') INT(11)"`
CommissionRetention int `json:"commission_retention" xorm:"not null default 0 comment('佣金留存(分)') INT(11)"`
PriceAdjustmentRetention int `json:"price_adjustment_retention" xorm:"not null default 0 comment('调价留存(分)') INT(11)"`
MediaRevenue int `json:"media_revenue" xorm:"not null default 0 comment('媒体收益(分)') INT(11)"`
AgentRevenue int `json:"agent_revenue" xorm:"not null default 0 comment('代理收益(分)') INT(11)"`
ExtraRevenue int `json:"extra_revenue" xorm:"not null default 0 comment('额外收益(分)') INT(11)"`
AgreementSharing int `json:"agreement_sharing" xorm:"not null default 0 comment('协议分成(分)') INT(11)"`
AgreementSharingTotal int `json:"agreement_sharing_total" xorm:"not null default 0 comment('协议总分成(分)') INT(11)"`
PlatformRetentionRate int `json:"platform_retention_rate" xorm:"not null default 0 comment('平台留存百分比') TINYINT(3)"`
CommissionRetentionRate int `json:"commission_retention_rate" xorm:"not null default 0 comment('佣金留存百分比') TINYINT(3)"`
MediaRevenueRate int `json:"media_revenue_rate" xorm:"not null default 0 comment('媒体收益百分比') TINYINT(3)"`
AgentRevenueRate int `json:"agent_revenue_rate" xorm:"not null default 0 comment('代理收益百分比') TINYINT(3)"`
ExtraRevenueRate int `json:"extra_revenue_rate" xorm:"not null default 0 comment('额外收益百分比') TINYINT(3)"`
AgreementSharingRate int `json:"agreement_sharing_rate" xorm:"not null default 0 comment('协议分成百分比') TINYINT(3)"`
IsGenerateReport int `json:"is_generate_report" xorm:"not null default 0 comment('是否已生成报表(0:未 1:已)') TINYINT(1)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 18
- 0
src/super/model/generate_wx_ad_data_with_agent_flow.go View File

@@ -0,0 +1,18 @@
package model

type GenerateWxAdDataWithAgentFlow struct {
Id int `json:"id" xorm:"not null pk autoincr unique(IDX_UUID_TYPE) INT(11)"`
Uuid int `json:"uuid" xorm:"not null comment('站长id') index unique(IDX_UUID_TYPE) INT(10)"`
AppId string `json:"app_id" xorm:"not null default '' comment('小程序id') VARCHAR(255)"`
AgentId int `json:"agent_id" xorm:"not null default 0 comment('代理id') INT(11)"`
GenerateDataId int `json:"generate_data_id" xorm:"not null default 0 comment('生成数据id') INT(11)"`
SlotId string `json:"slot_id" xorm:"not null default '' comment('广告位id') VARCHAR(255)"`
AdSlot string `json:"ad_slot" xorm:"not null default '' comment('广告位类型') CHAR(50)"`
Date string `json:"date" xorm:"not null default '' comment('日期') CHAR(50)"`
AgentRevenue int `json:"agent_revenue" xorm:"not null default 0 comment('代理收益(分)') INT(11)"`
AgentRevenueRate int `json:"agent_revenue_rate" xorm:"not null default 0 comment('代理收益百分比') TINYINT(3)"`
ExtraRevenue int `json:"extra_revenue" xorm:"not null default 0 comment('额外收益(分)') INT(11)"`
ExtraRevenueRate int `json:"extra_revenue_rate" xorm:"not null default 0 comment('额外收益百分比') TINYINT(3)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 12
- 16
src/super/model/medium_bank_info.go View File

@@ -1,20 +1,16 @@
package model

import (
"time"
)

type MediumBankInfo struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"`
MediumId int `json:"medium_id" xorm:"not null comment('代理id') unique(IDX_UUID_TYPE) INT(11)"`
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 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"`
Memo string `json:"memo" xorm:"comment('备注 审核时填写的') VARCHAR(255)"`
CurrencyConf int `json:"currency_conf" xorm:"default 0 comment('结算币种 1人民币') TINYINT(1)"`
Bank string `json:"bank" xorm:"comment('开户银行') VARCHAR(255)"`
BankBranch string `json:"bank_branch" xorm:"comment('开户银行分行') VARCHAR(255)"`
BankNo string `json:"bank_no" xorm:"comment('银行卡号') VARCHAR(255)"`
Licence string `json:"licence" xorm:"comment('开户许可证') VARCHAR(255)"`
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"`
MediumId int `json:"medium_id" xorm:"not null comment('代理id') unique(IDX_UUID_TYPE) INT(11)"`
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 1:审核通过 2:审核拒绝)') TINYINT(1)"`
CreateAt string `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"`
Memo string `json:"memo" xorm:"comment('备注 审核时填写的') VARCHAR(255)"`
CurrencyConf int `json:"currency_conf" xorm:"default 0 comment('结算币种 1人民币') TINYINT(1)"`
Bank string `json:"bank" xorm:"comment('开户银行') VARCHAR(255)"`
BankBranch string `json:"bank_branch" xorm:"comment('开户银行分行') VARCHAR(255)"`
BankNo string `json:"bank_no" xorm:"comment('银行卡号') VARCHAR(255)"`
Licence string `json:"licence" xorm:"comment('开户许可证') VARCHAR(255)"`
}

+ 11
- 15
src/super/model/medium_contact_info.go View File

@@ -1,19 +1,15 @@
package model

import (
"time"
)

type MediumContactInfo struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"`
MediumId int `json:"medium_id" xorm:"not null comment('代理id') unique(IDX_UUID_TYPE) INT(11)"`
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 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"`
Memo string `json:"memo" xorm:"comment('备注 审核时填写的') VARCHAR(255)"`
Name string `json:"name" xorm:"comment('联系人') VARCHAR(255)"`
Email string `json:"email" xorm:"comment('邮箱地址') VARCHAR(255)"`
Phone string `json:"phone" xorm:"comment('联系电话') VARCHAR(255)"`
Address string `json:"address" xorm:"comment('联系地址') VARCHAR(255)"`
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"`
MediumId int `json:"medium_id" xorm:"not null comment('代理id') unique(IDX_UUID_TYPE) INT(11)"`
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 1:审核通过 2:审核拒绝)') TINYINT(1)"`
CreateAt string `json:"create_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default CURRENT_TIMESTAMP DATETIME"`
Memo string `json:"memo" xorm:"comment('备注 审核时填写的') VARCHAR(255)"`
Name string `json:"name" xorm:"comment('联系人') VARCHAR(255)"`
Email string `json:"email" xorm:"comment('邮箱地址') VARCHAR(255)"`
Phone string `json:"phone" xorm:"comment('联系电话') VARCHAR(255)"`
Address string `json:"address" xorm:"comment('联系地址') VARCHAR(255)"`
}

+ 15
- 0
src/super/model/medium_division_strategy.go View File

@@ -0,0 +1,15 @@
package model

type MediumDivisionStrategy struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null default 0 comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"`
MediumId int `json:"medium_id" xorm:"not null default 0 comment('媒体id') unique(IDX_UUID_TYPE) INT(11)"`
PlatformRetentionRate int `json:"platform_retention_rate" xorm:"not null default 0 comment('平台留存百分比') TINYINT(1)"`
CommissionRetentionRate int `json:"commission_retention_rate" xorm:"not null default 0 comment('佣金留存百分比') TINYINT(1)"`
MediaRevenueRate int `json:"media_revenue_rate" xorm:"not null default 0 comment('媒体收益百分比') TINYINT(1)"`
AgentRevenueRate int `json:"agent_revenue_rate" xorm:"not null default 0 comment('代理收益百分比') TINYINT(1)"`
ExtraRevenueRate int `json:"extra_revenue_rate" xorm:"not null default 0 comment('额外收益百分比') TINYINT(1)"`
AgreementSharingRate int `json:"agreement_sharing_rate" xorm:"not null default 0 comment('协议分成百分比') TINYINT(1)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 11
- 0
src/super/model/medium_division_strategy_with_agent_flow.go View File

@@ -0,0 +1,11 @@
package model

type MediumDivisionStrategyWithAgentFlow struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
StrategyId int `json:"strategy_id" xorm:"not null default 0 comment('策略id') index unique(IDX_UUID_TYPE) INT(11)"`
AgentId int `json:"agent_id" xorm:"not null default 0 comment('代理id') unique(IDX_UUID_TYPE) INT(11)"`
AgentRevenueRate int `json:"agent_revenue_rate" xorm:"not null default 0 comment('代理收益百分比') TINYINT(1)"`
ExtraRevenueRate int `json:"extra_revenue_rate" xorm:"not null default 0 comment('额外收益百分比') TINYINT(1)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 18
- 0
src/super/model/medium_settlement.go View File

@@ -0,0 +1,18 @@
package model

type MediumSettlement struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null default 0 comment('站长id') index unique(IDX_UUID_TYPE) INT(11)"`
MediumId int `json:"medium_id" xorm:"not null default 0 comment('媒体id') unique(IDX_UUID_TYPE) INT(11)"`
AppId string `json:"app_id" xorm:"not null default '' comment('小程序id') VARCHAR(255)"`
BusinessKind int `json:"business_kind" xorm:"not null default 1 comment('业务类型(1:广告合作)') TINYINT(1)"`
Kind int `json:"kind" xorm:"not null default 1 comment('结算单类型(1:日结 2:周结 3:月结 4:预付)') TINYINT(1)"`
BasicIncome int `json:"basic_income" xorm:"not null default 0 comment('基础收益(分)') INT(11)"`
OtherIncome int `json:"other_income" xorm:"not null default 0 comment('其他收益(分)') INT(11)"`
State int `json:"state" xorm:"not null default 0 comment('结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)') TINYINT(1)"`
PayState int `json:"pay_state" xorm:"not null default 0 comment('结算单状态(0:未开始 1:核算中 2:待签订 3:完成签订)') TINYINT(1)"`
StartDate string `json:"start_date" xorm:"not null default '0000-00-00' comment('开始时间') CHAR(50)"`
EndDate string `json:"end_date" xorm:"not null default '0000-00-00' comment('结束时间') CHAR(50)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 14
- 0
src/super/model/medium_settlement_with_flow.go View File

@@ -0,0 +1,14 @@
package model

type MediumSettlementWithFlow struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
SettlementId int `json:"settlement_id" xorm:"not null default 0 comment('结算id') index unique(IDX_UUID_TYPE) INT(11)"`
Amount int `json:"amount" xorm:"not null default 0 comment('变动金额(分)') unique(IDX_UUID_TYPE) INT(11)"`
BasicIncomeBefore int `json:"basic_income_before" xorm:"not null default 0 comment('基础收益(分)-变更前') INT(11)"`
BasicIncomeAfter int `json:"basic_income_after" xorm:"not null default 0 comment('基础收益(分)-变更后') INT(11)"`
OtherIncomeBefore int `json:"other_income_before" xorm:"not null default 0 comment('其他收益(分)-变更前') INT(11)"`
OtherIncomeAfter int `json:"other_income_after" xorm:"not null default 0 comment('其他收益(分)-变更后') INT(11)"`
Kind int `json:"kind" xorm:"not null default 0 comment('类型(1:基础收益 2:其他收益 3:管理员增加其他收益 4:管理员减少其他收益)') TINYINT(3)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 21
- 0
src/super/model/original_wx_ad_data.go View File

@@ -0,0 +1,21 @@
package model

type OriginalWxAdData struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
Uuid int `json:"uuid" xorm:"not null default 0 comment('站长id') index INT(11)"`
MediumId int `json:"medium_id" xorm:"not null default 0 comment('媒体id') INT(11)"`
AppId string `json:"app_id" xorm:"not null default '' comment('小程序id') VARCHAR(255)"`
SlotId string `json:"slot_id" xorm:"not null default '' comment('广告位id') index unique(SLOT_ID_UNIQUE) VARCHAR(255)"`
AdSlot string `json:"ad_slot" xorm:"not null default '' comment('广告位类型') CHAR(50)"`
Date string `json:"date" xorm:"not null default '' comment('日期') unique(SLOT_ID_UNIQUE) CHAR(50)"`
ReqSuccCount int `json:"req_succ_count" xorm:"not null default 0 comment('拉取量') INT(11)"`
ExposureCount int `json:"exposure_count" xorm:"not null default 0 comment('曝光量') INT(11)"`
ExposureRate string `json:"exposure_rate" xorm:"not null default '0.00' comment('曝光率') CHAR(50)"`
ClickCount int `json:"click_count" xorm:"not null default 0 comment('点击量') INT(11)"`
ClickRate string `json:"click_rate" xorm:"not null default '0.00' comment('点击率') CHAR(50)"`
PublisherIncome int `json:"publisher_income" xorm:"not null default 0 comment('小程序分账收入(分)') INT(11)"`
Ecpm string `json:"ecpm" xorm:"not null default '0.00' comment('广告千次曝光收益(分)') CHAR(50)"`
IsApply int `json:"is_apply" xorm:"not null default 0 comment('是否已应用(0:未 1:已)') TINYINT(1)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

Loading…
Cancel
Save