1
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful

This commit is contained in:
昔念
2026-04-18 16:34:03 +08:00
parent 823eef00ac
commit da118dc826
9 changed files with 165 additions and 126 deletions

View File

@@ -4,6 +4,7 @@ import (
"blazing/common/socket/errorcode"
logicplayer "blazing/logic/service/player"
"blazing/logic/service/user"
baseservice "blazing/modules/base/service"
configservice "blazing/modules/config/service"
playerservice "blazing/modules/player/service"
"strings"
@@ -14,6 +15,11 @@ import (
func (h Controller) CDK(data *C2S_GET_GIFT_COMPLETE, player *logicplayer.Player) (result *user.S2C_GET_GIFT_COMPLETE, err errorcode.ErrorCode) {
result = &user.S2C_GET_GIFT_COMPLETE{}
userInfo := baseservice.NewBaseSysUserService().GetPerson(data.Head.UserID)
if userInfo == nil || userInfo.QQ == 0 {
return nil, errorcode.ErrorCodes.ErrCannotPerformAction
}
cdkCode := strings.Trim(data.PassText, "\x00")
cdkService := configservice.NewCdkService()
now := time.Now()