Further AI fixes on snakecase vs camelcase
All checks were successful
Build & Deploy Backend / build (push) Successful in 51s
Build & Deploy Backend / deploy (push) Successful in 1s

This commit is contained in:
2025-10-29 11:39:43 +08:00
parent 859fc20ae8
commit 988c5ad527
2 changed files with 233 additions and 2 deletions

View File

@@ -67,7 +67,7 @@ public interface ReportingRepository extends JpaRepository<com.psg.dlsysinfo.dl_
"cdv.score as score, " +
"COUNT(DISTINCT cdv.device_id) as affectedDevices " +
"FROM cached_device_vulns cdv " +
"WHERE cdv.device_id IN (SELECT d.device_id FROM devices d WHERE d.client_id = :clientId) " +
"WHERE cdv.device_id IN (SELECT d.deviceId FROM devices d WHERE d.clientId = :clientId) " +
"GROUP BY cdv.cve_id, cdv.description, cdv.severity, cdv.score " +
"ORDER BY " +
"CASE WHEN UPPER(cdv.severity) = 'CRITICAL' THEN 0 " +
@@ -87,7 +87,7 @@ public interface ReportingRepository extends JpaRepository<com.psg.dlsysinfo.dl_
"SUM(CASE WHEN cis.total_cves > 0 THEN 1 ELSE 0 END) as vulnerableInstances, " +
"MAX(COALESCE(cis.total_cves, 0)) as totalCves " +
"FROM cached_installed_software cis " +
"WHERE cis.device_id IN (SELECT d.device_id FROM devices d WHERE d.client_id = :clientId) " +
"WHERE cis.device_id IN (SELECT d.deviceId FROM devices d WHERE d.clientId = :clientId) " +
"GROUP BY cis.software_name " +
"ORDER BY (SUM(CASE WHEN cis.total_cves > 0 THEN 1 ELSE 0 END) * 1.0 / COUNT(cis.id) * MAX(COALESCE(cis.total_cves, 0))) DESC " +
"LIMIT 20",