|
@@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.PathVariable;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
|
|
import com.github.pagehelper.PageHelper;
|
|
import com.github.pagehelper.PageHelper;
|
|
@@ -99,10 +100,10 @@ public class MenuController extends BaseController {
|
|
|
*/
|
|
*/
|
|
|
|
|
|
|
|
@RequestMapping(value = "/get/all",method=RequestMethod.GET,produces="application/json;charset=UTF-8")
|
|
@RequestMapping(value = "/get/all",method=RequestMethod.GET,produces="application/json;charset=UTF-8")
|
|
|
- public String getAllMenu(HttpServletRequest request){
|
|
|
|
|
|
|
+ public String getAllMenu(HttpServletRequest request,@RequestParam(required=false) Integer judge){
|
|
|
try{
|
|
try{
|
|
|
User u = getCurrentUser(request);
|
|
User u = getCurrentUser(request);
|
|
|
- List<Menu> menus= menuService.getMenus(new Menu(),u);
|
|
|
|
|
|
|
+ List<Menu> menus= menuService.getMenus(new Menu(),u,judge);
|
|
|
return returnResult(0, "获取成功", menus);
|
|
return returnResult(0, "获取成功", menus);
|
|
|
}catch(Exception e){
|
|
}catch(Exception e){
|
|
|
throw new BusinessException(20001);
|
|
throw new BusinessException(20001);
|
|
@@ -130,7 +131,7 @@ public class MenuController extends BaseController {
|
|
|
Menu menu = new Menu();
|
|
Menu menu = new Menu();
|
|
|
menu.setId(menuid);
|
|
menu.setId(menuid);
|
|
|
|
|
|
|
|
- List<Menu> menus = menuService.getMenus(menu,u);
|
|
|
|
|
|
|
+ List<Menu> menus = menuService.getMenus(menu,u,0);
|
|
|
if(menus==null||menus.size()<1 ) throw new BusinessException(20001);
|
|
if(menus==null||menus.size()<1 ) throw new BusinessException(20001);
|
|
|
return returnResult(0, "获取成功", menus.get(0));
|
|
return returnResult(0, "获取成功", menus.get(0));
|
|
|
}catch(Exception e){
|
|
}catch(Exception e){
|