insert into owner_property_survey( id, owner_id, room_id, survey_warrant_apply_date, property_survey_date, name, extra_date, create_time, update_time ) values ( #{id}, #{ownerId}, #{roomId}, '' #{surveyWarrantApplyDate}, '' #{propertySurveyDate}, '' #{name}, '' #{extraDate}, CURRENT_TIMESTAMP #{createTime}, CURRENT_TIMESTAMP #{updateTime} ) insert into owner_property_survey( id, owner_id, room_id, survey_warrant_apply_date, property_survey_date, name, extra_date, create_time, update_time ) values ( #{item.id}, #{item.ownerId}, #{item.roomId}, ''#{item.surveyWarrantApplyDate}, ''#{item.propertySurveyDate}, ''#{item.name}, ''#{item.extraDate}, CURRENT_TIMESTAMP#{item.createTime}, CURRENT_TIMESTAMP#{item.updateTime}) update owner_property_survey t set t.owner_id = #{ownerId}, t.room_id = #{roomId}, t.survey_warrant_apply_date = #{surveyWarrantApplyDate}, t.property_survey_date = #{propertySurveyDate}, t.name = #{name}, t.extra_date = #{extraDate}, t.update_time = #{updateTime}, t.update_time = CURRENT_TIMESTAMP where 1 = 1 and t.id = #{id} and t.owner_id = #{ownerId} and t.room_id = #{roomId} delete from owner_property_survey t where 1 = 1 and t.id = #{id} and t.owner_id = #{ownerId} and t.room_id = #{roomId} and t.survey_warrant_apply_date = #{surveyWarrantApplyDate} and t.property_survey_date = #{propertySurveyDate} and t.survey_warrant_apply_date >= #{startSurveyWarrantApplyDate} and t.survey_warrant_apply_date <= #{endSurveyWarrantApplyDate}