111
This commit is contained in:
1 parent
81eca8933a
commit
345f906c35
540 files changed
+494222
-90
No files matched your search
@@ -0,0 +1,75 @@
|
||||
package com.luqj.common.domain;
|
||||
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class RedisKey {
|
||||
private StringBuffer stringBuffer = new StringBuffer("");
|
||||
|
||||
public RedisKey() {
|
||||
}
|
||||
|
||||
public RedisKey(String key) {
|
||||
stringBuffer = new StringBuffer(key);
|
||||
}
|
||||
|
||||
public RedisKey add(String key) {
|
||||
if (StringUtils.isNotBlank(key)) {
|
||||
stringBuffer.append(key).append("_");
|
||||
} else {
|
||||
stringBuffer.append("NULL_");
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public RedisKey add(BigDecimal key) {
|
||||
if (key != null) {
|
||||
stringBuffer.append(key).append("_");
|
||||
} else {
|
||||
stringBuffer.append("NULL_");
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public RedisKey add(Boolean key) {
|
||||
if (key != null) {
|
||||
stringBuffer.append(key).append("_");
|
||||
} else {
|
||||
stringBuffer.append("NULL_");
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public RedisKey add(Long key) {
|
||||
if (key != null) {
|
||||
stringBuffer.append(key).append("_");
|
||||
} else {
|
||||
stringBuffer.append("NULL_");
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public RedisKey add(Date key) {
|
||||
if (key != null) {
|
||||
stringBuffer.append(key.getTime()).append("_");
|
||||
} else {
|
||||
stringBuffer.append("_NULL");
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public RedisKey add(Integer key) {
|
||||
if (key != null) {
|
||||
stringBuffer.append(key).append("_");
|
||||
} else {
|
||||
stringBuffer.append("_NULL");
|
||||
}
|
||||
return this;
|
||||
}
|
||||
|
||||
public String key() {
|
||||
return this.stringBuffer.toString();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user