瀏覽代碼

update

master
dengbiao 3 月之前
父節點
當前提交
567553b40a
共有 27 個文件被更改,包括 242 次插入17 次删除
  1. +6
    -2
      src/super/dao/agent_list_dao.go
  2. +8
    -1
      src/super/dao/agent_settlement_dao.go
  3. +6
    -1
      src/super/dao/agent_settlement_with_flow_dao.go
  4. +5
    -0
      src/super/dao/fin_agent_flow_dao.go
  5. +5
    -0
      src/super/dao/fin_medium_flow_dao.go
  6. +2
    -0
      src/super/dao/generate_wx_ad_data_dao.go
  7. +5
    -1
      src/super/dao/medium_list_dao.go
  8. +8
    -1
      src/super/dao/medium_settlement_dao.go
  9. +6
    -1
      src/super/dao/medium_settlement_with_flow_dao.go
  10. +13
    -4
      src/super/implement/agent_list_implement.go
  11. +30
    -0
      src/super/implement/agent_settlement_implement.go
  12. +9
    -0
      src/super/implement/agent_settlement_with_flow_implement.go
  13. +14
    -0
      src/super/implement/fin_agent_flow_implement.go
  14. +14
    -0
      src/super/implement/fin_medium_flow_implement.go
  15. +21
    -0
      src/super/implement/generate_wx_ad_data_implement.go
  16. +9
    -0
      src/super/implement/medium_list_implement.go
  17. +30
    -0
      src/super/implement/medium_settlement_implement.go
  18. +9
    -0
      src/super/implement/medium_settlement_with_flow_implement.go
  19. +2
    -0
      src/super/model/agent_list.go
  20. +2
    -2
      src/super/model/agent_settlement.go
  21. +1
    -0
      src/super/model/agent_settlement_with_flow.go
  22. +15
    -0
      src/super/model/fin_agent_flow.go
  23. +15
    -0
      src/super/model/fin_medium_flow.go
  24. +1
    -1
      src/super/model/generate_wx_ad_data.go
  25. +3
    -1
      src/super/model/medium_list.go
  26. +2
    -2
      src/super/model/medium_settlement.go
  27. +1
    -0
      src/super/model/medium_settlement_with_flow.go

+ 6
- 2
src/super/dao/agent_list_dao.go 查看文件

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

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

