liubing hace 4 años
padre
commit
4785f805f9

+ 2 - 2
svr/svr-iot/src/main/java/com/yihu/iot/service/company/IotCompanyService.java

@ -1164,13 +1164,13 @@ public class IotCompanyService extends BaseJpaService<IotCompanyDO,IotCompanyDao
        JSONObject object = new JSONObject();
        String str = "SELECT SUM(b.count) count,b.app_name appName\n" +
                "FROM (SELECT COUNT(id) fali,app_name,interface_name FROM xmiot.iot_interface_log  WHERE state=0 GROUP BY app_name,interface_name) c\n" +
                "RIGHT JOIN (SELECT count(id) count,app_name,interface_name,work_type FROM xmiot.iot_interface_log WHERE app_name IS NOT NULL\n" +
                "RIGHT JOIN (SELECT count(id) count,app_name,interface_name,work_type FROM xmiot.iot_interface_log WHERE app_name IS NOT NULL and app_id<>'2c9a80ed72393a3301724abe57ec0032' \n" +
                "GROUP BY app_name,interface_name) b ON c.app_name=b.app_name AND c.interface_name=b.interface_name\n" +
                "GROUP BY b.app_name ORDER BY count DESC";
        String str1 = "SELECT SUM(b.count) count,b.app_name appName\n" +
                "FROM (SELECT COUNT(id) fali,app_name,interface_name FROM xmiot.iot_interface_log  WHERE state=0 GROUP BY app_name,interface_name) c\n" +
                "RIGHT JOIN (SELECT count(id) count,app_name,interface_name,work_type FROM xmiot.iot_interface_log WHERE app_name IS NOT NULL\n" +
                "RIGHT JOIN (SELECT count(id) count,app_name,interface_name,work_type FROM xmiot.iot_interface_log WHERE app_name IS NOT NULL and app_id<>'2c9a80ed72393a3301724abe57ec0032' \n" +
                "GROUP BY app_name,interface_name) b ON c.app_name=b.app_name AND c.interface_name=b.interface_name\n" +
                "GROUP BY b.app_name ORDER BY count DESC limit 0,3";
        List<AppServiceCount> counts = jdbcTemplate.query(str,new BeanPropertyRowMapper<>(AppServiceCount.class));