<?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.elephant.framework.galaxy.aroad.module.traffic.mapper.TrafficRoadsectionMapper">

	<resultMap id="trafficRoadsectionMap"
	           type="com.elephant.framework.galaxy.aroad.module.traffic.entity.TrafficRoadsection">
		<id property="id" column="id"/>
		<result property="spotName" column="spot_name"/>
		<result property="spotCode" column="spot_code"/>
		<result property="spotLength" column="spot_length"/>
		<result property="techLevel" column="tech_level"/>
		<result property="roadWidth" column="road_width"/>
		<result property="qcSTruck" column="QC_s_truck"/>
		<result property="qcMTruck" column="QC_m_truck"/>
		<result property="qcLTruck" column="QC_l_truck"/>
		<result property="qcXlTruck" column="QC_xl_truck"/>
		<result property="qcJzxTruck" column="QC_jzx_truck"/>
		<result property="qcSmBus" column="QC_sm_bus"/>
		<result property="qcLBus" column="QC_l_bus"/>
		<result property="qcNaturalAmount" column="QC_natural_amount"/>
		<result property="qcCurrentAmount" column="QC_current_amount"/>
		<result property="motor" column="motor"/>
		<result property="tljCurrentAmount" column="TLJ_current_amount"/>
		<result property="tljNaturalAmount" column="TLJ_natural_amount"/>
		<result property="jdcCurrentAmount" column="JDC_current_amount"/>
		<result property="jdcNaturalAmount" column="JDC_natural_amount"/>
		<result property="year" column="year"/>
	</resultMap>

	<select id="getTrafficRoadsectionPage" resultMap="trafficRoadsectionMap">
		select * from t_lwjc_gsd_ldnpjrjtl
		<where>
			<if test="trafficRoadsection.spotName != null">
				spot_name like CONCAT('%',#{trafficRoadsection.spotName},'%')
				or
				spot_code like CONCAT('%',#{trafficRoadsection.spotName},'%')
			</if>
		</where>
	</select>
</mapper>
