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();
//		test();
	}
	public static void load() {
		logger.info("loadResultInfo.load启动");
		Properties prop = new Properties();
		try {
			prop.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(loadResultUtil.fileName));
			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.userMoneyOutError = prop.getProperty("userMoneyOutError");
			ResultInfo.userNoDrpError = prop.getProperty("userNoDrpError");
			
			ResultInfo.repeatNameError=prop.getProperty("repeatNameError");
			ResultInfo.lostMemberInfo=prop.getProperty("lostMemberInfo");

			ResultInfo.yearMsg = prop.getProperty("yearMsg");
			
			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.messageMothMsg=prop.getProperty("messageMothMsg");
			ResultInfo.tryCatchDefaultResponseText=prop.getProperty("tryCatchDefaultResponseText");
			ResultInfo.rebateOrderText=prop.getProperty("rebateOrderText");

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

			ResultInfo.PAGE_SHIPMENT = prop.getProperty("PAGE_SHIPMENT"); 			// 订单发货的界面
			ResultInfo.TUIHUI_SHIPMENT = prop.getProperty("TUIHUI_SHIPMENT"); 		//收益退回的界面
			ResultInfo.ORDER_GUOQI = prop.getProperty("ORDER_GUOQI"); 				//订单即将过期提醒
			ResultInfo.TRY_ORDER_DETAIL = prop.getProperty("TRY_ORDER_DETAIL");		//试用订单详情
			ResultInfo.RENT_ORDER_DETAIL = prop.getProperty("RENT_ORDER_DETAIL");		//租赁订单详情
			ResultInfo.SERVICE_PUSH_URL = prop.getProperty("SERVICE_PUSH_URL");		//活动推送详情
			ResultInfo.AGENT_REFERRER_MACHINE_PAGE = prop.getProperty("AGENT_REFERRER_MACHINE_PAGE");		//推荐人点击模板消息跳转链接
			//消息的模板id
			ResultInfo.rewards_template_id = prop.getProperty("rewards_template_id");		//返现到账通知 		模版id 	TM00211
			ResultInfo.Income_template_id = prop.getProperty("Income_template_id");			//账户变更提醒 		模版id	TM00370
			ResultInfo.Shipment_template_id = prop.getProperty("Shipment_template_id");		//订单包裹跟踪通知 	模版id	TM00665
			ResultInfo.Order_template_id = prop.getProperty("Order_template_id");			//订单未支付通知 	模版id	TM00184
			
			ResultInfo.trial_progress_remind = prop.getProperty("trial_progress_remind");	//试用进度提醒
			ResultInfo.probation_apply_notice = prop.getProperty("probation_apply_notice");	//试用申请通知
			ResultInfo.probation_apply_success = prop.getProperty("probation_apply_success");//试用申请成功通知
			ResultInfo.probation_pay_success = prop.getProperty("probation_pay_success");	//订单支付成功
			ResultInfo.probation_shut_down = prop.getProperty("probation_shut_down");		//订单关闭通知	 	模版id	TM00984
			ResultInfo.prize_receive_push = prop.getProperty("prize_receive_push");			//付费代理商支付后推送推荐人通知  	模版id
			ResultInfo.female_lady_reply = prop.getProperty("female_lady_reply");			//2019 38 妇女节活动回复语
			ResultInfo.service_push = prop.getProperty("service_push");			//服务推送模板
			ResultInfo.probation_spell_success = prop.getProperty("probation_spell_success");			//拼单成功推送模板
			ResultInfo.spellErrorMsg = prop.getProperty("spellErrorMsg");			//拼单成功推送模板
			ResultInfo.chineseLottery = prop.getProperty("chineseLottery");			//七夕回复url
			ResultInfo.chineseLotteryFailure = prop.getProperty("chineseLotteryFailure");			//七夕回复失败



		} catch (IOException e) {
			new RuntimeException(e.getMessage());
		}
	}

}
