| | |
| | | } |
| | | |
| | | if (!hasKey(addMenuView, "mId")) { |
| | | addMenuView.put("gId",viewMenuGroupInfo.getString("gId")); |
| | | addMenuView.put("pId",addPrivilegeView.getString("pId")); |
| | | addMenuView.put("gId", viewMenuGroupInfo.getString("gId")); |
| | | addMenuView.put("pId", addPrivilegeView.getString("pId")); |
| | | saveMenu(addMenuView, context); |
| | | } |
| | | |
| | | JSONObject outParam = new JSONObject(); |
| | | outParam.put("gId", viewMenuGroupInfo.getString("gId")); |
| | | outParam.put("pId", addPrivilegeView.getString("pId")); |
| | | outParam.put("mId", addMenuView.getString("mId")); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>("", HttpStatus.OK); |
| | | |
| | | ResponseEntity<String> responseEntity = new ResponseEntity<String>(outParam.toString(), HttpStatus.OK); |
| | | |
| | | context.setResponseEntity(responseEntity); |
| | | |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | public int updateMenuInfo(Map info) throws DAOException { |
| | | logger.debug("修改路由信息Instance 入参 info : {}", info); |
| | | |
| | | int saveFlag = sqlSessionTemplate.update("menuServiceDaoImpl.updateMenuInfo", info); |
| | | int saveFlag = 0; |
| | | |
| | | //判断是否为删除 |
| | | if(info.containsKey("statusCd") && StatusConstant.STATUS_CD_INVALID.equals(info.get("statusCd"))){ |
| | | //做查询 |
| | | List<Map> baseMenus = getMenuInfo(info); |
| | | |
| | | if(baseMenus != null && baseMenus.size() > 0){ |
| | | Map privilegeInfo = new HashMap(); |
| | | privilegeInfo.put("pId", baseMenus.get(0).get("pId")); |
| | | privilegeInfo.put("statusCd", StatusConstant.STATUS_CD_INVALID); |
| | | //删除权限 权限组关系 |
| | | saveFlag = sqlSessionTemplate.update("menuServiceDaoImpl.updateBasePrivilegeRelInfo", info); |
| | | |
| | | if(saveFlag < 1){ |
| | | return saveFlag; |
| | | } |
| | | //删除权限 |
| | | saveFlag = sqlSessionTemplate.update("menuServiceDaoImpl.updateBasePrivilegeInfo", info); |
| | | |
| | | if(saveFlag < 1){ |
| | | return saveFlag; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | saveFlag = sqlSessionTemplate.update("menuServiceDaoImpl.updateMenuInfo", info); |
| | | |
| | | return saveFlag; |
| | | } |
| | |
| | | } |
| | | }, |
| | | _initMethod:function(){ |
| | | vc.component.menuManageInfo.conditions.mId = vc.getParam("mId"); |
| | | vc.component._listMenus(DEFAULT_PAGE, DEFAULT_ROWS); |
| | | }, |
| | | _initEvent:function(){ |