@Component public class UserParamCache extends Object
构造器和说明 |
---|
UserParamCache() |
限定符和类型 | 方法和说明 |
---|---|
void |
delete(Object userId)
根据用户ID,删除所有个性化参数
|
void |
delete(Object userId,
String name)
根据用户ID和Key,删除所有个性化参数
|
Boolean |
getBoolean(Object userId,
String key)
获取Boolean类型的值
|
String |
getDate(Object userId,
String key)
获取日期
|
String |
getDateTime(Object userId,
String key)
获取日期时间
|
Double |
getDouble(Object userId,
String key)
获取Double类型的值
|
Float |
getFloat(Object userId,
String key)
获取Float类型的值
|
Integer |
getInt(Object userId,
String key)
获取Integer类型的值
|
com.alibaba.fastjson.JSONObject |
getJson(Object userId,
String key)
获取JSONObject类型的值
|
List<Object> |
getList(Object userId,
String key)
获取List类型的值
|
Map<String,Object> |
getMap(Object userId,
String key)
获取Map类型的值
|
Object |
getObject(Object userId,
String name)
获取Object类型的值
|
String |
getString(Object userId,
String key)
获取String类型的值
|
void |
reloadAll()
初始化缓存
|
void |
update(Object userId,
String name,
Object value)
更新缓存
|
public Object getObject(Object userId, String name) throws SQLException
userId
- 用户IDname
- 参数名SQLException
public String getString(Object userId, String key) throws SQLException
userId
- 用户IDkey
- 参数名SQLException
public Integer getInt(Object userId, String key) throws SQLException
userId
- 用户IDkey
- 参数名SQLException
public Double getDouble(Object userId, String key) throws SQLException
userId
- 用户IDkey
- 参数名SQLException
public Float getFloat(Object userId, String key) throws SQLException
userId
- 用户IDkey
- 参数名SQLException
public String getDate(Object userId, String key) throws SQLException
userId
- 用户IDkey
- 参数名SQLException
public String getDateTime(Object userId, String key) throws SQLException
userId
- 用户IDkey
- 参数名SQLException
public com.alibaba.fastjson.JSONObject getJson(Object userId, String key) throws SQLException
userId
- 用户IDkey
- 参数名SQLException
public Map<String,Object> getMap(Object userId, String key) throws SQLException
userId
- 用户IDkey
- 参数名SQLException
public List<Object> getList(Object userId, String key) throws SQLException
userId
- 用户IDkey
- 参数名SQLException
public Boolean getBoolean(Object userId, String key) throws SQLException
userId
- 用户IDkey
- 参数名SQLException
public void delete(Object userId) throws SQLException
userId
- 用户IDSQLException
public void delete(Object userId, String name) throws SQLException
userId
- 用户IDname
- 参数名SQLException
public void reloadAll() throws SQLException
SQLException
public void update(Object userId, String name, Object value) throws SQLException
userId
- name
- 参数名value
- 参数值SQLException
- 参数描述Copyright © 2025. All rights reserved.