INSERT INTO house_population( population_id, house_id, population_info_id, name, card_num, phone, bind_time, out_house, creator, gmt_create, modifier, gmt_modified, is_delete ) VALUES( #{populationId}, #{houseId}, #{populationInfoId}, #{name}, #{cardNum}, #{phone}, #{bindTime}, #{outHouse}, #{creator}, #{gmtCreate}, #{modifier}, #{gmtModified}, #{isDelete} ) UPDATE house_population SET gmt_modified = #{gmtModified}, modifier = #{modifier}, is_delete = 1 WHERE population_id IN #{populationIds[${index}]} DELETE FROM house_population WHERE population_id IN #{populationIds[${index}]} DELETE FROM house_population WHERE house_id = #{houseId} AND out_house != 1 UPDATE house_population SET out_house = '1', gmt_modified = #{gmtModified}, modifier = #{modifier} WHERE is_delete = 0 AND population_id IN #{populationIds[${index}]} UPDATE house_population SET bind_time = #{bindTime} WHERE population_id = #{populationId} UPDATE house_population SET house_id = #{houseId}, population_info_id = #{populationInfoId}, name = #{name}, card_num = #{cardNum}, phone = #{phone}, bind_time = #{bindTime}, out_house = #{outHouse}, gmt_modified = #{gmtModified}, modifier = #{modifier}, population_id = population_id WHERE population_id = #{populationId}