cn.jiangzeyin.entity.defaults.SystemParameter Maven / Gradle / Ivy
package cn.jiangzeyin.entity.defaults;
import cn.jiangzeyin.entity.base.BaseEntity;
import cn.jiangzeyin.util.util.StringUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
/**
* 系统参数
*
* @author jiangzeyin
*/
public class SystemParameter extends BaseEntity {
private String type;
private String value;
private int userId;
private String siteId;
public String getSiteId() {
return "";//EntitySystemCache.getInstance().parseSiteName(siteId);
}
public String getSiteIdValue() {
return siteId;
}
public void setSiteId(String siteId) {
this.siteId = siteId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getValue() {
return StringUtil.compileHtml(this.value);
}
/**
* @param def def
* @return v
* @author jiangzeyin
*/
public String getValue(String def) {
String value = StringUtil.compileHtml(this.value);
if (StringUtil.isEmpty(value))
return def;
return value;
}
public void setValue(String value) {
this.value = value;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
/**
* 转换为json
*
* @return json
* @author jiangzeyin
*/
public JSONObject toJSONObject() {
return JSON.parseObject(getValue());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy