Commit 5bec813d by 阳浪

登录添加埋点

parent 254a7b58
......@@ -20,8 +20,8 @@ public interface DictionaryFeignClients {
@GetMapping(value = "/dictionary/insertBySearchName")
boolean insertBySearchName(@RequestParam("searchName") String searchName);
@GetMapping(value = "/dictionary/child/listByCode")
Response<List<Dictionary>> listChildDictionary(@RequestParam(name = "code", defaultValue = "0") String code,
@GetMapping(value = "/dictionary/child/listByCode1")
List<Dictionary> listChildDictionary(@RequestParam(name = "code", defaultValue = "0") String code,
@RequestParam(name = "includeParent", defaultValue = "false") Boolean includeParent,
@RequestParam(name = "layer", defaultValue = "1") Integer layer);
}
......@@ -366,6 +366,36 @@ public class DictionaryController {
}
/**
* 查询当前数据字典下的子节点
*
* @param code 要查找的对象的父节点
* @param includeParent 是否包含父节点(id对应的自身节点),true:包含,false:不包含,默认false
* @param layer 以id对应对象为第0层,查询多少层子节点,默认1层
* @return
*/
@ApiOperation(value = "数据字典", notes = "通过父类code查询当前数据字典下的子节点", response = Response.class)
@GetMapping(value = "/child/listByCode1")
public List<Dictionary> listChildDictionary1(
@ApiParam("要查找的对象的父节点") @RequestParam(name = "code", defaultValue = "0") String code,
@ApiParam("是否包含父节点(id对应的自身节点),</br>true:包含,</br>false:不包含,默认false") @RequestParam(name = "includeParent", defaultValue = "false") Boolean includeParent,
@ApiParam("以id对应对象为第0层,查询多少层子节点,默认1层") @RequestParam(name = "layer", defaultValue = "1") Integer layer
) {
try {
com.yizhi.system.application.domain.Dictionary dictionary = dictionaryService.findByCode(code);
if(dictionary==null){
return Lists.newArrayList();
}
List<com.yizhi.system.application.domain.Dictionary> result = dictionaryService.listChildren(dictionary.getId(), includeParent, layer);
List<Dictionary> list = domainConverter.toDOList(result, Dictionary.class);
return list;
} catch (Exception e) {
LOG.error("", e);
return Lists.newArrayList();
}
}
/**
* 检查该字典下是否有子数据
*
......
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