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

@@ -187,6 +187,7 @@ const onSignIn = async () => {
}
// 用户信息
const userInfos = {
name: loginRes.name,
username: state.loginForm.username,
// 头像
photo: letterAvatar(state.loginForm.username),

View File

@@ -13,7 +13,7 @@
<div class="personal-user-right">
<el-row>
<el-col :span="24" class="personal-title mb18">{{ currentTime }}{{
getUserInfos.username
getUserInfos.name
}}生活变的再糟糕也不妨碍我变得更好
</el-col>
<el-col :span="24">

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,

View File

@@ -302,7 +302,7 @@ CREATE TABLE `t_sys_account` (
-- Records of t_sys_account
-- ----------------------------
BEGIN;
INSERT INTO `t_sys_account` VALUES (1, 'admin', '$2a$10$w3Wky2U.tinvR7c/s0aKPuwZsIu6pM1/DMJalwBDMbE6niHIxVrrm', 1, '2022-10-26 20:03:48', '::1', '2020-01-01 19:00:00', 1, 'admin', '2020-01-01 19:00:00', 1, 'admin');
INSERT INTO `t_sys_account` VALUES (1, "管理员", 'admin', '$2a$10$w3Wky2U.tinvR7c/s0aKPuwZsIu6pM1/DMJalwBDMbE6niHIxVrrm', 1, '2022-10-26 20:03:48', '::1', '2020-01-01 19:00:00', 1, 'admin', '2020-01-01 19:00:00', 1, 'admin');
COMMIT;
-- ----------------------------