type AgentListDao interface {
GetAgentList(agentId int) (medium *model.AgentList, err error)
GetAgentList(agentId int) (agent *model.AgentList, err error)
GetAgentListBySession(session *xorm.Session, agentId int) (agent *model.AgentList, err error)
AgentListInsert(m *model.AgentList) (int64, error)
UpdateAgentList(m *model.AgentList, columns ...string) (int64, error)
FindAgentList(uuid, name, state string, minState, page, limit int) (list []model.AgentList, total int64, err error)


+ 8
- 1
src/super/dao/agent_settlement_dao.go 查看文件

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

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

type AgentSettlementDao interface {
//TODO:: You can add specific method definitions here
GetAgentSettlementForAvailable(agentId int) (agentSettlement *model.AgentSettlement, err error)
AgentSettlementInsertBySession(session *xorm.Session, m *model.AgentSettlement) (int64, error)
UpdateAgentSettlementBySession(session *xorm.Session, agentSettlement *model.AgentSettlement, columns ...string) (int64, error)
}

+ 6
- 1
src/super/dao/agent_settlement_with_flow_dao.go 查看文件

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

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

type AgentSettlementWithFlowDao interface {
//TODO:: You can add specific method definitions here
AgentSettlementWithFlowInsertBySession(session *xorm.Session, agentSettlementWithFlow *model.AgentSettlementWithFlow) (int64, error)
}

+ 5
- 0
src/super/dao/fin_agent_flow_dao.go 查看文件

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

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

+ 5
- 0
src/super/dao/fin_medium_flow_dao.go 查看文件

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

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

+ 2
- 0
src/super/dao/generate_wx_ad_data_dao.go 查看文件

@@ -7,4 +7,6 @@ import (

type GenerateWxAdDataDao interface {
GenerateWxAdDataInsertBySession(session *xorm.Session, m *model.GenerateWxAdData) (int64, error)
GetGenerateWxAdData(id int) (data *model.GenerateWxAdData, err error)
UpdateGenerateWxAdDataBySession(session *xorm.Session, m *model.GenerateWxAdData, columns ...string) (int64, error)
}

+ 5
- 1
src/super/dao/medium_list_dao.go 查看文件

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

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

type MediumListDao interface {
GetMediumList(mediumId int) (medium *model.MediumList, err error)
GetMediumListBySession(session *xorm.Session, mediumId int) (medium *model.MediumList, err error)
MediumListInsert(m *model.MediumList) (int64, error)
UpdateMediumList(m *model.MediumList, columns ...string) (int64, error)
FindMediumList(uuid, name, state string, minState, page, limit int) (list []model.MediumList, total int64, err error)


+ 8
- 1
src/super/dao/medium_settlement_dao.go 查看文件

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

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

type MediumSettlementDao interface {
//TODO:: You can add specific method definitions here
GetMediumSettlementForAvailable(mediumId int) (mediumSettlement *model.MediumSettlement, err error)
MediumSettlementInsertBySession(session *xorm.Session, m *model.MediumSettlement) (int64, error)
UpdateMediumSettlementBySession(session *xorm.Session, mediumSettlement *model.MediumSettlement, columns ...string) (int64, error)
}

+ 6
- 1
src/super/dao/medium_settlement_with_flow_dao.go 查看文件

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

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

type MediumSettlementWithFlowDao interface {
//TODO:: You can add specific method definitions here
MediumSettlementWithFlowInsertBySession(session *xorm.Session, mediumSettlementWithFlow *model.MediumSettlementWithFlow) (int64, error)
}

+ 13
- 4
src/super/implement/agent_list_implement.go 查看文件

@@ -15,16 +15,25 @@ type AgentListDb struct {
Db *xorm.Engine
}

func (a AgentListDb) GetAgentList(agentId int) (medium *model.AgentList, err error) {
medium = new(model.AgentList)
has, err := a.Db.Where("agent_id =?", agentId).Get(medium)
func (a AgentListDb) GetAgentListBySession(session *xorm.Session, agentId int) (agent *model.AgentList, err error) {
var mm model.AgentList
if has, err := session.Where("agent_id = ?", agentId).
Get(&mm); err != nil || has == false {
return nil, zhios_order_relate_logx.Warn(err)
}
return &mm, nil
}

func (a AgentListDb) GetAgentList(agentId int) (agent *model.AgentList, err error) {
agent = new(model.AgentList)
has, err := a.Db.Where("agent_id =?", agentId).Get(agent)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return medium, nil
return agent, nil
}

func (a AgentListDb) AgentListInsert(m *model.AgentList) (int64, error) {


+ 30
- 0
src/super/implement/agent_settlement_implement.go 查看文件

@@ -2,6 +2,8 @@

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"
)

@@ -12,3 +14,31 @@ func NewAgentSettlementDb(engine *xorm.Engine) dao.AgentSettlementDao {
type AgentSettlementDb struct {
Db *xorm.Engine
}

func (a AgentSettlementDb) UpdateAgentSettlementBySession(session *xorm.Session, agentSettlement *model.AgentSettlement, columns ...string) (int64, error) {
affected, err := session.Where("id =?", agentSettlement.Id).Cols(columns...).Update(agentSettlement)
if err != nil {
return 0, err
}
return affected, nil
}

func (a AgentSettlementDb) GetAgentSettlementForAvailable(agentId int) (agentSettlement *model.AgentSettlement, err error) {
agentSettlement = new(model.AgentSettlement)
has, err := a.Db.Where("agent_id =?", agentId).And("state =?", 0).Get(agentSettlement)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return agentSettlement, nil
}

func (a AgentSettlementDb) AgentSettlementInsertBySession(session *xorm.Session, m *model.AgentSettlement) (int64, error) {
insertAffected, err := session.InsertOne(m)
if err != nil {
return 0, err
}
return insertAffected, nil
}

+ 9
- 0
src/super/implement/agent_settlement_with_flow_implement.go 查看文件

@@ -2,6 +2,7 @@

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

@@ -12,3 +13,11 @@ func NewAgentSettlementWithFlowDb(engine *xorm.Engine) dao.AgentSettlementWithFl
type AgentSettlementWithFlowDb struct {
Db *xorm.Engine
}

func (a AgentSettlementWithFlowDb) AgentSettlementWithFlowInsertBySession(session *xorm.Session, agentSettlementWithFlow *model.AgentSettlementWithFlow) (int64, error) {
insertAffected, err := session.InsertOne(agentSettlementWithFlow)
if err != nil {
return 0, err
}
return insertAffected, nil
}

+ 14
- 0
src/super/implement/fin_agent_flow_implement.go 查看文件

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

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

func NewFinAgentFlowDb(engine *xorm.Engine) dao.FinAgentFlowDao {
return &FinAgentFlowDb{Db: engine}
}

type FinAgentFlowDb struct {
Db *xorm.Engine
}

+ 14
- 0
src/super/implement/fin_medium_flow_implement.go 查看文件

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

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

func NewFinMediumFlowDb(engine *xorm.Engine) dao.FinMediumFlowDao {
return &FinMediumFlowDb{Db: engine}
}

type FinMediumFlowDb struct {
Db *xorm.Engine
}

+ 21
- 0
src/super/implement/generate_wx_ad_data_implement.go 查看文件

@@ -3,6 +3,7 @@
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"
)

@@ -14,6 +15,26 @@ type GenerateWxAdDataDb struct {
Db *xorm.Engine
}

func (g GenerateWxAdDataDb) UpdateGenerateWxAdDataBySession(session *xorm.Session, m *model.GenerateWxAdData, 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 (g GenerateWxAdDataDb) GetGenerateWxAdData(id int) (data *model.GenerateWxAdData, err error) {
data = new(model.GenerateWxAdData)
has, err := g.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
}

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


+ 9
- 0
src/super/implement/medium_list_implement.go 查看文件

@@ -15,6 +15,15 @@ type MediumListDb struct {
Db *xorm.Engine
}

func (m MediumListDb) GetMediumListBySession(session *xorm.Session, mediumId int) (medium *model.MediumList, err error) {
var mm model.MediumList
if has, err := session.Where("medium_id = ?", mediumId).
Get(&mm); err != nil || has == false {
return nil, zhios_order_relate_logx.Warn(err)
}
return &mm, nil
}

func (m MediumListDb) GetMediumList(mediumId int) (medium *model.MediumList, err error) {
medium = new(model.MediumList)
has, err := m.Db.Where("medium_id =?", mediumId).Get(medium)


+ 30
- 0
src/super/implement/medium_settlement_implement.go 查看文件

@@ -2,6 +2,8 @@

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"
)

@@ -12,3 +14,31 @@ func NewMediumSettlementDb(engine *xorm.Engine) dao.MediumSettlementDao {
type MediumSettlementDb struct {
Db *xorm.Engine
}

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

func (m MediumSettlementDb) MediumSettlementInsertBySession(session *xorm.Session, mediumSettlement *model.MediumSettlement) (int64, error) {
insertAffected, err := session.InsertOne(mediumSettlement)
if err != nil {
return 0, err
}
return insertAffected, nil
}

func (m MediumSettlementDb) GetMediumSettlementForAvailable(mediumId int) (mediumSettlement *model.MediumSettlement, err error) {
mediumSettlement = new(model.MediumSettlement)
has, err := m.Db.Where("medium_id =?", mediumId).And("state =?", 0).Get(mediumSettlement)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return mediumSettlement, nil
}

+ 9
- 0
src/super/implement/medium_settlement_with_flow_implement.go 查看文件

@@ -2,6 +2,7 @@

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

@@ -12,3 +13,11 @@ func NewMediumSettlementWithFlowDb(engine *xorm.Engine) dao.MediumSettlementWith
type MediumSettlementWithFlowDb struct {
Db *xorm.Engine
}

func (m MediumSettlementWithFlowDb) MediumSettlementWithFlowInsertBySession(session *xorm.Session, mediumSettlementWithFlow *model.MediumSettlementWithFlow) (int64, error) {
insertAffected, err := session.InsertOne(m)
if err != nil {
return 0, err
}
return insertAffected, nil
}

+ 2
- 0
src/super/model/agent_list.go 查看文件

@@ -4,6 +4,7 @@ type AgentList 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)"`
Amount string `json:"amount" xorm:"not null default 0.00 comment('余额') DECIMAL(8,2)"`
Kind int `json:"kind" xorm:"not null default 1 comment('类型(1:企业 2:个人)') TINYINT(1)"`
CompanyName string `json:"company_name" xorm:"not null default '' comment('公司名称') VARCHAR(255)"`
CompanyAbbreviation string `json:"company_abbreviation" xorm:"not null default '' comment('公司简称') VARCHAR(255)"`
@@ -22,6 +23,7 @@ type AgentList struct {
BusinessLicenseAddress string `json:"business_license_address" xorm:"not null default '' comment('营业执照地址') VARCHAR(255)"`
CertificateValidity string `json:"certificate_validity" xorm:"not null default '0000-00-00' comment('证件有效期') CHAR(50)"`
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 1:审核通过 2:审核拒绝)') TINYINT(1)"`
SettlementType int `json:"settlement_type" xorm:"not null default 1 comment('结算方式(1:日结 2:周结 3:月结 4:预付)') 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:"not null default '' comment('备注') VARCHAR(255)"`


+ 2
- 2
src/super/model/agent_settlement.go 查看文件

@@ -10,8 +10,8 @@ type AgentSettlement struct {
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)"`
PayState int `json:"pay_state" xorm:"not null default 0 comment('结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)') TINYINT(1)"`
State int `json:"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"`


+ 1
- 0
src/super/model/agent_settlement_with_flow.go 查看文件

@@ -3,6 +3,7 @@ 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)"`
GenerateDataId int `json:"generate_data_id" xorm:"not null default 0 comment('生成数据id') 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)"`


+ 15
- 0
src/super/model/fin_agent_flow.go 查看文件

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

type FinAgentFlow 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)"`
Type int `json:"type" xorm:"not null default 1 comment('1收入,2支出') TINYINT(1)"`
Amount string `json:"amount" xorm:"not null default 0.00 comment('变动金额') DECIMAL(8,2)"`
BeforeAmount string `json:"before_amount" xorm:"not null default 0.00 comment('变动前金额') DECIMAL(8,2)"`
AfterAmount string `json:"after_amount" xorm:"not null default 0.00 comment('变动后金额') DECIMAL(8,2)"`
OrdId string `json:"ord_id" xorm:"not null default '' comment('对应订单id') VARCHAR(50)"`
Kind int `json:"kind" xorm:"not null default 1 comment('类型(1:管理员修改增加 2:管理员修改减少 3:结算款扣除)') TINYINT(4)"`
Memo string `json:"memo" xorm:"not null default '' comment('备注信息') VARCHAR(244)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 15
- 0
src/super/model/fin_medium_flow.go 查看文件

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

type FinMediumFlow struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
MediumId int `json:"medium_id" xorm:"not null default 0 comment('媒体id') INT(11)"`
Type int `json:"type" xorm:"not null default 1 comment('1收入,2支出') TINYINT(1)"`
Amount string `json:"amount" xorm:"not null default 0.00 comment('变动金额') DECIMAL(8,2)"`
BeforeAmount string `json:"before_amount" xorm:"not null default 0.00 comment('变动前金额') DECIMAL(8,2)"`
AfterAmount string `json:"after_amount" xorm:"not null default 0.00 comment('变动后金额') DECIMAL(8,2)"`
OrdId string `json:"ord_id" xorm:"not null default '' comment('对应订单id') VARCHAR(50)"`
Kind int `json:"kind" xorm:"not null default 1 comment('类型(1:管理员修改增加 2:管理员修改减少 3:结算款扣除)') TINYINT(4)"`
Memo string `json:"memo" xorm:"not null default '' comment('备注信息') VARCHAR(244)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
UpdateAt string `json:"update_at" xorm:"not null default 'CURRENT_TIMESTAMP' DATETIME"`
}

+ 1
- 1
src/super/model/generate_wx_ad_data.go 查看文件

@@ -4,7 +4,7 @@ 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)"`
OriginalDataId int `json:"original_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)"`


+ 3
- 1
src/super/model/medium_list.go 查看文件

@@ -4,6 +4,7 @@ type MediumList 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)"`
Amount string `json:"amount" xorm:"not null default 0.00 comment('余额') DECIMAL(8,2)"`
Kind int `json:"kind" xorm:"not null default 1 comment('类型(1:企业 2:个人)') TINYINT(1)"`
CompanyName string `json:"company_name" xorm:"not null default '' comment('公司名称') VARCHAR(255)"`
CompanyAbbreviation string `json:"company_abbreviation" xorm:"not null default '' comment('公司简称') VARCHAR(255)"`
@@ -22,7 +23,8 @@ type MediumList struct {
BusinessLicenseAddress string `json:"business_license_address" xorm:"not null default '' comment('营业执照地址') VARCHAR(255)"`
CertificateValidity string `json:"certificate_validity" xorm:"not null default '0000-00-00' comment('证件有效期') CHAR(50)"`
State int `json:"state" xorm:"not null default 0 comment('状态(0:待审核 1:审核通过 2:审核拒绝)') TINYINT(1)"`
SettlementType int `json:"settlement_type" xorm:"not null default 1 comment('结算方式(1:日结 2:周结 3:月结 4:预付)') TINYINT(1)"`
Memo string `json:"memo" xorm:"not null default '' comment('备注') VARCHAR(255)"`
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:"not null default '' comment('备注') VARCHAR(255)"`
}

+ 2
- 2
src/super/model/medium_settlement.go 查看文件

@@ -9,8 +9,8 @@ type MediumSettlement struct {
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)"`
PayState int `json:"pay_state" xorm:"not null default 0 comment('结算单支付状态(0:未开始 1:待审核发票 2:发票审核中 3:发票审核拒绝 4:付款中 5:已付款)') TINYINT(1)"`
State int `json:"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"`


+ 1
- 0
src/super/model/medium_settlement_with_flow.go 查看文件

@@ -3,6 +3,7 @@ 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)"`
GenerateDataId int `json:"generate_data_id" xorm:"not null default 0 comment('生成数据id') 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)"`


Loading…
取消
儲存