<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.dromara.system.mapper.SysOperLogMapper">

    <select id="getExpertErrorSts" resultType="org.dromara.system.domain.vo.ExpertToDbInfoVO">
        SELECT
            SUM(CASE WHEN business_type = 15 THEN 1 ELSE 0 END) +
            SUM(CASE WHEN business_type = 14 THEN 1 ELSE 0 END) AS countNum,
            SUM(CASE WHEN business_type = 15 THEN 1 ELSE 0 END) AS webErrorNum,
            SUM(CASE WHEN business_type = 14 THEN 1 ELSE 0 END) AS sysErrorNum
        FROM sys_oper_log
        WHERE business_type = 15 OR business_type = 14

    </select>
</mapper>
