This commit is contained in:
lu7213 committed 2025-12-02 23:07:47 +08:00
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();
}
}