|
@@ -0,0 +1,138 @@
|
|
|
+package com.ygj.yuemum.component;
|
|
|
+
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.beans.factory.annotation.Value;
|
|
|
+import org.springframework.context.annotation.Configuration;
|
|
|
+
|
|
|
+/**
|
|
|
+ * 常量
|
|
|
+ * @author pibigstar
|
|
|
+ *
|
|
|
+ */
|
|
|
+@Configuration
|
|
|
+public class Constant {
|
|
|
+ //此数据是读取的配置文件
|
|
|
+ public static String NEWUSER_COUPON;
|
|
|
+ public static String CONSULTTASK_COUPON;
|
|
|
+ public static String DETECTIONTASK_COUPON;
|
|
|
+ public static String RECHARGETASK_COUPON;
|
|
|
+
|
|
|
+ public static String ROOT;
|
|
|
+ public static String RESUMEFILE;
|
|
|
+ public static String HTTPROOT;
|
|
|
+ public static String HTTPHTMLROOT;
|
|
|
+ public static String MODULEPATH;
|
|
|
+ public static String PAYVOUCHER;
|
|
|
+ public static String HTTPPAYVOUCHER;
|
|
|
+
|
|
|
+ public static String APPID;
|
|
|
+ public static String APPSECRET;
|
|
|
+ public static String GRANT_TYPE;
|
|
|
+ public static String JSAPI_TICKET_TYPE;
|
|
|
+ public static String ACCESS_TOKEN_URL;
|
|
|
+ public static String JSAPI_TICKET_URL;
|
|
|
+ public static String JSCODE2SESSION;
|
|
|
+ public static String SENDMESSAGEURL;
|
|
|
+ public static String ORDERTEMPLATEID;
|
|
|
+ public static String BOOKINGTEMPLATEID;
|
|
|
+ public static String MINIAPPID;
|
|
|
+ public static String MINIAPPSECRET;
|
|
|
+
|
|
|
+ //注入
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getNewUserCoupon(@Value("${coupon.NewUserCoupon}")String NEWUSER_COUPON) {
|
|
|
+ Constant.NEWUSER_COUPON = NEWUSER_COUPON;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getConsultTaskCoupon(@Value("${coupon.ConsultTaskCoupon}")String CONSULTTASK_COUPON) {
|
|
|
+ Constant.CONSULTTASK_COUPON = CONSULTTASK_COUPON;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getDetectionTaskCoupon(@Value("${coupon.DetectionTaskCoupon}")String DETECTIONTASK_COUPON) {
|
|
|
+ Constant.DETECTIONTASK_COUPON = DETECTIONTASK_COUPON;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getRechargeTaskCoupon(@Value("${coupon.NewUserCoupon}")String RECHARGETASK_COUPON) {
|
|
|
+ Constant.RECHARGETASK_COUPON = RECHARGETASK_COUPON;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getROOT(@Value("${file.ROOT}")String ROOT) {
|
|
|
+ Constant.ROOT = ROOT;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getResumeFile(@Value("${file.ResumeFile}")String RESUMEFILE) {
|
|
|
+ Constant.RESUMEFILE = RESUMEFILE;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void gethttpRoot(@Value("${file.httpRoot}")String HTTPROOT) {
|
|
|
+ Constant.HTTPROOT = HTTPROOT;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void gethttphtmlRoot(@Value("${file.httphtmlRoot}")String HTTPHTMLROOT) {
|
|
|
+ Constant.HTTPHTMLROOT = HTTPHTMLROOT;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getmodulePath(@Value("${file.modulePath}")String MODULEPATH) {
|
|
|
+ Constant.MODULEPATH = MODULEPATH;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getPayvoucher(@Value("${file.payvoucher}")String PAYVOUCHER) {
|
|
|
+ Constant.PAYVOUCHER = PAYVOUCHER;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getHttppayvoucher(@Value("${file.httppayvoucher}")String HTTPPAYVOUCHER) {
|
|
|
+ Constant.HTTPPAYVOUCHER = HTTPPAYVOUCHER;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getAPPID(@Value("${wechat.APPID}")String APPID) {
|
|
|
+ Constant.APPID = APPID;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getAPPSECRET(@Value("${wechat.APPSECRET}")String APPSECRET) {
|
|
|
+ Constant.APPSECRET = APPSECRET;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getGRANT_TYPE(@Value("${wechat.GRANT_TYPE}")String GRANT_TYPE) {
|
|
|
+ Constant.GRANT_TYPE = GRANT_TYPE;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getJSAPI_TICKET_TYPE(@Value("${wechat.JSAPI_TICKET_TYPE}")String JSAPI_TICKET_TYPE) {
|
|
|
+ Constant.JSAPI_TICKET_TYPE = JSAPI_TICKET_TYPE;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getACCESS_TOKEN_URL(@Value("${wechat.ACCESS_TOKEN_URL}")String ACCESS_TOKEN_URL) {
|
|
|
+ Constant.ACCESS_TOKEN_URL = ACCESS_TOKEN_URL;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getJSAPI_TICKET_URL(@Value("${wechat.JSAPI_TICKET_URL}")String JSAPI_TICKET_URL) {
|
|
|
+ Constant.JSAPI_TICKET_URL = JSAPI_TICKET_URL;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getJSCODE2SESSION(@Value("${wechat.JSCODE2SESSION}")String JSCODE2SESSION) {
|
|
|
+ Constant.JSCODE2SESSION = JSCODE2SESSION;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getSENDMESSAGEURL(@Value("${wechat.SENDMESSAGEURL}")String SENDMESSAGEURL) {
|
|
|
+ Constant.SENDMESSAGEURL = SENDMESSAGEURL;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getOrderTemplateid(@Value("${wechat.OrderTemplateid}")String ORDERTEMPLATEID) {
|
|
|
+ Constant.ORDERTEMPLATEID = ORDERTEMPLATEID;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getBookingTemplateid(@Value("${wechat.BookingTemplateid}")String BOOKINGTEMPLATEID) {
|
|
|
+ Constant.BOOKINGTEMPLATEID = BOOKINGTEMPLATEID;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getMINIAPPID(@Value("${wechat.MINIAPPID}")String MINIAPPID) {
|
|
|
+ Constant.MINIAPPID = MINIAPPID;
|
|
|
+ }
|
|
|
+ @Autowired(required = false)
|
|
|
+ public void getMINIAPPSECRET(@Value("${wechat.MINIAPPSECRET}")String MINIAPPSECRET) {
|
|
|
+ Constant.MINIAPPSECRET = MINIAPPSECRET;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|