Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
S
sts网站
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liyang
sts网站
Commits
08637e31
Commit
08637e31
authored
Aug 28, 2025
by
RuoYi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化代码
parent
512b1578
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
5 deletions
+15
-5
SysUserMapper.java
.../src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
+9
-0
SysUserServiceImpl.java
...ava/com/ruoyi/system/service/impl/SysUserServiceImpl.java
+3
-2
SysUserMapper.xml
...system/src/main/resources/mapper/system/SysUserMapper.xml
+3
-3
No files found.
ruoyi-system/src/main/java/com/ruoyi/system/mapper/SysUserMapper.java
View file @
08637e31
...
...
@@ -77,6 +77,15 @@ public interface SysUserMapper
*/
public
int
updateUserAvatar
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"avatar"
)
String
avatar
);
/**
* 修改用户状态
*
* @param userId 用户ID
* @param status 状态
* @return 结果
*/
public
int
updateUserStatus
(
@Param
(
"userId"
)
Long
userId
,
@Param
(
"status"
)
String
status
);
/**
* 更新用户登录信息(IP和登录时间)
*
...
...
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java
View file @
08637e31
...
...
@@ -327,7 +327,7 @@ public class SysUserServiceImpl implements ISysUserService
@Override
public
int
updateUserStatus
(
SysUser
user
)
{
return
userMapper
.
updateUser
(
user
);
return
userMapper
.
updateUser
Status
(
user
.
getUserId
(),
user
.
getStatus
()
);
}
/**
...
...
@@ -377,7 +377,7 @@ public class SysUserServiceImpl implements ISysUserService
@Override
public
int
resetPwd
(
SysUser
user
)
{
return
userMapper
.
updateUser
(
user
);
return
userMapper
.
resetUserPwd
(
user
.
getUserId
(),
user
.
getPassword
()
);
}
/**
...
...
@@ -531,6 +531,7 @@ public class SysUserServiceImpl implements ISysUserService
checkUserDataScope
(
u
.
getUserId
());
deptService
.
checkDeptDataScope
(
user
.
getDeptId
());
user
.
setUserId
(
u
.
getUserId
());
user
.
setDeptId
(
u
.
getDeptId
());
user
.
setUpdateBy
(
operName
);
userMapper
.
updateUser
(
user
);
successNum
++;
...
...
ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
View file @
08637e31
...
...
@@ -198,11 +198,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<update
id=
"updateUserStatus"
parameterType=
"SysUser"
>
update sys_user set status = #{status} where user_id = #{userId}
update sys_user set status = #{status}
, update_time = sysdate()
where user_id = #{userId}
</update>
<update
id=
"updateUserAvatar"
parameterType=
"SysUser"
>
update sys_user set avatar = #{avatar} where user_id = #{userId}
update sys_user set avatar = #{avatar}
, update_time = sysdate()
where user_id = #{userId}
</update>
<update
id=
"updateLoginInfo"
parameterType=
"SysUser"
>
...
...
@@ -210,7 +210,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update>
<update
id=
"resetUserPwd"
parameterType=
"SysUser"
>
update sys_user set pwd_update_date = sysdate(), password = #{password} where user_id = #{userId}
update sys_user set pwd_update_date = sysdate(), password = #{password}
, update_time = sysdate()
where user_id = #{userId}
</update>
<delete
id=
"deleteUserById"
parameterType=
"Long"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment