From 6b06346550423afc5bad4d4cdbb7951f1695bdce Mon Sep 17 00:00:00 2001 From: wangxinyu Date: Thu, 5 Dec 2024 13:21:37 +0800 Subject: [PATCH] fix: mongo _id update --- app/mix/service/logic/vas_zone.go | 1 + dbstruct/vas_mongo.go | 27 ++++++++++++++------------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/app/mix/service/logic/vas_zone.go b/app/mix/service/logic/vas_zone.go index 9be68aa2..b258833a 100644 --- a/app/mix/service/logic/vas_zone.go +++ b/app/mix/service/logic/vas_zone.go @@ -1084,6 +1084,7 @@ func (v *Vas) ZoneRefundV2(ctx *gin.Context, req *vasproto.ZoneRefundReq) error err = v.store.AddZoneRefundAutomatic(ctx, refund) if err != nil { + logger.Error("ZoneRefundV2 AddZoneRefundAutomatic fail, mid: %v, zid: %v, orderId: %v, err: %v", req.Mid, req.Zid, order.GetID(), err) return err } diff --git a/dbstruct/vas_mongo.go b/dbstruct/vas_mongo.go index 3e9219b1..1fa6c7bb 100644 --- a/dbstruct/vas_mongo.go +++ b/dbstruct/vas_mongo.go @@ -1,6 +1,7 @@ package dbstruct import ( + "go.mongodb.org/mongo-driver/bson/primitive" "math" "service/bizcommon/util" ) @@ -199,17 +200,17 @@ const ( ) type RefundInfo struct { - AuditId string `json:"audit_id" bson:"_id"` - Zid int64 `json:"zid" bson:"zid"` - Price int64 `json:"price" bson:"price"` - CoinPrice int64 `json:"coin_price" bson:"coin_price"` - Mid int64 `json:"mid" bson:"mid"` - ByTime int64 `json:"by_time" bson:"by_time"` - RefundT int64 `json:"refund_t" bson:"refund_t"` - RefundsStatus int64 `json:"refunds_status" bson:"refunds_status"` - ContactName string `json:"contact_name" bson:"contact_name"` - ContactPhone string `json:"contact_phone" bson:"contact_phone"` - Note string `json:"note" bson:"note"` - Ct int64 `json:"ct" bson:"ct"` - Ut int64 `json:"ut" bson:"ut"` + AuditId primitive.ObjectID `json:"audit_id" bson:"_id"` + Zid int64 `json:"zid" bson:"zid"` + Price int64 `json:"price" bson:"price"` + CoinPrice int64 `json:"coin_price" bson:"coin_price"` + Mid int64 `json:"mid" bson:"mid"` + ByTime int64 `json:"by_time" bson:"by_time"` + RefundT int64 `json:"refund_t" bson:"refund_t"` + RefundsStatus int64 `json:"refunds_status" bson:"refunds_status"` + ContactName string `json:"contact_name" bson:"contact_name"` + ContactPhone string `json:"contact_phone" bson:"contact_phone"` + Note string `json:"note" bson:"note"` + Ct int64 `json:"ct" bson:"ct"` + Ut int64 `json:"ut" bson:"ut"` }