mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 19:51:56 +08:00
Compare commits
3 Commits
d2a6a564bd
...
cc6bbccaf8
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cc6bbccaf8 | ||
|
|
8ef3b5490e | ||
|
|
64410bafc4 |
@@ -28,10 +28,9 @@ http {
|
|||||||
proxy_pass http://ruoyi-gateway:8080/;
|
proxy_pass http://ruoyi-gateway:8080/;
|
||||||
}
|
}
|
||||||
|
|
||||||
# 避免actuator暴露
|
# springdoc proxy
|
||||||
if ($uri ~ "/actuator") {
|
location~^/v3/api-docs/(.*){
|
||||||
return 403;
|
proxy pass http://localhost:8080/v3/api-docs/$1;
|
||||||
}
|
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
error_page 500 502 503 504 /50x.html;
|
||||||
location = /50x.html {
|
location = /50x.html {
|
||||||
|
|||||||
@@ -163,7 +163,7 @@ public class SysUserController extends BaseController
|
|||||||
@PutMapping("/recordlogin")
|
@PutMapping("/recordlogin")
|
||||||
public R<Boolean> recordlogin(@RequestBody SysUser sysUser)
|
public R<Boolean> recordlogin(@RequestBody SysUser sysUser)
|
||||||
{
|
{
|
||||||
return R.ok(userService.updateUserProfile(sysUser));
|
return R.ok(userService.updateLoginInfo(sysUser));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -76,6 +76,14 @@ public interface SysUserMapper
|
|||||||
*/
|
*/
|
||||||
public int updateUserAvatar(@Param("userId") Long userId, @Param("avatar") String avatar);
|
public int updateUserAvatar(@Param("userId") Long userId, @Param("avatar") String avatar);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户登录信息(IP和登录时间)
|
||||||
|
*
|
||||||
|
* @param user 用户信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public int updateLoginInfo(SysUser user);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置用户密码
|
* 重置用户密码
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -161,6 +161,14 @@ public interface ISysUserService
|
|||||||
*/
|
*/
|
||||||
public boolean updateUserAvatar(Long userId, String avatar);
|
public boolean updateUserAvatar(Long userId, String avatar);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户登录信息(IP和登录时间)
|
||||||
|
*
|
||||||
|
* @param user 用户信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public boolean updateLoginInfo(SysUser user);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置用户密码
|
* 重置用户密码
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -354,6 +354,17 @@ public class SysUserServiceImpl implements ISysUserService
|
|||||||
return userMapper.updateUserAvatar(userId, avatar) > 0;
|
return userMapper.updateUserAvatar(userId, avatar) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新用户登录信息(IP和登录时间)
|
||||||
|
*
|
||||||
|
* @param user 用户信息
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
public boolean updateLoginInfo(SysUser user)
|
||||||
|
{
|
||||||
|
return userMapper.updateLoginInfo(user) > 0;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 重置用户密码
|
* 重置用户密码
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -205,6 +205,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
update sys_user set avatar = #{avatar} where user_id = #{userId}
|
update sys_user set avatar = #{avatar} where user_id = #{userId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateLoginInfo" parameterType="SysUser">
|
||||||
|
update sys_user set login_ip = #{loginIp}, login_date = #{loginDate} where user_id = #{userId}
|
||||||
|
</update>
|
||||||
|
|
||||||
<update id="resetUserPwd" parameterType="SysUser">
|
<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} where user_id = #{userId}
|
||||||
</update>
|
</update>
|
||||||
|
|||||||
Reference in New Issue
Block a user