|
|
@@ -23,32 +23,42 @@
|
|
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
|
|
</resultMap>
|
|
|
<sql id="Base_Column_List">
|
|
|
- estate_id, address, building_count, capture_interval, city_id, coordinates, create_time,
|
|
|
- data_status, enable_capture, estate_code, estate_company_id, estate_name, estate_photo_file_url,
|
|
|
+ estate_id, address, building_count, capture_interval, city_id, coordinates, create_time,
|
|
|
+ data_status, enable_capture, estate_code, estate_company_id, estate_name, estate_photo_file_url,
|
|
|
estate_type, home_count, short_msg_alert, `years`, bc_status, create_by
|
|
|
</sql>
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
- select
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from `ele_estate`
|
|
|
+ where estate_id = #{estateId,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <select id="selectByPrimaryKeyV2" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from `ele_estate`
|
|
|
where estate_id = #{estateId,jdbcType=VARCHAR}
|
|
|
+ <if test="limitUser != null">
|
|
|
+ and (create_by = #{limitUser} or estate_id in (select estate_id from ele_info_usage where elevator_id in
|
|
|
+ (select elevator_id from pf_user_elevator where user_id = #{limitUser})))
|
|
|
+ </if>
|
|
|
</select>
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
delete from `ele_estate`
|
|
|
where estate_id = #{estateId,jdbcType=VARCHAR}
|
|
|
</delete>
|
|
|
<insert id="insert" parameterType="com.inspur.idm.media.po.estate.EleEstate">
|
|
|
- insert into `ele_estate` (estate_id, address, building_count,
|
|
|
- capture_interval, city_id, coordinates,
|
|
|
- create_time, data_status, enable_capture,
|
|
|
- estate_code, estate_company_id, estate_name,
|
|
|
- estate_photo_file_url, estate_type, home_count,
|
|
|
+ insert into `ele_estate` (estate_id, address, building_count,
|
|
|
+ capture_interval, city_id, coordinates,
|
|
|
+ create_time, data_status, enable_capture,
|
|
|
+ estate_code, estate_company_id, estate_name,
|
|
|
+ estate_photo_file_url, estate_type, home_count,
|
|
|
short_msg_alert, `years`)
|
|
|
- values (#{estateId,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{buildingCount,jdbcType=INTEGER},
|
|
|
- #{captureInterval,jdbcType=INTEGER}, #{cityId,jdbcType=VARCHAR}, #{coordinates,jdbcType=VARCHAR},
|
|
|
- #{createTime,jdbcType=TIMESTAMP}, #{dataStatus,jdbcType=INTEGER}, #{enableCapture,jdbcType=INTEGER},
|
|
|
- #{estateCode,jdbcType=VARCHAR}, #{estateCompanyId,jdbcType=VARCHAR}, #{estateName,jdbcType=VARCHAR},
|
|
|
- #{estatePhotoFileUrl,jdbcType=VARCHAR}, #{estateType,jdbcType=INTEGER}, #{homeCount,jdbcType=INTEGER},
|
|
|
+ values (#{estateId,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{buildingCount,jdbcType=INTEGER},
|
|
|
+ #{captureInterval,jdbcType=INTEGER}, #{cityId,jdbcType=VARCHAR}, #{coordinates,jdbcType=VARCHAR},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{dataStatus,jdbcType=INTEGER}, #{enableCapture,jdbcType=INTEGER},
|
|
|
+ #{estateCode,jdbcType=VARCHAR}, #{estateCompanyId,jdbcType=VARCHAR}, #{estateName,jdbcType=VARCHAR},
|
|
|
+ #{estatePhotoFileUrl,jdbcType=VARCHAR}, #{estateType,jdbcType=INTEGER}, #{homeCount,jdbcType=INTEGER},
|
|
|
#{shortMsgAlert,jdbcType=INTEGER}, #{years,jdbcType=VARCHAR})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" parameterType="com.inspur.idm.media.po.estate.EleEstate">
|
|
|
@@ -300,4 +310,4 @@
|
|
|
<select id="selectByCityLevel4" resultType="com.inspur.idm.media.vo.estate.EleEstateVO">
|
|
|
select * from `ele_estate` where city_id = #{cityId}
|
|
|
</select>
|
|
|
-</mapper>
|
|
|
+</mapper>
|