This commit is contained in:
aozhiwei 2024-11-05 14:03:28 +08:00
parent 2b48bbb344
commit 4cba2c04f2
3 changed files with 14 additions and 14 deletions

View File

@ -19,10 +19,10 @@ func (this *UserApi) Login(c *gin.Context) {
user := new(model.User) user := new(model.User)
if result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Table(user.TableName()).Take( if result := f5.GetApp().GetOrmDb(constant.WHEEL_DB).Table(user.TableName()).Take(
user, "account_id = ?", s.GetAccountId()); result.Error != nil { user, "account_id = ?", s.GetAccountId()); result.Error != nil {
c.JSON(200, gin.H{ if result.Error != nil {
"code": 2,
"message": "mailid不存在", }
}) f5.RspErr(c, 500, "server internal error")
return return
} }

View File

@ -0,0 +1,10 @@
package vo
type User struct {
AccountId string `json:"account_id"`
NickName string `json:"nickname"`
Avatar string `json:"avatar"`
Score string `json:"score"`
HourlyEarnings string `json:"hourly_earnings"`
Dice int32 `gorm:"json:dice"`
}

View File

@ -1,10 +0,0 @@
package vo
type User struct {
AccountId string `json:"account_id"`
NickName string `json:"nickname"`
Avatar string `json:"avatar"`
Score string `json:"score"`
HourlyEarnings string `json:"hourly_earnings"`
Dice int32 `gorm:"json:dice"`
}