From e2108940383943f7a74c566b1afdea5c747277ef Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 26 Oct 2024 11:02:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/db/model/user_virtual_coin_flow.go | 1 + app/svc/svc_tborder_refund_track.go | 6 ++++++ 2 files changed, 7 insertions(+) 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 }