12345678910111213141516171819202122232425262728293031 |
- <?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.zhgd.scs.mapper.EngVehicleRecordMapper">
- <resultMap id="BaseResultMap" type="com.zhgd.scs.domain.EngVehicleRecord">
- <id property="id" column="id" jdbcType="BIGINT"/>
- <result property="vehicleId" column="vehicle_id" jdbcType="BIGINT"/>
- <result property="projectId" column="project_id" jdbcType="BIGINT"/>
- <result property="plateNo" column="plate_no" jdbcType="VARCHAR"/>
- <result property="flag" column="flag" jdbcType="INTEGER"/>
- <result property="recordTime" column="record_time" jdbcType="TIMESTAMP"/>
- <result property="inOutType" column="in_out_type" jdbcType="INTEGER"/>
- </resultMap>
- <select id="pagelist" resultType="com.zhgd.scs.domain.vo.EngVehicleRecordVo">
- SELECT v.*,ev.unit_name,ev.id_card,ev.gender
- FROM eng_vehicle_record v
- left join eng_vehicle ev on v.vehicle_id = ev.id
- WHERE v.project_id=#{projectId}
- <if test="inOutType!=null">
- AND v.in_out_type = #{inOutType}
- </if>
- <if test="plateNo!=null and plateNo!= ''">
- AND v.plate_no LIKE concat('%',#{plateNo},'%')
- </if>
- order by record_time desc
- </select>
- </mapper>
|