<?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.ty.lift.ud.dataBank.mapper.LiftFileMapper">

   <select id="selectByQuery" resultType="cn.com.ty.lift.ud.dataBank.mapper.entity.LiftFileEntity" >
    SELECT a.*,b.name brandName FROM lift_file a LEFT JOIN lift_brand b ON  a.brand_id=b.id
    <where>
        ${ew.sqlSegment}
    </where>
    limit #{page.pageIndex},#{page.pageSize}
  </select>
  <select id="countByQuery" resultType="java.lang.Integer">
    SELECT count(0) FROM lift_file a LEFT JOIN lift_brand b ON  a.brand_id=b.id
    <where>
        ${ew.sqlSegment}
    </where>
  </select>
</mapper>