import { resultSuccess } from '../_util';

const gudongTable = (_pageSize) => {
  return [
    {
      days: '2022-07-21',
      players: 528,
      jinglis: 404,
      adJinglis: 359,
      diamondJinglis: 45,
      adDiamonds: 0,
      rmbDiamonds: 0,
      speedUps: 152,
      boxDetails:
        '[{"EventId":1,"Count":25},{"EventId":2,"Count":28},{"EventId":3,"Count":21},{"EventId":4,"Count":37},{"EventId":5,"Count":41}]',
      identifyGoods: 289,
      upgradeGoods: 96,
      showRevenues: 797659200,
      rankings: 447,
      rankingBenifit: 45,
      exchangeGoods:
        '[{Id:1,Count:1478},{Id:2,Count:371},{Id:3,Count:409},{Id:4,Count:260},{Id:5,Count:231},{Id:6,Count:232},{Id:7,Count:221},{Id:8,Count:211}]',
      sellGoods: 245,
      getGoods: 21681,
      getGoodsDetail:
        '[{Id:1,Count:4401},{Id:2,Count:4196},{Id:3,Count:4190},{Id:4,Count:4163},{Id:5,Count:4731}]',
      avgJinglis: 0.76,
      avgAdJinglis: 0.67,
      avgDiamondJinglis: 0.08,
      avgAdDiamonds: 0,
      avgRmbDiamonds: 0,
      avgSpeedUps: 0.28,
      avgBoxDetails: 0,
      avgIdentifyGoods: 0.54,
      avgUpgradeGoods: 0.18,
      avgShowRevenues: 1510718.18,
      avgRankings: 0.84,
      avgRankingBenifit: 0.08,
      avgSellGoods: 0.46,
      avgGetGoods: 41.06,
    },
    {
      days: '2022-07-20',
      players: 545,
      jinglis: 425,
      adJinglis: 383,
      diamondJinglis: 42,
      adDiamonds: 0,
      rmbDiamonds: 0,
      speedUps: 156,
      boxDetails:
        '[{"EventId":1,"Count":28},{"EventId":2,"Count":24},{"EventId":3,"Count":25},{"EventId":4,"Count":32},{"EventId":5,"Count":47}]',
      identifyGoods: 295,
      upgradeGoods: 68,
      showRevenues: 625351400,
      rankings: 480,
      rankingBenifit: 60,
      exchangeGoods:
        '[{Id:1,Count:1222},{Id:2,Count:296},{Id:3,Count:318},{Id:4,Count:177},{Id:5,Count:170},{Id:6,Count:176},{Id:7,Count:159},{Id:8,Count:160}]',
      sellGoods: 138,
      getGoods: 22735,
      getGoodsDetail:
        '[{Id:1,Count:4601},{Id:2,Count:4352},{Id:3,Count:4338},{Id:4,Count:4428},{Id:5,Count:5016}]',
      avgJinglis: 0.77,
      avgAdJinglis: 0.7,
      avgDiamondJinglis: 0.07,
      avgAdDiamonds: 0,
      avgRmbDiamonds: 0,
      avgSpeedUps: 0.28,
      avgBoxDetails: 0,
      avgIdentifyGoods: 0.54,
      avgUpgradeGoods: 0.12,
      avgShowRevenues: 1147433.76,
      avgRankings: 0.88,
      avgRankingBenifit: 0.11,
      avgSellGoods: 0.25,
      avgGetGoods: 41.71,
    },
    {
      days: '2022-07-19',
      players: 545,
      jinglis: 508,
      adJinglis: 439,
      diamondJinglis: 69,
      adDiamonds: 0,
      rmbDiamonds: 0,
      speedUps: 169,
      boxDetails:
        '[{"EventId":1,"Count":37},{"EventId":2,"Count":28},{"EventId":3,"Count":30},{"EventId":4,"Count":25},{"EventId":5,"Count":49}]',
      identifyGoods: 285,
      upgradeGoods: 44,
      showRevenues: 295319000,
      rankings: 577,
      rankingBenifit: 60,
      exchangeGoods:
        '[{Id:1,Count:834},{Id:2,Count:147},{Id:3,Count:160},{Id:4,Count:116},{Id:5,Count:95},{Id:6,Count:99},{Id:7,Count:88},{Id:8,Count:86}]',
      sellGoods: 223,
      getGoods: 23323,
      getGoodsDetail:
        '[{Id:1,Count:4728},{Id:2,Count:4457},{Id:3,Count:4503},{Id:4,Count:4478},{Id:5,Count:5157}]',
      avgJinglis: 0.93,
      avgAdJinglis: 0.8,
      avgDiamondJinglis: 0.12,
      avgAdDiamonds: 0,
      avgRmbDiamonds: 0,
      avgSpeedUps: 0.31,
      avgBoxDetails: 0,
      avgIdentifyGoods: 0.52,
      avgUpgradeGoods: 0.08,
      avgShowRevenues: 541869.72,
      avgRankings: 1.05,
      avgRankingBenifit: 0.11,
      avgSellGoods: 0.4,
      avgGetGoods: 42.79,
    },
    {
      days: '2022-07-18',
      players: 538,
      jinglis: 472,
      adJinglis: 387,
      diamondJinglis: 85,
      adDiamonds: 0,
      rmbDiamonds: 0,
      speedUps: 239,
      boxDetails:
        '[{"EventId":1,"Count":45},{"EventId":2,"Count":42},{"EventId":3,"Count":40},{"EventId":4,"Count":50},{"EventId":5,"Count":62}]',
      identifyGoods: 185,
      upgradeGoods: 12,
      showRevenues: 56638300,
      rankings: 625,
      rankingBenifit: 94,
      exchangeGoods:
        '[{Id:1,Count:235},{Id:2,Count:39},{Id:3,Count:47},{Id:4,Count:23},{Id:5,Count:24},{Id:6,Count:21},{Id:7,Count:20},{Id:8,Count:16}]',
      sellGoods: 177,
      getGoods: 22403,
      getGoodsDetail:
        '[{Id:1,Count:4568},{Id:2,Count:4254},{Id:3,Count:4316},{Id:4,Count:4286},{Id:5,Count:4979}]',
      avgJinglis: 0.87,
      avgAdJinglis: 0.71,
      avgDiamondJinglis: 0.15,
      avgAdDiamonds: 0,
      avgRmbDiamonds: 0,
      avgSpeedUps: 0.44,
      avgBoxDetails: 0,
      avgIdentifyGoods: 0.34,
      avgUpgradeGoods: 0.02,
      avgShowRevenues: 105275.65,
      avgRankings: 1.16,
      avgRankingBenifit: 0.17,
      avgSellGoods: 0.32,
      avgGetGoods: 41.64,
    },
    {
      days: '2022-07-17',
      players: 511,
      jinglis: 311,
      adJinglis: 276,
      diamondJinglis: 35,
      adDiamonds: 0,
      rmbDiamonds: 0,
      speedUps: 123,
      boxDetails:
        '[{"EventId":1,"Count":20},{"EventId":2,"Count":25},{"EventId":3,"Count":28},{"EventId":4,"Count":23},{"EventId":5,"Count":27}]',
      identifyGoods: 246,
      upgradeGoods: 113,
      showRevenues: 1671411300,
      rankings: 464,
      rankingBenifit: 73,
      exchangeGoods:
        '[{Id:1,Count:2394},{Id:2,Count:601},{Id:3,Count:631},{Id:4,Count:442},{Id:5,Count:437},{Id:6,Count:445},{Id:7,Count:405},{Id:8,Count:403}]',
      sellGoods: 450,
      getGoods: 17701,
      getGoodsDetail:
        '[{Id:1,Count:3558},{Id:2,Count:3446},{Id:3,Count:3448},{Id:4,Count:3422},{Id:5,Count:3827}]',
      avgJinglis: 0.6,
      avgAdJinglis: 0.54,
      avgDiamondJinglis: 0.06,
      avgAdDiamonds: 0,
      avgRmbDiamonds: 0,
      avgSpeedUps: 0.24,
      avgBoxDetails: 0,
      avgIdentifyGoods: 0.48,
      avgUpgradeGoods: 0.22,
      avgShowRevenues: 3270863.6,
      avgRankings: 0.9,
      avgRankingBenifit: 0.14,
      avgSellGoods: 0.88,
      avgGetGoods: 34.63,
    },
    {
      days: '2022-07-16',
      players: 530,
      jinglis: 359,
      adJinglis: 318,
      diamondJinglis: 41,
      adDiamonds: 0,
      rmbDiamonds: 0,
      speedUps: 167,
      boxDetails:
        '[{"EventId":1,"Count":33},{"EventId":2,"Count":29},{"EventId":3,"Count":30},{"EventId":4,"Count":28},{"EventId":5,"Count":47}]',
      identifyGoods: 255,
      upgradeGoods: 107,
      showRevenues: 1338714100,
      rankings: 410,
      rankingBenifit: 65,
      exchangeGoods:
        '[{Id:1,Count:1827},{Id:2,Count:501},{Id:3,Count:518},{Id:4,Count:361},{Id:5,Count:362},{Id:6,Count:346},{Id:7,Count:317},{Id:8,Count:327}]',
      sellGoods: 206,
      getGoods: 19583,
      getGoodsDetail:
        '[{Id:1,Count:4001},{Id:2,Count:3755},{Id:3,Count:3724},{Id:4,Count:3791},{Id:5,Count:4312}]',
      avgJinglis: 0.67,
      avgAdJinglis: 0.6,
      avgDiamondJinglis: 0.07,
      avgAdDiamonds: 0,
      avgRmbDiamonds: 0,
      avgSpeedUps: 0.31,
      avgBoxDetails: 0,
      avgIdentifyGoods: 0.48,
      avgUpgradeGoods: 0.2,
      avgShowRevenues: 2525875.66,
      avgRankings: 0.77,
      avgRankingBenifit: 0.12,
      avgSellGoods: 0.38,
      avgGetGoods: 36.94,
    },
    {
      days: '2022-07-15',
      players: 509,
      jinglis: 355,
      adJinglis: 303,
      diamondJinglis: 52,
      adDiamonds: 0,
      rmbDiamonds: 0,
      speedUps: 141,
      boxDetails:
        '[{"EventId":1,"Count":28},{"EventId":2,"Count":21},{"EventId":3,"Count":22},{"EventId":4,"Count":19},{"EventId":5,"Count":51}]',
      identifyGoods: 280,
      upgradeGoods: 111,
      showRevenues: 1106945400,
      rankings: 398,
      rankingBenifit: 44,
      exchangeGoods:
        '[{Id:1,Count:1783},{Id:2,Count:463},{Id:3,Count:493},{Id:4,Count:319},{Id:5,Count:305},{Id:6,Count:306},{Id:7,Count:282},{Id:8,Count:279}]',
      sellGoods: 167,
      getGoods: 20459,
      getGoodsDetail:
        '[{Id:1,Count:4110},{Id:2,Count:3978},{Id:3,Count:3868},{Id:4,Count:3975},{Id:5,Count:4528}]',
      avgJinglis: 0.69,
      avgAdJinglis: 0.59,
      avgDiamondJinglis: 0.1,
      avgAdDiamonds: 0,
      avgRmbDiamonds: 0,
      avgSpeedUps: 0.27,
      avgBoxDetails: 0,
      avgIdentifyGoods: 0.55,
      avgUpgradeGoods: 0.21,
      avgShowRevenues: 2174745.38,
      avgRankings: 0.78,
      avgRankingBenifit: 0.08,
      avgSellGoods: 0.32,
      avgGetGoods: 40.19,
    },
  ];
};

export default [
  {
    url: '/api/echarts/gudongTable',
    timeout: 1,
    method: 'get',
    response: ({ query }) => {
      const { page = 1, pageSize = 10 } = query;
      const list = gudongTable(Number(pageSize));
      return resultSuccess({
        page: Number(page),
        pageSize: Number(pageSize),
        pageCount: 1,
        list,
      });
    },
  },
];
