Sfoglia il codice sorgente

update

tags/v3.4.5
DengBiao 2 anni fa
parent
commit
f65eaf00dc
3 ha cambiato i file con 20 aggiunte e 13 eliminazioni
  1. +18
    -13
      db/model/user_virtual_coin_flow.go
  2. +1
    -0
      md/block_star_chain.go
  3. +1
    -0
      rule/block_star_chain_settlement.go

+ 18
- 13
db/model/user_virtual_coin_flow.go Vedi File

@@ -5,17 +5,22 @@ import (
)

type UserVirtualCoinFlow struct {
Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"`
Uid int `json:"uid" xorm:"not null comment('用户id') index INT(11)"`
CoinId int `json:"coin_id" xorm:"not null comment('虚拟币id') INT(11)"`
Direction int `json:"direction" xorm:"not null comment('方向:1收入 2支出') TINYINT(255)"`
Title string `json:"title" xorm:"comment('标题') VARCHAR(255)"`
OrdId string `json:"ord_id" xorm:"comment('相关的订单id') VARCHAR(255)"`
Amout string `json:"amout" xorm:"not null comment('变更数量') DECIMAL(16,6)"`
BeforeAmout string `json:"before_amout" xorm:"not null comment('变更前数量') DECIMAL(16,6)"`
AfterAmout string `json:"after_amout" xorm:"not null comment('变更后数量') DECIMAL(16,6)"`
SysFee string `json:"sys_fee" xorm:"not null default 0.000000 comment('手续费') DECIMAL(16,6)"`
CreateTime time.Time `json:"create_time" xorm:"created default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"`
TransferType int `json:"transfer_type" xorm:"comment('转账类型:1全球分红,2管理员修改,3消费,4退回,5虚拟币兑换') TINYINT(100)"`
CoinIdTo int `json:"coin_id_to" xorm:"not null default 0 comment('兑换时目标币种id') INT(11)"`
Id int64 `json:"id" xorm:"pk autoincr BIGINT(20)"`
Uid int `json:"uid" xorm:"not null comment('用户id') index INT(11)"`
CoinId int `json:"coin_id" xorm:"not null comment('虚拟币id') INT(11)"`
Direction int `json:"direction" xorm:"not null comment('方向:1收入 2支出') TINYINT(255)"`
Title string `json:"title" xorm:"comment('标题') VARCHAR(255)"`
OrdId string `json:"ord_id" xorm:"comment('相关的订单id') VARCHAR(255)"`
Amout string `json:"amout" xorm:"not null comment('变更数量') DECIMAL(16,6)"`
BeforeAmout string `json:"before_amout" xorm:"not null comment('变更前数量') DECIMAL(16,6)"`
AfterAmout string `json:"after_amout" xorm:"not null comment('变更后数量') DECIMAL(16,6)"`
SysFee string `json:"sys_fee" xorm:"not null default 0.000000 comment('手续费') DECIMAL(16,6)"`
CoinTransferData string `json:"coin_transfer_data" xorm:"not null comment('虚拟币转赠信息') TEXT"`
CreateTime time.Time `json:"create_time" xorm:"created default 'CURRENT_TIMESTAMP' comment('创建时间') DATETIME"`
TransferType int `json:"transfer_type" xorm:"comment('转账类型:1全球分红,2管理员修改,3消费,4退回,5虚拟币兑换') TINYINT(100)"`
CoinIdTo int `json:"coin_id_to" xorm:"not null default 0 comment('兑换时目标币种id') INT(11)"`
IsRevoke int `json:"is_revoke" xorm:"not null default 0 comment('转赠是否撤回') INT(1)"`
TransferId int `json:"transfer_id" xorm:"not null default 0 comment('转赠关联id') INT(11)"`
ToUid int `json:"to_uid" xorm:"not null default 0 comment('转赠的用户id') INT(11)"`
TransferMoney string `json:"transfer_money" xorm:"not null default '0.000000' comment('转赠已撤回金额') INT(11)"`
}

+ 1
- 0
md/block_star_chain.go Vedi File

@@ -75,6 +75,7 @@ type DealUserCoinReq struct {
OrdId string `json:"ord_id"`
CoinId int `json:"coin_id"`
Uid int `json:"uid"`
ToUid int `json:"to_uid"`
Amount float64 `json:"amount"`
}



+ 1
- 0
rule/block_star_chain_settlement.go Vedi File

@@ -817,6 +817,7 @@ func DealUserCoin(session *xorm.Session, req md.DealUserCoinReq) (err error) {
userVirtualCoinFlow.Title = req.Title
userVirtualCoinFlow.TransferType = req.TransferType
userVirtualCoinFlow.Uid = req.Uid
userVirtualCoinFlow.ToUid = req.ToUid
userVirtualCoinFlow.BeforeAmout = coinAmount
userVirtualCoinFlow.Amout = amountValue.String()
userVirtualCoinFlow.CreateTime = now


Caricamento…
Annulla
Salva