修复多个手机号问题

This commit is contained in:
2024-11-05 14:10:00 +08:00
parent 5296661813
commit 7dec78512b

View File

@@ -203,7 +203,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
@Override
public User getByPhone(String phone) {
return query().eq("phone", phone).one();
return getOne(
new LambdaQueryWrapper<User>()
.eq(User::getPhone, phone)
.orderByDesc(User::getUserId).last("limit 1")
);
}
@Override