<?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="cn.com.countrygarden.bi.main.dao.manager.map.FenghuangHouseKeeperCommunicationMapper">
	<update id="updateHouseKeeperInfoByRegionProjectId" parameterType="cn.com.countrygarden.bi.main.model.manager.map.FenghuangHouseKeeperCommunication">
		UPDATE fenghuang_house_keeper_communication
		SET garden_district=#{gardenDistrict},
			jurisdiction_month=#{jurisdictionMonth},
			housekeeper_phone=#{housekeeperPhone},
			phone_isfixed=#{phoneIsfixed},
			service_center_hotline=#{serviceCenterHotline},
			hotline_connection_time=#{hotlineConnectionTime},
			remark = #{remark}
		WHERE  organ_name=#{organName} AND pk_org = #{pkOrg} AND user_code=#{userCode} 
	</update>
	<select id="selectHouseKeeperInfoByUserCode" resultType="cn.com.countrygarden.bi.main.model.manager.map.FenghuangHouseKeeperCommunication">
		SELECT bid,organ_name organName,pk_org pkOrg,user_code userCode,garden_district gardenDistrict,jurisdiction_month jurisdictionMonth,housekeeper_phone housekeeperPhone,phone_isfixed phoneIsfixed,service_center_hotline serviceCenterHotline,hotline_connection_time hotlineConnectionTime,remark
		FROM fenghuang_house_keeper_communication
		WHERE  pk_org = #{pkOrg} AND user_code=#{userCode} AND bid=#{bid}
	</select>
	<select id="selectGardenDistrictTree" resultType="cn.com.countrygarden.bi.main.dto.HouseKeeperNameTreeDTO">
		SELECT DISTINCT IFNULL(garden_district,'1') code,IFNULL(garden_district,'1')  name
		FROM fenghuang_house_keeper_communication
	</select>

</mapper>