<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//oos.juyouhx.com//DTD Mapper 3.0//EN" "http://oss.juyouhx.com/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.scpyun.platform.standard.jilinsscgsdp.jlGridBuilding" name="网格管理">

     <select id="getBuildingId" parameterType="map" resultType="string">
         select
               id
         from
              jl_grid_building
         where
               name = #{buildingName}
         and
              residential_id = #{residentialId}
         and
              del_flag = 0
         limit 1
     </select>
     <insert id="saveBuildingInfo" parameterType="map">
         insert into jl_grid_building
         (
          id,
          name,
          grade,
          company_code,
          city_id,
          area_id,
          street_id,
          community_id,
          garden_id,
          residential_id,
          del_flag,
          create_by,
          create_time,
          data_source
         )
         values
         (
          #{id},
          #{name},
          #{grade},
          #{companyCode},
          #{cityId},
          #{areaId},
          #{streetId},
          #{communityId},
          #{gardenId},
          #{residentialId},
          #{delFlag},
          #{createBy},
          #{createTime},
          #{dataSource}
         )
     </insert>
</mapper>
