fix refund_status
This commit is contained in:
parent
a64b404298
commit
01e4bfcd8c
|
@ -2380,18 +2380,13 @@ func (s *Service) ApiGetZoneListByUserIdFromOutside(ctx *gin.Context, req *zonep
|
||||||
}
|
}
|
||||||
zid := list[0].GetId()
|
zid := list[0].GetId()
|
||||||
zidZuMap, _ := _DefaultVas.GetZoneUnlockMapByMidZids(ctx, mid, []int64{zid})
|
zidZuMap, _ := _DefaultVas.GetZoneUnlockMapByMidZids(ctx, mid, []int64{zid})
|
||||||
if zu, ok := zidZuMap[zid]; ok && (time.Now().Unix()-zu.GetAdmissionCt() < 3600*2) {
|
if zu, ok := zidZuMap[zid]; ok {
|
||||||
refundEnable = 1
|
if time.Now().Unix()-zu.GetAdmissionCt() < 3600*2 {
|
||||||
}
|
refundEnable = 1
|
||||||
|
}
|
||||||
// 退款状态
|
if zu.GetAdmissionUnlockType() == dbstruct.ZoneUnlockTypeRefund {
|
||||||
if _, ok := zidZuMap[zid]; !ok {
|
refundStatus = zoneproto.AdmissionRefundStatusFinish
|
||||||
return
|
}
|
||||||
}
|
|
||||||
admissionOrderId := zidZuMap[zid].GetAdmissionOrderId()
|
|
||||||
order, _ := _DefaultVas.GetOrderById(ctx, nil, admissionOrderId)
|
|
||||||
if order.GetOrderStatus() == dbstruct.VasOrderStatusRefund {
|
|
||||||
refundStatus = zoneproto.AdmissionRefundStatusFinish
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue