insert into fee_manual_collection_detail(
amount,fee_name,detail_id,start_time,end_time,state,community_id,collection_id,fee_id
) values (
#{amount},#{feeName},#{detailId},#{startTime},#{endTime},#{state},#{communityId},#{collectionId},#{feeId}
)
update fee_manual_collection_detail t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.amount= #{amount}
, t.fee_name= #{feeName}
, t.start_time= #{startTime}
, t.end_time= #{endTime}
, t.state= #{state}
, t.community_id= #{communityId}
, t.collection_id= #{collectionId}
, t.fee_id= #{feeId}
where 1=1
and t.detail_id= #{detailId}
and t.collection_id= #{collectionId}