Selaa lähdekoodia

Merge remote-tracking branch 'origin/master'

master
huangjiajun 4 kuukautta sitten
vanhempi
commit
849ec3e356
9 muutettua tiedostoa jossa 255 lisäystä ja 1 poistoa
  1. +1
    -1
      src/implement/super_cloud_issuance_user_robot_bind_follow_db.go
  2. +44
    -0
      src/models/official/db_master_b2c_mall_order_statistics.go
  3. +44
    -0
      src/models/official/db_master_mall_order_statistics.go
  4. +44
    -0
      src/models/official/db_master_o2o_mall_order_statistics.go
  5. +44
    -0
      src/models/official/db_master_o2o_pay_order_statistics.go
  6. +21
    -0
      src/models/official/model/master_b2c_order_statistics.go
  7. +21
    -0
      src/models/official/model/master_mall_order_statistics.go
  8. +21
    -0
      src/models/official/model/master_o2o_order_statistics.go
  9. +15
    -0
      src/models/official/model/master_o2o_pay_order_statistics.go

+ 1
- 1
src/implement/super_cloud_issuance_user_robot_bind_follow_db.go Näytä tiedosto

@@ -55,7 +55,7 @@ func (s SuperCloudIssuanceUserRobotBindFollowDb) FindCloudIssuanceUserRobotBindF

