尝试引入 go-spring

This commit is contained in:
des
2026-01-21 17:44:51 +08:00
parent 35a31a6614
commit feb235e11d
9 changed files with 107 additions and 48 deletions

View File

@@ -0,0 +1,24 @@
package userpak
import (
"Crimson-Gatekeeper/internal/query"
"fmt"
"github.com/gin-gonic/gin"
)
type UserCtl struct {
q *query.Query
}
func NewUserCtl(q *query.Query) *UserCtl {
return &UserCtl{q}
}
func (u *UserCtl) login(ctx *gin.Context) {
lp := loginParam{}
err := ctx.ShouldBindBodyWithJSON(&lp)
if err != nil {
fmt.Println("出错啦")
}
}

View File

@@ -0,0 +1,6 @@
package userpak
type loginParam struct {
Account string `json:"account"`
Password string `json:"password"`
}