<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="java.util.*,org.springframework.context.ApplicationContext"%>  
<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils"%>  
<%@ page import="com.iamberry.wechat.core.entity.WechatUtils"%>
<%@ page import="com.iamberry.wechat.face.activity.answer.*"%>
<%@ page import="com.iamberry.wechat.core.entity.activity.answer.*"%>
<%@ page import="com.iamberry.wechat.core.entity.member.*"%>  
<% 
	ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(application); 
	WechatUtils wechatUtils = (WechatUtils)context.getBean("wechatUtils");
	AnswerPeopleDao answerPeopleDao = (AnswerPeopleDao)context.getBean("answerPeopleDaoImpl");
	//String openid = "o3dG7wViuhImN5I0w6N0upIUVw_0";
	String openid = "";
	String result = "";
	try {
		Member member = wechatUtils.getUserBySession(request);
		openid = member.getUserOpenid();
	} catch (Exception e) {
		e.printStackTrace();
	}
	AnswerPeople people = answerPeopleDao.selectPeopleByOpenId(openid);
	if(people != null){
		result = "true";
	}else{
		result = "false";
	}
	response.getWriter().println(result);
%>
