id,
position_type,
position_sn,
user_id,
nick_name,
subaccount_number,
agent_id,
stock_id,
stock_name,
stock_code,
stock_gid,
stock_spell,
buy_order_id,
buy_order_time,
buy_order_price,
sell_order_id,
sell_order_time,
sell_order_price,
order_direction,
order_num,
order_lever,
order_total_price,
order_fee,
order_spread,
order_stay_fee,
order_stay_days,
profit_and_lose,
all_profit_and_lose,
is_lock,
lock_msg,
stock_plate,
spread_rate_price
INSERT INTO user_funds_position
position_type,
position_sn,
user_id,
nick_name,
subaccount_number,
agent_id,
stock_id,
stock_name,
stock_code,
stock_gid,
stock_spell,
buy_order_id,
buy_order_time,
buy_order_price,
sell_order_id,
sell_order_time,
sell_order_price,
order_direction,
order_num,
order_lever,
order_total_price,
order_fee,
order_spread,
order_stay_fee,
order_stay_days,
profit_and_lose,
all_profit_and_lose,
is_lock,
lock_msg,
stock_plate,
spread_rate_price
#{positionType},
#{positionSn},
#{userId},
#{nickName},
#{subaccountNumber},
#{agentId},
#{stockId},
#{stockName},
#{stockCode},
#{stockGid},
#{stockSpell},
#{buyOrderId},
#{buyOrderTime},
#{buyOrderPrice},
#{sellOrderId},
#{sellOrderTime},
#{sellOrderPrice},
#{orderDirection},
#{orderNum},
#{orderLever},
#{orderTotalPrice},
#{orderFee},
#{orderSpread},
#{orderStayFee},
#{orderStayDays},
#{profitAndLose},
#{allProfitAndLose},
#{isLock},
#{lockMsg},
#{stockPlate},
#{spreadRatePrice}
DELETE FROM user_funds_position
WHERE id = #{id}
UPDATE user_funds_position
position_type = #{positionType},
position_sn = #{positionSn},
user_id = #{userId},
nick_name = #{nickName},
subaccount_number = #{subaccountNumber},
agent_id = #{agentId},
stock_id = #{stockId},
stock_name = #{stockName},
stock_code = #{stockCode},
stock_gid = #{stockGid},
stock_spell = #{stockSpell},
buy_order_id = #{buyOrderId},
buy_order_time = #{buyOrderTime},
buy_order_price = #{buyOrderPrice},
sell_order_id = #{sellOrderId},
sell_order_time = #{sellOrderTime},
sell_order_price = #{sellOrderPrice},
order_direction = #{orderDirection},
order_num = #{orderNum},
order_lever = #{orderLever},
order_total_price = #{orderTotalPrice},
order_fee = #{orderFee},
order_spread = #{orderSpread},
order_stay_fee = #{orderStayFee},
order_stay_days = #{orderStayDays},
profit_and_lose = #{profitAndLose},
all_profit_and_lose = #{allProfitAndLose},
is_lock = #{isLock},
lock_msg = #{lockMsg},
stock_plate = #{stockPlate},
spread_rate_price = #{spreadRatePrice}
WHERE id = #{id}