From f3533490f8d3c36a40ea4220ebb0797e9a71398f Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Thu, 25 Apr 2024 14:07:46 +0800 Subject: [PATCH] add --- api/proto/account/proto/account_vo_api.go | 2 +- app/mix/service/logic/vas.go | 7 +++++++ app/mix/service/vasservice.go | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/api/proto/account/proto/account_vo_api.go b/api/proto/account/proto/account_vo_api.go index 7f41534c..8ff5c498 100644 --- a/api/proto/account/proto/account_vo_api.go +++ b/api/proto/account/proto/account_vo_api.go @@ -57,7 +57,7 @@ func (vo *ApiListVO) CopyWallet(wallet *dbstruct.Wallet) *ApiListVO { return vo } vo.GoldNum = wallet.Coins - vo.DiamondNum = wallet.WithdrawDiamonds + vo.DiamondNum = wallet.Diamonds vo.WithdrawDiamondNum = wallet.WithdrawDiamonds return vo } diff --git a/app/mix/service/logic/vas.go b/app/mix/service/logic/vas.go index dc5e6658..014b93c7 100644 --- a/app/mix/service/logic/vas.go +++ b/app/mix/service/logic/vas.go @@ -1515,6 +1515,13 @@ func (v *Vas) WithdrawApply(ctx *gin.Context, req *vasproto.WithdrawApplyReq) (t return } + // 扣钻石 + err = v.store.DecDiamonds(ctx, tx, mid, diamonds) + if err != nil { + logger.Error("DecDiamonds fail, mid: %, err: %v", mid, err) + return + } + // 添加提现订单 wOrder = &dbstruct.WithdrawOrder{ ID: goproto.String(orderId), diff --git a/app/mix/service/vasservice.go b/app/mix/service/vasservice.go index 87c446e8..3046b22b 100644 --- a/app/mix/service/vasservice.go +++ b/app/mix/service/vasservice.go @@ -611,6 +611,7 @@ func (s *Service) OpOrderList(ctx *gin.Context, req *vasproto.OpOrderListReq) (l productIds = append(productIds, id) } productMap, _ := _DefaultVas.GetProductMapByIds(ctx, productIds) + logger.Info("GetProductMapByIds, ids: %v, map: %v", productIds, util.ToJson(productMap)) // 组装 for _, o := range orders {