Commit ffd0d397 by zhengxj

finish 机构搜索 on 20190122 by zhengxj

git-svn-id: svn://192.168.3.233/frms/code/car-service/trunk/car-service@16918 aeb6102e-e053-11e5-9fec-f9ebc45caf4b
1 parent e9be6e2a
......@@ -72,13 +72,13 @@ public class OrganizationController extends BaseController{
if (menuStatus == null) {
// 根据id递归查询子菜单
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg(),
organizationService.findAllRecursion(id));
organizationService.findOrgById(id));
} else if (id != null) {
// // 根据id和状态递归查询子菜单
map.put("menu_status", menuStatus);
map.put("id", id);
return new ResultObject(ResultCodeEnum.SUCCESS.getCode(), ResultCodeEnum.SUCCESS.getMsg(),
organizationService.findMenuByParams(map));
organizationService.findOrgsByParams(map));
}
}
// 根据名字和状态搜索
......
......@@ -33,6 +33,6 @@ public interface SysMenuMapper {
List<SysMenu> findMenuByParams(Map map);
SysMenu findMenuByParentId(@Param("id")Integer id);
List<SysMenu> findMenuByParentId(@Param("id")Integer id);
}
\ No newline at end of file
......@@ -2,6 +2,7 @@ package com.glsx.usercenter.mapper;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.annotations.Param;
......@@ -29,4 +30,9 @@ public interface SysOrganizationMapper {
int updateByPrimaryKeySelective(SysOrganization record);
int updateByPrimaryKey(SysOrganization record);
List<SysOrganization> findOrgByParams(Map map);
List<SysOrganization> findOrgByParentId(@Param("id")Integer id);
}
\ No newline at end of file
package com.glsx.usercenter.pojo.menu;
import java.util.Date;
import java.util.List;
public class SysOrganization {
private Integer id;
......@@ -28,8 +29,21 @@ public class SysOrganization {
private Byte label;
private String orgGroup;
private List<SysOrganization> children;
public Integer getId() {
public List<SysOrganization> getChildren() {
return children;
}
public void setChildren(List<SysOrganization> children) {
this.children = children;
}
public Integer getId() {
return id;
}
......
......@@ -37,6 +37,6 @@ public interface ISysMenuService {
List<SysMenu> findMenuByParams(Map map);
SysMenu findAllRecursion(Integer id);
List<SysMenu> findAllRecursion(Integer id);
}
......@@ -29,8 +29,8 @@ public interface ISysOrganizationService {
int updateByPrimaryKeySelective(SysOrganization record);
List<SysOrganization> findMenuByParams(Map map);
List<SysOrganization> findOrgsByParams(Map map);
SysOrganization findAllRecursion(Integer id);
List<SysOrganization> findOrgById(Integer id);
}
......@@ -170,11 +170,11 @@ public class SysMenuServiceImpl implements ISysMenuService {
/**
*
* 根据id或者状态搜索
*/
@Override
public List<SysMenu> findMenuByParams(Map map) {
// TODO Auto-generated method stub
return menuDao.findMenuByParams( map);
}
......@@ -182,7 +182,7 @@ public class SysMenuServiceImpl implements ISysMenuService {
* 根据id查询其所有子孙节点
*/
@Override
public SysMenu findAllRecursion(Integer id) {
public List<SysMenu> findAllRecursion(Integer id) {
return menuDao.findMenuByParentId( id);
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!