<?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.xinxincaravan.caravan.vehicle.mapper.BranchCompanyStockApplyInfoMapper" >
  <resultMap id="BaseResultMap" type="com.xinxincaravan.caravan.vehicle.entity.BranchCompanyStockApplyInfo" >
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="name" property="name" jdbcType="VARCHAR" />
    <result column="tel" property="tel" jdbcType="VARCHAR" />
    <result column="company_id" property="companyId" jdbcType="INTEGER" />
    <result column="count" property="count" jdbcType="INTEGER" />
    <result column="state" property="state" jdbcType="INTEGER" />
    <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
    <result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
  </resultMap>
    <select id="selectVoAll" resultType="com.xinxincaravan.caravan.vehicle.vo.BranchCompanyStockApplyInfoVo">
      select a.*, b.company_name
      from branch_company_stock_apply_info a
      left join branch_company_stock_info b on a.company_id = b.id
      order by a.create_time desc
    </select>
</mapper>