id, position_type, position_sn, user_id, real_name, agent_id, index_name, index_code,
index_gid, buy_order_time, buy_order_price, sell_order_time, sell_order_price, order_direction,
order_num, all_deposit_amt, order_fee, order_stay_days, each_point, profit_and_lose,
all_profit_and_lose, is_lock, lock_msg, order_lever, profit_target_price, stop_target_price
delete from user_index_position
where id = #{id,jdbcType=INTEGER}
insert into user_index_position (id, position_type, position_sn,
user_id, real_name, agent_id,
index_name, index_code, index_gid,
buy_order_time, buy_order_price, sell_order_time,
sell_order_price, order_direction, order_num,
all_deposit_amt, order_fee, order_stay_days,
each_point, profit_and_lose, all_profit_and_lose,
is_lock, lock_msg, order_lever,profit_target_price, stop_target_price)
values (#{id,jdbcType=INTEGER}, #{positionType,jdbcType=INTEGER}, #{positionSn,jdbcType=VARCHAR},
#{userId,jdbcType=INTEGER}, #{realName,jdbcType=VARCHAR}, #{agentId,jdbcType=INTEGER},
#{indexName,jdbcType=VARCHAR}, #{indexCode,jdbcType=VARCHAR}, #{indexGid,jdbcType=VARCHAR},
#{buyOrderTime,jdbcType=TIMESTAMP}, #{buyOrderPrice,jdbcType=DECIMAL}, #{sellOrderTime,jdbcType=TIMESTAMP},
#{sellOrderPrice,jdbcType=DECIMAL}, #{orderDirection,jdbcType=VARCHAR}, #{orderNum,jdbcType=INTEGER},
#{allDepositAmt,jdbcType=DECIMAL}, #{orderFee,jdbcType=DECIMAL}, #{orderStayDays,jdbcType=INTEGER},
#{eachPoint,jdbcType=DECIMAL}, #{profitAndLose,jdbcType=DECIMAL}, #{allProfitAndLose,jdbcType=DECIMAL},
#{isLock,jdbcType=INTEGER}, #{lockMsg,jdbcType=VARCHAR},#{orderLever,jdbcType=INTEGER},#{profitTargetPrice,jdbcType=DECIMAL},#{stopTargetPrice,jdbcType=DECIMAL})
insert into user_index_position
id,
position_type,
position_sn,
user_id,
real_name,
agent_id,
index_name,
index_code,
index_gid,
buy_order_time,
buy_order_price,
sell_order_time,
sell_order_price,
order_direction,
order_num,
all_deposit_amt,
order_fee,
order_stay_days,
each_point,
profit_and_lose,
all_profit_and_lose,
is_lock,
lock_msg,
order_lever,
#{id,jdbcType=INTEGER},
#{positionType,jdbcType=INTEGER},
#{positionSn,jdbcType=VARCHAR},
#{userId,jdbcType=INTEGER},
#{realName,jdbcType=VARCHAR},
#{agentId,jdbcType=INTEGER},
#{indexName,jdbcType=VARCHAR},
#{indexCode,jdbcType=VARCHAR},
#{indexGid,jdbcType=VARCHAR},
#{buyOrderTime,jdbcType=TIMESTAMP},
#{buyOrderPrice,jdbcType=DECIMAL},
#{sellOrderTime,jdbcType=TIMESTAMP},
#{sellOrderPrice,jdbcType=DECIMAL},
#{orderDirection,jdbcType=VARCHAR},
#{orderNum,jdbcType=INTEGER},
#{allDepositAmt,jdbcType=DECIMAL},
#{orderFee,jdbcType=DECIMAL},
#{orderStayDays,jdbcType=INTEGER},
#{eachPoint,jdbcType=DECIMAL},
#{profitAndLose,jdbcType=DECIMAL},
#{allProfitAndLose,jdbcType=DECIMAL},
#{isLock,jdbcType=INTEGER},
#{lockMsg,jdbcType=VARCHAR},
#{orderLever,jdbcType=INTEGER},
update user_index_position
position_type = #{positionType,jdbcType=INTEGER},
position_sn = #{positionSn,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=INTEGER},
real_name = #{realName,jdbcType=VARCHAR},
agent_id = #{agentId,jdbcType=INTEGER},
index_name = #{indexName,jdbcType=VARCHAR},
index_code = #{indexCode,jdbcType=VARCHAR},
index_gid = #{indexGid,jdbcType=VARCHAR},
buy_order_time = #{buyOrderTime,jdbcType=TIMESTAMP},
buy_order_price = #{buyOrderPrice,jdbcType=DECIMAL},
sell_order_time = #{sellOrderTime,jdbcType=TIMESTAMP},
sell_order_price = #{sellOrderPrice,jdbcType=DECIMAL},
order_direction = #{orderDirection,jdbcType=VARCHAR},
order_num = #{orderNum,jdbcType=INTEGER},
all_deposit_amt = #{allDepositAmt,jdbcType=DECIMAL},
order_fee = #{orderFee,jdbcType=DECIMAL},
order_stay_days = #{orderStayDays,jdbcType=INTEGER},
each_point = #{eachPoint,jdbcType=DECIMAL},
profit_and_lose = #{profitAndLose,jdbcType=DECIMAL},
all_profit_and_lose = #{allProfitAndLose,jdbcType=DECIMAL},
is_lock = #{isLock,jdbcType=INTEGER},
lock_msg = #{lockMsg,jdbcType=VARCHAR},
order_lever = #{orderLever,jdbcType=INTEGER},
profit_target_price = #{profitTargetPrice,jdbcType=DECIMAL},
stop_target_price = #{stopTargetPrice,jdbcType=DECIMAL},
where id = #{id,jdbcType=INTEGER}
update user_index_position
set position_type = #{positionType,jdbcType=INTEGER},
position_sn = #{positionSn,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=INTEGER},
real_name = #{realName,jdbcType=VARCHAR},
agent_id = #{agentId,jdbcType=INTEGER},
index_name = #{indexName,jdbcType=VARCHAR},
index_code = #{indexCode,jdbcType=VARCHAR},
index_gid = #{indexGid,jdbcType=VARCHAR},
buy_order_time = #{buyOrderTime,jdbcType=TIMESTAMP},
buy_order_price = #{buyOrderPrice,jdbcType=DECIMAL},
sell_order_time = #{sellOrderTime,jdbcType=TIMESTAMP},
sell_order_price = #{sellOrderPrice,jdbcType=DECIMAL},
order_direction = #{orderDirection,jdbcType=VARCHAR},
order_num = #{orderNum,jdbcType=INTEGER},
all_deposit_amt = #{allDepositAmt,jdbcType=DECIMAL},
order_fee = #{orderFee,jdbcType=DECIMAL},
order_stay_days = #{orderStayDays,jdbcType=INTEGER},
each_point = #{eachPoint,jdbcType=DECIMAL},
profit_and_lose = #{profitAndLose,jdbcType=DECIMAL},
all_profit_and_lose = #{allProfitAndLose,jdbcType=DECIMAL},
is_lock = #{isLock,jdbcType=INTEGER},
lock_msg = #{lockMsg,jdbcType=VARCHAR},
order_lever = #{orderLever,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}