Exemplo n.º 1
0
        public void TestSaveReportTableInfoData()
        {
            AccessToken     accessToken = accessTokenService.GetAccessToken();
            TableInfoDataVo tableData   = new TableInfoDataVo();
            string          testData    = "[{\"表头1\":\"中国\",\"表头2\":\"100\",\"表头3\":\"2008-08-08 20:00:00\"},{\"表头1\":\"美国\",\"表头2\":\"80\",\"表头3\":\"2009-09-08 20:00:00\"},{\"表头1\":\"法国\",\"表头2\":\"115\",\"表头3\":\"2008-08-08 20:00:00\"}]";

            tableData.eid = "11738174";
            tableData.reportCategoryId = "59cf54bd59b4462841b12c85"; // 来源于AdminTableInfos,与表头保持一致
            tableData.tableInfoId      = "59e48733b449296dae8bacc2"; // 来源于表头创建或已有数据表Id
            tableData.addType          = 1;
            tableData.data             = testData;
            tableData.batchId          = "GmdGyrsuqqPqZcZRLpwzxXvjbDXu89";// 批次id,每次传不重复随机值,建议使用uuid

            bool status = openApiService.SaveReportTableInfoData(tableData, accessToken.accessToken);

            Console.WriteLine(status);
        }