From d2e58ba46b9ac334b3abab863927b2c3f8bb191c Mon Sep 17 00:00:00 2001 From: 疯狂的狮子Li <15040126243@163.com> Date: 星期四, 20 十月 2022 23:24:33 +0800 Subject: [PATCH] fix 修复 升级 nginx 1.21.6 => 1.22.1 修复漏洞 https://www.oschina.net/news/214309 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java index d1c6c57..7e358d5 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java @@ -136,7 +136,7 @@ @Log(title = "鐢ㄦ埛绠$悊", businessType = BusinessType.INSERT) @PostMapping public R<Void> add(@Validated @RequestBody SysUser user) { - if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user.getUserName()))) { + if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user))) { return R.fail("鏂板鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岀櫥褰曡处鍙峰凡瀛樺湪"); } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { @@ -158,7 +158,9 @@ public R<Void> edit(@Validated @RequestBody SysUser user) { userService.checkUserAllowed(user); userService.checkUserDataScope(user.getUserId()); - if (StringUtils.isNotEmpty(user.getPhonenumber()) + if (UserConstants.NOT_UNIQUE.equals(userService.checkUserNameUnique(user))) { + return R.fail("淇敼鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛岀櫥褰曡处鍙峰凡瀛樺湪"); + } else if (StringUtils.isNotEmpty(user.getPhonenumber()) && UserConstants.NOT_UNIQUE.equals(userService.checkPhoneUnique(user))) { return R.fail("淇敼鐢ㄦ埛'" + user.getUserName() + "'澶辫触锛屾墜鏈哄彿鐮佸凡瀛樺湪"); } else if (StringUtils.isNotEmpty(user.getEmail()) -- Gitblit v1.9.3