Commit bd7bf1f3 authored by tangwei's avatar tangwei

修改接口

parent 14fc1a75
......@@ -113,8 +113,8 @@ public class AlertFormController extends BaseController {
@ApiOperation(httpMethod = "GET", value = "根据表态类型code查询表单数据项", notes = "根据表态类型code查询表单数据项")
public ResponseModel selectFormdItem(HttpServletRequest request, @PathVariable String code){
List<AlertFormVo> list=new ArrayList<AlertFormVo>();
if(redisUtils.hasKey(RedisKey.FORM+code)){
Object obj= redisUtils.get(RedisKey.FORM+code);
if(redisUtils.hasKey(RedisKey.FORM_CODE+code)){
Object obj= redisUtils.get(RedisKey.FORM_CODE+code);
return CommonResponseUtil.success(obj);
}else{
QueryWrapper queryWrapper = new QueryWrapper<>();
......@@ -122,7 +122,7 @@ public class AlertFormController extends BaseController {
//警情动态表单数据
List<AlertForm> alertFormValue = iAlertFormService.list(queryWrapper);
list= FormList.getFormlist(alertFormValue);
redisUtils.set(RedisKey.FORM+code,JSON.toJSON(list),86400);
redisUtils.set(RedisKey.FORM_CODE+code,JSON.toJSON(list),86400);
return CommonResponseUtil.success(list);
}
}
......
......@@ -154,13 +154,13 @@ public class DataDictionaryController extends BaseController {
queryWrapper.eq("type", type);
queryWrapper.orderByAsc("sort_num");
if(redisUtils.hasKey(RedisKey.DATADICTIONARY+type)){
Object obj= redisUtils.get(RedisKey.DATADICTIONARY+type);
if(redisUtils.hasKey(RedisKey.DATA_DICTIONARY_CODE+type)){
Object obj= redisUtils.get(RedisKey.DATA_DICTIONARY_CODE+type);
return CommonResponseUtil.success(obj);
}else{
Collection<DataDictionary> list=iDataDictionaryService.list(queryWrapper);
List<Menu> menus =TreeParser.getTree(null, list, DataDictionary.class.getName(),"getCode",0, "getName", "getParent");
redisUtils.set(RedisKey.DATADICTIONARY+type, JSON.toJSON(menus),86400);
redisUtils.set(RedisKey.DATA_DICTIONARY_CODE+type, JSON.toJSON(menus),86400);
return CommonResponseUtil.success(menus);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment