From f01f9a3ecb6f0ac7d24e7d9ed7ba49b7a60828d1 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Wed, 17 Jul 2024 17:51:08 +0800 Subject: [PATCH] 1 --- api/proto/zone/proto/zone_op.go | 5 +++++ app/mix/controller/init.go | 1 + app/mix/controller/vas_op.go | 15 +++++++++++++++ app/mix/service/vasservice.go | 12 ++++++++++++ 4 files changed, 33 insertions(+) diff --git a/api/proto/zone/proto/zone_op.go b/api/proto/zone/proto/zone_op.go index 4b4be13a..85c63bd1 100644 --- a/api/proto/zone/proto/zone_op.go +++ b/api/proto/zone/proto/zone_op.go @@ -141,3 +141,8 @@ type OpManualUnlockWechatParam struct { ProductId string `json:"product_id"` // 商品id Oid2 string `json:"oid2"` // oid2 } + +type OpRollbackZoneRefundStatusParam struct { + Userid int64 `json:"userid"` + StreamerUserid int64 `json:"streamer_userid"` +} diff --git a/app/mix/controller/init.go b/app/mix/controller/init.go index 5a2f44e2..bd7816f2 100644 --- a/app/mix/controller/init.go +++ b/app/mix/controller/init.go @@ -318,6 +318,7 @@ func Init(r *gin.Engine) { opVasPayGroup.POST("wxpay_callback_manual", middleware.JSONParamValidator(vasproto.WxpayCallbackManualParam{}), WxpayCallbackManual) opVasPayGroup.POST("zone_refund_list", middleware.JSONParamValidator(zoneproto.OpZoneRefundListParam{}), OpZoneRefundList) opVasPayGroup.POST("manual_unlock_wechat", middleware.JSONParamValidator(zoneproto.OpManualUnlockWechatParam{}), OpManualUnlockWechat) + opVasPayGroup.POST("rollback_zone_exit_status", middleware.JSONParamValidator(zoneproto.OpRollbackZoneRefundStatusParam{}), OpManualUnlockWechat) // 慧用工 extHvyogoGroup := r.Group("/ext/hvyogo") diff --git a/app/mix/controller/vas_op.go b/app/mix/controller/vas_op.go index 3ee5ffa5..134e4daf 100644 --- a/app/mix/controller/vas_op.go +++ b/app/mix/controller/vas_op.go @@ -75,3 +75,18 @@ func OpManualUnlockWechat(ctx *gin.Context) { } ReplyOk(ctx, nil) } + +func OpRollbackZoneRefundStatus(ctx *gin.Context) { + req := ctx.MustGet("client_req").(*zoneproto.OpRollbackZoneRefundStatusParam) + ec, err := service.DefaultService.OpRollbackZoneRefundStatus(ctx, req) + if ec != errcode.ErrCodeVasSrvOk { + logger.Error("RefundOrder fail, req: %v, ec: %v", util.ToJson(req), ec) + if err != nil { + ReplyErrorMsg(ctx, err.Error()) + return + } + ReplyErrCodeMsg(ctx, ec) + return + } + ReplyOk(ctx, nil) +} diff --git a/app/mix/service/vasservice.go b/app/mix/service/vasservice.go index 7b1b94a7..0b782040 100644 --- a/app/mix/service/vasservice.go +++ b/app/mix/service/vasservice.go @@ -1175,3 +1175,15 @@ func (s *Service) VasIncomePage(ctx *gin.Context, req *vasproto.IncomePageReq) ( } return } + +func (s *Service) OpRollbackZoneRefundStatus(ctx *gin.Context, req *zoneproto.OpRollbackZoneRefundStatusParam) (ec errcode.ErrCode, err error) { + userAcnt, _ := _DefaultAccount.OpListByUserId(ctx, &accountproto.OpListByUserIdReq{UserId: goproto.Int64(req.Userid)}) + + err = _DefaultVas.SuperfanUnlockContact(ctx, nil, req.Mid, req.StreamerMid, req.Oid2) + ec, err = errs.DealVasErr(err) + if err != nil { + logger.Error("OneStepUnlockContact fail, req: %v, err: %v", util.ToJson(req), err) + return + } + return +}