insert into business_community_location(location_name, operate, location_id, location_type, b_id, community_id) values (#{locationName}, #{operate}, #{locationId}, #{locationType}, #{bId}, #{communityId}) insert into community_location( location_name,location_id,location_type,status_cd,b_id,community_id ) select t.location_name,t.location_id,t.location_type,'0',t.b_id,t.community_id from business_community_location t where 1=1 and t.location_name= #{locationName} and t.operate= 'ADD' and t.location_id= #{locationId} and t.location_type= #{locationType} and t.b_id= #{bId} and t.community_id= #{communityId} update community_location t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.location_name= #{locationName} , t.location_type= #{locationType} , t.community_id= #{communityId} where 1=1 and t.location_id= #{locationId} and t.b_id= #{bId}