insert into parking_coupon_order(
quantity,order_id,pa_name,shop_name,receivable_amount,remark,received_amount,coupon_id,price,pa_id,community_name,shop_id,community_id,pay_type
) values (
#{quantity},#{orderId},#{paName},#{shopName},#{receivableAmount},#{remark},#{receivedAmount},#{couponId},#{price},#{paId},#{communityName},#{shopId},#{communityId},#{payType}
)
update parking_coupon_order t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.quantity= #{quantity}
, t.pa_name= #{paName}
, t.shop_name= #{shopName}
, t.receivable_amount= #{receivableAmount}
, t.remark= #{remark}
, t.received_amount= #{receivedAmount}
, t.coupon_id= #{couponId}
, t.price= #{price}
, t.pa_id= #{paId}
, t.community_name= #{communityName}
, t.shop_id= #{shopId}
, t.community_id= #{communityId}
where 1=1
and t.order_id= #{orderId}