mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-26 08:55:07 +08:00
开始迁移字典类型模块
This commit is contained in:
@ -0,0 +1,35 @@
|
||||
package cn.iocoder.dashboard.framework.dict.core.service;
|
||||
|
||||
import cn.iocoder.dashboard.modules.system.dal.mysql.dataobject.dict.SysDictDataDO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface DictDataFrameworkService {
|
||||
|
||||
/**
|
||||
* 获得指定的字典数据,从缓存中
|
||||
*
|
||||
* @param type 字典类型
|
||||
* @param value 字典数据值
|
||||
* @return 字典数据
|
||||
*/
|
||||
SysDictDataDO getDictDataFromCache(String type, String value);
|
||||
|
||||
/**
|
||||
* 解析获得指定的字典数据,从缓存中
|
||||
*
|
||||
* @param type 字典类型
|
||||
* @param label 字典数据标签
|
||||
* @return 字典数据
|
||||
*/
|
||||
SysDictDataDO parseDictDataFromCache(String type, String label);
|
||||
|
||||
/**
|
||||
* 获得指定类型的字典数据,从缓存中
|
||||
*
|
||||
* @param type 字典类型
|
||||
* @return 字典数据列表
|
||||
*/
|
||||
List<SysDictDataDO> listDictDatasFromCache(String type);
|
||||
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package cn.iocoder.dashboard.framework.dict.core.util;
|
||||
|
||||
import cn.iocoder.dashboard.framework.dict.core.service.DictDataFrameworkService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 字典工具类
|
||||
*/
|
||||
@Slf4j
|
||||
public class DictUtils {
|
||||
|
||||
private static DictDataFrameworkService service;
|
||||
|
||||
public static void init(DictDataFrameworkService service) {
|
||||
DictUtils.service = service;
|
||||
log.info("[init][初始化 DictUtils 成功]");
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
/**
|
||||
* 字典数据模块
|
||||
*
|
||||
* 通过将字典缓存在内存中,保证性能
|
||||
*/
|
||||
package cn.iocoder.dashboard.framework.dict;
|
Reference in New Issue
Block a user