Constant.java 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. package com.ygj.yuemum.component;
  2. import org.springframework.beans.factory.annotation.Autowired;
  3. import org.springframework.beans.factory.annotation.Value;
  4. import org.springframework.context.annotation.Configuration;
  5. /**
  6. * 常量
  7. *
  8. * @author pibigstar
  9. */
  10. @Configuration
  11. public class Constant {
  12. //此数据是读取的配置文件
  13. public static String NEWUSER_COUPON;
  14. public static String CONSULTTASK_COUPON;
  15. public static String DETECTIONTASK_COUPON;
  16. public static String RECHARGETASK_COUPON;
  17. public static String ROOT;
  18. public static String RESUMEFILE;
  19. public static String HTTPROOT;
  20. public static String HTTPHTMLROOT;
  21. public static String MODULEPATH;
  22. public static String PAYVOUCHER;
  23. public static String HTTPPAYVOUCHER;
  24. public static String APPID;
  25. public static String APPSECRET;
  26. public static String GRANT_TYPE;
  27. public static String JSAPI_TICKET_TYPE;
  28. public static String ACCESS_TOKEN_URL;
  29. public static String JSAPI_TICKET_URL;
  30. public static String JSCODE2SESSION;
  31. public static String SENDMESSAGEURL;
  32. public static String ORDERTEMPLATEID;
  33. public static String BOOKINGTEMPLATEID;
  34. public static String EXTRACTTEMPLATEID;
  35. public static String MINIAPPID;
  36. public static String MINIAPPSECRET;
  37. public static String PROMOTIONVOUCHER;
  38. public static String HTTPPROMOTIONVOUCHER;
  39. public static String QRCODE;
  40. public static String HTTPQRCODE;
  41. public static String BAIDUAK;
  42. public static String BAIDUSK;
  43. public static String AUTHHOST;
  44. public static String BANKCARD;
  45. public static String IMGBANKCARD;
  46. public static String HTTPIMGBANKCARD;
  47. public static String WPOPENID;
  48. public static String MDJAPIURL;
  49. public static String BIZOBJECTSERVICE;
  50. public static String BIZUSERSERVICE;
  51. public static String LOCALQRCODE;
  52. public static String DEMOQRCODE;
  53. public static String HTTPOPPQRCODE;
  54. public static String TESTQRCODE;
  55. public static String HTTTESTQRCODE;
  56. public static String BANNERIMGURL;
  57. public static String HTTPBANNERIMGURL;
  58. public static String DIANPINGIMGURL;
  59. public static String HTTPDIANPINGIMGURL;
  60. public static Integer LMP;
  61. public static Integer AGE;
  62. public static Integer MAXSCHOLARSHIPS;
  63. public static String FOLDER;
  64. //注入
  65. @Autowired(required = false)
  66. public void getQrcode(@Value("${file.qrcode}") String QRCODE) {
  67. Constant.QRCODE = QRCODE;
  68. }
  69. @Autowired(required = false)
  70. public void getHttpQrocde(@Value("${file.httpqrcode}") String HTTPQRCODE) {
  71. Constant.HTTPQRCODE = HTTPQRCODE;
  72. }
  73. @Autowired(required = false)
  74. public void getNewUserCoupon(@Value("${coupon.NewUserCoupon}") String NEWUSER_COUPON) {
  75. Constant.NEWUSER_COUPON = NEWUSER_COUPON;
  76. }
  77. @Autowired(required = false)
  78. public void getConsultTaskCoupon(@Value("${coupon.ConsultTaskCoupon}") String CONSULTTASK_COUPON) {
  79. Constant.CONSULTTASK_COUPON = CONSULTTASK_COUPON;
  80. }
  81. @Autowired(required = false)
  82. public void getDetectionTaskCoupon(@Value("${coupon.DetectionTaskCoupon}") String DETECTIONTASK_COUPON) {
  83. Constant.DETECTIONTASK_COUPON = DETECTIONTASK_COUPON;
  84. }
  85. @Autowired(required = false)
  86. public void getRechargeTaskCoupon(@Value("${coupon.NewUserCoupon}") String RECHARGETASK_COUPON) {
  87. Constant.RECHARGETASK_COUPON = RECHARGETASK_COUPON;
  88. }
  89. @Autowired(required = false)
  90. public void getROOT(@Value("${file.ROOT}") String ROOT) {
  91. Constant.ROOT = ROOT;
  92. }
  93. @Autowired(required = false)
  94. public void getResumeFile(@Value("${file.ResumeFile}") String RESUMEFILE) {
  95. Constant.RESUMEFILE = RESUMEFILE;
  96. }
  97. @Autowired(required = false)
  98. public void gethttpRoot(@Value("${file.httpRoot}") String HTTPROOT) {
  99. Constant.HTTPROOT = HTTPROOT;
  100. }
  101. @Autowired(required = false)
  102. public void gethttphtmlRoot(@Value("${file.httphtmlRoot}") String HTTPHTMLROOT) {
  103. Constant.HTTPHTMLROOT = HTTPHTMLROOT;
  104. }
  105. @Autowired(required = false)
  106. public void getmodulePath(@Value("${file.modulePath}") String MODULEPATH) {
  107. Constant.MODULEPATH = MODULEPATH;
  108. }
  109. @Autowired(required = false)
  110. public void getPayvoucher(@Value("${file.payvoucher}") String PAYVOUCHER) {
  111. Constant.PAYVOUCHER = PAYVOUCHER;
  112. }
  113. @Autowired(required = false)
  114. public void getHttppayvoucher(@Value("${file.httppayvoucher}") String HTTPPAYVOUCHER) {
  115. Constant.HTTPPAYVOUCHER = HTTPPAYVOUCHER;
  116. }
  117. @Autowired(required = false)
  118. public void getPromotionvoucher(@Value("${file.promotionvoucher}")String PROMOTIONVOUCHER) {
  119. Constant.PROMOTIONVOUCHER = PROMOTIONVOUCHER;
  120. }
  121. @Autowired(required = false)
  122. public void getHttppromotionvoucher(@Value("${file.httppromotionvoucher}")String HTTPPROMOTIONVOUCHER) {
  123. Constant.HTTPPROMOTIONVOUCHER = HTTPPROMOTIONVOUCHER;
  124. }
  125. @Autowired(required = false)
  126. public void getAPPID(@Value("${wechat.APPID}") String APPID) {
  127. Constant.APPID = APPID;
  128. }
  129. @Autowired(required = false)
  130. public void getAPPSECRET(@Value("${wechat.APPSECRET}") String APPSECRET) {
  131. Constant.APPSECRET = APPSECRET;
  132. }
  133. @Autowired(required = false)
  134. public void getGRANT_TYPE(@Value("${wechat.GRANT_TYPE}") String GRANT_TYPE) {
  135. Constant.GRANT_TYPE = GRANT_TYPE;
  136. }
  137. @Autowired(required = false)
  138. public void getJSAPI_TICKET_TYPE(@Value("${wechat.JSAPI_TICKET_TYPE}") String JSAPI_TICKET_TYPE) {
  139. Constant.JSAPI_TICKET_TYPE = JSAPI_TICKET_TYPE;
  140. }
  141. @Autowired(required = false)
  142. public void getACCESS_TOKEN_URL(@Value("${wechat.ACCESS_TOKEN_URL}") String ACCESS_TOKEN_URL) {
  143. Constant.ACCESS_TOKEN_URL = ACCESS_TOKEN_URL;
  144. }
  145. @Autowired(required = false)
  146. public void getJSAPI_TICKET_URL(@Value("${wechat.JSAPI_TICKET_URL}") String JSAPI_TICKET_URL) {
  147. Constant.JSAPI_TICKET_URL = JSAPI_TICKET_URL;
  148. }
  149. @Autowired(required = false)
  150. public void getJSCODE2SESSION(@Value("${wechat.JSCODE2SESSION}") String JSCODE2SESSION) {
  151. Constant.JSCODE2SESSION = JSCODE2SESSION;
  152. }
  153. @Autowired(required = false)
  154. public void getSENDMESSAGEURL(@Value("${wechat.SENDMESSAGEURL}") String SENDMESSAGEURL) {
  155. Constant.SENDMESSAGEURL = SENDMESSAGEURL;
  156. }
  157. @Autowired(required = false)
  158. public void getOrderTemplateid(@Value("${wechat.OrderTemplateid}") String ORDERTEMPLATEID) {
  159. Constant.ORDERTEMPLATEID = ORDERTEMPLATEID;
  160. }
  161. @Autowired(required = false)
  162. public void getBookingTemplateid(@Value("${wechat.BookingTemplateid}") String BOOKINGTEMPLATEID) {
  163. Constant.BOOKINGTEMPLATEID = BOOKINGTEMPLATEID;
  164. }
  165. @Autowired(required = false)
  166. public void getMINIAPPID(@Value("${wechat.MINIAPPID}") String MINIAPPID) {
  167. Constant.MINIAPPID = MINIAPPID;
  168. }
  169. @Autowired(required = false)
  170. public void getMINIAPPSECRET(@Value("${wechat.MINIAPPSECRET}") String MINIAPPSECRET) {
  171. Constant.MINIAPPSECRET = MINIAPPSECRET;
  172. }
  173. @Autowired(required = false)
  174. public void getBAIDUAK(@Value("${baidu.BAIDUAK}") String BAIDUAK) {
  175. Constant.BAIDUAK = BAIDUAK;
  176. }
  177. @Autowired(required = false)
  178. public void getBAIDUSK(@Value("${baidu.BAIDUSK}") String BAIDUSK) {
  179. Constant.BAIDUSK = BAIDUSK;
  180. }
  181. @Autowired(required = false)
  182. public void getBANKCARD(@Value("${baidu.BANKCARD}") String BANKCARD) {
  183. Constant.BANKCARD = BANKCARD;
  184. }
  185. @Autowired(required = false)
  186. public void getAUTHHOST(@Value("${baidu.AUTHHOST}") String AUTHHOST) {
  187. Constant.AUTHHOST = AUTHHOST;
  188. }
  189. @Autowired(required = false)
  190. public void getIMGBANKCARD(@Value("${file.IMGBANKCARD}") String IMGBANKCARD) {
  191. Constant.IMGBANKCARD = IMGBANKCARD;
  192. }
  193. @Autowired(required = false)
  194. public void getHTTPIMGBANKCARD(@Value("${file.HTTPIMGBANKCARD}") String HTTPIMGBANKCARD) {
  195. Constant.HTTPIMGBANKCARD = HTTPIMGBANKCARD;
  196. }
  197. @Autowired(required = false)
  198. public void getWPOPENID(@Value("${wechat.WPOPENID}") String WPOPENID) {
  199. Constant.WPOPENID = WPOPENID;
  200. }
  201. @Autowired(required = false)
  202. public void getEXTRACTTEMPLATEID(@Value("${wechat.ExtractTemplateid}") String EXTRACTTEMPLATEID) {
  203. Constant.EXTRACTTEMPLATEID = EXTRACTTEMPLATEID;
  204. }
  205. @Autowired(required = false)
  206. public void getMDJAPIURL(@Value("${api.MDJAPIURL}") String MDJAPIURL) {
  207. Constant.MDJAPIURL = MDJAPIURL;
  208. }
  209. @Autowired(required = false)
  210. public void getBIZOBJECTSERVICE(@Value("${api.BIZOBJECTSERVICE}") String BIZOBJECTSERVICE) {
  211. Constant.BIZOBJECTSERVICE = BIZOBJECTSERVICE;
  212. }
  213. @Autowired(required = false)
  214. public void getBIZUSERSERVICE(@Value("${api.BIZUSERSERVICE}") String BIZUSERSERVICE) {
  215. Constant.BIZUSERSERVICE = BIZUSERSERVICE;
  216. }
  217. @Autowired(required = false)
  218. public void getLOCALQRCODE(@Value("${file.LOCALQRCODE}") String LOCALQRCODE) {
  219. Constant.LOCALQRCODE = LOCALQRCODE;
  220. }
  221. @Autowired(required = false)
  222. public void getDEMOQRCODE(@Value("${file.DEMOQRCODE}") String DEMOQRCODE) {
  223. Constant.DEMOQRCODE = DEMOQRCODE;
  224. }
  225. @Autowired(required = false)
  226. public void getHTTPOPPQRCODE(@Value("${file.HTTPOPPQRCODE}") String HTTPOPPQRCODE) {
  227. Constant.HTTPOPPQRCODE = HTTPOPPQRCODE;
  228. }
  229. @Autowired(required = false)
  230. public void getTESTQRCODE(@Value("${file.TESTQRCODE}") String TESTQRCODE) {
  231. Constant.TESTQRCODE = TESTQRCODE;
  232. }
  233. @Autowired(required = false)
  234. public void getHTTTESTQRCODE(@Value("${file.HTTTESTQRCODE}") String HTTTESTQRCODE) {
  235. Constant.HTTTESTQRCODE = HTTTESTQRCODE;
  236. }
  237. @Autowired(required = false)
  238. public void getBANNERIMGURL(@Value("${file.BANNERIMGURL}") String BANNERIMGURL) {
  239. Constant.BANNERIMGURL = BANNERIMGURL;
  240. }
  241. @Autowired(required = false)
  242. public void getHTTPBANNERIMGURL(@Value("${file.HTTPBANNERIMGURL}") String HTTPBANNERIMGURL) {
  243. Constant.HTTPBANNERIMGURL = HTTPBANNERIMGURL;
  244. }
  245. @Autowired(required = false)
  246. public void getDIANPINGIMGURL(@Value("${file.DIANPINGIMGURL}") String DIANPINGIMGURL) {
  247. Constant.DIANPINGIMGURL = DIANPINGIMGURL;
  248. }
  249. @Autowired(required = false)
  250. public void getHTTPDIANPINGIMGURL(@Value("${file.HTTPDIANPINGIMGURL}") String HTTPDIANPINGIMGURL) {
  251. Constant.HTTPDIANPINGIMGURL = HTTPDIANPINGIMGURL;
  252. }
  253. @Autowired(required = false)
  254. public void getLMP(@Value("${college.LMP}") Integer LMP) {
  255. Constant.LMP = LMP;
  256. }
  257. @Autowired(required = false)
  258. public void getAGE(@Value("${college.AGE}") Integer AGE) {
  259. Constant.AGE = AGE;
  260. }
  261. @Autowired(required = false)
  262. public void getMAXSCHOLARSHIPS(@Value("${college.MAXSCHOLARSHIPS}") Integer MAXSCHOLARSHIPS) {
  263. Constant.MAXSCHOLARSHIPS = MAXSCHOLARSHIPS;
  264. }
  265. @Autowired(required = false)
  266. public void getMAXSCHOLARSHIPS(@Value("${chuanyun.OssFolder}") String OssFolder) {
  267. Constant.FOLDER = OssFolder;
  268. }
  269. }