docs: change confident return status code to 409

This commit is contained in:
wzp 2024-12-23 20:20:11 +08:00
parent 061f2c1db2
commit f728d3ae59

View File

@ -138,7 +138,7 @@ public class UserService {
if (changeUserId == userId || userHasPermission(userId, 4)) {
String newName = renameVo.newName();
if (userDao.countUser(newName) > 0) {
return BaseResponse.failed(307, "用户名已存在!");
return BaseResponse.failed(409, "用户名已存在!");
}
userDao.changeUsername(changeUserId, newName);
return BaseResponse.success(true);