This commit is contained in:
lwl0608 2024-07-19 17:53:54 +08:00
parent 9157c5fa08
commit 4211c887cf
3 changed files with 6 additions and 6 deletions

View File

@ -592,10 +592,10 @@ func (m *Mysql) GetZoneMemberCountGroupByZoneMemberType(ctx *gin.Context, tx *sq
}
// 回滚空间退出状态
func (m *Mysql) RollbackZoneAdmissionExitStatus(ctx *gin.Context, tx *sqlx.Tx, orderCt, id int64) error {
func (m *Mysql) RollbackZoneAdmissionExitStatus(ctx *gin.Context, tx *sqlx.Tx, orderCt, mid, zid int64) error {
var err error
sqlStr := "update " + TableVasZoneUnlock + " set admission_ct=?, admission_until=?, admission_unlock_type=? where id=?"
args := []any{orderCt, -1, dbstruct.ZoneUnlockTypePay, id}
sqlStr := "update " + TableVasZoneUnlock + " set admission_ct=?, admission_until=?, admission_unlock_type=? where mid=? and zid=?"
args := []any{orderCt, -1, dbstruct.ZoneUnlockTypePay, mid, zid}
if tx != nil {
_, err = tx.ExecContext(ctx, sqlStr, args...)
} else {

View File

@ -1291,6 +1291,6 @@ func (v *Vas) ZoneGetIncomePage(ctx *gin.Context, mid int64) (*vasproto.IncomePa
}
// 获取动态解锁记录
func (v *Vas) RollbackZoneAdmissionExitStatus(ctx *gin.Context, ct, id int64) (err error) {
return v.store.RollbackZoneAdmissionExitStatus(ctx, nil, ct, id)
func (v *Vas) RollbackZoneAdmissionExitStatus(ctx *gin.Context, ct, mid, zid int64) (err error) {
return v.store.RollbackZoneAdmissionExitStatus(ctx, nil, ct, mid, zid)
}

View File

@ -1228,7 +1228,7 @@ func (s *Service) OpRollbackZoneAdmissionExitStatus(ctx *gin.Context, req *zonep
}
// 回滚
err = _DefaultVas.RollbackZoneAdmissionExitStatus(ctx, order.GetUt(), zu.GetId())
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)
return