|
|
@@ -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 |
|
|
|
} |
|
|
|