diff --git a/api/proto/vas/proto/vas.go b/api/proto/vas/proto/vas.go index 5cb2e7b0..13580508 100644 --- a/api/proto/vas/proto/vas.go +++ b/api/proto/vas/proto/vas.go @@ -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"` } // 空间退款详情 diff --git a/app/mix/service/logic/vas_zone.go b/app/mix/service/logic/vas_zone.go index b258833a..9ecb1839 100644 --- a/app/mix/service/logic/vas_zone.go +++ b/app/mix/service/logic/vas_zone.go @@ -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(), diff --git a/dbstruct/vas_mongo.go b/dbstruct/vas_mongo.go index 1fa6c7bb..3e9219b1 100644 --- a/dbstruct/vas_mongo.go +++ b/dbstruct/vas_mongo.go @@ -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"` }