<?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.ruoyi.system.mapper.grid.GridCompanyLandRemarkExtMapper">
  <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.grid.ext.GridCompanyLandRemarkExt">
    <id column="id" jdbcType="VARCHAR" property="id" />
    <result column="company_id" jdbcType="VARCHAR" property="companyId" />
    <result column="vacant_factory_area" jdbcType="VARCHAR" property="vacantFactoryArea" />
    <result column="company_vacant_area" jdbcType="VARCHAR" property="companyVacantArea" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="is_valid" jdbcType="VARCHAR" property="isValid" />
    <result column="create_time" jdbcType="VARCHAR" property="createTime" />
    <result column="companyName" jdbcType="VARCHAR" property="companyName" />
  </resultMap>

  <select id="getList" resultMap="BaseResultMap">
    select wclr.*,wc.company_name as companyName
    from grid_company_land_remark wclr
    left join
    grid_company wc
    on wc.id = wclr.company_id
    <where>
      and wclr.is_valid = 1
    </where>
    order by wclr.create_time desc
  </select>

</mapper>