Fix CDK type checks and server naming ownership update

This commit is contained in:
昔念
2026-04-21 00:39:12 +08:00
parent d517c822ef
commit 4b42a64da0
4 changed files with 28 additions and 2 deletions

View File

@@ -35,6 +35,9 @@ func (s *CdkService) GrantConfigReward(cdkID uint32, specialAdders ...CdkSpecial
if cfg == nil {
return nil, fmt.Errorf("绑定的CDK不存在")
}
if cfg.Type != configservice.CDKTypeReward {
return nil, fmt.Errorf("当前CDK不是游戏内奖励类型")
}
if cfg.BindUserId != 0 && cfg.BindUserId != s.userid {
return nil, fmt.Errorf("CDK已绑定其他用户")
}