public void initChatGroup() {
		String sessionId = getSession().getId();
		checkUserRegister(getRequest(), sessionId);
		int selfChatState = UserState.dao.getUserState(sessionId);
		if (selfChatState == Users.onlineWithoutChat || selfChatState == Users.offLine || selfChatState == Users.unExist) {
			UserState.dao.updateUserState(sessionId, Users.requestChat);
			String newAcceptancerId = UserState.dao.getLongWriteUser(sessionId);// 返回此用户ID
			if (StringKit.isBlank(newAcceptancerId)) {
				renderText("-1");
			} else {
				renderText("0," + newAcceptancerId);
			}
		} else if (selfChatState == Users.onChatting || selfChatState == Users.onWritting) {
			String resultTypeAndId = ChatGroup.dao.getChatTypeAndId(sessionId,
					ChatGroup.onChatting);
			if (StringKit.isBlank(resultTypeAndId)) {
				UserState.dao.updateUserState(sessionId, Users.requestChat);
				renderText("-2");
			} else {
				String[] strTempArr = resultTypeAndId.split(",");
				renderText("1," + strTempArr[1] + ","
						+ UserState.dao.getUserState(strTempArr[1]));
			}
		} else if (selfChatState == Users.requestChat) {
			String acceptance_session_id = UserState.dao
					.getLongWriteUser(sessionId);
			if (StringKit.isBlank(acceptance_session_id)) {
				renderText("-1");
			} else {
				renderText("0," + acceptance_session_id);
			}
		}
	}