Ver código fonte

更新

three
huangjiajun 1 ano atrás
pai
commit
ffb1efc52a
3 arquivos alterados com 5 adições e 2 exclusões
  1. +1
    -0
      app/db/model/user_virtual_coin_flow.go
  2. +3
    -1
      consume/zhios_appreciation.go
  3. +1
    -1
      go.mod

+ 1
- 0
app/db/model/user_virtual_coin_flow.go Ver arquivo

@@ -16,6 +16,7 @@ type UserVirtualCoinFlow struct {
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)"`
Price string `json:"price" 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)"`


+ 3
- 1
consume/zhios_appreciation.go Ver arquivo

@@ -2,6 +2,7 @@ package consume

import (
"applet/app/db"
"applet/app/db/model"
"applet/app/svc"
"applet/app/utils"
"applet/app/utils/logx"
@@ -167,7 +168,7 @@ func withdraw(eg *xorm.Engine, msg *md.ZhiosAppreciation) error {
//这是到手的
newAmount := utils.GetPrec(utils.Float64ToStrByPrec(resp.TransferOutValue-resp.AmountOut, 5), "4")
//扣的
coinSum := utils.GetPrec(utils.Float64ToStrByPrec(resp.TransferOut-resp.RefluxValue, 20), "4")
coinSum := utils.GetPrec(utils.Float64ToStrByPrec(resp.TransferOutValue-resp.RefluxValue, 20), "4")
price = utils.GetPrec(utils.Float64ToStrByPrec(resp.Price, 20), "4")
err := svc.UpdateUserFinValidAndInterFlowSess(sess,
newAmount, args["amount"]+"个数字资产转余额,价值"+price+"/个", "appreciation", 0, 56, utils.StrToInt(msg.Uid), utils.StrToInt(msg.Oid), utils.StrToInt64(msg.Oid), utils.StrToInt64(msg.Oid))
@@ -211,6 +212,7 @@ func withdraw(eg *xorm.Engine, msg *md.ZhiosAppreciation) error {
sess.Rollback()
return err
}
sess.Where("ord_id=?", msg.Oid).Cols("price").Update(&model.UserVirtualCoinFlow{Price: price})
sess.Commit()
return nil
}


+ 1
- 1
go.mod Ver arquivo

@@ -6,7 +6,7 @@ require (
code.fnuoos.com/go_rely_warehouse/zyos_go_condition_statistics.git v1.1.2-0.20231117125527-cb06c9e24f3f
code.fnuoos.com/go_rely_warehouse/zyos_go_es.git v1.0.0
code.fnuoos.com/go_rely_warehouse/zyos_go_mq.git v0.0.4
code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git v1.9.10-0.20231128005921-f49c8849bc4a
code.fnuoos.com/go_rely_warehouse/zyos_go_order_relate_rule.git v1.9.10-0.20231130020109-71fc70fb5505
code.fnuoos.com/go_rely_warehouse/zyos_go_pay.git v1.6.2-0.20231116085701-9ba6e19f877b
code.fnuoos.com/go_rely_warehouse/zyos_go_third_party_api.git v1.1.21-0.20230911014653-22cc8e626d17
github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5


Carregando…
Cancelar
Salvar