insert into reserve_goods_order(
order_id,goods_id,receivable_amount,pay_way,remark,received_amount,type,person_name,ext_order_id,appointment_time,person_id,state,person_tel,community_id
) values (
#{orderId},#{goodsId},#{receivableAmount},#{payWay},#{remark},#{receivedAmount},#{type},#{personName},#{extOrderId},#{appointmentTime},#{personId},#{state},#{personTel},#{communityId}
)
update reserve_goods_order t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.goods_id= #{goodsId}
, t.receivable_amount= #{receivableAmount}
, t.pay_way= #{payWay}
, t.remark= #{remark}
, t.received_amount= #{receivedAmount}
, t.type= #{type}
, t.person_name= #{personName}
, t.ext_order_id= #{extOrderId}
, t.appointment_time= #{appointmentTime}
, t.person_id= #{personId}
, t.state= #{state}
, t.person_tel= #{personTel}
, t.community_id= #{communityId}
where 1=1
and t.order_id= #{orderId}