树DEMO 功能完成

yun-zuoyi
wei.peng 6 years ago
parent e89057e452
commit 540b1faca0

@ -44,7 +44,7 @@ public class SysMemTreeController {
private SysRefUserPositionRepository refUserPositionRDao;
/**
* -1
* ID
* @return
*/
@GetMapping(value="/position/root")
@ -63,6 +63,11 @@ public class SysMemTreeController {
}
}
/**
* ID
* @param userId
* @return
*/
@GetMapping(value="/position/userId")
@ApiOperation(value="查询岗位树",notes="通过部门主键获取岗位树,-1为根节点")
public ResultBean listSysPositionParentId(Long userId) {
@ -81,6 +86,11 @@ public class SysMemTreeController {
}
}
/**
*
* @param ids
* @return
*/
@GetMapping(value="/position/ids")
@ApiOperation(value="查询岗位树",notes="通过部门主键获取岗位树,-1为根节点")
public ResultBean listSysPositionParentId(Long[] ids) {
@ -98,6 +108,11 @@ public class SysMemTreeController {
}
}
/**
* ID ,
* @param id
* @return
*/
@GetMapping(value="/position/id")
@ApiOperation(value="查询岗位树",notes="通过部门主键获取岗位树,-1为根节点")
public ResultBean listSysPositionById(Long id) {
@ -115,6 +130,11 @@ public class SysMemTreeController {
}
}
/**
* ID
* @param id
* @return
*/
@GetMapping(value="/position/child")
@ApiOperation(value="查询岗位树",notes="通过部门主键获取岗位树,-1为根节点")
public ResultBean listSysPositionChild(Long id) {

@ -64,6 +64,7 @@ public class CoreMemTreeService implements ICoreMemTreeService {
}else{
List<SysPosition> childList = packTreeSysPositionByIds(position.getChildList(), ids);
if(ids.contains(position.getId()) || childList != null && childList.size() > 0){
position.setChildList(childList);
result.add(position);
}
}

Loading…
Cancel
Save