Merge branch 'dev-lwl/rollback_zone_status' into test

This commit is contained in:
lwl0608 2024-07-19 20:37:13 +08:00
commit ebd161ba90
1 changed files with 5 additions and 4 deletions

View File

@ -1202,14 +1202,14 @@ func (s *Service) OpRollbackZoneAdmissionExitStatus(ctx *gin.Context, req *zonep
}
zu := zuMap[zid]
if zu == nil {
err = fmt.Errorf("invalid zu, mid: %v, sMid: %v, zid: %v", uMid, sMid, zid)
logger.Error("%v", err)
err = fmt.Errorf("无对应解锁记录")
logger.Error("invalid zu, mid: %v, sMid: %v, zid: %v", uMid, sMid, zid)
return
}
// 检查是否主动退出
if zu.GetAdmissionUnlockType() != dbstruct.ZoneUnlockTypeExit {
err = fmt.Errorf("invalid AdmissionUnlockType")
err = fmt.Errorf("该用户不是主动退出空间, typ:%v", zu.GetAdmissionUnlockType())
logger.Error("%v, mid: %v, sMid: %v, zid: %v, zu: %v", err, uMid, sMid, zid, util.ToJson(zu))
return
}
@ -1222,7 +1222,7 @@ func (s *Service) OpRollbackZoneAdmissionExitStatus(ctx *gin.Context, req *zonep
return
}
if !util.InInt32Slice([]int32{dbstruct.VasOrderStatusPaySuccess, dbstruct.VasOrderStatusFinish}, order.GetOrderStatus()) {
err = fmt.Errorf("invalid orderStatus")
err = fmt.Errorf("订单状态异常, oderrId:%v", orderId)
logger.Error("%v, mid: %v, sMid: %v, zid: %v, order: %v", err, uMid, sMid, zid, util.ToJson(order))
return
}
@ -1231,6 +1231,7 @@ func (s *Service) OpRollbackZoneAdmissionExitStatus(ctx *gin.Context, req *zonep
err = _DefaultVas.RollbackZoneAdmissionExitStatus(ctx, order.GetUt(), uMid, zid)
if err != nil {
logger.Error("RollbackZoneAdmissionExitStatus fail, mid: %v, sMid: %v, zid: %v, zu: %v, err: %v", uMid, sMid, zid, util.ToJson(zu), err)
err = fmt.Errorf("回滚失败")
return
}
logger.Info("RollbackZoneAdmissionExitStatus success, uid: %v, suid: %v, mid: %v, sMid: %v, zu: %v", req.Userid, req.StreamerUserid, uMid, sMid, util.ToJson(zu))