From a1dd4cdee24f5483c0464044dd37602a17918ece Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Fri, 8 Nov 2024 16:40:01 +0800 Subject: [PATCH] fix --- app/mix/service/apiservice.go | 2 +- app/mix/service/logic/vas_zone.go | 4 ++++ library/payclients/alipaycli/client.go | 9 ++++----- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index 5dffcd67..57da110f 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -2852,7 +2852,7 @@ func (s *Service) ApiGetZoneListByMid(ctx *gin.Context, req *zoneproto.ApiListBy logger.Info("_ZU mid: %v, zid: %v, zidZuMapTmp: %v", req.BaseRequest.Mid, zid, util.ToJson(zidZuMapTmp)) if zu, ok := zidZuMapTmp[zid]; ok { logger.Info("_ZU mid: %v, zid: %v, zu: %v", req.BaseRequest.Mid, zid, util.ToJson(zu)) - if time.Now().Unix()-zu.GetAdmissionCt() < 3600*2 { + if time.Now().Unix()-zu.GetAdmissionCt() < 3600*48 { refundEnable = 1 } if zu.GetAdmissionUnlockType() == dbstruct.ZoneUnlockTypeRefund { diff --git a/app/mix/service/logic/vas_zone.go b/app/mix/service/logic/vas_zone.go index c1dab06e..f7cccb8e 100644 --- a/app/mix/service/logic/vas_zone.go +++ b/app/mix/service/logic/vas_zone.go @@ -10,6 +10,7 @@ import ( "service/bizcommon/util" "service/dbstruct" "service/library/logger" + "service/library/payclients/alipaycli" "service/library/redis" "time" @@ -974,6 +975,9 @@ func (v *Vas) ZoneRefund(ctx *gin.Context, req *vasproto.ZoneRefundReq) error { logger.Error("get zone admission order info fail, mid: %v, zid: %v, orderId: %v, err: %v", req.Mid, req.Zid, zv.GetAdmissionOrderId(), err) return err } + if order.GetOid3() == alipaycli.AppIdMiYuanTianShi { + return fmt.Errorf("订单正在处理,请24小时后重试") + } // 退款 err = v.RefundOrder(ctx, &vasproto.RefundOrderReq{ diff --git a/library/payclients/alipaycli/client.go b/library/payclients/alipaycli/client.go index 0567097d..29d85df7 100644 --- a/library/payclients/alipaycli/client.go +++ b/library/payclients/alipaycli/client.go @@ -6,7 +6,6 @@ import ( "fmt" "github.com/go-pay/gopay" "github.com/go-pay/gopay/alipay" - "math/rand" "net/http" "service/bizcommon/util" "service/library/configcenter" @@ -28,10 +27,10 @@ const ( var allAlipayClients = map[string]*AlipayClient{} func GetDefaultAlipayClient() *AlipayClient { - rate := rand.Intn(100) - if rate < 75 { - return allAlipayClients[AppIdMiYuanTianShi] - } + //rate := rand.Intn(100) + //if rate < 75 { + // return allAlipayClients[AppIdMiYuanTianShi] + //} return allAlipayClients[AppIdLanXing01] }