func (s SuperCloudIssuanceUserRobotBindFollowDb) GetCloudIssuanceUserRobotBindFollow(id int) (m *models.SuperCloudIssuanceUserRobotBindFollow, err error) {
m = new(models.SuperCloudIssuanceUserRobotBindFollow)
has, err := s.Db.Where("id =?", id).Get(m)
has, err := s.Db.Where("activate_group_id =?", id).Get(m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}


+ 44
- 0
src/models/official/db_master_b2c_mall_order_statistics.go Näytä tiedosto

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

import (
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models/official/model"
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx"
"xorm.io/xorm"
)

// MasterB2cOrderStatisticsInsert 插入单条数据
func MasterB2cOrderStatisticsInsert(officialDb *xorm.Engine, MasterB2cOrderStatistics *model.MasterB2cOrderStatistics) (int, error) {
_, err := officialDb.InsertOne(MasterB2cOrderStatistics)
if err != nil {
return 0, err
}
return MasterB2cOrderStatistics.Id, nil
}

func GetMasterB2cOrderStatistics(officialDb *xorm.Engine, masterId int, date string) (m *model.MasterB2cOrderStatistics, err error) {
m = new(model.MasterB2cOrderStatistics)
has, err := officialDb.Where("master_id =?", masterId).And("date =?", date).Get(m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return m, nil
}

func MasterB2cOrderStatisticsUpdate(officialDb *xorm.Engine, id interface{}, m *model.MasterB2cOrderStatistics, forceColums ...string) (int64, error) {
var (
affected int64
err error
)
if forceColums != nil {
affected, err = officialDb.Where("id=?", id).Cols(forceColums...).Update(m)
} else {
affected, err = officialDb.Where("id=?", id).Update(m)
}
if err != nil {
return 0, err
}
return affected, nil
}

+ 44
- 0
src/models/official/db_master_mall_order_statistics.go Näytä tiedosto

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

import (
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models/official/model"
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx"
"xorm.io/xorm"
)

// MasterMallOrderStatisticsInsert 插入单条数据
func MasterMallOrderStatisticsInsert(officialDb *xorm.Engine, MasterMallOrderStatistics *model.MasterMallOrderStatistics) (int, error) {
_, err := officialDb.InsertOne(MasterMallOrderStatistics)
if err != nil {
return 0, err
}
return MasterMallOrderStatistics.Id, nil
}

func GetMasterMallOrderStatistics(officialDb *xorm.Engine, masterId int, date string) (m *model.MasterMallOrderStatistics, err error) {
m = new(model.MasterMallOrderStatistics)
has, err := officialDb.Where("master_id =?", masterId).And("date =?", date).Get(m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return m, nil
}

func MasterMallOrderStatisticsUpdate(officialDb *xorm.Engine, id interface{}, m *model.MasterMallOrderStatistics, forceColums ...string) (int64, error) {
var (
affected int64
err error
)
if forceColums != nil {
affected, err = officialDb.Where("id=?", id).Cols(forceColums...).Update(m)
} else {
affected, err = officialDb.Where("id=?", id).Update(m)
}
if err != nil {
return 0, err
}
return affected, nil
}

+ 44
- 0
src/models/official/db_master_o2o_mall_order_statistics.go Näytä tiedosto

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

import (
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models/official/model"
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx"
"xorm.io/xorm"
)

// MasterO2oOrderStatisticsInsert 插入单条数据
func MasterO2oOrderStatisticsInsert(officialDb *xorm.Engine, MasterO2oOrderStatistics *model.MasterO2oOrderStatistics) (int, error) {
_, err := officialDb.InsertOne(MasterO2oOrderStatistics)
if err != nil {
return 0, err
}
return MasterO2oOrderStatistics.Id, nil
}

func GetMasterO2oOrderStatistics(officialDb *xorm.Engine, masterId int, date string) (m *model.MasterO2oOrderStatistics, err error) {
m = new(model.MasterO2oOrderStatistics)
has, err := officialDb.Where("master_id =?", masterId).And("date =?", date).Get(m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return m, nil
}

func MasterO2oOrderStatisticsUpdate(officialDb *xorm.Engine, id interface{}, m *model.MasterO2oOrderStatistics, forceColums ...string) (int64, error) {
var (
affected int64
err error
)
if forceColums != nil {
affected, err = officialDb.Where("id=?", id).Cols(forceColums...).Update(m)
} else {
affected, err = officialDb.Where("id=?", id).Update(m)
}
if err != nil {
return 0, err
}
return affected, nil
}

+ 44
- 0
src/models/official/db_master_o2o_pay_order_statistics.go Näytä tiedosto

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

import (
"code.fnuoos.com/go_rely_warehouse/zyos_model.git/src/models/official/model"
zhios_order_relate_logx "code.fnuoos.com/go_rely_warehouse/zyos_model.git/utils/logx"
"xorm.io/xorm"
)

// MasterO2oPayOrderStatisticsInsert 插入单条数据
func MasterO2oPayOrderStatisticsInsert(officialDb *xorm.Engine, MasterO2oPayOrderStatistics *model.MasterO2oPayOrderStatistics) (int, error) {
_, err := officialDb.InsertOne(MasterO2oPayOrderStatistics)
if err != nil {
return 0, err
}
return MasterO2oPayOrderStatistics.Id, nil
}

func GetMasterO2oPayOrderStatistics(officialDb *xorm.Engine, masterId int, date string) (m *model.MasterO2oPayOrderStatistics, err error) {
m = new(model.MasterO2oPayOrderStatistics)
has, err := officialDb.Where("master_id =?", masterId).And("date =?", date).Get(m)
if err != nil {
return nil, zhios_order_relate_logx.Error(err)
}
if has == false {
return nil, nil
}
return m, nil
}

func MasterO2oPayOrderStatisticsUpdate(officialDb *xorm.Engine, id interface{}, m *model.MasterO2oPayOrderStatistics, forceColums ...string) (int64, error) {
var (
affected int64
err error
)
if forceColums != nil {
affected, err = officialDb.Where("id=?", id).Cols(forceColums...).Update(m)
} else {
affected, err = officialDb.Where("id=?", id).Update(m)
}
if err != nil {
return 0, err
}
return affected, nil
}

+ 21
- 0
src/models/official/model/master_b2c_order_statistics.go Näytä tiedosto

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

type MasterB2cOrderStatistics struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
MasterId int `json:"master_id" xorm:"not null default 0 comment('站长id') INT(11)"`
PaymentTotal string `json:"payment_total" xorm:"not null default 0.0000 comment('付款金额(元)') DECIMAL(10,4)"`
OrderCount int `json:"order_count" xorm:"not null default 0 comment('订单数量(笔)') INT(11)"`
EstimatedCommission string `json:"estimated_commission" xorm:"not null default 0.0000 comment('预估佣金(元)') DECIMAL(10,4)"`
LoseOrderCount int `json:"lose_order_count" xorm:"not null default 0 comment('失效订单(笔)') INT(11)"`
PlaceOrderNumOfPeople int `json:"place_order_num_of_people" xorm:"not null default 0 comment('下单人数(个)') INT(11)"`
EffectiveOrderCount int `json:"effective_order_count" xorm:"not null default 0 comment('有效订单(笔)') INT(11)"`
EffectiveCommission string `json:"effective_commission" xorm:"not null default 0.0000 comment('有效佣金(元)') DECIMAL(10,4)"`
ReceiveCommission string `json:"receive_commission" xorm:"not null default 0.0000 comment('收货佣金(元)') DECIMAL(10,4)"`
LoseCommission string `json:"lose_commission" xorm:"not null default 0.0000 comment('失效佣金(元)') DECIMAL(10,4)"`
AvgCommission string `json:"avg_commission" xorm:"not null default 0.0000 comment('平均佣金(元)') DECIMAL(10,4)"`
CustomerUnitPrice string `json:"customer_unit_price" xorm:"not null default 0.0000 comment('客单价(元)') DECIMAL(10,4)"`
Date string `json:"date" xorm:"not null default '0000-00-00' comment('统计时间') VARCHAR(50)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' TIMESTAMP"`
UpdateAt string `json:"update_at" xorm:"default 'CURRENT_TIMESTAMP' TIMESTAMP"`
EffectivePaymentTotal string `json:"effective_payment_total" xorm:"not null default 0.0000 comment('有效付款金额(元)') DECIMAL(10,4)"`
}

+ 21
- 0
src/models/official/model/master_mall_order_statistics.go Näytä tiedosto

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

type MasterMallOrderStatistics struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
MasterId int `json:"master_id" xorm:"not null default 0 comment('站长id') INT(11)"`
PaymentTotal string `json:"payment_total" xorm:"not null default 0.0000 comment('付款金额(元)') DECIMAL(10,4)"`
OrderCount int `json:"order_count" xorm:"not null default 0 comment('订单数量(笔)') INT(11)"`
EstimatedCommission string `json:"estimated_commission" xorm:"not null default 0.0000 comment('预估佣金(元)') DECIMAL(10,4)"`
LoseOrderCount int `json:"lose_order_count" xorm:"not null default 0 comment('失效订单(笔)') INT(11)"`
PlaceOrderNumOfPeople int `json:"place_order_num_of_people" xorm:"not null default 0 comment('下单人数(个)') INT(11)"`
EffectiveOrderCount int `json:"effective_order_count" xorm:"not null default 0 comment('有效订单(笔)') INT(11)"`
EffectiveCommission string `json:"effective_commission" xorm:"not null default 0.0000 comment('有效佣金(元)') DECIMAL(10,4)"`
ReceiveCommission string `json:"receive_commission" xorm:"not null default 0.0000 comment('收货佣金(元)') DECIMAL(10,4)"`
LoseCommission string `json:"lose_commission" xorm:"not null default 0.0000 comment('失效佣金(元)') DECIMAL(10,4)"`
AvgCommission string `json:"avg_commission" xorm:"not null default 0.0000 comment('平均佣金(元)') DECIMAL(10,4)"`
CustomerUnitPrice string `json:"customer_unit_price" xorm:"not null default 0.0000 comment('客单价(元)') DECIMAL(10,4)"`
Date string `json:"date" xorm:"not null default '0000-00-00' comment('统计时间') VARCHAR(50)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' TIMESTAMP"`
UpdateAt string `json:"update_at" xorm:"default 'CURRENT_TIMESTAMP' TIMESTAMP"`
EffectivePaymentTotal string `json:"effective_payment_total" xorm:"not null default 0.0000 comment('有效付款金额(元)') DECIMAL(10,4)"`
}

+ 21
- 0
src/models/official/model/master_o2o_order_statistics.go Näytä tiedosto

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

type MasterO2oOrderStatistics struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
MasterId int `json:"master_id" xorm:"not null default 0 comment('站长id') INT(11)"`
PaymentTotal string `json:"payment_total" xorm:"not null default 0.0000 comment('付款金额(元)') DECIMAL(10,4)"`
OrderCount int `json:"order_count" xorm:"not null default 0 comment('订单数量(笔)') INT(11)"`
EstimatedCommission string `json:"estimated_commission" xorm:"not null default 0.0000 comment('预估佣金(元)') DECIMAL(10,4)"`
LoseOrderCount int `json:"lose_order_count" xorm:"not null default 0 comment('失效订单(笔)') INT(11)"`
PlaceOrderNumOfPeople int `json:"place_order_num_of_people" xorm:"not null default 0 comment('下单人数(个)') INT(11)"`
EffectiveOrderCount int `json:"effective_order_count" xorm:"not null default 0 comment('有效订单(笔)') INT(11)"`
EffectiveCommission string `json:"effective_commission" xorm:"not null default 0.0000 comment('有效佣金(元)') DECIMAL(10,4)"`
ReceiveCommission string `json:"receive_commission" xorm:"not null default 0.0000 comment('收货佣金(元)') DECIMAL(10,4)"`
LoseCommission string `json:"lose_commission" xorm:"not null default 0.0000 comment('失效佣金(元)') DECIMAL(10,4)"`
AvgCommission string `json:"avg_commission" xorm:"not null default 0.0000 comment('平均佣金(元)') DECIMAL(10,4)"`
CustomerUnitPrice string `json:"customer_unit_price" xorm:"not null default 0.0000 comment('客单价(元)') DECIMAL(10,4)"`
Date string `json:"date" xorm:"not null default '0000-00-00' comment('统计时间') VARCHAR(50)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' TIMESTAMP"`
UpdateAt string `json:"update_at" xorm:"default 'CURRENT_TIMESTAMP' TIMESTAMP"`
EffectivePaymentTotal string `json:"effective_payment_total" xorm:"not null default 0.0000 comment('有效付款金额(元)') DECIMAL(10,4)"`
}

+ 15
- 0
src/models/official/model/master_o2o_pay_order_statistics.go Näytä tiedosto

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

type MasterO2oPayOrderStatistics struct {
Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
MasterId int `json:"master_id" xorm:"not null default 0 comment('站长id') INT(11)"`
PaymentTotal string `json:"payment_total" xorm:"not null default 0.0000 comment('付款金额(元)') DECIMAL(10,4)"`
OrderCount int `json:"order_count" xorm:"not null default 0 comment('订单数量(笔)') INT(11)"`
EstimatedCommission string `json:"estimated_commission" xorm:"not null default 0.0000 comment('预估佣金(元)') DECIMAL(10,4)"`
PlaceOrderNumOfPeople int `json:"place_order_num_of_people" xorm:"not null default 0 comment('下单人数(个)') INT(11)"`
AvgCommission string `json:"avg_commission" xorm:"not null default 0.0000 comment('平均佣金(元)') DECIMAL(10,4)"`
CustomerUnitPrice string `json:"customer_unit_price" xorm:"not null default 0.0000 comment('客单价(元)') DECIMAL(10,4)"`
Date string `json:"date" xorm:"not null default '0000-00-00' comment('统计时间') VARCHAR(50)"`
CreateAt string `json:"create_at" xorm:"not null default 'CURRENT_TIMESTAMP' TIMESTAMP"`
UpdateAt string `json:"update_at" xorm:"default 'CURRENT_TIMESTAMP' TIMESTAMP"`
}

Ladataan…
Peruuta
Tallenna