优化
This commit is contained in:
@@ -27,8 +27,8 @@ interface BaseBook : RuleDataInterface {
|
|||||||
putVariable("custom", value)
|
putVariable("custom", value)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getCustomVariable(): String? {
|
fun getCustomVariable(): String {
|
||||||
return getVariable("custom")
|
return getVariable("custom") ?: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun putBigVariable(key: String, value: String?) {
|
override fun putBigVariable(key: String, value: String?) {
|
||||||
|
|||||||
@@ -196,8 +196,8 @@ interface BaseSource : JsExtensions {
|
|||||||
/**
|
/**
|
||||||
* 获取自定义变量
|
* 获取自定义变量
|
||||||
*/
|
*/
|
||||||
fun getVariable(): String? {
|
fun getVariable(): String {
|
||||||
return CacheManager.get("sourceVariable_${getKey()}")
|
return CacheManager.get("sourceVariable_${getKey()}") ?: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,8 +24,8 @@ interface RuleDataInterface {
|
|||||||
|
|
||||||
fun putBigVariable(key: String, value: String?)
|
fun putBigVariable(key: String, value: String?)
|
||||||
|
|
||||||
fun getVariable(key: String): String? {
|
fun getVariable(key: String): String {
|
||||||
return variableMap[key] ?: getBigVariable(key)
|
return variableMap[key] ?: getBigVariable(key) ?: ""
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getBigVariable(key: String): String?
|
fun getBigVariable(key: String): String?
|
||||||
|
|||||||
Reference in New Issue
Block a user