fix: mongo _id update 2

This commit is contained in:
wangxinyu 2024-12-05 13:51:40 +08:00
parent 6b06346550
commit a939417d72
3 changed files with 20 additions and 22 deletions

View File

@ -242,11 +242,10 @@ type ZoneRefundListResp struct {
}
type ZoneRefundListVo struct {
AuditId string
RefundT int64
RefundsStatus int64
//*dbstruct.RefundInfo
Account *dbstruct.Account `json:"account"`
AuditId string `json:"audit_id"`
RefundT int64 `json:"refund_t"`
RefundsStatus int64 `json:"refunds_status"`
Account *dbstruct.Account `json:"account"`
}
// 空间退款详情

View File

@ -3,6 +3,7 @@ package logic
import (
"database/sql"
"fmt"
"go.mongodb.org/mongo-driver/bson/primitive"
"service/api/errs"
vasproto "service/api/proto/vas/proto"
zone_collaborator_proto "service/api/proto/zone_collaborator/proto"
@ -1062,9 +1063,8 @@ func (v *Vas) ZoneRefundV2(ctx *gin.Context, req *vasproto.ZoneRefundReq) error
}
refund := &dbstruct.RefundInfo{
Zid: req.Zid,
//Price: order.GetPayAmount(),
//CoinPrice: order.GetPayAmount(),
AuditId: primitive.NewObjectID().Hex(),
Zid: req.Zid,
Mid: req.Mid,
ByTime: order.GetCt(),
RefundT: time.Now().Unix(),

View File

@ -1,7 +1,6 @@
package dbstruct
import (
"go.mongodb.org/mongo-driver/bson/primitive"
"math"
"service/bizcommon/util"
)
@ -200,17 +199,17 @@ const (
)
type RefundInfo struct {
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"`
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"`
}