package com.iamberry.wechat.tools;

import java.io.IOException;
import java.util.Properties;

import org.apache.log4j.Logger;

//@Component("loadResultInfo")
public class loadResultUtil {
	private static Logger logger = Logger.getLogger(loadResultUtil.class);
	
	static String fileName="ResultInfo.properties";
	public loadResultUtil(){
		logger.info("loadResultInfo启动");
		load();
	}
	public static void load(){
		logger.info("loadResultInfo.load启动");
		Properties prop = new Properties();
		try {
			prop.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(loadResultUtil.fileName));
			ResultInfo.SUCCESSINFO=prop.getProperty("SUCCESSINFO");
			ResultInfo.ERRORINFO=prop.getProperty("ERRORINFO");
			ResultInfo.SUCCESSCODE=prop.getProperty("SUCCESSCODE");
			ResultInfo.ERRORCODE=prop.getProperty("ERRORCODE");
			//购物车活动字段
			ResultInfo.ISSHOW=prop.getProperty("ISSHOW");
			ResultInfo.CARTDESC=prop.getProperty("CARTDESC");
			ResultInfo.CART_URL=prop.getProperty("CART_URL");
			
			
			ResultInfo.getMoneyLimitDown=Integer.parseInt(prop.getProperty("getMoneyLimitDown"));
			ResultInfo.getMoneyLimitTop=Integer.parseInt(prop.getProperty("getMoneyLimitTop"));
			
			ResultInfo.getMoneyLimitError=prop.getProperty("getMoneyLimitError");
			ResultInfo.getMoneyCountError=prop.getProperty("getMoneyCountError");

			ResultInfo.loginOutError = prop.getProperty("loginOutError");
			ResultInfo.paramFormatError = prop.getProperty("paramFormatError");
			ResultInfo.withdrawCountOutError =prop.getProperty("withdrawCountOutError");
			ResultInfo.cartEmptyError = prop.getProperty("cartEmptyError");
			ResultInfo.integralOutError = prop.getProperty("integralOutError");
			ResultInfo.userIntegralOutError = prop.getProperty("userIntegralOutError");
			ResultInfo.userMoneyOutError = prop.getProperty("userMoneyOutError");
			ResultInfo.integralOutOrderMeonyError = prop.getProperty("integralOutOrderMeonyError");
			ResultInfo.userNoDrpError = prop.getProperty("userNoDrpError");
			
			ResultInfo.APPLY_AGAIN = prop.getProperty("APPLY_AGAIN");
			ResultInfo.APPLY_EXIST = prop.getProperty("APPLY_EXIST");
			ResultInfo.APPLY_OPENID_IS_NULL = prop.getProperty("APPLY_OPENID_IS_NULL");
			ResultInfo.APPLY_ORDER_IS_NULL = prop.getProperty("APPLY_ORDER_IS_NULL");
			
			ResultInfo.repeatNameError=prop.getProperty("repeatNameError");
			ResultInfo.lostMemberInfo=prop.getProperty("lostMemberInfo");

			ResultInfo.telJoinMsg=prop.getProperty("telJoinMsg");

			ResultInfo.initPorxySuccessPrifix=prop.getProperty("initPorxySuccessPrifix");
			ResultInfo.initPorxySuccessSuffix=prop.getProperty("initPorxySuccessSuffix");
			ResultInfo.initPorxyErrorByCodeError=prop.getProperty("initPorxyErrorByCodeError");
			ResultInfo.initPorxyErrorByUseInit=prop.getProperty("initPorxyErrorByUseInit");
			ResultInfo.initPorxyErrorByUseBuild=prop.getProperty("initPorxyErrorByUseBuild");
			ResultInfo.initPorxyErrorByCodeWrong=prop.getProperty("initPorxyErrorByCodeWrong");
			ResultInfo.subDefaultResponseText=prop.getProperty("subDefaultResponseText");
			ResultInfo.messageDefaultResponseText=prop.getProperty("messageDefaultResponseText");
			ResultInfo.messageIsNullResponseText=prop.getProperty("messageIsNullResponseText");
			ResultInfo.imageMessageResponseText=prop.getProperty("imageMessageResponseText");
			ResultInfo.locationMessageResponseText=prop.getProperty("locationMessageResponseText");
			ResultInfo.linkMessageResponseText=prop.getProperty("linkMessageResponseText");
			ResultInfo.videoMessageResponseText=prop.getProperty("videoMessageResponseText");
			ResultInfo.tryCatchDefaultResponseText=prop.getProperty("tryCatchDefaultResponseText");
			ResultInfo.rebateOrderText=prop.getProperty("rebateOrderText");
			ResultInfo.FOLLOW_REPLY_MESSAGE_TEXT=prop.getProperty("follow_reply_message_text");
			ResultInfo.FOLLOW_REPLY_MESSAGE_IS_IMAGE_TEXT="true".equals(prop.getProperty("follow_reply_message_is_image_text"))?true:false;

			ResultInfo.eventExpiredMsg=prop.getProperty("eventExpiredMsg");
			ResultInfo.repeatCollectionMsg=prop.getProperty("repeatCollectionMsg");
			ResultInfo.failedReceiveMsg=prop.getProperty("failedReceiveMsg");
			ResultInfo.successReceiveMsg=prop.getProperty("successReceiveMsg");

			/*微信推送*/
			ResultInfo.ORDER_DETAIL = prop.getProperty("wx_push_url");
			
			//消息的回调连接
			ResultInfo.INDEX_PAGE = prop.getProperty("INDEX_PAGE"); 	// 商城首页，，，
			ResultInfo.PAGE_SHIPMENT = prop.getProperty("PAGE_SHIPMENT"); // 订单发货的界面
			ResultInfo.TUIHUI_SHIPMENT = prop.getProperty("TUIHUI_SHIPMENT"); //收益退回的界面
			ResultInfo.ORDER_GUOQI = prop.getProperty("ORDER_GUOQI"); 	//订单即将过期提醒
			//消息的模板id
			ResultInfo.rewards_template_id = prop.getProperty("rewards_template_id");//返现到账通知模版id
			ResultInfo.Income_template_id = prop.getProperty("Income_template_id");//收入提醒模版id
			ResultInfo.Shipment_template_id = prop.getProperty("Shipment_template_id");//发货提醒模版id
			ResultInfo.Order_template_id = prop.getProperty("Order_template_id");//订单未支付模版id

			ResultInfo.probation_pay_success = prop.getProperty("probation_pay_success");	//订单支付成功
			ResultInfo.order_apply_refund = prop.getProperty("order_apply_refund");			//用户申请退款提醒
			ResultInfo.order_apply_return = prop.getProperty("order_apply_return");			//用户 申请退货 提醒
			ResultInfo.order_apply_barter = prop.getProperty("order_apply_barter");			//用户 申请换货 提醒
			ResultInfo.order_send_success = prop.getProperty("order_send_success");			//发货后 提醒

			ResultInfo.order_refund_msg = prop.getProperty("order_refund_msg");			//退款申请通知

			ResultInfo.yearMsg = prop.getProperty("yearMsg");

			ResultInfo.service_push = prop.getProperty("service_push");			//服务推送模板
			ResultInfo.member_activation = prop.getProperty("member_activation");			//服务推送模板

			ResultInfo.register_member = prop.getProperty("register_member");
			ResultInfo.recommend_use_coupon = prop.getProperty("recommend_use_coupon");

		} catch (IOException e) {
			ResultInfo.SUCCESSINFO="操作成功！";
			ResultInfo.ERRORINFO="操作失败！";
			ResultInfo.SUCCESSCODE="200";
			ResultInfo.ERRORCODE="500";
			
			//购物车活动字段
			ResultInfo.ISSHOW="是";
//			ResultInfo.CARTDESC="京东众筹价¥399，快快点我前往！";
			ResultInfo.CARTDESC="";

			ResultInfo.CART_URL="http://z.jd.com/project/details/53631.html?from=jr_search&type=0";
			
			ResultInfo.getMoneyLimitDown=100;
			ResultInfo.getMoneyLimitTop=200000000;
			
			ResultInfo.getMoneyLimitError="提现资金不符合规则！";
			ResultInfo.getMoneyCountError="当月取现次数不能超过两次";

			ResultInfo.loginOutError = "登陆信息丢失，请登陆!";
			ResultInfo.paramFormatError = "参数格式有误，请检测!";
			ResultInfo.withdrawCountOutError = "对不起,本月提现次数已经使用完成!";
			ResultInfo.cartEmptyError = "没有选中购物项，或者购物车已经结算！";
			ResultInfo.integralOutError = "抵扣积分不能大于用户可用积分!";
			ResultInfo.userIntegralOutError = "对不起,您的可用积分不足提现!";
			ResultInfo.userMoneyOutError = "对不起,您的可用金额不足提现!";
			ResultInfo.integralOutOrderMeonyError = "抵扣积分金额不能大于等于订单金额!";
			ResultInfo.userNoDrpError = "您不是代理商，无法查看二维码!";
			
			ResultInfo.APPLY_AGAIN = "您的申请已经提交,请等待审核!";
			ResultInfo.APPLY_EXIST = "您已经是微代理!";
			ResultInfo.APPLY_OPENID_IS_NULL = "请关注公众号!";
			ResultInfo.APPLY_ORDER_IS_NULL="请完成一次订单后再次申请!";

			ResultInfo.repeatNameError="分销商用户名重复";
			ResultInfo.lostMemberInfo="用户信息丢失！";
			
			ResultInfo.initPorxySuccessPrifix="尊敬的";
			ResultInfo.initPorxySuccessSuffix="您好!\n恭喜您激活账户成功!";
			ResultInfo.initPorxyErrorByCodeError="对不起!\n您输入的激活码不正确，请重试!";
			ResultInfo.initPorxyErrorByUseInit="对不起!\n您输入的激活码不正确，请重试!";
			ResultInfo.initPorxyErrorByUseBuild="对不起！您的微信已经绑定了其他代理商信息！导致无法绑定!";
			ResultInfo.initPorxyErrorByCodeWrong="对不起!\n您输入的激活码不正确，请重试!";
			ResultInfo.subDefaultResponseText="感谢您关注我们，我们会为您提供最好的服务!";
			ResultInfo.messageDefaultResponseText="您好，有什么能帮到您的?";
			ResultInfo.messageIsNullResponseText="您好，有什么能帮到您的！";
			ResultInfo.imageMessageResponseText="哎哟 ~ 您发的图片我暂时不懂\n有什么能帮到您呢？";
			ResultInfo.locationMessageResponseText="哎哟 ~ 您发的地址我暂时不懂\n有什么能帮到您呢？";
			ResultInfo.linkMessageResponseText="哎哟 ~ 您发的链接我暂时不懂\n有什么能帮到您呢？";
			ResultInfo.videoMessageResponseText="哎哟 ~ 您发的语音我暂时不懂\n有什么能帮到您呢？";
			ResultInfo.tryCatchDefaultResponseText="对不起，暂时无法给您回复...";
			ResultInfo.rebateOrderText="{1}购买了{2}订单，给{3}返利{4}元钱";
			ResultInfo.FOLLOW_REPLY_MESSAGE_TEXT="恭喜您，已获得购买冲奶机优惠100元资格!";
			ResultInfo.FOLLOW_REPLY_MESSAGE_IS_IMAGE_TEXT=false;
			
			/*微信推送*/
			ResultInfo.ORDER_DETAIL = "http://s.iamberry.com/aiberle/wechat/order-details.html?orderId=";

			ResultInfo.INDEX_PAGE = "http://h5.iamberry.com/iamberry/wechat/index"; 	// 商城首页，，，
			ResultInfo.PAGE_SHIPMENT = "http://h5.iamberry.com/iamberry/pay/goOrderInfo?orderId="; // 订单发货的界面
			ResultInfo.TUIHUI_SHIPMENT = "http://h5.iamberry.com/iamberry/wechat/agentWechat/reback"; //收益退回的界面
			ResultInfo.ORDER_GUOQI = "http://h5.iamberry.com/iamberry/pay/goOrderList"; 	//订单即将过期提醒

			ResultInfo.service_push = prop.getProperty("service_push");			//服务推送模板
		}
	}
}
