public void login(String randCode) throws IOException {
        UserEntity user = Scheduler.getUsers().get(username);
        if (user == null) {
            return;
        }
//        URL url = new URL("https://kyfw.12306.cn/otn/login/loginAysnSuggest?loginUserDTO.user_name=" + username
//                + "&userDTO.password=" + user.getPassword() + "&randCode=" + randCode);
        URL url = new URL("https://kyfw.12306.cn/otn/login/loginAysnSuggest");
        HttpsURLConnection con = (HttpsURLConnection) url.openConnection();
//        ConnectionUtil.setSessionId(con, user.getSessionId());
        con.setSSLSocketFactory(Utils.getSsf());
        con.setDoOutput(true);
        con.setRequestMethod("POST");
        con.setInstanceFollowRedirects(true);

        con.setRequestProperty("Content-Type", "application/x-www-form-urlencoded");
        con
                .setRequestProperty(
                        "Accept",
                        "image/jpeg, application/x-ms-application, image/gif, application/xaml+xml, image/pjpeg, application/x-ms-xbap, application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*");
        con.setRequestProperty("Accept-Encoding", "gzip,deflate");
//        con.setRequestProperty("Referer", "***");
        con.setRequestProperty("User-Agent", "Mozilla/5.0 (MSIE 9.0; Windows NT 6.1; Trident/5.0;)");
        con.setRequestProperty("Connection", "Keep-Alive");
        con.setRequestProperty("Cache-Control", "no-cache");
        con.setRequestProperty("Content-Length", "64");
        con.setRequestProperty("Host", "kyfw.12306.cn");
        con.setRequestProperty("Cookie", user.getSessionId());

        String message1 = "loginUserDTO.user_name=" + user.getUsername() + "&userDTO.password=" + user.getPassword()
                + "&randCode=" + randCode;
        System.out.println(message1);
        OutputStream out = con.getOutputStream();
        out.write(message1.getBytes());
        out.close();

        BufferedReader br = new BufferedReader(new InputStreamReader(con.getInputStream(), "UTF-8"));
        try {
            String res = br.readLine();
            System.out.println(res);
            if (res == null)
                return;
            String tmp = res.split("\"messages\":")[1];
            String message = tmp.substring(0, tmp.lastIndexOf(",\"validateMessages\":"));
            if (!StringUtil.isBlank(message)) {
                user.setErrorMsg(message);
            } else {
                user.setErrorMsg(null);
                user.setStatus(Constant.USER_STATUS_TICKETIMG);
            }
        } finally {
            br.close();
//            con.disconnect();
        }
    }