select p.id, p.integral_order_no, w.wares_name, p.wares_id, p.union_id, p.customer_name, w.wares_pic,w.wares_detail,p.exchange_num,p.exchange_time,p.status, p.integral, p.station_id,d.dept_name as station_name,p.mobile_phone
from integral_order p
join sys_dept d on p.station_id =d.dept_id
join integral_wares w on p.wares_id = w.id
insert into integral_order
integral_order_no,wares_id,union_id,customer_name,exchange_num,exchange_time,status,integral,station_id, mobile_phone,#{integralOrderNo},#{waresId},#{unionId},#{customerName},#{exchangeNum},#{exchangeTime},#{status},#{integral},#{stationId},#{mobilePhone},
update integral_order
integral_order_no = #{integralOrderNo},wares_id = #{waresId},union_id = #{unionId},customer_name = #{customerName},exchange_num = #{exchangeNum},exchange_time = #{exchangeTime},status = #{status},integral = #{integral},station_id = #{stationId}, mobile_phone = #{mobilePhone},
where id = #{id}
delete from integral_order where id = #{id}
delete from integral_order where id in
#{id}