From 931ed0eb0036d3505fd0a4bd7b2f1d54c7d5f903 Mon Sep 17 00:00:00 2001 From: 疯狂的狮子li <15040126243@163.com> Date: 星期六, 18 九月 2021 15:44:36 +0800 Subject: [PATCH] update [重大改动]重写 防重提交实现 使用分布式锁 解决并发问题 压测通过 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java index 7f1fc0d..7e31821 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/SysUserServiceImpl.java @@ -162,7 +162,7 @@ */ @Override public String checkUserNameUnique(String userName) { - int count = count(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUserName, userName).last("limit 1")); + long count = count(new LambdaQueryWrapper<SysUser>().eq(SysUser::getUserName, userName).last("limit 1")); if (count > 0) { return UserConstants.NOT_UNIQUE; } -- Gitblit v1.9.3