| | |
| | | * @return |
| | | */ |
| | | public static String getMenuUrl(Integer type,String token){ |
| | | String componentId = HKConstants.MenuPageId.componentIds[0]; |
| | | String menuId = HKConstants.MenuPageId.afzx; |
| | | if(Constants.equalsInteger(type,Constants.ONE)){ |
| | | menuId = HKConstants.MenuPageId.xkzx; |
| | |
| | | menuId = HKConstants.MenuPageId.jsc; |
| | | }else if(Constants.equalsInteger(type,Constants.FOUR)){ |
| | | menuId = HKConstants.MenuPageId.kqgzt; |
| | | }else if(Constants.equalsInteger(type,Constants.FIVE)){ |
| | | componentId = HKConstants.MenuPageId.componentIds[1]; |
| | | menuId = HKConstants.MenuPageId.kqdbcl; |
| | | } |
| | | log.info("【海康获取工作台菜单免密登陆调整地址】================开始====menuId:"+menuId+"==token:"+token); |
| | | try { |
| | | String res = HKTools.getMenuUrl(menuId,token); |
| | | String res = HKTools.getMenuUrl(componentId,menuId,token); |
| | | return res; |
| | | }catch (Exception e){ |
| | | log.error("【海康获取工作台菜单免密登陆调整地址】================失败====:\n"+ e.getMessage()); |
| | |
| | | Class<?> clazz = obj.getClass(); |
| | | for (Field field : clazz.getDeclaredFields()) { |
| | | field.setAccessible(true); // 使得私有字段也可以访问 |
| | | map.put(field.getName(), (String) field.get(obj)); |
| | | if(field.get(obj)!=null){ |
| | | map.put(field.getName(), String.valueOf( field.get(obj))); |
| | | } |
| | | } |
| | | return map; |
| | | } |