mirror of
				https://gitee.com/dromara/mayfly-go
				synced 2025-11-04 00:10:25 +08:00 
			
		
		
		
	fix: sql accout表字段修复
This commit is contained in:
		@@ -187,6 +187,7 @@ const onSignIn = async () => {
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    // 用户信息
 | 
					    // 用户信息
 | 
				
			||||||
    const userInfos = {
 | 
					    const userInfos = {
 | 
				
			||||||
 | 
					        name: loginRes.name,
 | 
				
			||||||
        username: state.loginForm.username,
 | 
					        username: state.loginForm.username,
 | 
				
			||||||
        // 头像
 | 
					        // 头像
 | 
				
			||||||
        photo: letterAvatar(state.loginForm.username),
 | 
					        photo: letterAvatar(state.loginForm.username),
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,7 +13,7 @@
 | 
				
			|||||||
                        <div class="personal-user-right">
 | 
					                        <div class="personal-user-right">
 | 
				
			||||||
                            <el-row>
 | 
					                            <el-row>
 | 
				
			||||||
                                <el-col :span="24" class="personal-title mb18">{{ currentTime }},{{
 | 
					                                <el-col :span="24" class="personal-title mb18">{{ currentTime }},{{
 | 
				
			||||||
                                        getUserInfos.username
 | 
					                                        getUserInfos.name
 | 
				
			||||||
                                }},生活变的再糟糕,也不妨碍我变得更好!
 | 
					                                }},生活变的再糟糕,也不妨碍我变得更好!
 | 
				
			||||||
                                </el-col>
 | 
					                                </el-col>
 | 
				
			||||||
                                <el-col :span="24">
 | 
					                                <el-col :span="24">
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -43,7 +43,7 @@ func (a *Account) Login(rc *ctx.ReqCtx) {
 | 
				
			|||||||
	biz.ErrIsNilAppendErr(err, "解密密码错误: %s")
 | 
						biz.ErrIsNilAppendErr(err, "解密密码错误: %s")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	account := &entity.Account{Username: loginForm.Username}
 | 
						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.ErrIsNil(err, "用户名或密码错误")
 | 
				
			||||||
	biz.IsTrue(utils.CheckPwdHash(originPwd, account.Password), "用户名或密码错误")
 | 
						biz.IsTrue(utils.CheckPwdHash(originPwd, account.Password), "用户名或密码错误")
 | 
				
			||||||
	biz.IsTrue(account.IsEnable(), "该账号不可用")
 | 
						biz.IsTrue(account.IsEnable(), "该账号不可用")
 | 
				
			||||||
@@ -77,6 +77,7 @@ func (a *Account) Login(rc *ctx.ReqCtx) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	rc.ResData = map[string]interface{}{
 | 
						rc.ResData = map[string]interface{}{
 | 
				
			||||||
		"token":         ctx.CreateToken(account.Id, account.Username),
 | 
							"token":         ctx.CreateToken(account.Id, account.Username),
 | 
				
			||||||
 | 
							"name":          account.Name,
 | 
				
			||||||
		"username":      account.Username,
 | 
							"username":      account.Username,
 | 
				
			||||||
		"lastLoginTime": account.LastLoginTime,
 | 
							"lastLoginTime": account.LastLoginTime,
 | 
				
			||||||
		"lastLoginIp":   account.LastLoginIp,
 | 
							"lastLoginIp":   account.LastLoginIp,
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -302,7 +302,7 @@ CREATE TABLE `t_sys_account` (
 | 
				
			|||||||
-- Records of t_sys_account
 | 
					-- Records of t_sys_account
 | 
				
			||||||
-- ----------------------------
 | 
					-- ----------------------------
 | 
				
			||||||
BEGIN;
 | 
					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;
 | 
					COMMIT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
-- ----------------------------
 | 
					-- ----------------------------
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user