insert into business_owner_car_attr( attr_id,operate,create_time,spec_cd,community_id,b_id,value,car_id ) values ( #{attrId},#{operate},#{createTime},#{specCd},#{communityId},#{bId},#{value},#{carId} ) insert into owner_car_attr( attr_id,spec_cd,community_id,b_id,value,car_id ) values ( #{attrId},#{specCd},#{communityId},'-1',#{value},#{carId} ) insert into owner_car_attr( attr_id,create_time,spec_cd,status_cd,community_id,b_id,value,car_id ) select t.attr_id,t.create_time,t.spec_cd,'0',t.community_id,t.b_id,t.value,t.car_id from business_owner_car_attr t where 1=1 and t.attr_id= #{attrId} and t.operate= 'ADD' and t.create_time= #{createTime} and t.spec_cd= #{specCd} and t.community_id= #{communityId} and t.b_id= #{bId} and t.value= #{value} and t.car_id= #{carId} update owner_car_attr t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.create_time= #{createTime} , t.spec_cd= #{specCd} , t.community_id= #{communityId} , t.value= #{value} , t.car_id= #{carId} where 1=1 and t.attr_id= #{attrId} and t.b_id= #{bId}