insert into fee_discount_spec(
spec_id,spec_name,spec_value,discount_id,community_id, discount_spec_id
) values (
#{specId},#{specName},#{specValue},#{discountId},#{communityId},#{discountSpecId}
)
update fee_discount_spec t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.spec_name= #{specName}
, t.spec_value= #{specValue}
where 1=1
and t.spec_id= #{specId}
and t.discount_id= #{discountId}
and t.discount_spec_id= #{discountSpecId}
and t.community_id= #{communityId}