@PostMapping("login_a")
    public DataResult login(@Validated @RequestBody LoginRequest request) {
        //   Query user
        User user = userService.query(request.getUserName()).getData();
        this.validateUser(user);

        // Successfully logged in without modifying the administrator password
        if (this.validateAdmin(user)) {
            return DataResult.of(doLogin(user));
        }

        if (!DigestUtil.bcryptCheck(request.getPassword(), user.getPassword())) {
            throw new BusinessException("oauth.passwordIncorrect");
        }

        return DataResult.of(doLogin(user));
    }
Login with username and password

@param request
@return
chat2db-server/chat2db-server-web-start/src/main/java/ai/chat2db/server/web/start/controller/oauth/OauthController.java