select p.id,p.union_id,p.mobile_phone,p.points,p.customer_name, p.consumption_points, p.accumulate_points, p.invalid_points, p.recent_consumption_date,p.station_id, d.dept_name as station_name from customer_points p join sys_dept d on p.station_id = d.dept_id insert into customer_points union_id, mobile_phone, points, consumption_points, accumulate_points, invalid_points, recent_consumption_date, station_id, #{unionId}, #{mobilePhone}, #{points}, #{consumptionPoints}, #{accumulatePoints}, #{invalidPoints}, #{recentConsumptionDate}, #{stationId}, update customer_points union_id = #{unionId}, mobile_phone = #{mobilePhone}, points = #{points}, consumption_points = #{consumptionPoints}, accumulate_points = #{accumulatePoints}, invalid_points = #{invalidPoints}, recent_consumption_date = #{recentConsumptionDate}, station_id = #{stationId}, station_name = #{stationName}, where id = #{id} delete from customer_points where id = #{id} delete from customer_points where id in #{id}