Files
bl/modules/player/controller/robot/bindqq.go
昔念 f1223e471c
All checks were successful
ci/woodpecker/push/my-first-workflow Pipeline was successful
```
fix(base): 修复QQ绑定功能中用户名查询条件错误

在BindQQ方法中,将数据库查询条件从"id"字段更正为"username"字段,
确保能够正确根据用户名查找和更新用户信息。
```
2026-03-24 12:18:30 +08:00

27 lines
457 B
Go

package robot
import (
"blazing/modules/base/service"
"strings"
zero "github.com/wdvxdr1123/ZeroBot"
)
func init() {
zero.OnCommand("绑定").
Handle(func(ctx *zero.Ctx) {
msgs := strings.Fields(ctx.Event.Message.String())
if len(msgs) > 2 {
err := service.NewBaseSysUserService().BindQQ(msgs[1], msgs[2], ctx.Event.Sender.ID)
if err != nil {
ctx.Send(err.Error())
} else {
ctx.Send("绑定成功")
}
}
})
}