import request from '@/utils/request';

// 获取销售同环比
export async function handleGetCommoditySaleSummary(params: any) {
  const data = await request('/Sales/GetCommoditySaleSummary', {
    method: 'GET',
    params
  })

  if (data.Result_Code !== 100) {
    return {
      data: [],
      otherData: '',
      current: 1,
      pageSize: 20,
      total: 0,
      success: true,
    };
  }

  return data.Result_Data.List
}


// 获取商品业态
export async function handleGetBusinessTrades(params: any) {
  const data = await request('/BaseInfo/GetBusinessTrades', {
    method: 'POST',
    params
  })

  return data.Result_Data.List
}
