123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735 |
- <?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.huaxu.zoniot.dao.BuildingMapper">
- <resultMap id="BaseResultMap" type="com.huaxu.zoniot.entity.Building">
- <!--@mbg.generated-->
- <!--@Table sc_building-->
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="site_id" jdbcType="INTEGER" property="siteId" />
- <result column="name" jdbcType="VARCHAR" property="name" />
- <result column="address" jdbcType="VARCHAR" property="address" />
- <result column="contact_penson" jdbcType="VARCHAR" property="contactPenson" />
- <result column="completion_date" jdbcType="TIMESTAMP" property="completionDate" />
- <result column="contact_phone" jdbcType="VARCHAR" property="contactPhone" />
- <result column="access_unit_id" jdbcType="INTEGER" property="accessUnitId" />
- <result column="province" jdbcType="INTEGER" property="province" />
- <result column="city" jdbcType="INTEGER" property="city" />
- <result column="region" jdbcType="INTEGER" property="region" />
- <result column="detail_address" jdbcType="VARCHAR" property="detailAddress" />
- <result column="region_code" jdbcType="VARCHAR" property="regionCode" />
- <result column="door_no" jdbcType="VARCHAR" property="doorNo" />
- <result column="road_name" jdbcType="VARCHAR" property="roadName" />
- <result column="stree_no" jdbcType="VARCHAR" property="streeNo" />
- <result column="buildl_no" jdbcType="VARCHAR" property="buildlNo" />
- <result column="longitude" jdbcType="DECIMAL" property="longitude" />
- <result column="latitude" jdbcType="DECIMAL" property="latitude" />
- <result column="highly" jdbcType="VARCHAR" property="highly" />
- <result column="building_area" jdbcType="VARCHAR" property="buildingArea" />
- <result column="building_category" jdbcType="INTEGER" property="buildingCategory" />
- <result column="building_structure" jdbcType="INTEGER" property="buildingStructure" />
- <result column="fire_rating" jdbcType="INTEGER" property="fireRating" />
- <result column="risk_rating" jdbcType="INTEGER" property="riskRating" />
- <result column="has_control_roon" jdbcType="INTEGER" property="hasControlRoon" />
- <result column="control_roon_loc" jdbcType="VARCHAR" property="controlRoonLoc" />
- <result column="building_usage" jdbcType="INTEGER" property="buildingUsage" />
- <result column="building_usage_cla" jdbcType="VARCHAR" property="buildingUsageCla" />
- <result column="rights" jdbcType="INTEGER" property="rights" />
- <result column="cover_area" jdbcType="VARCHAR" property="coverArea" />
- <result column="stand_bed_area" jdbcType="VARCHAR" property="standBedArea" />
- <result column="under_floor_num" jdbcType="INTEGER" property="underFloorNum" />
- <result column="under_floor_area" jdbcType="VARCHAR" property="underFloorArea" />
- <result column="floor_num" jdbcType="INTEGER" property="floorNum" />
- <result column="floor_area" jdbcType="VARCHAR" property="floorArea" />
- <result column="asylum_floor_num" jdbcType="VARCHAR" property="asylumFloorNum" />
- <result column="asylum_floor_area" jdbcType="VARCHAR" property="asylumFloorArea" />
- <result column="asylum_floor_loc" jdbcType="VARCHAR" property="asylumFloorLoc" />
- <result column="fire_lift_num" jdbcType="VARCHAR" property="fireLiftNum" />
- <result column="fire_lift_loc" jdbcType="VARCHAR" property="fireLiftLoc" />
- <result column="check_in_func" jdbcType="VARCHAR" property="checkInFunc" />
- <result column="max_capacity" jdbcType="VARCHAR" property="maxCapacity" />
- <result column="has_auto_equipme" jdbcType="INTEGER" property="hasAutoEquipme" />
- <result column="equipment_status" jdbcType="VARCHAR" property="equipmentStatus" />
- <result column="equipment_desc" jdbcType="VARCHAR" property="equipmentDesc" />
- <result column="beside_buildind_desc" jdbcType="VARCHAR" property="besideBuildindDesc" />
- <result column="geography" jdbcType="VARCHAR" property="geography" />
- <result column="status" jdbcType="BOOLEAN" property="status" />
- <result column="create_date" jdbcType="TIMESTAMP" property="createDate" />
- <result column="create_by" jdbcType="VARCHAR" property="createBy" />
- <result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
- <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
- <result column="community" jdbcType="INTEGER" property="community" />
- <result column="unit" jdbcType="VARCHAR" property="unit" />
- </resultMap>
- <sql id="Base_Column_List">
- <!--@mbg.generated-->
- id, site_id, `name`, address, contact_penson, completion_date, contact_phone, access_unit_id,
- province, city, region, detail_address, region_code, door_no, road_name, stree_no,
- buildl_no, longitude, latitude, highly, building_area, building_category, building_structure,
- fire_rating, risk_rating, has_control_roon, control_roon_loc, building_usage, building_usage_cla,
- rights, cover_area, stand_bed_area, under_floor_num, under_floor_area, floor_num,
- floor_area, asylum_floor_num, asylum_floor_area, asylum_floor_loc, fire_lift_num,
- fire_lift_loc, check_in_func, max_capacity, has_auto_equipme, equipment_status, equipment_desc,
- beside_buildind_desc, geography, `status`, create_date, create_by, update_date, update_by,
- community, unit
- </sql>
- <select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
- <!--@mbg.generated-->
- select
- <include refid="Base_Column_List" />
- from sc_building
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
- <!--@mbg.generated-->
- delete from sc_building
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.huaxu.zoniot.entity.Building" useGeneratedKeys="true">
- <!--@mbg.generated-->
- insert into sc_building (site_id, `name`, address,
- contact_penson, completion_date, contact_phone,
- access_unit_id, province, city,
- region, detail_address, region_code,
- door_no, road_name, stree_no,
- buildl_no, longitude, latitude,
- highly, building_area, building_category,
- building_structure, fire_rating, risk_rating,
- has_control_roon, control_roon_loc, building_usage,
- building_usage_cla, rights, cover_area,
- stand_bed_area, under_floor_num, under_floor_area,
- floor_num, floor_area, asylum_floor_num,
- asylum_floor_area, asylum_floor_loc, fire_lift_num,
- fire_lift_loc, check_in_func, max_capacity,
- has_auto_equipme, equipment_status, equipment_desc,
- beside_buildind_desc, geography, `status`,
- create_date, create_by, update_date,
- update_by, community, unit
- )
- values (#{siteId,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR},
- #{contactPenson,jdbcType=VARCHAR}, #{completionDate,jdbcType=TIMESTAMP}, #{contactPhone,jdbcType=VARCHAR},
- #{accessUnitId,jdbcType=INTEGER}, #{province,jdbcType=INTEGER}, #{city,jdbcType=INTEGER},
- #{region,jdbcType=INTEGER}, #{detailAddress,jdbcType=VARCHAR}, #{regionCode,jdbcType=VARCHAR},
- #{doorNo,jdbcType=VARCHAR}, #{roadName,jdbcType=VARCHAR}, #{streeNo,jdbcType=VARCHAR},
- #{buildlNo,jdbcType=VARCHAR}, #{longitude,jdbcType=DECIMAL}, #{latitude,jdbcType=DECIMAL},
- #{highly,jdbcType=VARCHAR}, #{buildingArea,jdbcType=VARCHAR}, #{buildingCategory,jdbcType=INTEGER},
- #{buildingStructure,jdbcType=INTEGER}, #{fireRating,jdbcType=INTEGER}, #{riskRating,jdbcType=INTEGER},
- #{hasControlRoon,jdbcType=INTEGER}, #{controlRoonLoc,jdbcType=VARCHAR}, #{buildingUsage,jdbcType=INTEGER},
- #{buildingUsageCla,jdbcType=VARCHAR}, #{rights,jdbcType=INTEGER}, #{coverArea,jdbcType=VARCHAR},
- #{standBedArea,jdbcType=VARCHAR}, #{underFloorNum,jdbcType=INTEGER}, #{underFloorArea,jdbcType=VARCHAR},
- #{floorNum,jdbcType=INTEGER}, #{floorArea,jdbcType=VARCHAR}, #{asylumFloorNum,jdbcType=VARCHAR},
- #{asylumFloorArea,jdbcType=VARCHAR}, #{asylumFloorLoc,jdbcType=VARCHAR}, #{fireLiftNum,jdbcType=VARCHAR},
- #{fireLiftLoc,jdbcType=VARCHAR}, #{checkInFunc,jdbcType=VARCHAR}, #{maxCapacity,jdbcType=VARCHAR},
- #{hasAutoEquipme,jdbcType=INTEGER}, #{equipmentStatus,jdbcType=VARCHAR}, #{equipmentDesc,jdbcType=VARCHAR},
- #{besideBuildindDesc,jdbcType=VARCHAR}, #{geography,jdbcType=VARCHAR}, #{status,jdbcType=BOOLEAN},
- #{createDate,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{updateDate,jdbcType=TIMESTAMP},
- #{updateBy,jdbcType=VARCHAR}, #{community,jdbcType=INTEGER}, #{unit,jdbcType=VARCHAR}
- )
- </insert>
- <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.huaxu.zoniot.entity.Building" useGeneratedKeys="true">
- <!--@mbg.generated-->
- insert into sc_building
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="siteId != null">
- site_id,
- </if>
- <if test="name != null">
- `name`,
- </if>
- <if test="address != null">
- address,
- </if>
- <if test="contactPenson != null">
- contact_penson,
- </if>
- <if test="completionDate != null">
- completion_date,
- </if>
- <if test="contactPhone != null">
- contact_phone,
- </if>
- <if test="accessUnitId != null">
- access_unit_id,
- </if>
- <if test="province != null">
- province,
- </if>
- <if test="city != null">
- city,
- </if>
- <if test="region != null">
- region,
- </if>
- <if test="detailAddress != null">
- detail_address,
- </if>
- <if test="regionCode != null">
- region_code,
- </if>
- <if test="doorNo != null">
- door_no,
- </if>
- <if test="roadName != null">
- road_name,
- </if>
- <if test="streeNo != null">
- stree_no,
- </if>
- <if test="buildlNo != null">
- buildl_no,
- </if>
- <if test="longitude != null">
- longitude,
- </if>
- <if test="latitude != null">
- latitude,
- </if>
- <if test="highly != null">
- highly,
- </if>
- <if test="buildingArea != null">
- building_area,
- </if>
- <if test="buildingCategory != null">
- building_category,
- </if>
- <if test="buildingStructure != null">
- building_structure,
- </if>
- <if test="fireRating != null">
- fire_rating,
- </if>
- <if test="riskRating != null">
- risk_rating,
- </if>
- <if test="hasControlRoon != null">
- has_control_roon,
- </if>
- <if test="controlRoonLoc != null">
- control_roon_loc,
- </if>
- <if test="buildingUsage != null">
- building_usage,
- </if>
- <if test="buildingUsageCla != null">
- building_usage_cla,
- </if>
- <if test="rights != null">
- rights,
- </if>
- <if test="coverArea != null">
- cover_area,
- </if>
- <if test="standBedArea != null">
- stand_bed_area,
- </if>
- <if test="underFloorNum != null">
- under_floor_num,
- </if>
- <if test="underFloorArea != null">
- under_floor_area,
- </if>
- <if test="floorNum != null">
- floor_num,
- </if>
- <if test="floorArea != null">
- floor_area,
- </if>
- <if test="asylumFloorNum != null">
- asylum_floor_num,
- </if>
- <if test="asylumFloorArea != null">
- asylum_floor_area,
- </if>
- <if test="asylumFloorLoc != null">
- asylum_floor_loc,
- </if>
- <if test="fireLiftNum != null">
- fire_lift_num,
- </if>
- <if test="fireLiftLoc != null">
- fire_lift_loc,
- </if>
- <if test="checkInFunc != null">
- check_in_func,
- </if>
- <if test="maxCapacity != null">
- max_capacity,
- </if>
- <if test="hasAutoEquipme != null">
- has_auto_equipme,
- </if>
- <if test="equipmentStatus != null">
- equipment_status,
- </if>
- <if test="equipmentDesc != null">
- equipment_desc,
- </if>
- <if test="besideBuildindDesc != null">
- beside_buildind_desc,
- </if>
- <if test="geography != null">
- geography,
- </if>
- <if test="status != null">
- `status`,
- </if>
- <if test="createDate != null">
- create_date,
- </if>
- <if test="createBy != null">
- create_by,
- </if>
- <if test="updateDate != null">
- update_date,
- </if>
- <if test="updateBy != null">
- update_by,
- </if>
- <if test="community != null">
- community,
- </if>
- <if test="unit != null">
- unit,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="siteId != null">
- #{siteId,jdbcType=INTEGER},
- </if>
- <if test="name != null">
- #{name,jdbcType=VARCHAR},
- </if>
- <if test="address != null">
- #{address,jdbcType=VARCHAR},
- </if>
- <if test="contactPenson != null">
- #{contactPenson,jdbcType=VARCHAR},
- </if>
- <if test="completionDate != null">
- #{completionDate,jdbcType=TIMESTAMP},
- </if>
- <if test="contactPhone != null">
- #{contactPhone,jdbcType=VARCHAR},
- </if>
- <if test="accessUnitId != null">
- #{accessUnitId,jdbcType=INTEGER},
- </if>
- <if test="province != null">
- #{province,jdbcType=INTEGER},
- </if>
- <if test="city != null">
- #{city,jdbcType=INTEGER},
- </if>
- <if test="region != null">
- #{region,jdbcType=INTEGER},
- </if>
- <if test="detailAddress != null">
- #{detailAddress,jdbcType=VARCHAR},
- </if>
- <if test="regionCode != null">
- #{regionCode,jdbcType=VARCHAR},
- </if>
- <if test="doorNo != null">
- #{doorNo,jdbcType=VARCHAR},
- </if>
- <if test="roadName != null">
- #{roadName,jdbcType=VARCHAR},
- </if>
- <if test="streeNo != null">
- #{streeNo,jdbcType=VARCHAR},
- </if>
- <if test="buildlNo != null">
- #{buildlNo,jdbcType=VARCHAR},
- </if>
- <if test="longitude != null">
- #{longitude,jdbcType=DECIMAL},
- </if>
- <if test="latitude != null">
- #{latitude,jdbcType=DECIMAL},
- </if>
- <if test="highly != null">
- #{highly,jdbcType=VARCHAR},
- </if>
- <if test="buildingArea != null">
- #{buildingArea,jdbcType=VARCHAR},
- </if>
- <if test="buildingCategory != null">
- #{buildingCategory,jdbcType=INTEGER},
- </if>
- <if test="buildingStructure != null">
- #{buildingStructure,jdbcType=INTEGER},
- </if>
- <if test="fireRating != null">
- #{fireRating,jdbcType=INTEGER},
- </if>
- <if test="riskRating != null">
- #{riskRating,jdbcType=INTEGER},
- </if>
- <if test="hasControlRoon != null">
- #{hasControlRoon,jdbcType=INTEGER},
- </if>
- <if test="controlRoonLoc != null">
- #{controlRoonLoc,jdbcType=VARCHAR},
- </if>
- <if test="buildingUsage != null">
- #{buildingUsage,jdbcType=INTEGER},
- </if>
- <if test="buildingUsageCla != null">
- #{buildingUsageCla,jdbcType=VARCHAR},
- </if>
- <if test="rights != null">
- #{rights,jdbcType=INTEGER},
- </if>
- <if test="coverArea != null">
- #{coverArea,jdbcType=VARCHAR},
- </if>
- <if test="standBedArea != null">
- #{standBedArea,jdbcType=VARCHAR},
- </if>
- <if test="underFloorNum != null">
- #{underFloorNum,jdbcType=INTEGER},
- </if>
- <if test="underFloorArea != null">
- #{underFloorArea,jdbcType=VARCHAR},
- </if>
- <if test="floorNum != null">
- #{floorNum,jdbcType=INTEGER},
- </if>
- <if test="floorArea != null">
- #{floorArea,jdbcType=VARCHAR},
- </if>
- <if test="asylumFloorNum != null">
- #{asylumFloorNum,jdbcType=VARCHAR},
- </if>
- <if test="asylumFloorArea != null">
- #{asylumFloorArea,jdbcType=VARCHAR},
- </if>
- <if test="asylumFloorLoc != null">
- #{asylumFloorLoc,jdbcType=VARCHAR},
- </if>
- <if test="fireLiftNum != null">
- #{fireLiftNum,jdbcType=VARCHAR},
- </if>
- <if test="fireLiftLoc != null">
- #{fireLiftLoc,jdbcType=VARCHAR},
- </if>
- <if test="checkInFunc != null">
- #{checkInFunc,jdbcType=VARCHAR},
- </if>
- <if test="maxCapacity != null">
- #{maxCapacity,jdbcType=VARCHAR},
- </if>
- <if test="hasAutoEquipme != null">
- #{hasAutoEquipme,jdbcType=INTEGER},
- </if>
- <if test="equipmentStatus != null">
- #{equipmentStatus,jdbcType=VARCHAR},
- </if>
- <if test="equipmentDesc != null">
- #{equipmentDesc,jdbcType=VARCHAR},
- </if>
- <if test="besideBuildindDesc != null">
- #{besideBuildindDesc,jdbcType=VARCHAR},
- </if>
- <if test="geography != null">
- #{geography,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- #{status,jdbcType=BOOLEAN},
- </if>
- <if test="createDate != null">
- #{createDate,jdbcType=TIMESTAMP},
- </if>
- <if test="createBy != null">
- #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="updateDate != null">
- #{updateDate,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- #{updateBy,jdbcType=VARCHAR},
- </if>
- <if test="community != null">
- #{community,jdbcType=INTEGER},
- </if>
- <if test="unit != null">
- #{unit,jdbcType=VARCHAR},
- </if>
- </trim>
- </insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.huaxu.zoniot.entity.Building">
- <!--@mbg.generated-->
- update sc_building
- <set>
- <if test="siteId != null">
- site_id = #{siteId,jdbcType=INTEGER},
- </if>
- <if test="name != null">
- `name` = #{name,jdbcType=VARCHAR},
- </if>
- <if test="address != null">
- address = #{address,jdbcType=VARCHAR},
- </if>
- <if test="contactPenson != null">
- contact_penson = #{contactPenson,jdbcType=VARCHAR},
- </if>
- <if test="completionDate != null">
- completion_date = #{completionDate,jdbcType=TIMESTAMP},
- </if>
- <if test="contactPhone != null">
- contact_phone = #{contactPhone,jdbcType=VARCHAR},
- </if>
- <if test="accessUnitId != null">
- access_unit_id = #{accessUnitId,jdbcType=INTEGER},
- </if>
- <if test="province != null">
- province = #{province,jdbcType=INTEGER},
- </if>
- <if test="city != null">
- city = #{city,jdbcType=INTEGER},
- </if>
- <if test="region != null">
- region = #{region,jdbcType=INTEGER},
- </if>
- <if test="detailAddress != null">
- detail_address = #{detailAddress,jdbcType=VARCHAR},
- </if>
- <if test="regionCode != null">
- region_code = #{regionCode,jdbcType=VARCHAR},
- </if>
- <if test="doorNo != null">
- door_no = #{doorNo,jdbcType=VARCHAR},
- </if>
- <if test="roadName != null">
- road_name = #{roadName,jdbcType=VARCHAR},
- </if>
- <if test="streeNo != null">
- stree_no = #{streeNo,jdbcType=VARCHAR},
- </if>
- <if test="buildlNo != null">
- buildl_no = #{buildlNo,jdbcType=VARCHAR},
- </if>
- <if test="longitude != null">
- longitude = #{longitude,jdbcType=DECIMAL},
- </if>
- <if test="latitude != null">
- latitude = #{latitude,jdbcType=DECIMAL},
- </if>
- <if test="highly != null">
- highly = #{highly,jdbcType=VARCHAR},
- </if>
- <if test="buildingArea != null">
- building_area = #{buildingArea,jdbcType=VARCHAR},
- </if>
- <if test="buildingCategory != null">
- building_category = #{buildingCategory,jdbcType=INTEGER},
- </if>
- <if test="buildingStructure != null">
- building_structure = #{buildingStructure,jdbcType=INTEGER},
- </if>
- <if test="fireRating != null">
- fire_rating = #{fireRating,jdbcType=INTEGER},
- </if>
- <if test="riskRating != null">
- risk_rating = #{riskRating,jdbcType=INTEGER},
- </if>
- <if test="hasControlRoon != null">
- has_control_roon = #{hasControlRoon,jdbcType=INTEGER},
- </if>
- <if test="controlRoonLoc != null">
- control_roon_loc = #{controlRoonLoc,jdbcType=VARCHAR},
- </if>
- <if test="buildingUsage != null">
- building_usage = #{buildingUsage,jdbcType=INTEGER},
- </if>
- <if test="buildingUsageCla != null">
- building_usage_cla = #{buildingUsageCla,jdbcType=VARCHAR},
- </if>
- <if test="rights != null">
- rights = #{rights,jdbcType=INTEGER},
- </if>
- <if test="coverArea != null">
- cover_area = #{coverArea,jdbcType=VARCHAR},
- </if>
- <if test="standBedArea != null">
- stand_bed_area = #{standBedArea,jdbcType=VARCHAR},
- </if>
- <if test="underFloorNum != null">
- under_floor_num = #{underFloorNum,jdbcType=INTEGER},
- </if>
- <if test="underFloorArea != null">
- under_floor_area = #{underFloorArea,jdbcType=VARCHAR},
- </if>
- <if test="floorNum != null">
- floor_num = #{floorNum,jdbcType=INTEGER},
- </if>
- <if test="floorArea != null">
- floor_area = #{floorArea,jdbcType=VARCHAR},
- </if>
- <if test="asylumFloorNum != null">
- asylum_floor_num = #{asylumFloorNum,jdbcType=VARCHAR},
- </if>
- <if test="asylumFloorArea != null">
- asylum_floor_area = #{asylumFloorArea,jdbcType=VARCHAR},
- </if>
- <if test="asylumFloorLoc != null">
- asylum_floor_loc = #{asylumFloorLoc,jdbcType=VARCHAR},
- </if>
- <if test="fireLiftNum != null">
- fire_lift_num = #{fireLiftNum,jdbcType=VARCHAR},
- </if>
- <if test="fireLiftLoc != null">
- fire_lift_loc = #{fireLiftLoc,jdbcType=VARCHAR},
- </if>
- <if test="checkInFunc != null">
- check_in_func = #{checkInFunc,jdbcType=VARCHAR},
- </if>
- <if test="maxCapacity != null">
- max_capacity = #{maxCapacity,jdbcType=VARCHAR},
- </if>
- <if test="hasAutoEquipme != null">
- has_auto_equipme = #{hasAutoEquipme,jdbcType=INTEGER},
- </if>
- <if test="equipmentStatus != null">
- equipment_status = #{equipmentStatus,jdbcType=VARCHAR},
- </if>
- <if test="equipmentDesc != null">
- equipment_desc = #{equipmentDesc,jdbcType=VARCHAR},
- </if>
- <if test="besideBuildindDesc != null">
- beside_buildind_desc = #{besideBuildindDesc,jdbcType=VARCHAR},
- </if>
- <if test="geography != null">
- geography = #{geography,jdbcType=VARCHAR},
- </if>
- <if test="status != null">
- `status` = #{status,jdbcType=BOOLEAN},
- </if>
- <if test="createDate != null">
- create_date = #{createDate,jdbcType=TIMESTAMP},
- </if>
- <if test="createBy != null">
- create_by = #{createBy,jdbcType=VARCHAR},
- </if>
- <if test="updateDate != null">
- update_date = #{updateDate,jdbcType=TIMESTAMP},
- </if>
- <if test="updateBy != null">
- update_by = #{updateBy,jdbcType=VARCHAR},
- </if>
- <if test="community != null">
- community = #{community,jdbcType=INTEGER},
- </if>
- <if test="unit != null">
- unit = #{unit,jdbcType=VARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.huaxu.zoniot.entity.Building">
- <!--@mbg.generated-->
- update sc_building
- set site_id = #{siteId,jdbcType=INTEGER},
- `name` = #{name,jdbcType=VARCHAR},
- address = #{address,jdbcType=VARCHAR},
- contact_penson = #{contactPenson,jdbcType=VARCHAR},
- completion_date = #{completionDate,jdbcType=TIMESTAMP},
- contact_phone = #{contactPhone,jdbcType=VARCHAR},
- access_unit_id = #{accessUnitId,jdbcType=INTEGER},
- province = #{province,jdbcType=INTEGER},
- city = #{city,jdbcType=INTEGER},
- region = #{region,jdbcType=INTEGER},
- detail_address = #{detailAddress,jdbcType=VARCHAR},
- region_code = #{regionCode,jdbcType=VARCHAR},
- door_no = #{doorNo,jdbcType=VARCHAR},
- road_name = #{roadName,jdbcType=VARCHAR},
- stree_no = #{streeNo,jdbcType=VARCHAR},
- buildl_no = #{buildlNo,jdbcType=VARCHAR},
- longitude = #{longitude,jdbcType=DECIMAL},
- latitude = #{latitude,jdbcType=DECIMAL},
- highly = #{highly,jdbcType=VARCHAR},
- building_area = #{buildingArea,jdbcType=VARCHAR},
- building_category = #{buildingCategory,jdbcType=INTEGER},
- building_structure = #{buildingStructure,jdbcType=INTEGER},
- fire_rating = #{fireRating,jdbcType=INTEGER},
- risk_rating = #{riskRating,jdbcType=INTEGER},
- has_control_roon = #{hasControlRoon,jdbcType=INTEGER},
- control_roon_loc = #{controlRoonLoc,jdbcType=VARCHAR},
- building_usage = #{buildingUsage,jdbcType=INTEGER},
- building_usage_cla = #{buildingUsageCla,jdbcType=VARCHAR},
- rights = #{rights,jdbcType=INTEGER},
- cover_area = #{coverArea,jdbcType=VARCHAR},
- stand_bed_area = #{standBedArea,jdbcType=VARCHAR},
- under_floor_num = #{underFloorNum,jdbcType=INTEGER},
- under_floor_area = #{underFloorArea,jdbcType=VARCHAR},
- floor_num = #{floorNum,jdbcType=INTEGER},
- floor_area = #{floorArea,jdbcType=VARCHAR},
- asylum_floor_num = #{asylumFloorNum,jdbcType=VARCHAR},
- asylum_floor_area = #{asylumFloorArea,jdbcType=VARCHAR},
- asylum_floor_loc = #{asylumFloorLoc,jdbcType=VARCHAR},
- fire_lift_num = #{fireLiftNum,jdbcType=VARCHAR},
- fire_lift_loc = #{fireLiftLoc,jdbcType=VARCHAR},
- check_in_func = #{checkInFunc,jdbcType=VARCHAR},
- max_capacity = #{maxCapacity,jdbcType=VARCHAR},
- has_auto_equipme = #{hasAutoEquipme,jdbcType=INTEGER},
- equipment_status = #{equipmentStatus,jdbcType=VARCHAR},
- equipment_desc = #{equipmentDesc,jdbcType=VARCHAR},
- beside_buildind_desc = #{besideBuildindDesc,jdbcType=VARCHAR},
- geography = #{geography,jdbcType=VARCHAR},
- `status` = #{status,jdbcType=BOOLEAN},
- create_date = #{createDate,jdbcType=TIMESTAMP},
- create_by = #{createBy,jdbcType=VARCHAR},
- update_date = #{updateDate,jdbcType=TIMESTAMP},
- update_by = #{updateBy,jdbcType=VARCHAR},
- community = #{community,jdbcType=INTEGER},
- unit = #{unit,jdbcType=VARCHAR}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <insert id="batchInsert" keyColumn="id" keyProperty="id" parameterType="map" useGeneratedKeys="true">
- <!--@mbg.generated-->
- insert into sc_building
- (site_id, `name`, address, contact_penson, completion_date, contact_phone, access_unit_id,
- province, city, region, detail_address, region_code, door_no, road_name, stree_no,
- buildl_no, longitude, latitude, highly, building_area, building_category, building_structure,
- fire_rating, risk_rating, has_control_roon, control_roon_loc, building_usage, building_usage_cla,
- rights, cover_area, stand_bed_area, under_floor_num, under_floor_area, floor_num,
- floor_area, asylum_floor_num, asylum_floor_area, asylum_floor_loc, fire_lift_num,
- fire_lift_loc, check_in_func, max_capacity, has_auto_equipme, equipment_status,
- equipment_desc, beside_buildind_desc, geography, `status`, create_date, create_by,
- update_date, update_by, community, unit)
- values
- <foreach collection="list" item="item" separator=",">
- (#{item.siteId,jdbcType=INTEGER}, #{item.name,jdbcType=VARCHAR}, #{item.address,jdbcType=VARCHAR},
- #{item.contactPenson,jdbcType=VARCHAR}, #{item.completionDate,jdbcType=TIMESTAMP},
- #{item.contactPhone,jdbcType=VARCHAR}, #{item.accessUnitId,jdbcType=INTEGER}, #{item.province,jdbcType=INTEGER},
- #{item.city,jdbcType=INTEGER}, #{item.region,jdbcType=INTEGER}, #{item.detailAddress,jdbcType=VARCHAR},
- #{item.regionCode,jdbcType=VARCHAR}, #{item.doorNo,jdbcType=VARCHAR}, #{item.roadName,jdbcType=VARCHAR},
- #{item.streeNo,jdbcType=VARCHAR}, #{item.buildlNo,jdbcType=VARCHAR}, #{item.longitude,jdbcType=DECIMAL},
- #{item.latitude,jdbcType=DECIMAL}, #{item.highly,jdbcType=VARCHAR}, #{item.buildingArea,jdbcType=VARCHAR},
- #{item.buildingCategory,jdbcType=INTEGER}, #{item.buildingStructure,jdbcType=INTEGER},
- #{item.fireRating,jdbcType=INTEGER}, #{item.riskRating,jdbcType=INTEGER}, #{item.hasControlRoon,jdbcType=INTEGER},
- #{item.controlRoonLoc,jdbcType=VARCHAR}, #{item.buildingUsage,jdbcType=INTEGER},
- #{item.buildingUsageCla,jdbcType=VARCHAR}, #{item.rights,jdbcType=INTEGER}, #{item.coverArea,jdbcType=VARCHAR},
- #{item.standBedArea,jdbcType=VARCHAR}, #{item.underFloorNum,jdbcType=INTEGER},
- #{item.underFloorArea,jdbcType=VARCHAR}, #{item.floorNum,jdbcType=INTEGER}, #{item.floorArea,jdbcType=VARCHAR},
- #{item.asylumFloorNum,jdbcType=VARCHAR}, #{item.asylumFloorArea,jdbcType=VARCHAR},
- #{item.asylumFloorLoc,jdbcType=VARCHAR}, #{item.fireLiftNum,jdbcType=VARCHAR},
- #{item.fireLiftLoc,jdbcType=VARCHAR}, #{item.checkInFunc,jdbcType=VARCHAR}, #{item.maxCapacity,jdbcType=VARCHAR},
- #{item.hasAutoEquipme,jdbcType=INTEGER}, #{item.equipmentStatus,jdbcType=VARCHAR},
- #{item.equipmentDesc,jdbcType=VARCHAR}, #{item.besideBuildindDesc,jdbcType=VARCHAR},
- #{item.geography,jdbcType=VARCHAR}, #{item.status,jdbcType=BOOLEAN}, #{item.createDate,jdbcType=TIMESTAMP},
- #{item.createBy,jdbcType=VARCHAR}, #{item.updateDate,jdbcType=TIMESTAMP}, #{item.updateBy,jdbcType=VARCHAR},
- #{item.community,jdbcType=INTEGER}, #{item.unit,jdbcType=VARCHAR})
- </foreach>
- </insert>
- <select id="findBuildingByName" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List" />
- from
- sc_building
- where status = 1
- and name = #{name,jdbcType=VARCHAR}
- and community = #{communityId,jdbcType=INTEGER}
- limit 1
- </select>
- </mapper>
|