diff --git a/app/db/model/user_virtual_coin_flow.go b/app/db/model/user_virtual_coin_flow.go index 492a7d1..1e322f2 100644 --- a/app/db/model/user_virtual_coin_flow.go +++ b/app/db/model/user_virtual_coin_flow.go @@ -27,4 +27,5 @@ type UserVirtualCoinFlow struct { TransferMoney string `json:"transfer_money" xorm:"not null default '0.000000' comment('转赠已撤回金额') INT(11)"` FreezeBeforeAmout string `json:"freeze_before_amout" xorm:" comment('变更前数量') DECIMAL(16,6)"` FreezeAfterAmout string `json:"freeze_after_amout" xorm:" comment('变更后数量') DECIMAL(16,6)"` + State int `json:"state" xorm:"not null default 0 comment('兑换时目标币种id') INT(11)"` } diff --git a/app/svc/svc_tborder_refund_track.go b/app/svc/svc_tborder_refund_track.go index f6e2aee..b34e2ce 100644 --- a/app/svc/svc_tborder_refund_track.go +++ b/app/svc/svc_tborder_refund_track.go @@ -216,6 +216,12 @@ func refundServiceVirtualAmount(eg *xorm.Engine, sess *xorm.Session, oid int64) return false, err } } + if len(list) > 0 { + _, err := sess.Where("ord_id=?", oid).Cols("state").Update(&model.UserVirtualCoinFlow{State: 2}) + if err != nil { + return false, err + } + } return true, nil }