id_, organ_id_, cooperation_organ_id_, trans_no_,order_id_, order_no_, expect_amount_, actual_amount_,
balance_amount_, sell_cost_, sell_cost2_, type_, goods_id_,goods_name_, num_, user_id_, payment_channel_,
mer_no_, sell_time_, create_ime_, update_time_
delete from sell_order
where id_ = #{id}
insert into sell_order (organ_id_, cooperation_organ_id_, trans_no_,order_id_, order_no_, expect_amount_, actual_amount_,
balance_amount_, type_, goods_id_,goods_name_, sell_cost_, sell_cost2_, num_, user_id_, payment_channel_,
mer_no_, sell_time_, create_ime_, update_time_)
values (#{organId}, #{cooperationOrganId}, #{transNo}, #{orderNo},#{orderId}, #{expectAmount}, #{actualAmount},
#{balanceAmount}, #{type}, #{goodsId}, #{goodsName}, #{sellCost}, #{sellCost2}, #{num}, #{userId},
#{paymentChannel},
#{merNo}, #{sellTime}, #{createIme}, #{updateTime})
update sell_order
organ_id_ = #{organId},
cooperation_organ_id_ = #{cooperationOrganId},
trans_no_ = #{transNo},
order_id_ = #{orderId},
order_no_ = #{orderNo},
expect_amount_ = #{expectAmount},
actual_amount_ = #{actualAmount},
balance_amount_ = #{balanceAmount},
type_ = #{type},
goods_id_ = #{goodsId},
goods_name_ = #{goodsName},
sell_cost_ = #{sellCost},
sell_cost2_ = #{sellCost2},
num_ = #{num},
user_id_ = #{userId},
payment_channel_ = #{paymentChannel},
mer_no_ = #{merNo},
sell_time_ = #{sellTime},
create_ime_ = #{createIme},
update_time_ = #{updateTime},
where id_ = #{id}
insert into sell_order (organ_id_, cooperation_organ_id_, trans_no_,order_id_, order_no_, expect_amount_, actual_amount_,
balance_amount_, type_, goods_id_,goods_name_, sell_cost_, sell_cost2_, num_, user_id_, payment_channel_,
mer_no_, sell_time_, create_ime_, update_time_)
VALUE
(#{sellOrder.organId},#{sellOrder.cooperationOrganId},#{sellOrder.transNo},#{sellOrder.orderId},#{sellOrder.orderNo},
#{sellOrder.expectAmount},#{sellOrder.actualAmount},#{sellOrder.balanceAmount},#{sellOrder.type},#{sellOrder.goodsId},
#{sellOrder.goodsName},#{sellOrder.sellCost},#{sellOrder.sellCost2},#{sellOrder.num},#{sellOrder.userId},
#{sellOrder.paymentChannel},#{sellOrder.merNo},#{sellOrder.sellTime},#{sellOrder.createIme},#{sellOrder.updateTime})
AND (so.order_no_ = #{search} OR so.trans_no_ = #{search})
AND FIND_IN_SET(so.organ_id_,#{organIdList})
AND so.goods_name_ = #{goodsName}
AND so.cooperation_organ_id_ = #{cooperationOrganId}
AND so.type_ = #{type}
AND so.sell_time_ >= #{startTime}
AND so.sell_time_ <= #{endTime}