Merge branch 'feat-IRONFANS-70' into test

This commit is contained in:
lwl0608 2024-04-25 15:28:32 +08:00
commit 85d20b02a9
2 changed files with 12 additions and 14 deletions

View File

@ -2263,18 +2263,16 @@ func (s *Service) ApiGetZoneListByMid(ctx *gin.Context, req *zoneproto.ApiListBy
return
}
zid := list[0].GetId()
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
zidZuMapTmp, _ := _DefaultVas.GetZoneUnlockMapByMidZids(ctx, req.BaseRequest.Mid, []int64{zid})
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 {
refundEnable = 1
}
if zu.GetAdmissionUnlockType() == dbstruct.ZoneUnlockTypeRefund {
refundStatus = zoneproto.AdmissionRefundStatusFinish
}
}
return

View File

@ -271,7 +271,7 @@ func (s *Service) chListCharge(ctx *gin.Context, chList []*dbstruct.ConsumeHisto
Ct: util.DerefInt64(chDB.Ct),
}
changeMark := "-"
if chDB.GetChange() > 0 {
if chDB.GetChange() >= 0 {
changeMark = "+"
}
switch chDB.GetSType() {
@ -320,7 +320,7 @@ func (s *Service) chListIncome(ctx *gin.Context, chList []*dbstruct.ConsumeHisto
Ct: util.DerefInt64(chDB.Ct),
}
changeMark := "-"
if chDB.GetChange() > 0 {
if chDB.GetChange() >= 0 {
changeMark = "+"
}
switch chDB.GetSType() {