export function processDates(
  oldArr: Array<{ date: string; id: number }>,
  newTimeArr: string[]
) {
  // 构建快速查找结构
  const oldDateMap = new Map(oldArr.map(item => [item.date, item.id]))
  const newTimeSet = new Set(newTimeArr)

  // 处理 dates 数组
  const dates = newTimeArr.map(date => ({
    date,
    id: oldDateMap.get(date) || null
  }))

  // 处理 removeIds 数组
  const removeIds = oldArr.filter(item => !newTimeSet.has(item.date)).map(item => item.id)

  return { dates, removeIds }
}
