RouteOilMileageMapper.xml 2.37 KB
<?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="cn.com.glsx.stdinterface.modules.mapper.RouteOilMileageMapper">
    <resultMap id="BaseResultMap" type="cn.com.glsx.stdinterface.modules.entity.RouteOilMileage">
        <!--
          WARNING - @mbg.generated
        -->
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="sn" jdbcType="VARCHAR" property="sn"/>
        <result column="fac_id" jdbcType="VARCHAR" property="facId"/>
        <result column="begin_time" jdbcType="TIMESTAMP" property="beginTime"/>
        <result column="end_time" jdbcType="TIMESTAMP" property="endTime"/>
        <result column="total_time" jdbcType="INTEGER" property="totalTime"/>
        <result column="mileage" jdbcType="INTEGER" property="mileage"/>
        <result column="oil" jdbcType="INTEGER" property="oil"/>
        <result column="idle_time" jdbcType="INTEGER" property="idleTime"/>
        <result column="rush_up_count" jdbcType="INTEGER" property="rushUpCount"/>
        <result column="rush_slow_count" jdbcType="INTEGER" property="rushSlowCount"/>
        <result column="rush_turn_count" jdbcType="INTEGER" property="rushTurnCount"/>
        <result column="over_speed_count" jdbcType="INTEGER" property="overSpeedCount"/>
        <result column="time" jdbcType="TIMESTAMP" property="time"/>
        <result column="vd_id" jdbcType="INTEGER" property="vdId"/>
        <result column="created_time" jdbcType="TIMESTAMP" property="createdTime"/>
        <result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime"/>
    </resultMap>
    <sql id="Base_Column_List">
        <!--
          WARNING - @mbg.generated
        -->
        id, sn, fac_id, begin_time, end_time, total_time, mileage, oil, idle_time, rush_up_count,
        rush_slow_count, rush_turn_count, over_speed_count, `time`, vd_id, created_time,
        updated_time
    </sql>

    <select id="selectBySn" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from t_electric_oil_mileage
        where sn = #{sn}
        <if test="beginTime != null and beginTime != ''">
            and begin_time = #{beginTime}
        </if>
        <if test="endTime != null and endTime != ''">
            and end_time = #{endTime}
        </if>
    </select>

</mapper>