package cn.hmsoft.weixin.processor.event;

import cn.hmsoft.frame.constants.FrameStatus;
import cn.hmsoft.weixin.entity.reply.WeiXinReply;

public class EventUnsubscribeProcessor extends EvenBasicProcessor {

	// private final static String UPDATE_USER_SQL =
	// "update wx_user set active_time=?,location_latitude=?,location_longitude=?,location_precision=? where open_id=?";

	@Override
	public WeiXinReply handleEvent() throws Exception {
		if (this.user != null) {
			this.user.setActive_time(log.getMsg_time());
			this.user.setUnsubscribe_time(log.getMsg_time());
			this.user.setWuser_status(FrameStatus.InActive.toString());
			this.daoWeiXin.update(user);
		}
		return null;

	}

}
