|
@@ -28,21 +28,20 @@ public class DictCtrl {
|
|
|
|
|
|
/**
|
|
/**
|
|
* 通过字典类型dictTypes将字典数据刷新至缓存,当dictTypes值为all时,将刷新所有字典。
|
|
* 通过字典类型dictTypes将字典数据刷新至缓存,当dictTypes值为all时,将刷新所有字典。
|
|
|
|
+ *
|
|
* @param param
|
|
* @param param
|
|
* @return
|
|
* @return
|
|
- * @throws JsonProcessingException
|
|
|
|
*/
|
|
*/
|
|
@RequestMapping("/refreshDictsByTypes")
|
|
@RequestMapping("/refreshDictsByTypes")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
@PreAuthorize("@AuthorityCheck.admin()")
|
|
@PreAuthorize("@AuthorityCheck.admin()")
|
|
- public ResponseBodyVO refreshDictsByTypes(@RequestBody @Validated DictParam param) throws JsonProcessingException {
|
|
|
|
- ResponseBodyVO<String> response = new ResponseBodyVO<String>(ResponseBodyVO.Response.SUCCESS);
|
|
|
|
- response.setInfo(dictService.refreshDicts(param));
|
|
|
|
- return response;
|
|
|
|
|
|
+ public ResponseBodyVO<String> refreshDictsByTypes(@RequestBody @Validated DictParam param) {
|
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, dictService.refreshDicts(param));
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 通过字典类型dictTypes从缓存中查询字典数据lists
|
|
* 通过字典类型dictTypes从缓存中查询字典数据lists
|
|
|
|
+ *
|
|
* @param param
|
|
* @param param
|
|
* @return
|
|
* @return
|
|
* @throws JsonProcessingException
|
|
* @throws JsonProcessingException
|
|
@@ -50,13 +49,14 @@ public class DictCtrl {
|
|
@RequestMapping("/getDictListsByTypes")
|
|
@RequestMapping("/getDictListsByTypes")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public ResponseBodyVO getDictListsByTypes(@RequestBody @Validated DictParam param) throws JsonProcessingException {
|
|
public ResponseBodyVO getDictListsByTypes(@RequestBody @Validated DictParam param) throws JsonProcessingException {
|
|
- ResponseBodyVO<Map<String, List<DictVO>>> response = new ResponseBodyVO<Map<String,List<DictVO>>>(ResponseBodyVO.Response.SUCCESS);
|
|
|
|
|
|
+ ResponseBodyVO<Map<String, List<DictVO>>> response = new ResponseBodyVO<Map<String, List<DictVO>>>(ResponseBodyVO.Response.SUCCESS);
|
|
response.setInfo(dictService.getDictListsByTypes(param));
|
|
response.setInfo(dictService.getDictListsByTypes(param));
|
|
return response;
|
|
return response;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 通过字典类型dictTypes从缓存中查询字典数据trees
|
|
* 通过字典类型dictTypes从缓存中查询字典数据trees
|
|
|
|
+ *
|
|
* @param param
|
|
* @param param
|
|
* @return
|
|
* @return
|
|
* @throws JsonProcessingException
|
|
* @throws JsonProcessingException
|
|
@@ -64,13 +64,14 @@ public class DictCtrl {
|
|
@RequestMapping("/getDictTreesByTypes")
|
|
@RequestMapping("/getDictTreesByTypes")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public ResponseBodyVO getDictTreesByTypes(@RequestBody @Validated DictParam param) throws JsonProcessingException {
|
|
public ResponseBodyVO getDictTreesByTypes(@RequestBody @Validated DictParam param) throws JsonProcessingException {
|
|
- ResponseBodyVO<Map<String, List<DictVO>>> response = new ResponseBodyVO<Map<String,List<DictVO>>>(ResponseBodyVO.Response.SUCCESS);
|
|
|
|
|
|
+ ResponseBodyVO<Map<String, List<DictVO>>> response = new ResponseBodyVO<Map<String, List<DictVO>>>(ResponseBodyVO.Response.SUCCESS);
|
|
response.setInfo(dictService.getDictTreesByTypes(param));
|
|
response.setInfo(dictService.getDictTreesByTypes(param));
|
|
return response;
|
|
return response;
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
* 通过字典类型dictTypes从缓存中查询字典数据maps
|
|
* 通过字典类型dictTypes从缓存中查询字典数据maps
|
|
|
|
+ *
|
|
* @param param
|
|
* @param param
|
|
* @return
|
|
* @return
|
|
* @throws JsonProcessingException
|
|
* @throws JsonProcessingException
|
|
@@ -78,7 +79,7 @@ public class DictCtrl {
|
|
@RequestMapping("/getDictMapsByTypes")
|
|
@RequestMapping("/getDictMapsByTypes")
|
|
@ResponseBody
|
|
@ResponseBody
|
|
public ResponseBodyVO getDictMapsByTypes(@RequestBody @Validated DictParam param) throws JsonProcessingException {
|
|
public ResponseBodyVO getDictMapsByTypes(@RequestBody @Validated DictParam param) throws JsonProcessingException {
|
|
- ResponseBodyVO<Map<String,Map<String,String>>> response = new ResponseBodyVO<Map<String,Map<String,String>>>(ResponseBodyVO.Response.SUCCESS);
|
|
|
|
|
|
+ ResponseBodyVO<Map<String, Map<String, String>>> response = new ResponseBodyVO<Map<String, Map<String, String>>>(ResponseBodyVO.Response.SUCCESS);
|
|
response.setInfo(dictService.getDictMapsByTypes(param));
|
|
response.setInfo(dictService.getDictMapsByTypes(param));
|
|
return response;
|
|
return response;
|
|
}
|
|
}
|