/**
* 定义需要在用户登录的时候获取到本地的数据字典类别
*/
var clsCodes = {clsCodes :
[BOOL,
STATUS,
USER_TYPE,
REPORT_STATUS
]
};
/**
* 获取数据字典到本地
*/
var dicts;
function getDicts() {
$.post(getContextPath() + /api/sys/getDictList,
clsCodes,
function(resultBean, status, xhRequest) {
if (resultBean.data != undefined) {
dicts = resultBean.data;
}
},
'json');
}
/**
* 根据多个分类编号获取多个字典集合
* @param clsCodes
* @return {{clsCode : {code1:name1,code2:name2...}}, ...}
*/
@SuppressWarnings({ unchecked, rawtypes })
@ResponseBody
@RequestMapping(getDictList)
public ResultBean getDictList(@RequestParam(value = clsCodes[], required = true) String[] clsCodes) {
ResultBean rb = new ResultBean();
Map<string, string="">> dictCache = (Map<string, string="">>) CacheManager.getInstance().get(CacheConstants.DICT);
Map dictMap = new LinkedHashMap<>(); //使用LinkedHashMap保证顺序
if(dictCache != null){
for(String clsCode: clsCodes){
dictMap.put(clsCode, dictCache.get(clsCode));
}
}else{
rb.setMessage(缓存中拿不到字典信息!);
rb.setSuccess(false);
}
rb.setData(dictMap);
return rb;
}</string,></string,>
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有