Compare commits

...

3 Commits

Author SHA1 Message Date
root cc6bbccaf8
Pre Merge pull request !422 from root/N/A 2025-08-27 08:02:48 +00:00
RuoYi 8ef3b5490e 优化代码 2025-08-27 16:02:32 +08:00
root 64410bafc4
update docker/nginx/conf/nginx.conf.
Signed-off-by: root <15907907+xuezhihongg@user.noreply.gitee.com>
2025-07-16 02:35:07 +00:00
6 changed files with 35 additions and 5 deletions

View File

@ -28,10 +28,9 @@ http {
proxy_pass http://ruoyi-gateway:8080/;
}
# 避免actuator暴露
if ($uri ~ "/actuator") {
return 403;
}
# springdoc proxy
location~^/v3/api-docs/(.*){
proxy pass http://localhost:8080/v3/api-docs/$1;
error_page 500 502 503 504 /50x.html;
location = /50x.html {

View File

@ -163,7 +163,7 @@ public class SysUserController extends BaseController
@PutMapping("/recordlogin")
public R<Boolean> recordlogin(@RequestBody SysUser sysUser)
{
return R.ok(userService.updateUserProfile(sysUser));
return R.ok(userService.updateLoginInfo(sysUser));
}
/**

View File

@ -76,6 +76,14 @@ public interface SysUserMapper
*/
public int updateUserAvatar(@Param("userId") Long userId, @Param("avatar") String avatar);
/**
* IP
*
* @param user
* @return
*/
public int updateLoginInfo(SysUser user);
/**
*
*

View File

@ -161,6 +161,14 @@ public interface ISysUserService
*/
public boolean updateUserAvatar(Long userId, String avatar);
/**
* IP
*
* @param user
* @return
*/
public boolean updateLoginInfo(SysUser user);
/**
*
*

View File

@ -354,6 +354,17 @@ public class SysUserServiceImpl implements ISysUserService
return userMapper.updateUserAvatar(userId, avatar) > 0;
}
/**
* IP
*
* @param user
* @return
*/
public boolean updateLoginInfo(SysUser user)
{
return userMapper.updateLoginInfo(user) > 0;
}
/**
*
*

View File

@ -205,6 +205,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
update sys_user set avatar = #{avatar} where user_id = #{userId}
</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 sys_user set pwd_update_date = sysdate(), password = #{password} where user_id = #{userId}
</update>