loadResultUtil.java 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. package com.iamberry.wechat.tools;
  2. import java.io.IOException;
  3. import java.util.Properties;
  4. import org.apache.log4j.Logger;
  5. //@Component("loadResultInfo")
  6. public class loadResultUtil {
  7. private static Logger logger = Logger.getLogger(loadResultUtil.class);
  8. static String fileName="ResultInfo.properties";
  9. public loadResultUtil(){
  10. logger.info("loadResultInfo启动");
  11. load();
  12. }
  13. public static void load(){
  14. logger.info("loadResultInfo.load启动");
  15. Properties prop = new Properties();
  16. try {
  17. prop.load(Thread.currentThread().getContextClassLoader().getResourceAsStream(loadResultUtil.fileName));
  18. ResultInfo.SUCCESSINFO=prop.getProperty("SUCCESSINFO");
  19. ResultInfo.ERRORINFO=prop.getProperty("ERRORINFO");
  20. ResultInfo.SUCCESSCODE=prop.getProperty("SUCCESSCODE");
  21. ResultInfo.ERRORCODE=prop.getProperty("ERRORCODE");
  22. //购物车活动字段
  23. ResultInfo.ISSHOW=prop.getProperty("ISSHOW");
  24. ResultInfo.CARTDESC=prop.getProperty("CARTDESC");
  25. ResultInfo.CART_URL=prop.getProperty("CART_URL");
  26. ResultInfo.getMoneyLimitDown=Integer.parseInt(prop.getProperty("getMoneyLimitDown"));
  27. ResultInfo.getMoneyLimitTop=Integer.parseInt(prop.getProperty("getMoneyLimitTop"));
  28. ResultInfo.getMoneyLimitError=prop.getProperty("getMoneyLimitError");
  29. ResultInfo.getMoneyCountError=prop.getProperty("getMoneyCountError");
  30. ResultInfo.loginOutError = prop.getProperty("loginOutError");
  31. ResultInfo.paramFormatError = prop.getProperty("paramFormatError");
  32. ResultInfo.withdrawCountOutError =prop.getProperty("withdrawCountOutError");
  33. ResultInfo.cartEmptyError = prop.getProperty("cartEmptyError");
  34. ResultInfo.integralOutError = prop.getProperty("integralOutError");
  35. ResultInfo.userIntegralOutError = prop.getProperty("userIntegralOutError");
  36. ResultInfo.userMoneyOutError = prop.getProperty("userMoneyOutError");
  37. ResultInfo.integralOutOrderMeonyError = prop.getProperty("integralOutOrderMeonyError");
  38. ResultInfo.userNoDrpError = prop.getProperty("userNoDrpError");
  39. ResultInfo.APPLY_AGAIN = prop.getProperty("APPLY_AGAIN");
  40. ResultInfo.APPLY_EXIST = prop.getProperty("APPLY_EXIST");
  41. ResultInfo.APPLY_OPENID_IS_NULL = prop.getProperty("APPLY_OPENID_IS_NULL");
  42. ResultInfo.APPLY_ORDER_IS_NULL = prop.getProperty("APPLY_ORDER_IS_NULL");
  43. ResultInfo.repeatNameError=prop.getProperty("repeatNameError");
  44. ResultInfo.lostMemberInfo=prop.getProperty("lostMemberInfo");
  45. ResultInfo.telJoinMsg=prop.getProperty("telJoinMsg");
  46. ResultInfo.initPorxySuccessPrifix=prop.getProperty("initPorxySuccessPrifix");
  47. ResultInfo.initPorxySuccessSuffix=prop.getProperty("initPorxySuccessSuffix");
  48. ResultInfo.initPorxyErrorByCodeError=prop.getProperty("initPorxyErrorByCodeError");
  49. ResultInfo.initPorxyErrorByUseInit=prop.getProperty("initPorxyErrorByUseInit");
  50. ResultInfo.initPorxyErrorByUseBuild=prop.getProperty("initPorxyErrorByUseBuild");
  51. ResultInfo.initPorxyErrorByCodeWrong=prop.getProperty("initPorxyErrorByCodeWrong");
  52. ResultInfo.subDefaultResponseText=prop.getProperty("subDefaultResponseText");
  53. ResultInfo.messageDefaultResponseText=prop.getProperty("messageDefaultResponseText");
  54. ResultInfo.messageIsNullResponseText=prop.getProperty("messageIsNullResponseText");
  55. ResultInfo.imageMessageResponseText=prop.getProperty("imageMessageResponseText");
  56. ResultInfo.locationMessageResponseText=prop.getProperty("locationMessageResponseText");
  57. ResultInfo.linkMessageResponseText=prop.getProperty("linkMessageResponseText");
  58. ResultInfo.videoMessageResponseText=prop.getProperty("videoMessageResponseText");
  59. ResultInfo.tryCatchDefaultResponseText=prop.getProperty("tryCatchDefaultResponseText");
  60. ResultInfo.rebateOrderText=prop.getProperty("rebateOrderText");
  61. ResultInfo.FOLLOW_REPLY_MESSAGE_TEXT=prop.getProperty("follow_reply_message_text");
  62. ResultInfo.FOLLOW_REPLY_MESSAGE_IS_IMAGE_TEXT="true".equals(prop.getProperty("follow_reply_message_is_image_text"))?true:false;
  63. ResultInfo.eventExpiredMsg=prop.getProperty("eventExpiredMsg");
  64. ResultInfo.repeatCollectionMsg=prop.getProperty("repeatCollectionMsg");
  65. ResultInfo.failedReceiveMsg=prop.getProperty("failedReceiveMsg");
  66. ResultInfo.successReceiveMsg=prop.getProperty("successReceiveMsg");
  67. /*微信推送*/
  68. ResultInfo.ORDER_DETAIL = prop.getProperty("wx_push_url");
  69. //消息的回调连接
  70. ResultInfo.INDEX_PAGE = prop.getProperty("INDEX_PAGE"); // 商城首页,,,
  71. ResultInfo.PAGE_SHIPMENT = prop.getProperty("PAGE_SHIPMENT"); // 订单发货的界面
  72. ResultInfo.TUIHUI_SHIPMENT = prop.getProperty("TUIHUI_SHIPMENT"); //收益退回的界面
  73. ResultInfo.ORDER_GUOQI = prop.getProperty("ORDER_GUOQI"); //订单即将过期提醒
  74. //消息的模板id
  75. ResultInfo.rewards_template_id = prop.getProperty("rewards_template_id");//返现到账通知模版id
  76. ResultInfo.Income_template_id = prop.getProperty("Income_template_id");//收入提醒模版id
  77. ResultInfo.Shipment_template_id = prop.getProperty("Shipment_template_id");//发货提醒模版id
  78. ResultInfo.Order_template_id = prop.getProperty("Order_template_id");//订单未支付模版id
  79. ResultInfo.probation_pay_success = prop.getProperty("probation_pay_success"); //订单支付成功
  80. ResultInfo.order_apply_refund = prop.getProperty("order_apply_refund"); //用户申请退款提醒
  81. ResultInfo.order_apply_return = prop.getProperty("order_apply_return"); //用户 申请退货 提醒
  82. ResultInfo.order_apply_barter = prop.getProperty("order_apply_barter"); //用户 申请换货 提醒
  83. ResultInfo.order_send_success = prop.getProperty("order_send_success"); //发货后 提醒
  84. ResultInfo.order_refund_msg = prop.getProperty("order_refund_msg"); //退款申请通知
  85. ResultInfo.yearMsg = prop.getProperty("yearMsg");
  86. ResultInfo.service_push = prop.getProperty("service_push"); //服务推送模板
  87. } catch (IOException e) {
  88. ResultInfo.SUCCESSINFO="操作成功!";
  89. ResultInfo.ERRORINFO="操作失败!";
  90. ResultInfo.SUCCESSCODE="200";
  91. ResultInfo.ERRORCODE="500";
  92. //购物车活动字段
  93. ResultInfo.ISSHOW="是";
  94. // ResultInfo.CARTDESC="京东众筹价¥399,快快点我前往!";
  95. ResultInfo.CARTDESC="";
  96. ResultInfo.CART_URL="http://z.jd.com/project/details/53631.html?from=jr_search&type=0";
  97. ResultInfo.getMoneyLimitDown=100;
  98. ResultInfo.getMoneyLimitTop=200000000;
  99. ResultInfo.getMoneyLimitError="提现资金不符合规则!";
  100. ResultInfo.getMoneyCountError="当月取现次数不能超过两次";
  101. ResultInfo.loginOutError = "登陆信息丢失,请登陆!";
  102. ResultInfo.paramFormatError = "参数格式有误,请检测!";
  103. ResultInfo.withdrawCountOutError = "对不起,本月提现次数已经使用完成!";
  104. ResultInfo.cartEmptyError = "没有选中购物项,或者购物车已经结算!";
  105. ResultInfo.integralOutError = "抵扣积分不能大于用户可用积分!";
  106. ResultInfo.userIntegralOutError = "对不起,您的可用积分不足提现!";
  107. ResultInfo.userMoneyOutError = "对不起,您的可用金额不足提现!";
  108. ResultInfo.integralOutOrderMeonyError = "抵扣积分金额不能大于等于订单金额!";
  109. ResultInfo.userNoDrpError = "您不是代理商,无法查看二维码!";
  110. ResultInfo.APPLY_AGAIN = "您的申请已经提交,请等待审核!";
  111. ResultInfo.APPLY_EXIST = "您已经是微代理!";
  112. ResultInfo.APPLY_OPENID_IS_NULL = "请关注公众号!";
  113. ResultInfo.APPLY_ORDER_IS_NULL="请完成一次订单后再次申请!";
  114. ResultInfo.repeatNameError="分销商用户名重复";
  115. ResultInfo.lostMemberInfo="用户信息丢失!";
  116. ResultInfo.initPorxySuccessPrifix="尊敬的";
  117. ResultInfo.initPorxySuccessSuffix="您好!\n恭喜您激活账户成功!";
  118. ResultInfo.initPorxyErrorByCodeError="对不起!\n您输入的激活码不正确,请重试!";
  119. ResultInfo.initPorxyErrorByUseInit="对不起!\n您输入的激活码不正确,请重试!";
  120. ResultInfo.initPorxyErrorByUseBuild="对不起!您的微信已经绑定了其他代理商信息!导致无法绑定!";
  121. ResultInfo.initPorxyErrorByCodeWrong="对不起!\n您输入的激活码不正确,请重试!";
  122. ResultInfo.subDefaultResponseText="感谢您关注我们,我们会为您提供最好的服务!";
  123. ResultInfo.messageDefaultResponseText="您好,有什么能帮到您的?";
  124. ResultInfo.messageIsNullResponseText="您好,有什么能帮到您的!";
  125. ResultInfo.imageMessageResponseText="哎哟 ~ 您发的图片我暂时不懂\n有什么能帮到您呢?";
  126. ResultInfo.locationMessageResponseText="哎哟 ~ 您发的地址我暂时不懂\n有什么能帮到您呢?";
  127. ResultInfo.linkMessageResponseText="哎哟 ~ 您发的链接我暂时不懂\n有什么能帮到您呢?";
  128. ResultInfo.videoMessageResponseText="哎哟 ~ 您发的语音我暂时不懂\n有什么能帮到您呢?";
  129. ResultInfo.tryCatchDefaultResponseText="对不起,暂时无法给您回复...";
  130. ResultInfo.rebateOrderText="{1}购买了{2}订单,给{3}返利{4}元钱";
  131. ResultInfo.FOLLOW_REPLY_MESSAGE_TEXT="恭喜您,已获得购买冲奶机优惠100元资格!";
  132. ResultInfo.FOLLOW_REPLY_MESSAGE_IS_IMAGE_TEXT=false;
  133. /*微信推送*/
  134. ResultInfo.ORDER_DETAIL = "http://s.iamberry.com/aiberle/wechat/order-details.html?orderId=";
  135. ResultInfo.INDEX_PAGE = "http://h5.iamberry.com/iamberry/wechat/index"; // 商城首页,,,
  136. ResultInfo.PAGE_SHIPMENT = "http://h5.iamberry.com/iamberry/pay/goOrderInfo?orderId="; // 订单发货的界面
  137. ResultInfo.TUIHUI_SHIPMENT = "http://h5.iamberry.com/iamberry/wechat/agentWechat/reback"; //收益退回的界面
  138. ResultInfo.ORDER_GUOQI = "http://h5.iamberry.com/iamberry/pay/goOrderList"; //订单即将过期提醒
  139. ResultInfo.service_push = prop.getProperty("service_push"); //服务推送模板
  140. }
  141. }
  142. }