import request from '@/config/axios'

export interface CombinationConfigVO {
  id: number
  userId: number
  comboSequence: number
  executeStatus: number
  multiplier: number
  deleteStatus: number
  description: string
}

// 查询连单设置列表
export const getCombinationConfigPage = async (params) => {
  return await request.get({ url: `/member/combination-config/page`, params })
}

// 查询连单设置详情
export const getCombinationConfig = async (id: number) => {
  return await request.get({ url: `/member/combination-config/get?id=` + id })
}

// 新增连单设置
export const createCombinationConfig = async (data: any) => {
  return await request.post({ url: `/member/combination-config/create`, data })
}

// 修改连单设置
export const updateCombinationConfig = async (data: CombinationConfigVO) => {
  return await request.put({ url: `/member/combination-config/update`, data })
}

// 删除连单设置
export const deleteCombinationConfig = async (id: number) => {
  return await request.delete({ url: `/member/combination-config/delete?id=` + id })
}

// 导出连单设置 Excel
export const exportCombinationConfig = async (params) => {
  return await request.download({ url: `/member/combination-config/export-excel`, params })
}

// 修改执行状态
export const updateCombinationExecuteStatus = async (data: any) => {
  return await request.put({ url: `/member/combination-config/execute-status`, data })
}
