数据库 数据校验写入等逻辑更新。

This commit is contained in:
Neo
2026-02-01 03:46:16 +08:00
parent 9948000b71
commit 076f5755ca
128 changed files with 494310 additions and 2819 deletions

View File

@@ -0,0 +1,569 @@
================================================================================
Table: billiards_dwd.dwd_settlement_head
Primary Key: order_settle_id
================================================================================
## COLUMNS
--------------------------------------------------------------------------------
order_settle_id: bigint | nullable=NO | PK
tenant_id: bigint | nullable=YES |
site_id: bigint | nullable=YES |
site_name: character varying(100) | nullable=YES |
table_id: bigint | nullable=YES |
settle_name: character varying(100) | nullable=YES |
order_trade_no: bigint | nullable=YES |
create_time: timestamp with time zone | nullable=YES |
pay_time: timestamp with time zone | nullable=YES |
settle_type: integer | nullable=YES |
revoke_order_id: bigint | nullable=YES |
member_id: bigint | nullable=YES |
member_name: character varying(100) | nullable=YES |
member_phone: character varying(50) | nullable=YES |
member_card_account_id: bigint | nullable=YES |
member_card_type_name: character varying(100) | nullable=YES |
is_bind_member: boolean | nullable=YES |
member_discount_amount: numeric(18,2) | nullable=YES |
consume_money: numeric(18,2) | nullable=YES |
table_charge_money: numeric(18,2) | nullable=YES |
goods_money: numeric(18,2) | nullable=YES |
real_goods_money: numeric(18,2) | nullable=YES |
assistant_pd_money: numeric(18,2) | nullable=YES |
assistant_cx_money: numeric(18,2) | nullable=YES |
adjust_amount: numeric(18,2) | nullable=YES |
pay_amount: numeric(18,2) | nullable=YES |
balance_amount: numeric(18,2) | nullable=YES |
recharge_card_amount: numeric(18,2) | nullable=YES |
gift_card_amount: numeric(18,2) | nullable=YES |
coupon_amount: numeric(18,2) | nullable=YES |
rounding_amount: numeric(18,2) | nullable=YES |
point_amount: numeric(18,2) | nullable=YES |
## VALUE ANALYSIS (for enum detection)
--------------------------------------------------------------------------------
order_settle_id:
Total: 23366, Non-null: 23366, Distinct: 23366
Top values:
2800957557606597: 1
2976413737093189: 1
2999989561657733: 1
2813089803389701: 1
3016989267592773: 1
3021547742021445: 1
2993181992014533: 1
2947505138716229: 1
2992745472101061: 1
2854193189832517: 1
2993477589912261: 1
2997829514791365: 1
2870187561552133: 1
2998670603291013: 1
2927680632849861: 1
tenant_id:
Total: 23366, Non-null: 23366, Distinct: 1
*** LIKELY ENUM (distinct <= 15) ***
Top values:
2790683160709957: 23366
site_id:
Total: 23366, Non-null: 23366, Distinct: 1
*** LIKELY ENUM (distinct <= 15) ***
Top values:
2790685415443269: 23366
site_name:
Total: 23366, Non-null: 23366, Distinct: 1
*** LIKELY ENUM (distinct <= 15) ***
Top values:
朗朗桌球: 23366
table_id:
Total: 23366, Non-null: 23366, Distinct: 75
Top values:
0: 5141
2793001695301765: 1075
2793001904918661: 1009
2793002509209733: 1006
2791964216463493: 930
2793002808987781: 906
2792521437958213: 840
2793002896494725: 775
2793002980429893: 659
2793003066429509: 619
2793003159474245: 505
2793003705192517: 486
2793003243294789: 463
2793020259897413: 456
2793003420504133: 418
settle_name:
Total: 23366, Non-null: 23366, Distinct: 80
Top values:
商城订单: 5131
A区 A3: 1075
A区 A4: 1009
A区 A5: 1006
A区 A1: 930
A区 A7: 906
A区 A2: 840
A区 A8: 775
A区 A9: 659
A区 A10: 619
A区 A11: 505
A区 A17: 486
A区 A12: 463
斯诺克区 S1: 456
A区 A14: 418
order_trade_no:
Total: 23366, Non-null: 23366, Distinct: 23336
Top values:
3027329290242053: 3
2976235557292165: 2
2994308597600517: 2
2974729138770693: 2
3015928035247749: 2
2865908017401733: 2
2933663025792581: 2
2984046562511557: 2
3064035456208069: 2
3065441882573701: 2
2997378605779525: 2
2980515978873157: 2
3056795414873989: 2
2807676743111429: 2
3015904480560645: 2
settle_type:
Total: 23366, Non-null: 23366, Distinct: 4
*** LIKELY ENUM (distinct <= 15) ***
Top values:
1: 18225
3: 5131
7: 9
6: 1
revoke_order_id:
Total: 23366, Non-null: 23366, Distinct: 1
*** LIKELY ENUM (distinct <= 15) ***
Top values:
0: 23366
member_id:
Total: 23366, Non-null: 23366, Distinct: 196
Top values:
0: 19344
2799207363643141: 261
2799207359858437: 250
2799207522600709: 231
2799207406946053: 175
2799207124305669: 149
2799207519176453: 138
2799207403554565: 131
2820625955784965: 119
2799212845565701: 108
2799207328155397: 104
2799209806071557: 102
2799207390349061: 87
2799212430657285: 82
2799207290996485: 82
member_name:
Total: 23366, Non-null: 1798, Distinct: 100
Top values:
张先生: 111
陈先生: 110
夏: 102
轩哥: 98
陈德韩: 93
黄先生: 62
曾巧明: 58
罗先生: 58
江先生: 50
周先生: 48
郭先生: 43
汪先生: 41
易先生: 40
刘先生: 40
艾宇民: 39
member_phone:
Total: 23366, Non-null: 1798, Distinct: 126
Top values:
19120942851: 102
13902258852: 99
18826267530: 98
13431017864: 93
15915782829: 77
18688471488: 58
13924036996: 55
18819484838: 50
13570163507: 44
13825157225: 42
13925126339: 41
18689418682: 40
15062279958: 39
19927472465: 39
13922213242: 38
member_card_account_id:
Total: 23366, Non-null: 23366, Distinct: 1
*** LIKELY ENUM (distinct <= 15) ***
Top values:
0: 23366
member_card_type_name:
Total: 23366, Non-null: 0, Distinct: 0
Top values:
is_bind_member:
Total: 23366, Non-null: 23366, Distinct: 1
*** LIKELY ENUM (distinct <= 15) ***
Top values:
False: 23366
## SAMPLE DATA (first 10 rows)
--------------------------------------------------------------------------------
Columns: ['order_settle_id', 'tenant_id', 'site_id', 'site_name', 'table_id', 'settle_name', 'order_trade_no', 'create_time', 'pay_time', 'settle_type', 'revoke_order_id', 'member_id', 'member_name', 'member_phone', 'member_card_account_id', 'member_card_type_name', 'is_bind_member', 'member_discount_amount', 'consume_money', 'table_charge_money', 'goods_money', 'real_goods_money', 'assistant_pd_money', 'assistant_cx_money', 'adjust_amount', 'pay_amount', 'balance_amount', 'recharge_card_amount', 'gift_card_amount', 'coupon_amount', 'rounding_amount', 'point_amount']
Row 1:
order_settle_id: 2957922914357125
tenant_id: 2790683160709957
site_id: 2790685415443269
site_name: 朗朗桌球
table_id: 2793003705192517
settle_name: A区 A17
order_trade_no: 2957858167230149
create_time: 2025-11-09 23:34:49+08:00
pay_time: 2025-11-09 23:35:57+08:00
settle_type: 1
revoke_order_id: 0
member_id: 0
member_name: NULL
member_phone: NULL
member_card_account_id: 0
member_card_type_name: NULL
is_bind_member: False
member_discount_amount: 0.00
consume_money: 58.00
table_charge_money: 48.00
goods_money: 10.00
real_goods_money: 10.00
assistant_pd_money: 0.00
assistant_cx_money: 0.00
adjust_amount: 0.00
pay_amount: 10.00
balance_amount: 0.00
recharge_card_amount: 0.00
gift_card_amount: 0.00
coupon_amount: 48.00
rounding_amount: 0.00
point_amount: 10.00
Row 2:
order_settle_id: 2957922677673797
tenant_id: 2790683160709957
site_id: 2790685415443269
site_name: 朗朗桌球
table_id: 2793001904918661
settle_name: A区 A4
order_trade_no: 2957804588781445
create_time: 2025-11-09 23:34:35+08:00
pay_time: 2025-11-09 23:34:36+08:00
settle_type: 1
revoke_order_id: 0
member_id: 0
member_name: NULL
member_phone: NULL
member_card_account_id: 0
member_card_type_name: NULL
is_bind_member: False
member_discount_amount: 0.00
consume_money: 96.00
table_charge_money: 96.00
goods_money: 0.00
real_goods_money: 0.00
assistant_pd_money: 0.00
assistant_cx_money: 0.00
adjust_amount: 0.00
pay_amount: 0.00
balance_amount: 0.00
recharge_card_amount: 0.00
gift_card_amount: 0.00
coupon_amount: 96.00
rounding_amount: 0.00
point_amount: 0.00
Row 3:
order_settle_id: 2957921502088901
tenant_id: 2790683160709957
site_id: 2790685415443269
site_name: 朗朗桌球
table_id: 2791964216463493
settle_name: A区 A1
order_trade_no: 2957862075436549
create_time: 2025-11-09 23:33:23+08:00
pay_time: 2025-11-09 23:33:24+08:00
settle_type: 1
revoke_order_id: 0
member_id: 0
member_name: NULL
member_phone: NULL
member_card_account_id: 0
member_card_type_name: NULL
is_bind_member: False
member_discount_amount: 0.00
consume_money: 48.00
table_charge_money: 48.00
goods_money: 0.00
real_goods_money: 0.00
assistant_pd_money: 0.00
assistant_cx_money: 0.00
adjust_amount: 0.00
pay_amount: 0.00
balance_amount: 0.00
recharge_card_amount: 0.00
gift_card_amount: 0.00
coupon_amount: 0.00
rounding_amount: 0.00
point_amount: 0.00
Row 4:
order_settle_id: 2957920006540997
tenant_id: 2790683160709957
site_id: 2790685415443269
site_name: 朗朗桌球
table_id: 2793002808987781
settle_name: A区 A7
order_trade_no: 2957814644494149
create_time: 2025-11-09 23:31:52+08:00
pay_time: 2025-11-09 23:32:08+08:00
settle_type: 1
revoke_order_id: 0
member_id: 0
member_name: NULL
member_phone: NULL
member_card_account_id: 0
member_card_type_name: NULL
is_bind_member: False
member_discount_amount: 0.00
consume_money: 95.72
table_charge_money: 85.72
goods_money: 10.00
real_goods_money: 10.00
assistant_pd_money: 0.00
assistant_cx_money: 0.00
adjust_amount: 0.00
pay_amount: 10.00
balance_amount: 0.00
recharge_card_amount: 0.00
gift_card_amount: 0.00
coupon_amount: 85.72
rounding_amount: 0.00
point_amount: 10.00
Row 5:
order_settle_id: 2957913909300741
tenant_id: 2790683160709957
site_id: 2790685415443269
site_name: 朗朗桌球
table_id: 2793002980429893
settle_name: A区 A9
order_trade_no: 2957852541275653
create_time: 2025-11-09 23:25:40+08:00
pay_time: 2025-11-09 23:25:41+08:00
settle_type: 1
revoke_order_id: 0
member_id: 0
member_name: NULL
member_phone: NULL
member_card_account_id: 0
member_card_type_name: NULL
is_bind_member: False
member_discount_amount: 0.00
consume_money: 48.00
table_charge_money: 48.00
goods_money: 0.00
real_goods_money: 0.00
assistant_pd_money: 0.00
assistant_cx_money: 0.00
adjust_amount: 0.00
pay_amount: 0.00
balance_amount: 0.00
recharge_card_amount: 0.00
gift_card_amount: 0.00
coupon_amount: 48.00
rounding_amount: 0.00
point_amount: 0.00
Row 6:
order_settle_id: 2957913171693253
tenant_id: 2790683160709957
site_id: 2790685415443269
site_name: 朗朗桌球
table_id: 2793020259897413
settle_name: 斯诺克区 S1
order_trade_no: 2957784612605829
create_time: 2025-11-09 23:24:55+08:00
pay_time: 2025-11-09 23:25:11+08:00
settle_type: 1
revoke_order_id: 0
member_id: 0
member_name: NULL
member_phone: NULL
member_card_account_id: 0
member_card_type_name: NULL
is_bind_member: False
member_discount_amount: 0.00
consume_money: 362.82
table_charge_money: 148.15
goods_money: 8.00
real_goods_money: 8.00
assistant_pd_money: 206.67
assistant_cx_money: 0.00
adjust_amount: 148.15
pay_amount: 215.00
balance_amount: 0.00
recharge_card_amount: 0.00
gift_card_amount: 0.00
coupon_amount: 0.00
rounding_amount: 0.33
point_amount: 215.00
Row 7:
order_settle_id: 2957911858859909
tenant_id: 2790683160709957
site_id: 2790685415443269
site_name: 朗朗桌球
table_id: 0
settle_name: 商城订单
order_trade_no: 2957911856353157
create_time: 2025-11-09 23:23:34+08:00
pay_time: 2025-11-09 23:23:36+08:00
settle_type: 3
revoke_order_id: 0
member_id: 0
member_name: NULL
member_phone: NULL
member_card_account_id: 0
member_card_type_name: NULL
is_bind_member: False
member_discount_amount: 0.00
consume_money: 8.00
table_charge_money: 0.00
goods_money: 8.00
real_goods_money: 6.00
assistant_pd_money: 0.00
assistant_cx_money: 0.00
adjust_amount: 0.00
pay_amount: 6.00
balance_amount: 0.00
recharge_card_amount: 0.00
gift_card_amount: 0.00
coupon_amount: 0.00
rounding_amount: 0.00
point_amount: 6.00
Row 8:
order_settle_id: 2957909354516357
tenant_id: 2790683160709957
site_id: 2790685415443269
site_name: 朗朗桌球
table_id: 2793002896494725
settle_name: A区 A8
order_trade_no: 2957850075041477
create_time: 2025-11-09 23:21:02+08:00
pay_time: 2025-11-09 23:21:03+08:00
settle_type: 1
revoke_order_id: 0
member_id: 0
member_name: NULL
member_phone: NULL
member_card_account_id: 0
member_card_type_name: NULL
is_bind_member: False
member_discount_amount: 0.00
consume_money: 48.00
table_charge_money: 48.00
goods_money: 0.00
real_goods_money: 0.00
assistant_pd_money: 0.00
assistant_cx_money: 0.00
adjust_amount: 0.00
pay_amount: 0.00
balance_amount: 0.00
recharge_card_amount: 0.00
gift_card_amount: 0.00
coupon_amount: 48.00
rounding_amount: 0.00
point_amount: 0.00
Row 9:
order_settle_id: 2957900926045701
tenant_id: 2790683160709957
site_id: 2790685415443269
site_name: 朗朗桌球
table_id: 2793012902154373
settle_name: B区 B5
order_trade_no: 2957733026106885
create_time: 2025-11-09 23:12:27+08:00
pay_time: 2025-11-09 23:14:25+08:00
settle_type: 1
revoke_order_id: 0
member_id: 0
member_name: NULL
member_phone: NULL
member_card_account_id: 0
member_card_type_name: NULL
is_bind_member: False
member_discount_amount: 0.00
consume_money: 360.08
table_charge_money: 165.09
goods_money: 0.00
real_goods_money: 0.00
assistant_pd_money: 194.99
assistant_cx_money: 0.00
adjust_amount: 0.00
pay_amount: 195.00
balance_amount: 0.00
recharge_card_amount: 0.00
gift_card_amount: 0.00
coupon_amount: 165.09
rounding_amount: 0.01
point_amount: 195.00
Row 10:
order_settle_id: 2957886361276293
tenant_id: 2790683160709957
site_id: 2790685415443269
site_name: 朗朗桌球
table_id: 0
settle_name: 商城订单
order_trade_no: 2957886358310789
create_time: 2025-11-09 22:57:38+08:00
pay_time: 2025-11-09 22:57:42+08:00
settle_type: 3
revoke_order_id: 0
member_id: 0
member_name: NULL
member_phone: NULL
member_card_account_id: 0
member_card_type_name: NULL
is_bind_member: False
member_discount_amount: 0.00
consume_money: 19.00
table_charge_money: 0.00
goods_money: 19.00
real_goods_money: 19.00
assistant_pd_money: 0.00
assistant_cx_money: 0.00
adjust_amount: 0.00
pay_amount: 13.00
balance_amount: 0.00
recharge_card_amount: 0.00
gift_card_amount: 0.00
coupon_amount: 0.00
rounding_amount: -6.00
point_amount: 13.00