From 01e4bfcd8c002c0683d1f7c022a537b9cfeef453 Mon Sep 17 00:00:00 2001 From: lwl0608 Date: Thu, 25 Apr 2024 15:12:22 +0800 Subject: [PATCH] fix refund_status --- app/mix/service/apiservice.go | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/app/mix/service/apiservice.go b/app/mix/service/apiservice.go index 37a35957..46f8c83c 100644 --- a/app/mix/service/apiservice.go +++ b/app/mix/service/apiservice.go @@ -2380,18 +2380,13 @@ func (s *Service) ApiGetZoneListByUserIdFromOutside(ctx *gin.Context, req *zonep } zid := list[0].GetId() zidZuMap, _ := _DefaultVas.GetZoneUnlockMapByMidZids(ctx, mid, []int64{zid}) - if zu, ok := zidZuMap[zid]; ok && (time.Now().Unix()-zu.GetAdmissionCt() < 3600*2) { - refundEnable = 1 - } - - // 退款状态 - if _, ok := zidZuMap[zid]; !ok { - return - } - admissionOrderId := zidZuMap[zid].GetAdmissionOrderId() - order, _ := _DefaultVas.GetOrderById(ctx, nil, admissionOrderId) - if order.GetOrderStatus() == dbstruct.VasOrderStatusRefund { - refundStatus = zoneproto.AdmissionRefundStatusFinish + if zu, ok := zidZuMap[zid]; ok { + if time.Now().Unix()-zu.GetAdmissionCt() < 3600*2 { + refundEnable = 1 + } + if zu.GetAdmissionUnlockType() == dbstruct.ZoneUnlockTypeRefund { + refundStatus = zoneproto.AdmissionRefundStatusFinish + } } return