/** * 保存/更新动态脆弱点 * * @param paraMap 参数Map * @param dynaVulnPoint 动态脆弱点 */ public void saveOrUpdate(Map paraMap, AsseKnowDynaVuln dynaVulnPoint) { String assetCode = (String) paraMap.get("assetCode"); AsseInfoAsse asseInfoAsse = assetDao.find(assetCode); dynaVulnPoint.setAsse(asseInfoAsse); dynaVulnPoint.setAsseInfoBusiId(asseInfoAsse.getAsseInfoBusiId()); vulnAnalDao.saveOrUpdate(dynaVulnPoint); }
/** * 批量保存/更新动态脆弱点 * * @param paraMaps 参数Map * @param asseInfoProj 测评项目 */ public void batchSaveOrUpdate(Map paraMaps, AsseInfoProj asseInfoProj) { List<AsseKnowDynaVuln> dynaVulnPoints = new ArrayList<AsseKnowDynaVuln>(); String[] dynaVulnPoinIds = (String[]) paraMaps.get("dynaVulnPoinIds"); String assetCode = (String) paraMaps.get("assetCode"); AsseInfoAsse asseInfoAsse = assetDao.find(assetCode); for (int i = 0; i < dynaVulnPoinIds.length; i++) { AsseKnowDynaVuln dynaVulnPoint = vulnAnalDao.find(new Integer(dynaVulnPoinIds[i])); dynaVulnPoint.setAsseInfoProjId(asseInfoProj.getId()); dynaVulnPoint.setAsse(asseInfoAsse); dynaVulnPoint.setAsseInfoBusiId(asseInfoAsse.getAsseInfoBusiId()); dynaVulnPoints.add(dynaVulnPoint); } vulnAnalDao.batchSaveOrUpdate(dynaVulnPoints); }
/** * 检查是否已存在该脆弱点 * * @param asseInfoProj 测评项目 * @param statVulnPoinId 脆弱点Id * @return 是否已存在 */ public boolean checkExitDynaVulnPoint( AsseInfoProj asseInfoProj, String assetCode, Integer statVulnPoinId) { AsseInfoAsse asseInfoAsse = assetDao.find(assetCode); return vulnAnalDao.checkExitDynaVulnPoint(asseInfoProj.getId(), asseInfoAsse, statVulnPoinId); }