2021与蓝度共同重构项目,服务端
liuhaonan
2022-04-20 f71a966ce03a8199aa1e9eb5a2e40c3a0fe25897
dao/src/main/resources/mapper/LightReportErrorMapper.xml
@@ -5,11 +5,11 @@
<mapper namespace="com.sandu.ximon.dao.mapper.LightReportErrorMapper">
    <resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.LightReportError">
            <id property="lightReportErrorId" column="light_report_error_id" jdbcType="BIGINT"/>
            <result property="deviceCode" column="device_code" jdbcType="VARCHAR"/>
            <result property="errorCode" column="error_code" jdbcType="INTEGER"/>
            <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
            <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
        <id property="lightReportErrorId" column="light_report_error_id" jdbcType="BIGINT"/>
        <result property="deviceCode" column="device_code" jdbcType="VARCHAR"/>
        <result property="errorCode" column="error_code" jdbcType="INTEGER"/>
        <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
        <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
    </resultMap>
    <resultMap id="listReportError" type="com.sandu.ximon.dao.bo.LightReportErrorBo" extends="BaseResultMap">
        <result property="poleName" column="pole_name" jdbcType="INTEGER"/>
@@ -17,18 +17,19 @@
    <select id="listReportError" resultMap="listReportError">
        SELECT
            t1.*,
            t2.pole_name
        t1.*,
        t3.pole_name,
        t3.id
        FROM
            light_report_error t1
        light_report_error t1
        LEFT JOIN pole_binding t2 ON t1.device_code = t2.device_code
        AND t2.device_type = 0
        LEFT JOIN pole t3 ON t3.id = t2.pole_id
        <where>
            <if test="keyword != null and keyword != ''">
                AND (
                t1.device_code LIKE CONCAT('%', #{keyword},'%')
                OR t2.pole_name LIKE CONCAT('%', #{keyword},'%')
                t3.id LIKE CONCAT('%', #{keyword},'%')
                OR t3.pole_name LIKE CONCAT('%', #{keyword},'%')
                )
            </if>
            <if test="userid != null">