insert into business_floor_attr(
floor_id,attr_id,operate,spec_cd,community_id,b_id,value
) values (
#{floorId},#{attrId},#{operate},#{specCd},#{communityId},#{bId},#{value}
)
insert into f_floor_attr(
floor_id,attr_id,spec_cd,community_id,b_id,value
) values (
#{floorId},#{attrId},#{specCd},#{communityId},'-1',#{value}
)
insert into f_floor_attr(
floor_id,attr_id,spec_cd,status_cd,community_id,b_id,value
) select t.floor_id,t.attr_id,t.spec_cd,'0',t.community_id,t.b_id,t.value from business_floor_attr t where 1=1
and t.floor_id= #{floorId}
and t.attr_id= #{attrId}
and t.operate= 'ADD'
and t.spec_cd= #{specCd}
and t.community_id= #{communityId}
and t.b_id= #{bId}
and t.value= #{value}
update f_floor_attr t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.floor_id= #{floorId}
, t.spec_cd= #{specCd}
, t.community_id= #{communityId}
, t.value= #{value}
where 1=1
and t.attr_id= #{attrId}
and t.b_id= #{bId}