:::info 💡 对于响应的源始JSON,最终需要标准成为表格过程中,可归纳为三种不同型态:1.List或Object型:列表下级为需要解析的对象{},包含二级对象{},不包含列表[]。2.List: 对象中都有相同数组[]。3.混合模式。除三种格式以外。还有一种JSON字段,对于非LIST ,LIST类型的处理。以源字串型试显示,可以用于MYSQL8.0存储和查询,也可以直接存放MSSQL中,程序做二次处理。 ::: { "self_support_gmv": { "value": 67808291, "unit": "price" }, "other_gmv": { "value": 0, "unit": "price" }, "self_support_gmv_rate": { "value": 1, "unit": "percent" }, "other_gmv_rate": { "value": 0, "unit": "percent" }} [ [ 0, 50022703, "大家电", 1 ], [ 0, 50023724, "其他", 1 ], [ 0, 50230002, "服务商品", 1 ], [ 50022703, 350301, "洗衣机", 2 ], [ 50022703, 50022734, "大家电配件", 2 ], [ 50023724, 50023725, "邮费", 2 ], [ 50023724, 50023728, "赠品", 2 ], [ 50230002, 50232002, "电保包", 2 ], [ 50023724, 124988005, "有价优惠券", 2 ], [ 50022703, 126664001, "洗烘套装", 2 ], [ 50022703, 201128001, "冰洗套装", 2 ], [ 50022703, 201131101, "冰箱", 2 ]] { "index_selected": [ "pay_amt", "refund_amt" ], "data_head": [ { "index_display": "成交金额", "index_name": "pay_amt", "value": { "value": 67808291, "unit": "price" }, "change_value": { "value": -0.090654130922042955, "unit": "ratio" }, "index_tip": "本店全部商品在抖音、火山、头条、西瓜视频当天支付成功或货到付款确认的订单金额汇总,包含退款金额" }, { "index_display": "商品曝光次数", "index_name": "product_show_pv", "value": { "value": 1773084, "unit": "number" }, "change_value": { "value": -0.03711624274816705, "unit": "ratio" }, "index_tip": "本店全部商品在抖音、火山中的直播、短视频、商品卡展现的曝光次数" }, { "index_display": "千次观看成交金额", "index_name": "gpm", "value": { "value": 38243.135125013818, "unit": "price" }, "change_value": { "value": -0.055513075163602432, "unit": "ratio" }, "index_tip": "抖音/火山成交金额/商品曝光数*1000" }, { "index_display": "退款金额", "index_name": "refund_amt", "value": { "value": 40355855, "unit": "price" }, "change_value": { "value": -0.0025569394947867, "unit": "ratio" }, "index_tip": "抖音、火山、头条、西瓜视频所有退款成功商品的退款金额,仅包含走售后系统且退款成功的订单(含货到付款),不含线下退款(如先行赔付等),包含发货前和发货后退款" }, { "index_display": "商品点击率", "index_name": "product_click_ratio", "value": { "value": 0.097535706148157666, "unit": "ratio" }, "change_value": { "value": -0.019595114997089928, "unit": "ratio" }, "index_tip": "商品点击数/商品总浏览量,商品点击数:所选时间范围内本店全部商品在抖音、火山中的直播、短视频、商品卡展现的点击次数" }, { "index_display": "点击-支付转化率", "index_name": "click_pay_ratio", "value": { "value": 0.0460277901456583, "unit": "ratio" }, "change_value": { "value": -0.087142901836757436, "unit": "ratio" }, "index_tip": "抖音、火山中的成交订单数/商品点击数,商品点击数:所选时间范围内本店全部商品在抖音、火山中的直播、短视频、商品卡展现的点击次数" }, { "index_display": "成交人数", "index_name": "pay_ucnt", "value": { "value": 7269, "unit": "number" }, "change_value": { "value": -0.12157099697885196, "unit": "ratio" }, "index_tip": "抖音、火山、头条、西瓜当天支付成功或货到付款确认的用户数汇总,包含退款用户" }, { "index_display": "成交件数", "index_name": "pay_combo_cnt", "value": { "value": 7977, "unit": "number" }, "change_value": { "value": -0.14068727781967036, "unit": "ratio" }, "index_tip": "抖音、火山抖音、火山、头条、西瓜当天支付成功或货到付款确认的商品件数汇总,包含退款商品" }, { "index_display": "成交件单价", "index_name": "product_unit_price", "value": { "value": 8500.47524131879, "unit": "price" }, "change_value": { "value": 0.058224608581004693, "unit": "ratio" }, "index_tip": "成交金额/成交件数" }, { "index_display": "成交订单数", "index_name": "pay_cnt", "value": { "value": 7960, "unit": "number" }, "change_value": { "value": -0.13824834903107069, "unit": "ratio" }, "index_tip": "抖音、火山、头条、西瓜当天支付成功或货到付款确认的子订单数,包含退款的子订单数" }, { "index_display": "商品访客数", "index_name": "product_show_uv", "value": { "value": 123342, "unit": "number" }, "change_value": { "value": -0.10196800803803505, "unit": "ratio" }, "index_tip": "本店全部商品在抖音、火山中的直播、短视频、商品卡曝光的去重人数(同一用户访问多个商品只被计算1次)" }, { "index_display": "商品点击人数", "index_name": "product_click_uv", "value": { "value": 54142, "unit": "number" }, "change_value": { "value": -0.0761854385994847, "unit": "ratio" }, "index_tip": "本店全部商品在抖音、火山中的直播、短视频、商品卡点击的去重人数(同一用户点击多个商品只被计算1次)" } ], "data_result": { "unit": { "pay_amt": "price", "refund_amt": "price" }, "value": [ { "x": "06/28", "y": { "pay_amt": 16850840, "refund_amt": 6445922 } }, { "x": "06/29", "y": { "pay_amt": 17241060, "refund_amt": 6880208 } }, { "x": "06/30", "y": { "pay_amt": 14073460, "refund_amt": 7020003 } }, { "x": "07/01", "y": { "pay_amt": 5060670, "refund_amt": 5629507 } }, { "x": "07/02", "y": { "pay_amt": 582110, "refund_amt": 4554126 } }, { "x": "07/03", "y": { "pay_amt": 7986600, "refund_amt": 4790756 } }, { "x": "07/04", "y": { "pay_amt": 6013551, "refund_amt": 5035333 } } ] }} 从JSON查表,可以看出是一个包含多种结构形式的情况,不能用常规转表模式 这里以json字段直接存放数据库