insert into business_parking_area( operate,type_cd,num,pa_id,remark,community_id,b_id ) values ( #{operate},#{typeCd},#{num},#{paId},#{remark},#{communityId},#{bId} ) insert into parking_area( type_cd,num,pa_id,remark,status_cd,community_id,b_id ) select t.type_cd,t.num,t.pa_id,t.remark,'0',t.community_id,t.b_id from business_parking_area t where 1=1 and t.operate= 'ADD' and t.type_cd= #{typeCd} and t.num= #{num} and t.pa_id= #{paId} and t.remark= #{remark} and t.community_id= #{communityId} and t.b_id= #{bId} update parking_area t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.type_cd= #{typeCd} , t.num= #{num} , t.remark= #{remark} , t.community_id= #{communityId} where 1=1 and t.pa_id= #{paId} and t.b_id= #{bId}