| | |
| | | |
| | | return model; |
| | | } |
| | | |
| | | |
| | | //页面定制可以看到的子菜单和子模块 |
| | | @PutMapping("/") |
| | | @ApiOperation(notes = "",value="页面定制可以看到的子菜单和子模块") |
| | | @ApiOperation(notes = "[{ \"num\": 78, \"subflag\": 0, \"subenable\": 0 }]",value="页面定制可以看到的子菜单和子模块") |
| | | public ServiceModel update(@RequestBody List<Custompage> list) { |
| | | // List<Custompage> list = ActionUtil.getGson().fromJson(result, new TypeToken<ArrayList<Custompage>>(){}.getType() ); |
| | | ServiceModel model=service.update(list); |
| | | |
| | | |
| | | ServiceModel model = service.update(list); |
| | | return model; |
| | | } |
| | | |
| | | |
| | | //页面定制修改主导航下子页面的顺序 |
| | | @PutMapping("order") |
| | | @ApiOperation(notes = "",value="页面定制修改主导航下子页面的顺序") |
| | | @ApiOperation(notes = "[{ \"num\": 78, \"page_order\": 0 }]",value="页面定制修改主导航下子页面的顺序") |
| | | public ServiceModel updateOrder(@RequestBody List<Custompage> list) { |
| | | // List<Custompage> list = ActionUtil.getGson().fromJson(result, new TypeToken<ArrayList<Custompage>>(){}.getType() ); |
| | | ServiceModel model=service.updateOrder(list); |
| | |
| | | } |
| | | |
| | | @DeleteMapping("/") |
| | | @ApiOperation(notes = "",value="删除") |
| | | public ServiceModel delete(@RequestBody Custompage cust) { |
| | | ServiceModel model=service.delete(cust); |
| | | |
| | | return model; |
| | | @ApiOperation(notes = "未完成功能",value="删除") |
| | | public ServiceModel delete() { |
| | | // Custompage cust = new Custompage(); |
| | | // ServiceModel model = service.delete(cust); |
| | | |
| | | return new ServiceModel(); |
| | | } |
| | | |
| | | @GetMapping("byCondition") |
| | | @PostMapping("byCondition") |
| | | @ApiOperation(notes = "",value="页面查询子模块/子菜单") |
| | | public ServiceModel serchByCondition(@RequestBody Custompage cust){ |
| | | // cust=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result,Custompage.class); |
| | | ServiceModel model=service.serchByCondition(cust); |
| | | |
| | | //System.out.println(result); |
| | | public ServiceModel serchByCondition(@RequestParam String navigate,@RequestParam Integer subjudge) { |
| | | Custompage cust = new Custompage(); |
| | | cust.setNavigate(navigate); |
| | | cust.setSubjudge(subjudge); |
| | | ServiceModel model = service.serchByCondition(cust); |
| | | |
| | | return model; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | //根据主导航的名字查询所有的子页面 |
| | | @GetMapping("byInfo") |
| | | @PostMapping("byInfo") |
| | | @ApiOperation(notes = "",value="主导航的名字查询所有的子页") |
| | | public ServiceModel serchByInfo(@RequestBody Custompage cust){ |
| | | // cust=ActionUtil.getGson("yyyy-MM-dd HH:mm:ss").fromJson(result,Custompage.class); |
| | | public ServiceModel serchByInfo(@RequestParam String navigate){ |
| | | // "navigate": "Monitor_data" |
| | | Custompage cust = new Custompage(); |
| | | cust.setNavigate(navigate); |
| | | ServiceModel model=service.serchByInfo(cust); |
| | | |
| | | return model; |
| | | } |
| | | |
| | | |
| | | //将导航对象数组存入session |
| | | @PostMapping("custom2Session") |
| | | @ApiOperation(notes = "",value="将导航对象数组存入session") |
| | | public static void setCust(ServiceModel obj){ |
| | | if(obj!=null){ |
| | | ServiceModel model=(ServiceModel) obj; |
| | | ActionUtil.getSession().setAttribute("custompages", model.getData()); |
| | | ActionUtil.getSession().setAttribute("custompages_json", ActionUtil.tojson(model.getData())); |
| | | } |
| | | } |
| | | @ApiOperation(notes = "参数:{ \"code\": 0, \"msg\": \"\", \"data\": {} } 返回值类型void",value="将导航对象数组存入session") |
| | | public static void setCust(ServiceModel obj) { |
| | | if (obj != null) { |
| | | ServiceModel model = (ServiceModel) obj; |
| | | ActionUtil.getSession().setAttribute("custompages", model.getData()); |
| | | ActionUtil.getSession().setAttribute("custompages_json", ActionUtil.tojson(model.getData())); |
| | | } |
| | | } |
| | | |
| | | } |