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