fix: sql accout表字段修复

This commit is contained in:
meilin.huang
2022-10-30 22:56:57 +08:00
parent b028708b94
commit 422f0d8491
4 changed files with 5 additions and 3 deletions

View File

@@ -43,7 +43,7 @@ func (a *Account) Login(rc *ctx.ReqCtx) {
biz.ErrIsNilAppendErr(err, "解密密码错误: %s")
account := &entity.Account{Username: loginForm.Username}
err = a.AccountApp.GetAccount(account, "Id", "Username", "Password", "Status", "LastLoginTime", "LastLoginIp")
err = a.AccountApp.GetAccount(account, "Id", "Name", "Username", "Password", "Status", "LastLoginTime", "LastLoginIp")
biz.ErrIsNil(err, "用户名或密码错误")
biz.IsTrue(utils.CheckPwdHash(originPwd, account.Password), "用户名或密码错误")
biz.IsTrue(account.IsEnable(), "该账号不可用")
@@ -77,6 +77,7 @@ func (a *Account) Login(rc *ctx.ReqCtx) {
rc.ResData = map[string]interface{}{
"token": ctx.CreateToken(account.Id, account.Username),
"name": account.Name,
"username": account.Username,
"lastLoginTime": account.LastLoginTime,
"lastLoginIp": account.LastLoginIp,