|
@@ -1,34 +1,26 @@
|
|
|
-//package com.gxzc.zen.api.util
|
|
|
-//
|
|
|
-//import com.gxzc.zen.api.sys.model.SysParam
|
|
|
-//import com.gxzc.zen.api.sys.service.ISysParamService
|
|
|
-//import com.gxzc.zen.common.util.SpringContextHolder
|
|
|
-//
|
|
|
-///**
|
|
|
-// * 系统参数工具类
|
|
|
-// * 缓存中获取
|
|
|
-// * @author NorthLan
|
|
|
-// * @date 2018/3/19
|
|
|
-// * @url https://noahlan.com
|
|
|
-// */
|
|
|
-//object SysParamUtil {
|
|
|
-// private var sysParamService: ISysParamService? = SpringContextHolder.getBean(ISysParamService::class.java)
|
|
|
-// get() {
|
|
|
-// if (field == null) {
|
|
|
-// field = SpringContextHolder.getBean(ISysParamService::class.java)
|
|
|
-// }
|
|
|
-// return field
|
|
|
-// }
|
|
|
-//
|
|
|
-// fun getAllList(): MutableList<SysParam> {
|
|
|
-// return sysParamService!!.getListCacheable()
|
|
|
-// }
|
|
|
-//
|
|
|
-// fun getListByKey(key: String): MutableList<SysParam> {
|
|
|
-// return sysParamService!!.getListByKey(key)
|
|
|
-// }
|
|
|
-//
|
|
|
-// fun getOne(key: String, value: String?, sort: Int?): SysParam? {
|
|
|
-// return sysParamService!!.getOneByKey(key, value, sort)
|
|
|
-// }
|
|
|
-//}
|
|
|
+package com.gxzc.zen.api.util
|
|
|
+
|
|
|
+import com.gxzc.zen.api.sys.model.SysParam
|
|
|
+import com.gxzc.zen.common.util.SpringContextHolder
|
|
|
+import com.gxzc.zen.rpc.api.sys.RParamService
|
|
|
+
|
|
|
+/**
|
|
|
+ * 系统参数工具类
|
|
|
+ * 缓存中获取
|
|
|
+ * @author NorthLan
|
|
|
+ * @date 2018/3/19
|
|
|
+ * @url https://noahlan.com
|
|
|
+ */
|
|
|
+object SysParamUtil {
|
|
|
+ private var sysParamService: RParamService? = null
|
|
|
+ get() {
|
|
|
+ if (field == null) {
|
|
|
+ field = SpringContextHolder.getBean(RParamService::class.java)
|
|
|
+ }
|
|
|
+ return field
|
|
|
+ }
|
|
|
+
|
|
|
+ fun getByKey(key: String): SysParam? {
|
|
|
+ return sysParamService!!.getByKey(key)
|
|
|
+ }
|
|
|
+}
|