EngVehicleTypeMapper.xml 837 B

12345678910111213141516171819202122
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.zhgd.scs.mapper.EngVehicleTypeMapper">
  6. <resultMap id="BaseResultMap" type="com.zhgd.scs.domain.EngVehicleType">
  7. <id property="id" column="id" jdbcType="BIGINT"/>
  8. <result property="type" column="type" jdbcType="VARCHAR"/>
  9. <result property="projectId" column="project_id" jdbcType="BIGINT"/>
  10. </resultMap>
  11. <select id="pagelist" resultType="com.zhgd.scs.domain.EngVehicleType">
  12. SELECT v.*
  13. FROM eng_vehicle_type v
  14. WHERE v.project_id=#{projectId}
  15. <if test="type!=null and type!= ''">
  16. AND v.type LIKE concat('%',#{type},'%')
  17. </if>
  18. </select>
  19. </mapper>