<?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="com.sandu.ximon.dao.mapper.C3mReportErrorMapper">
|
|
<resultMap id="BaseResultMap" type="com.sandu.ximon.dao.domain.C3mReportError">
|
<id property="c3mErrorId" column="c3m_error_id" jdbcType="BIGINT"/>
|
<result property="c3Mac" column="c3_mac" 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"/>
|
<result property="errorMsg" column="error_msg" jdbcType="VARCHAR"/>
|
</resultMap>
|
|
<select id="listReportError" resultType="com.sandu.ximon.dao.bo.C3ReportErrorBo">
|
SELECT
|
t1.*,
|
t4.pole_name as pole_name,
|
t4.id as pole_id
|
FROM
|
c3m_report_error t1
|
LEFT JOIN c3m_charging t2 ON t1.c3_mac = t2.c3_mac
|
LEFT JOIN pole_binding t3 ON t2.mcu_udid = t3.device_code
|
AND t3.device_type = 2
|
LEFT JOIN pole t4 ON t4.id = t3.pole_id
|
<where>
|
<if test="userid != null">
|
AND (t4.user_id = #{userid} OR t4.client_id = #{userid})
|
</if>
|
</where>
|
</select>
|
|
</mapper>
|