﻿2. 鏁颁粨鍒嗗眰缁撴瀯鎬昏

鏈」鐩噰鐢ㄥ吀鍨嬬殑涓夊眰鏁颁粨鍒嗗眰浣撶郴锛?

- **ODS锛圤perational Data Store锛屾搷浣滄暟鎹眰锛?*锛? 
  浠モ€滆创婧愨€濇柟寮忔壙鎺ヤ笂娓?JSON 鏁版嵁锛屼竴鏉¤褰曞敖閲忓搴斾笂娓镐竴鏉′笟鍔¤褰曪紝浠呭仛鏈€杞诲害鐨勬暟鎹被鍨嬭鑼冧笌瀛楁琛ュ厖锛屼笉鍋氫笟鍔″彛寰勬敼閫犮€?
- **DWD锛圖ata Warehouse Detail锛屾槑缁嗘暟鎹眰锛?*锛? 
  鍦?ODS 鍩虹涓婅繘琛屾竻娲椼€佹爣鍑嗗寲涓庤交搴︽眹鎬伙紝褰㈡垚鏍囧噯鐨勩€屼簨瀹炶〃 + 缁村害琛ㄣ€嶆ā鍨嬶紝浣滀负鍚庣画 DWS 鍜屾姤琛ㄧ殑缁熶竴鏄庣粏鏁版嵁婧愩€?
- **DWS锛圖ata Warehouse Service锛屾眹鎬绘湇鍔″眰锛?*锛? 
  闈㈠悜鍏蜂綋缁忚惀鍒嗘瀽鍦烘櫙鐨勬眹鎬诲琛ㄦ垨涓婚姹囨€昏〃锛屾湰鏈熼噸鐐逛负銆岃鍗曠矑搴︺€嶇殑姹囨€伙紙姣忕瑪缁撹处涓€琛岋級锛屽悗缁彲鎵╁睍鏃ョ矑搴︺€佸姪鏁欑哗鏁堢矑搴︾瓑瀹借〃銆?

### 2.1 鍚勫眰琛ㄦ竻鍗?

#### 2.1.1 ODS 灞傝〃锛堟簮鏁版嵁闀滃儚锛?

ODS 灞傛寜涓婃父 JSON 鏂囦欢涓€涓€鏄犲皠锛屼繚鐣欐簮绯荤粺瀛楁锛屽瓧娈靛懡鍚嶅敖閲忓榻愭簮瀛楁銆?

| 琛ㄥ悕                          | 绮掑害鎻忚堪                           | 涓昏鏉ユ簮 JSON / 璇存槑               |
|------------------------------|------------------------------------|------------------------------------|
| `member_profiles`         | 浼氬憳妗ｆ锛? 琛?= 1 涓細鍛樿处鍙?     | 浼氬憳妗ｆ.JSON                      |
| `member_stored_value_cards`            | 浼氬憳鍗¤褰曪紝1 琛?= 1 寮犲崱          | 鍌ㄥ€煎崱鍒楄〃.JSON                    |
| `member_balance_changes`         | 浣欓鍙樻洿璁板綍锛? 琛?= 1 娆′綑棰濆彉鍔? | 浣欓鍙樺姩.JSON                      |
| `ods_recharge_record`        | 鍏呭€艰褰曪紝1 琛?= 1 绗斿厖鍊间氦鏄?     | 鍏呭€艰褰?JSON                      |
| `ods_product`                | 绉熸埛绾у晢鍝佹。妗?                    | 鍟嗗搧妗ｆ.JSON                      |
| `ods_store_product`          | 闂ㄥ簵鍟嗗搧妗ｆ锛岄棬搴楃淮搴︾殑鍟嗗搧閰嶇疆   | 闂ㄥ簵鍟嗗搧妗ｆ.JSON                  |
| `ods_store_sale_item`        | 鍟嗗搧閿€鍞槑缁嗭紝1 琛?= 1 涓攢鍞    | 闂ㄥ簵閿€鍞褰?JSON                  |
| `ods_table_info`             | 鍙版妗ｆ锛? 琛?= 1 寮犲彴/鍖呭帰       | 鍙版鍒楄〃.JSON                      |
| `table_fee_transactions_log`          | 鍙拌垂娴佹按锛? 琛?= 1 绗斿彴妗屼娇鐢ㄨ褰? | 鍙拌垂娴佹按.JSON                      |
| `ods_table_fee_adjust`       | 鍙拌垂鎵撴姌璁板綍锛? 琛?= 1 娆′汉宸ユ姌鎵? | 鍙拌垂鎵撴姌.JSON                      |
| `assistant_accounts_master`      | 鍔╂暀璐﹀彿妗ｆ锛? 琛?= 1 涓姪鏁欒处鍙? | 鍔╂暀璐﹀彿.JSON                      |
| `ods_assistant_service_log`  | 鍔╂暀鏈嶅姟娴佹按锛? 琛?= 1 鏉″姪鏁欐湇鍔? | 鍔╂暀娴佹按.JSON                      |
| `ods_assistant_cancel_log`   | 鍔╂暀搴熼櫎璁板綍锛? 琛?= 1 娆℃湇鍔″彇娑? | 鍔╂暀搴熼櫎.JSON                      |
| `group_buy_packages`          | 鍥㈣喘濂楅瀹氫箟                       | 鍥㈣喘濂楅瀹氫箟.JSON                  |
| `group_buy_packages_log`      | 鍥㈣喘濂楅浣跨敤娴佹按                   | 鍥㈣喘濂楅浣跨敤.JSON                  |
| `ods_platform_coupon_log`    | 骞冲彴楠屽埜璁板綍                       | 骞冲彴楠屽埜.JSON                      |
| `payment_transactions`         | 鏀粯璁板綍锛? 琛?= 1 涓敮浠樻笭閬撴祦姘? | 鏀粯璁板綍.JSON                      |
| `refund_transactions`          | 閫€娆捐褰曪紝1 琛?= 1 涓€€娆炬祦姘?     | 閫€娆捐褰?JSON                      |
| `ods_order_receipt_detail`   | 缁撹处灏忕エ璇︽儏锛? 琛?= 1 寮犵粨绠楀皬绁? | 灏忕エ璇︽儏 JSON锛堝惈 siteProfile 蹇収锛?|

> 璇存槑锛氭湭鏉ュ鏋滀笂娓告柊澧?JSON 绫诲瀷锛堝搴撳瓨鏄庣粏銆佸椁愬畾涔夌瓑锛夛紝鎸変笂杩板懡鍚嶈鑼冩墿灞曞搴?ODS 琛ㄥ嵆鍙€?

#### 2.1.2 DWD 灞傝〃锛堢淮搴?+ 鏄庣粏浜嬪疄锛?

DWD 灞傚湪 ODS 鍩虹涓婂仛娓呮礂銆佸綊涓€鍖栧懡鍚嶄笌涓氬姟瑙勫垯鏁寸悊锛屽舰鎴愭湰鏈熺殑鏍稿績浜嬪疄涓庣淮搴︺€?

**缁村害琛紙Dim锛夛細**

| 琛ㄥ悕                    | 鎻忚堪                         | 璇存槑                          |
|------------------------|------------------------------|-------------------------------|
| `dim_tenant`           | 绉熸埛/鍝佺墝缁村害                | 鍝佺墝绾т富鏁版嵁锛堝鏈楁湕妗岀悆锛?   |
| `dim_site`             | 闂ㄥ簵缁村害                     | 缁熶竴鎵胯浇闂ㄥ簵涓绘暟鎹紙鏂板锛?   |
| `dim_member`           | 浼氬憳缁村害                     | 鐢变細鍛樻。妗?+ 鍗′俊鎭綊骞惰€屾潵   |
| `dim_member_card_type` | 浼氬憳鍗＄被鍨嬬淮搴?              | 鍗＄/绛夌骇绛夋灇涓剧淮             |
| `dim_product`          | 鍟嗗搧缁村害                     | 鍟嗗搧涓绘暟鎹紙鍝佺墝绾э級          |
| `dim_product_category` | 鍟嗗搧鍒嗙被缁村害                 | 浠庡晢鍝佸垎绫婚厤缃?JSON 鏋勫缓      |
| `dim_table`            | 鍙版缁村害                     | 鍙板彿銆佸尯鍩熴€佸彴鍨嬬瓑            |
| `dim_assistant`        | 鍔╂暀缁村害                     | 鍔╂暀/闄粌璐﹀彿涓绘暟鎹?          |
| `dim_assistant_team`   | 鍔╂暀鍥㈤槦缁村害锛堝浣跨敤锛?      | 鐝粍/鍥㈤槦淇℃伅                 |
| `dim_pay_method`       | 鏀粯鏂瑰紡缁村害                 | 鏀粯娓犻亾鏋氫妇锛堢幇閲?寰俊绛夛級   |
| `dim_order_assist_type`| 鍔╂暀鏈嶅姟绫诲瀷缁村害             | 鍩虹璇?闄勫姞璇剧瓑绫诲瀷           |
| `dim_coupon_platform`  | 鍒稿钩鍙扮淮搴︼紙缇庡洟/鐐硅瘎绛夛級    | 鍥㈣喘鍒告潵婧愭笭閬?               |
| `dim_date` 绛?         | 鏃堕棿缁村害                     | 鑷劧鏃ョ矑搴︼紝涓嶅仛钀ヤ笟鏃ュ垏鍒?   |

**浜嬪疄琛紙Fact锛夛細**

| 琛ㄥ悕                        | 绮掑害鎻忚堪                                  |
|----------------------------|-------------------------------------------|
| `fact_sale_item`           | 鍟嗗搧閿€鍞槑缁嗭細1 琛?= 1 涓晢鍝侀攢鍞       |
| `fact_table_usage`         | 鍙拌垂浣跨敤鏄庣粏锛? 琛?= 1 绗斿彴妗屼娇鐢ㄨ褰?    |
| `fact_assistant_service`   | 鍔╂暀鏈嶅姟鏄庣粏锛? 琛?= 1 鏉″姪鏁欐湇鍔¤褰?    |
| `fact_coupon_usage`        | 鍥㈣喘鍒镐娇鐢ㄦ槑缁嗭細1 琛?= 1 娆″埜鏍搁攢         |
| `fact_payment`             | 鏀粯鏄庣粏锛? 琛?= 1 绗旀敮浠樻祦姘?            |
| `fact_refund`              | 閫€娆炬槑缁嗭細1 琛?= 1 绗旈€€娆炬祦姘?            |
| `fact_balance_change`      | 浣欓鍙樺姩鏄庣粏锛? 琛?= 1 娆′綑棰濆鍑忎簨浠?    |

> 璇存槑锛氭湰鏈?DWD 涓嶅啀淇濈暀鈥渟iteProfile鈥濈瓑闂ㄥ簵蹇収瀛楁锛岃€屾槸缁熶竴娌夋穩鍒?`dim_site`锛屾墍鏈変簨瀹炶〃閫氳繃 `site_id` 鍏宠仈闂ㄥ簵銆?

#### 2.1.3 DWS 灞傝〃锛堟眹鎬诲琛級

DWS 灞傞潰鍚戠粡钀ュ垎鏋愬満鏅緭鍑烘眹鎬荤粨鏋滐紝鏈湡閲嶇偣濡備笅锛?

| 琛ㄥ悕                     | 绮掑害鎻忚堪                                           |
|-------------------------|----------------------------------------------------|
| `dws_order_summary`     | 璁㈠崟姹囨€诲琛細1 琛?= 1 娆＄粨璐?/ 鍗曠瑪娑堣垂           |
| 锛堝悗缁彲鎵╁睍锛?         | 锛堟寜鏃?鎸夊姪鏁?鎸夐棬搴楃殑鍚勭被缁忚惀鏃ユ姤銆佺哗鏁堝琛ㄧ瓑锛?  |

> 璇存槑锛? 
> - `dws_order_summary` 鏄湰鏈熸渶鏍稿績鐨?DWS 琛紝鎵€鏈夆€滆鍗曟湁鏁堟祦姘淬€佽璐︽祦姘淬€佸彴璐?鍟嗗搧/鍔╂暀鏀跺叆鎷嗚В鈥濈瓑鎸囨爣鍧囧湪姝よ〃瀹氫箟銆? 
> - 鏈湡鏆備笉杈撳嚭鎸夋棩/鎸夊姪鏁欑瓑 DWS 瀹借〃锛屽鍚庣画鏈夐渶姹傦紝鍙熀浜?DWD 鍜?`dws_order_summary` 鍐嶈寤鸿銆?
2. ODS灞傝〃瀹氫箟锛堟簮鏁版嵁琛級
ODS灞傜洿鎺ュ瓨鍌ㄤ笟鍔＄郴缁熷悇鏁版嵁婧愮殑鏄庣粏璁板綍锛岀粨鏋勪笌婧?JSON 鍩烘湰瀵瑰簲銆備竴鏉DS璁板綍閫氬父瀵瑰簲婧愮郴缁熶腑鐨勪竴鏉′笟鍔¤褰曪紙鎴栦笟鍔″璞″揩鐓э級銆傚瓧娈靛懡鍚嶄互鏉ユ簮瀛楁鑻辨枃涓哄噯锛屾暟鎹被鍨嬭创杩戞簮鏁版嵁绫诲瀷銆傛瘡涓瓧娈靛潎鏍囨敞鏉ユ簮JSON璺緞锛屼究浜嶦TL寮€鍙戝噯纭彇鏁般€備互涓嬫寜鐓т笟鍔′富棰橀€愪竴鍒楀嚭ODS琛ㄨ璁★細
member_profiles锛堜細鍛樻。妗堣〃锛?
鎻忚堪锛?瀛樺偍浼氬憳璐︽埛鍩烘湰淇℃伅锛屾瘡鏉¤褰曞搴斾竴涓鎴峰唴鐨勪細鍛樿处鎴凤紙閫氬父涔熷搴斾竴寮犱細鍛樺崱锛夈€傝琛ㄦ槸浼氬憳缁村害鐨勫熀纭€鏁版嵁锛屾彁渚涗細鍛樼殑韬唤鏍囪瘑鍙婅仈绯讳俊鎭瓑銆?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 浼氬憳璐︽埛ID锛屽敮涓€鏍囪瘑浼氬憳锛堢鎴疯寖鍥村唴锛夈€傛潵婧怞SON璺緞: $.id
鈥?tenant_id (BIGINT) - 绉熸埛ID锛堝搧鐗孖D锛夈€傚綋鍓嶆暟鎹腑鍥哄畾涓哄崟涓€鍊硷紝浣嗚璁′繚鐣欐瀛楁浠ユ敮鎸佸鍝佺墝銆傛潵婧? $.tenant_id
鈥?member_name (STRING) - 浼氬憳濮撳悕銆傚浼氬憳鏈疄鍚嶏紝鍙兘涓虹┖鎴栦负榛樿鍊笺€傛潵婧? $.name锛堣嫢JSON鏃犳槑纭畁ame瀛楁锛屽垯浣跨敤鐪熷疄濮撳悕瀛楁锛?
鈥?nickname (STRING) - 浼氬憳鏄电О銆傝嫢鏃犲崟鐙樀绉板垯鍙兘涓庡鍚嶇浉鍚屾垨鐣欑┖銆傛潵婧? $.nickname
鈥?mobile (STRING) - 浼氬憳鎵嬫満鍙枫€?1浣嶆墜鏈哄彿鐮佸瓧绗︿覆锛屽敮涓€鏍囪瘑浼氬憳鑱旂郴鏂瑰紡銆傘€愰噸澶嶇殑鎵嬫満鍙峰簲涓烘暟鎹紓甯革紝鍚屼竴鍙风爜閲嶅鍑虹幇闇€鍦‥TL鏃惰€冭檻鍚堝苟鎴栨竻娲椼€戞潵婧? $.mobile
鈥?gender (STRING) - 浼氬憳鎬у埆銆傛潵婧? $.sex锛堜緥濡?"M"/"F" 鎴栧叾浠栨爣璁帮紝濡侸SON涓烘暟瀛楅渶杞崲涓烘弿杩帮紝鍙湪DWD闃舵鍏宠仈鎬у埆缁磋〃锛?
鈥?birthday (DATE) - 浼氬憳鐢熸棩銆傛潵婧? $.birthday锛堝婧愪负瀛楃涓查渶杞崲涓烘棩鏈燂級
鈥?register_time (DATETIME) - 浼氬憳鍏ヤ細鏃堕棿/寮€鎴锋椂闂淬€傛潵婧? $.register_time
鈥?member_type_id (BIGINT) - 浼氬憳鍗＄被鍨婭D銆傝〃绀轰細鍛樻墍鎸佸崱鐨勭被鍨?绾у埆锛屼笌鍗＄瀹氫箟鐩稿叧鑱斻€傛潵婧? $.cardTypeId锛堝JSON涓互鍏蜂綋瀛楁鎻愪緵锛?
鈥?member_type_name (STRING) - 浼氬憳鍗＄被鍨嬪悕绉般€傚鈥滈粍閲戝崱鈥濄€佲€滅櫧閾跺崱鈥濈瓑锛屾弿杩颁細鍛樼骇鍒垨鍗＄鏉冪泭銆傛潵婧? $.cardTypeName锛堝鏋淛SON涓彁渚涳紱濡傛湭鎻愪緵鍒欓渶鍦―WD浠庡崱鍒楄〃鎴栭厤缃帹瀵硷級
鈥?status (STRING) - 浼氬憳璐︽埛鐘舵€併€備緥濡傗€滄甯糕€濄€佲€滃仠鐢ㄢ€濈瓑銆傛潵婧? $.status 鎴?$.state锛堟寜JSON瀹為檯瀛楁锛?
鈥?balance (DECIMAL(10,2)) - 褰撳墠鍌ㄥ€间綑棰濄€傚崟浣嶏細鍏冦€傛潵婧? $.balance锛堝鏋滀細鍛樻。妗圝SON鎻愪緵褰撳墠浣欓锛?
鈥?points (DECIMAL(10,2)) - 褰撳墠绉垎鎴栫偣鏁般€傚崟浣嶏細鍒嗐€傛潵婧? $.point 鎴?$.points锛堝鏈夛級
鈥?last_visit_time (DATETIME) - 鏈€杩戜竴娆″埌搴?娑堣垂鏃堕棿銆傛潵婧? $.lastVisitTime锛堝鏈夛級
鈥?wechat_id (STRING) - 寰俊ID鎴栫粦瀹氱殑寰俊璇嗗埆鐮併€傛潵婧? $.wechatId锛堝鏈夛級
鈥?alipay_id (STRING) - 鏀粯瀹滻D鎴栫粦瀹氳处鍙枫€傛潵婧? $.alipayId锛堝鏈夛級
鈥?member_card_no (STRING) - 浼氬憳鍗″彿銆傜敤浜庡疄浣撳崱鍦烘櫙涓嬬殑鍗＄墖缂栧彿銆傛潵婧? $.cardNo锛堝鏈夛級
鈥?remarks (STRING) - 浼氬憳澶囨敞銆傛潵婧? $.remark锛堝鏈夊娉ㄥ瓧娈碉級
(璇存槑: 鍘熷鈥滀細鍛樻。妗?json鈥濅腑鍑虹幇浜嗕竴渚嬮噸澶嶈褰曪紙鐩稿悓id鐨勮褰曢噸澶嶏級锛孍TL闇€杩囨护姝ょ被閲嶅锛屼互id鍞竴涓哄噯銆備笂杩板瓧娈靛彲鑳藉垎鏁ｄ簬浼氬憳妗ｆ鍜屽偍鍊煎崱鍒楄〃涓や釜婧愶紝鍦∣DS闃舵鏆備互浼氬憳妗ｆJSON涓哄噯锛屽鏌愪簺瀛楁缂哄け鍙湪DWD闃舵缁撳悎鈥滃偍鍊煎崱鍒楄〃鈥濊ˉ鍏呫€?
member_stored_value_cards锛堜細鍛樺崱鍒楄〃琛級
鎻忚堪锛?瀛樺偍浼氬憳鍗″紑鍗¤褰曞強鍗＄姸鎬佷俊鎭€傛瘡鏉¤褰曞搴斾竴寮犲凡寮€閫氱殑浼氬憳鍗★紝鍖呭惈鍗＄殑瀹氫箟灞炴€у拰褰撳墠鐘舵€併€傚嵆渚垮綋鍓嶇郴缁熶粎鏈夊偍鍊煎崱锛屼篃缁熶竴鎸夊崱鐗囪瑙掕褰曘€?
瀛楁瀹氫箟锛?
鈥?card_id (BIGINT) - 浼氬憳鍗″疄渚婭D锛屽敮涓€鏍囪瘑涓€寮犲叿浣撲細鍛樺崱銆傛潵婧怞SON璺緞: $.id锛堝偍鍊煎崱鍒楄〃JSON涓殑鍗＄墖涓婚敭锛?
鈥?member_id (BIGINT) - 鎸佸崱浼氬憳ID銆傚搴擮DS_MEMBER_PROFILE琛ㄧ殑id锛岀敤浜庡叧鑱斾細鍛樺熀鏈俊鎭€傛潵婧? $.member_id 鎴?$.memberCardId锛堟牴鎹疄闄呭瓧娈碉紝濡傚嚭鐜癿ember_card_id搴斿搴斾細鍛樻。妗坕d锛?
鈥?card_type_id (BIGINT) - 鍗＄ID銆傛爣璇嗘鍗″搴旂殑鍗＄瀹氫箟锛屼緥濡傚偍鍊煎崱銆佹鍗＄瓑绫诲埆銆傛潵婧? $.cardTypeId
鈥?card_type_name (STRING) - 鍗＄鍚嶇О銆傛潵婧? $.cardTypeName锛堜緥濡傗€滃偍鍊煎崱鈥濃€滄鍗♀€濈瓑锛?
鈥?card_balance (DECIMAL(10,2)) - 鍗″綋鍓嶄綑棰濄€傚崟浣嶏細鍏冦€傛潵婧? $.balance
鈥?discount_rate (DECIMAL(5,2)) - 鎶樻墸鐜囥€傚鎸佹鍗℃秷璐瑰彲浜彈鐨勬姌鎵ｏ紝90%鍒欏瓨0.90銆傛潵婧? $.discount锛堝瓧娈靛惈涔夐渶纭锛屽彲鑳絁SON涓彁渚涙姌鎵ｈ鍒欙級
鈥?valid_start_date (DATE) - 鍗℃湁鏁堟湡璧峰鏃ユ湡銆傛潵婧? $.validStart 鎴栫被浼煎瓧娈?
鈥?valid_end_date (DATE) - 鍗℃湁鏁堟湡鎴鏃ユ湡銆傛潵婧? $.validEnd
鈥?last_consume_time (DATETIME) - 鏈€杩戜竴娆′娇鐢ㄨ鍗＄殑娑堣垂鏃堕棿銆傛潵婧? $.lastConsumeTime
鈥?status (STRING) - 鍗＄姸鎬併€傚鈥滄甯糕€濄€佲€滃凡杩囨湡鈥濄€佲€滃凡鎸傚け鈥濈瓑銆傛潵婧? $.status锛堣嫢涓烘暟瀛椾唬鐮佸皢鍦―WD鍏宠仈缁磋〃锛?
鈥?activate_time (DATETIME) - 寮€鍗℃椂闂?婵€娲绘椂闂淬€傛潵婧? $.activateTime
鈥?deactivate_time (DATETIME) - 娉ㄩ攢鏃堕棿锛堝閫傜敤锛夈€傛潵婧? $.cancelTime锛堝鏈夛級
鈥?issuer_name (STRING) - 寮€鍗℃搷浣滃憳濮撳悕銆傛潵婧? $.issuerName锛堝鏈夛級
鈥?issuer_id (BIGINT) - 寮€鍗℃搷浣滃憳ID銆傛潵婧? $.issuerId
(璇存槑: 濡傛灉姣忎釜浼氬憳鍙湁涓€寮犲崱锛孫DS_MEMBER_PROFILE涓嶰DS_MEMBER_CARD璁板綍灏嗕竴涓€瀵瑰簲锛涗絾妯″瀷璁捐浠嶅尯鍒嗕袱琛紝浠ユ敮鎸佷竴浜哄鍗″満鏅€備緥濡傛湭鏉ュ彲鑳芥帹鍑轰笉鍚岀被鍨嬬殑浼氬憳鍗°€佹垨鏃у崱鏇存崲鏂板崱绛夈€侲TL浠庘€滃偍鍊煎崱鍒楄〃.json鈥濇彁鍙栦笂杩板瓧娈点€?
member_balance_changes锛堜綑棰濆彉鏇磋褰曡〃锛?
鎻忚堪: 瀛樺偍浼氬憳璐︽埛浣欓姣忔鍙樺姩鐨勬祦姘磋褰曘€傚寘鎷細鍛樺厖鍊笺€佹秷璐规墸娆俱€佸悗鍙拌皟鏁寸瓑瀵艰嚧鍌ㄥ€间綑棰濆鍑忕殑浜嬩欢銆?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 浣欓鍙樻洿璁板綍ID锛屽敮涓€鏍囪瘑涓€娆′綑棰濆彉鍔ㄤ簨浠躲€傛潵婧怞SON璺緞: $.id
鈥?member_id (BIGINT) - 浼氬憳璐︽埛ID銆傛湰娆′綑棰濆彉鍔ㄥ叧鑱旂殑浼氬憳锛屽紩鐢∣DS_MEMBER_PROFILE.id銆傛潵婧? $.memberId 鎴?$.member_card_id锛堟牴鎹甁SON瀛楁锛屽鍑虹幇member_card_id鍒欏搴斾細鍛樻。妗坕d锛?
鈥?change_amount (DECIMAL(10,2)) - 鍙樺姩閲戦銆傛鏁拌〃绀鸿处鎴峰厖鍊?澧炲姞锛岃礋鏁拌〃绀烘秷璐规墸鍑忋€傚崟浣嶏細鍏冦€傛潵婧? $.change_amount锛堣嫢JSON灏嗗厖鍊间笌鎵ｆ缁熶竴姝ｈ礋琛ㄧず锛?
鈥?balance_before (DECIMAL(10,2)) - 鍙樺姩鍓嶄綑棰濄€傛潵婧? $.before_balance锛堝鏈夛級
鈥?balance_after (DECIMAL(10,2)) - 鍙樺姩鍚庝綑棰濄€傛潵婧? $.after_balance锛堝鏈夛級
鈥?change_type (INT) - 鍙樺姩绫诲瀷浠ｇ爜銆傜敤浜庡尯鍒嗕綑棰濆彉鍔ㄥ師鍥?鏉ユ簮锛屼緥濡?=鍏呭€笺€?=娑堣垂銆?=璋冩暣绛夈€傘€愬湪DWD灏嗗叧鑱旂淮琛ㄨ幏鍙栫被鍨嬫弿杩般€戞潵婧? $.from_type 鎴?$.type
鈥?relate_id (BIGINT) - 鐩稿叧涓氬姟鍗曟嵁ID銆傜敤浜庡叧鑱斾骇鐢熸娆′綑棰濆彉鍔ㄧ殑涓氬姟璁板綍锛屼緥濡傚厖鍊艰褰旾D銆佽鍗曠粨绠桰D銆佸埜鏍搁攢ID绛夈€傝嫢涓?鎴栫┖琛ㄧず鏃犲搴斿崟锛堝绾悗鍙拌皟鏁达級銆傛潵婧? $.relate_id
鈥?pay_method (INT) - 鏀粯鏂瑰紡浠ｇ爜銆備粎鍦ㄥ厖鍊兼垨娑堣垂閫氳繃鏌愭敮浠樻笭閬撴椂鏈夋剰涔夛紝琛ㄧず姝ゆ鍙樺姩娑夊強鐨勪粯娆炬笭閬擄紙濡傜幇閲戙€佸井淇＄瓑锛夈€傛潵婧? $.pay_type锛堝鏋滀綑棰濆彉鍔ㄨ褰曚腑鍖呭惈鏀粯鏂瑰紡淇℃伅锛?
鈥?remark (STRING) - 澶囨敞淇℃伅銆傚姝ゆ浣欓鍙樻洿鐨勮鏄庢枃瀛椼€傛潵婧? $.remark锛堝鏈夛級
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D銆傛墽琛屾娆′綑棰濆彉鍔ㄦ搷浣滅殑鍛樺伐璐﹀彿銆傛潵婧? $.operatorId
鈥?operator_name (STRING) - 鎿嶄綔鍛樺鍚嶃€傛潵婧? $.operatorName
鈥?change_time (DATETIME) - 鍙樺姩鏃堕棿銆傝褰曚綑棰濆疄闄呭彉鏇村彂鐢熺殑鏃堕棿銆傛潵婧? $.create_time 鎴?$.changeTime
鈥?tenant_id (BIGINT) - 绉熸埛ID锛堝搧鐗孖D锛夛紝鏉ユ簮: $.tenant_id锛堥€氬父鍥哄畾鍊硷級
鈥?site_id (BIGINT) - 闂ㄥ簵ID锛屾寚鏄庡彂鐢熸鍙樺姩鐨勯棬搴椼€傛潵婧? $.site_id锛堥€氬父鍥哄畾鍊硷紝浣嗛鐣欏闂ㄥ簵锛?
鈥?is_deleted (TINYINT) - 璁板綍鏄惁琚垹闄ゆ爣蹇椼€?=姝ｅ父锛?=宸插垹闄わ紙鍙兘鐢ㄤ簬杞垹锛夈€傛潵婧? $.is_delete 鎴?$.is_deleted锛堝鏈夛級
(璇存槑: 閫氳繃 change_type 鍜?relate_id锛屽彲浠ュ湪DWD灞傝繘涓€姝ュ皢浣欓鍙樺姩涓庡叿浣撲笟鍔′簨瀹烇紙鍏呭€笺€佹秷璐圭粨绠楃瓑锛夊叧鑱旇捣鏉ャ€備緥濡?change_type=鍏呭€兼椂锛宺elate_id瀵瑰簲 ODS_RECHARGE.id锛沜hange_type=娑堣垂鎵ｆ鏃讹紝relate_id瀵瑰簲 settlement_recordsMENT.id 绛夈€?
ODS_RECHARGE_RECORD锛堝厖鍊艰褰曡〃锛?
鎻忚堪: 瀛樺偍浼氬憳鍌ㄥ€煎崱鍏呭€肩殑璁板綍銆傛瘡鏉¤褰曡〃绀轰竴绗斾細鍛樺厖鍊硷紙澧炲€硷級浜ゆ槗锛岄€氬父瀵瑰簲浼氬憳鏀粯涓€瀹氶噾棰濆苟澧炲姞璐︽埛浣欓銆?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 鍏呭€艰褰旾D锛屽敮涓€鏍囪瘑涓€绗斿厖鍊间氦鏄撱€傛潵婧怞SON璺緞: $.id
鈥?member_id (BIGINT) - 浼氬憳璐︽埛ID锛屾寚鏄庡厖鍊煎埌璐︾殑浼氬憳銆傛潵婧? $.memberId 鎴?$.member_card_id
鈥?recharge_amount (DECIMAL(10,2)) - 鍏呭€奸噾棰濄€備細鍛樺疄闄呮敮浠樼殑閲戦銆傚崟浣嶏細鍏冦€傛潵婧? $.amount
鈥?bonus_amount (DECIMAL(10,2)) - 璧犻€侀噾棰濄€傝嫢鏈夊厖鍊间紭鎯犳椿鍔ㄨ禒閫佺殑棰濆閲戦銆傛潵婧? $.gift_amount 鎴?$.bonus锛堝鏈夛級
鈥?total_amount (DECIMAL(10,2)) - 鍏呭€兼€婚銆傚嵆鍏呭€奸噾棰?+ 璧犻€侀噾棰濓紝璐︽埛瀹為檯澧炲姞鐨勪綑棰濄€傚崟浣嶏細鍏冦€傛潵婧? 鏃狅紙鍙疎TL璁＄畻寰楀埌锛?
鈥?pay_method (INT) - 鏀粯鏂瑰紡浠ｇ爜銆備細鍛橀€氳繃浣曠娓犻亾鏀粯浜嗘娆″厖鍊奸噾棰濓紝濡?=鐜伴噾銆?=寰俊绛夈€傛潵婧? $.pay_type锛堝JSON鎻愪緵锛?
鈥?pay_status (INT) - 鏀粯鐘舵€佷唬鐮併€傚0=鏈敮浠橈紝1=宸叉敮浠橈紝2=鏀粯瀹屾垚/鎴愬姛銆傛潵婧? $.pay_status锛堟牱鏈腑鍏呭€间竴鑸洿鎺ユ垚鍔燂級
鈥?transaction_id (STRING) - 绗笁鏂规敮浠樻祦姘村彿銆傚閫氳繃寰俊/鏀粯瀹濆厖鍊煎搴旂殑鏀粯浜ゆ槗鍙枫€傛潵婧? $.transactionId锛堝鏈夛級
鈥?recharge_time (DATETIME) - 鍏呭€兼椂闂淬€傛潵婧? $.create_time 鎴?$.rechargeTime
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D銆傛墽琛屾垨鐧昏姝ゆ鍏呭€肩殑宸ヤ綔浜哄憳璐﹀彿銆傛潵婧? $.operatorId
鈥?operator_name (STRING) - 鎿嶄綔鍛樺鍚嶃€傛潵婧? $.operatorName
鈥?tenant_id (BIGINT) - 绉熸埛ID銆傛潵婧? $.tenant_id
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.site_id
(璇存槑: 鍏呭€兼垚鍔熷悗浼氬憳璐︽埛浣欓澧炲姞锛屽搴旂殑浣欓鍙樻洿璁板綍涔熶細鏈変竴鏉′笌涔嬪叧鑱斻€傞€氳繃 pay_method 鍙互鍒嗘瀽浼氬憳鍠滄鐨勫厖鍊兼笭閬撳垎甯冦€?
ODS_PRODUCT锛堝晢鍝佹。妗堣〃锛?
鎻忚堪: 瀛樺偍鍝佺墝绾у晢鍝佹。妗堜俊鎭€傛瘡鏉¤褰曞敮涓€鏍囪瘑涓€涓敱鎬婚儴/鍝佺墝瀹氫箟鐨勫晢鍝侊紙鍟嗗搧鍩烘湰淇℃伅锛夛紝涓嶅尯鍒嗗叿浣撻棬搴椼€傚晢鍝佸彲浠ユ槸閰掓按銆佸皬鍚冪瓑鍗栧搧锛屼篃鍙兘鍖呮嫭鏈嶅姟绫婚」鐩紙濡傛寜娆℃敹璐圭殑鏈嶅姟锛夈€?
瀛楁瀹氫箟锛?
鈥?goods_id (BIGINT) - 鍟嗗搧ID锛屽晢鍝佹。妗堜富閿紝鍞竴鏍囪瘑涓€涓晢鍝佸畾涔夈€傛潵婧怞SON璺緞: $.id
鈥?tenant_id (BIGINT) - 绉熸埛ID锛堝搧鐗孖D锛夈€傚悓涓€鍝佺墝鐨勫晢鍝佸湪鍚勯棬搴楀叡浜tenant_id銆傛潵婧? $.tenant_id
鈥?goods_name (STRING) - 鍟嗗搧鍚嶇О銆傛潵婧? $.name 鎴?$.goodsName
鈥?goods_code (STRING) - 鍟嗗搧缂栫爜銆傜敤浜庡唴閮ㄧ鐞嗙殑缂栫爜锛屽鏉＄爜鎴栬嚜瀹氫箟鐮併€傛潵婧? $.code锛堝鏈夛級
鈥?goods_type_id (BIGINT) - 鍟嗗搧绫诲埆ID銆傚紩鐢ㄥ晢鍝佸垎绫荤淮搴︼紝渚嬪閰掓按銆佸皬鍚冦€佹湇鍔＄瓑绫诲埆銆傛潵婧? $.category_id锛堝鈥滃簱瀛樺彉鍖栬褰?鈥濅腑瀹氫箟鐨勫垎绫籌D锛?
鈥?goods_type_name (STRING) - 鍟嗗搧绫诲埆鍚嶇О銆傛潵婧? $.category_name锛堝鏈夋彁渚涳級
鈥?unit (STRING) - 璁￠噺鍗曚綅銆傚鈥滅摱鈥濄€佲€滀唤鈥濄€佲€滃皬鏃垛€濈瓑銆傛潵婧? $.unit
鈥?price (DECIMAL(10,2)) - 鏍囧噯鍞环銆傚搧鐗屽缓璁浂鍞环銆傛潵婧? $.price
鈥?cost_price (DECIMAL(10,2)) - 鎴愭湰浠枫€傛潵婧? $.cost_price锛堝鏈夛級
鈥?is_service (TINYINT) - 鏄惁鏈嶅姟绫婚」鐩爣璇嗐€?琛ㄧず鏈嶅姟锛堝璁℃椂鏀惰垂椤圭洰锛夛紝0琛ㄧず鍟嗗搧銆傛潵婧? $.is_service锛堝鍟嗗搧妗ｆ鍖哄垎浜嗗疄鐗╀笌鏈嶅姟锛?
鈥?status (STRING) - 鍟嗗搧鐘舵€併€傚鈥滀笂鏋垛€濄€佲€滀笅鏋垛€濄€傛潵婧? $.status锛堣嫢涓烘灇涓剧爜灏嗗湪缁磋〃鏄犲皠锛?
鈥?created_time (DATETIME) - 鍟嗗搧妗ｆ鍒涘缓鏃堕棿銆傛潵婧? $.create_time
鈥?updated_time (DATETIME) - 鏈€杩戜慨鏀规椂闂淬€傛潵婧? $.update_time
(璇存槑: 閮ㄥ垎瀛楁濡傚晢鍝佸垎绫诲彲鑳介渶瑕佷笌鍙︿竴涓狫SON锛堝簱瀛樺彉鍖栬褰?.json锛夌殑鍟嗗搧鍒嗙被鏍戝搴旓紝ODS_PRODUCT涓彲鐩存帴瀛樺垎绫籌D锛屽垎绫诲悕绉板彲鍦ㄧ淮搴﹁〃涓淮鎶や互閬垮厤閲嶅銆傚晢鍝佹。妗堜富瑕佺敤浜庢彁渚涘晢鍝佺殑鏍囧噯淇℃伅銆?
ODS_STORE_PRODUCT锛堥棬搴楀晢鍝佹。妗堣〃锛?
鎻忚堪: 瀛樺偍闂ㄥ簵绾у晢鍝侀厤缃紝姣忔潯璁板綍琛ㄧず鏌愰棬搴椾腑鐨勪竴绉嶅晢鍝佸強鍏惰瀹氾紙渚嬪鍞环銆佷笂涓嬫灦鐘舵€佺瓑锛夈€傚涓棬搴楀彲鍚勮嚜鏈変笉鍚岀殑鍟嗗搧鍒楄〃鎴栭厤缃€傛湰娆℃暟鎹敱浜庝粎涓€搴楋紝ODS_STORE_PRODUCT璁板綍鍗充负璇ュ簵鍟嗗搧鏄庣粏銆?
瀛楁瀹氫箟锛?
鈥?site_goods_id (BIGINT) - 闂ㄥ簵鍟嗗搧ID锛屽敮涓€鏍囪瘑鏌愰棬搴楃殑涓€鏉″晢鍝佽褰曘€傛潵婧怞SON璺緞: $.id锛堥棬搴楀晢鍝佹。妗圝SON涓殑涓婚敭锛?
鈥?goods_id (BIGINT) - 鍟嗗搧ID锛堝搧鐗屽晢鍝両D锛夈€傚叧鑱擮DS_PRODUCT.goods_id锛岃〃绀烘闂ㄥ簵鍟嗗搧鎵€灞炵殑鍟嗗搧妗ｆ瀹氫箟銆傛潵婧? $.tenant_goods_id锛堝瓧娈靛惈涔夛細绉熸埛绾у晢鍝両D锛?
鈥?tenant_id (BIGINT) - 绉熸埛ID銆傛潵婧? $.tenant_id锛堝簲涓嶰DS_PRODUCT淇濇寔涓€鑷达級
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.site_id
鈥?goods_name (STRING) - 鍟嗗搧鍚嶇О銆傚湪闂ㄥ簵涓殑灞曠ず鍚嶇О锛堥€氬父涓庡搧鐗屽晢鍝佸悕涓€鑷达紝鍙湁缁嗗井宸紓锛夈€傛潵婧? $.goodsName
鈥?category_id (BIGINT) - 鍟嗗搧鍒嗙被ID銆傛潵婧? $.goodsCategoryId
鈥?category_name (STRING) - 鍟嗗搧鍒嗙被鍚嶇О銆傛潵婧? $.goodsCategoryName锛堝鏈夛級
鈥?selling_price (DECIMAL(10,2)) - 闂ㄥ簵鍞崠浠枫€傛搴楀疄闄呴攢鍞鍟嗗搧鐨勫崟浠枫€傛潵婧? $.sellingPrice
鈥?member_price (DECIMAL(10,2)) - 浼氬憳浠枫€傚瀵逛細鍛樻湁浼樻儬浠峰垯璁板綍锛屽惁鍒欏彲鑳戒笌鍞崠浠风浉鍚屻€傛潵婧? $.memberPrice锛堝鏈夊瓧娈碉級
鈥?stock_quantity (DECIMAL(10,2)) - 褰撳墠搴撳瓨鏁伴噺銆傛潵婧? $.stock锛堝鏈夊簱瀛樺瓧娈碉級
鈥?min_stock_alert (DECIMAL) - 搴撳瓨璀︽垝鍊笺€備綆浜庢鏁板彲鑳介渶瑕佽ˉ璐с€傛潵婧? $.minStock锛堝鏈夛級
鈥?unit (STRING) - 璁￠噺鍗曚綅銆傛潵婧? $.unit锛堝鏈彁渚涘垯缁ф壙ODS_PRODUCT.unit锛?
鈥?is_weighable (TINYINT) - 鏄惁绉伴噸鍟嗗搧銆?鏄О閲嶅晢鍝侊紙濡傛按鏋滄寜鏂ゅ崠锛夛紝0闈炵О閲嶃€傛潵婧? $.isWeigh锛堝鏈夛級
鈥?status (STRING) - 涓婃灦鐘舵€併€備緥锛氣€渙n鈥濅笂鏋躲€佲€渙ff鈥濅笅鏋躲€傛潵婧? $.status
鈥?created_time (DATETIME) - 璁板綍鍒涘缓鏃堕棿銆傛潵婧? $.create_time
鈥?updated_time (DATETIME) - 璁板綍鏈€杩戜慨鏀规椂闂淬€傛潵婧? $.update_time
(璇存槑: 闂ㄥ簵鍟嗗搧妗ｆ鍦ㄥ綋鍓嶆暟鎹腑 tenant_id銆乻ite_id 鍥哄畾鍚勪竴鍊硷紝浣嗗湪妯″瀷涓繚鐣欙紝浠ユ敮鎸佸搴楀満鏅笅鍚屼竴鍟嗗搧鍦ㄤ笉鍚屽簵鏈変笉鍚宻ite_goods_id銆傚簱瀛樼浉鍏冲瓧娈靛stock_quantity鍙敤浜庡簱瀛樺垎鏋愶紝浣嗛攢鍞富棰樹腑鍙兘涓嶉噸鐐逛娇鐢ㄣ€傝嫢鏁版嵁涓嶈冻锛屾绫诲瓧娈靛彲浠ヤ繚鐣欎絾鍦‥TL鏃朵负绌恒€?
ODS_STORE_SALE_ITEM锛堥棬搴楀晢鍝侀攢鍞褰曡〃锛?
鎻忚堪: 瀛樺偍鍟嗗搧閿€鍞槑缁嗘祦姘达紝姣忔潯璁板綍浠ｈ〃璁㈠崟涓敭鍑虹殑鏌愮鍟嗗搧琛岄」鐩€備篃绉颁负閿€鍞椤圭洰琛ㄣ€備緥濡備竴绗旇鍗曚拱浜?鐡堕ギ鏂欙紝鍒欐湁3鏉″搴旇褰曪紙鎴栦竴鏉¤褰曞惈鏁伴噺3锛夈€傝繖鏄攢鍞簨瀹炵殑缁嗙矑搴︽暟鎹€?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 閿€鍞祦姘碔D锛屽敮涓€鏍囪瘑涓€鏉￠攢鍞槑缁嗚褰曘€傛潵婧怞SON璺緞: $.id
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€傝〃绀烘閿€鍞墍灞炵殑璁㈠崟鍙凤紝鐢ㄤ簬灏嗗涓槑缁嗗綊灞炲悓涓€璁㈠崟銆傘€愪笉鍚屾ā鍧楅棿璁㈠崟浜ゆ槗鍙风浉鍚岋紝鐢ㄤ簬涓茶仈鍙拌垂銆佸晢鍝併€佸姪鏁欍€佸椁愮瓑娑堣垂鏄庣粏銆戞潵婧? $.order_trade_no
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID銆傚搴旂粨璐﹀崟鍙风殑鍐呴儴涓婚敭銆傚鏋滆鍗曞凡缁撶畻锛屽彲鐢ㄤ簬鍏宠仈缁撹处璁板綍鎴栧皬绁ㄨ鎯呫€傛潵婧? $.order_settle_id
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.site_id
鈥?site_goods_id (BIGINT) - 闂ㄥ簵鍟嗗搧ID銆傛爣璇嗗崠鍑虹殑鍟嗗搧锛屽叧鑱擮DS_STORE_PRODUCT.site_goods_id鑾峰彇鍟嗗搧淇℃伅銆傛潵婧? $.site_goods_id
鈥?goods_id (BIGINT) - 鍟嗗搧ID锛堝搧鐗屽晢鍝両D锛夈€傛柟渚跨洿鎺ュ叧鑱斿晢鍝佺淮搴︺€傛潵婧? $.tenant_goods_id锛堥€氬父涓巗ite_goods_id瀵瑰簲鐨勫搧鐗屽晢鍝両D锛?
鈥?goods_name (STRING) - 鍟嗗搧鍚嶇О銆傞攢鍞褰曚腑鐨勫啑浣欏晢鍝佸悕銆傛潵婧? $.goodsName
鈥?quantity (DECIMAL(10,2)) - 閿€鍞暟閲忋€傚崠鍑哄晢鍝佺殑鏁伴噺锛堟垨閲嶉噺锛夈€傛潵婧? $.quantity
鈥?unit_price (DECIMAL(10,2)) - 鍗曚环銆傚晢鍝佸師鏈崟浠凤紝鍙兘涓烘爣鍑嗗敭浠枫€傛潵婧? $.price 鎴?$.unit_price
鈥?discount_amount (DECIMAL(10,2)) - 鎶樻墸閲戦銆傝鏄庣粏鑾峰緱鐨勬€绘姌鎵ｅ噺鍏嶉锛堜細鍛樻姌鎵ｆ垨鎵嬪伐浼樻儬锛夈€傛鍊艰〃绀轰紭鎯犻噾棰濓紝0琛ㄧず鏃犳姌鎵ｃ€傛潵婧? $.discount_money锛圝SON涓鏈夛級
鈥?actual_amount (DECIMAL(10,2)) - 瀹炴敹閲戦銆傚嵆姝ゅ晢鍝佽瀹為檯鏀跺彇閲戦 = 鍗曚环*鏁伴噺 - 鎶樻墸閲戦銆傛潵婧? 鏃狅紙ETL璁＄畻锛屾垨JSON涓凡鏈夊$.total_fee锛?
鈥?is_gift (TINYINT) - 鏄惁璧犻€佸搧鏍囪瘑銆?琛ㄧず璇ュ晢鍝佷綔涓鸿禒鍝佹湭璁′环锛?琛ㄧず姝ｅ父閿€鍞€傛潵婧? $.is_gift锛堝鏈夛級
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D銆傜櫥璁?褰曞叆姝ら攢鍞殑鍛樺伐銆傛潵婧? $.operator_id
鈥?operator_name (STRING) - 鎿嶄綔鍛樺鍚嶃€傛潵婧? $.operator_name
鈥?sales_time (DATETIME) - 閿€鍞椂闂淬€備竴鑸彇璁㈠崟鍒涘缓鏃堕棿锛屽浜庡晢鍝佹槑缁嗙瓑鍚屼簬璁㈠崟寮€鍗曟椂闂淬€傛潵婧? $.create_time
鈥?salesman_user_id (BIGINT) - 鎺ㄩ攢鍛樼敤鎴稩D銆傛寚濡傛湁涓氬姟鍛樻彁鎴愶紝姝ゅ瓧娈佃褰曞叧鑱旂殑閿€鍞汉鍛樿处鍙稩D銆傛潵婧? $.salesman_user_id锛堝鏈夛級
鈥?salesman_name (STRING) - 鎺ㄩ攢鍛樺鍚嶃€傛潵婧? $.salesman_name锛堝鏈夛級
鈥?is_refunded (TINYINT) - 鏄惁宸查€€娆炬爣蹇椼€?琛ㄧず璇ラ攢鍞悗缁湁閫€娆炬挙閿€锛?琛ㄧず姝ｅ父銆傛潵婧? $.is_refund 鎴栨牴鎹€€娆捐褰曞湪DWD琛嶇敓銆?
鈥?remark (STRING) - 澶囨敞銆傚璇ラ攢鍞槑缁嗙殑棰濆璇存槑銆傛潵婧? $.remark锛堝鏈夛級
(璇存槑: 鍟嗗搧閿€鍞褰曞湪璁㈠崟绾ф眹鎬绘椂浼氭眹鍏ヨ鍗曟€婚銆傝嫢鏈夐€€娆撅紝鍙兘闇€瑕佸湪DWD灞備笌閫€娆句簨瀹炲叧鑱斾互鏍囪瘑宸查€€娆鹃」銆俤iscount_amount瀛楁缁煎悎浜嗕細鍛樻姌鎵ｅ拰鎵嬪伐鎶樿锛岃嫢闇€鍒嗗埆鍒嗘瀽鍙湪DWD闃舵渚濇嵁瑙勫垯鎷嗗垎銆傚綋鍓峅DS鏁版嵁涓?salesm鐩稿叧瀛楁鏍锋湰涓?鎴栫┖锛屽鏃犳帹閿€鍛樺垯鐣欑┖鍗冲彲銆?
ODS_TABLE_INFO锛堝彴妗屽垪琛ㄨ〃锛?
鎻忚堪: 瀛樺偍鍙版淇℃伅缁村害锛屾瘡鏉¤褰曚唬琛ㄩ棬搴椾腑鐨勪竴涓彴妗?鍖呭帰銆傛瘮濡傚彴鐞冩銆並TV鍖呮埧銆侀夯灏嗘埧绛夈€傛涓哄吀鍨嬬淮琛紝涓哄悇绫绘祦姘达紙鍙拌垂銆佸姪鏁欑瓑锛夋彁渚涘彴鍙枫€佸尯鍩熺瓑闈欐€佸睘鎬с€?
瀛楁瀹氫箟锛?
鈥?site_table_id (BIGINT) - 鍙版ID锛屼富閿紝鍞竴鏍囪瘑涓€涓彴妗屻€傛潵婧怞SON璺緞: $.id
鈥?tenant_id (BIGINT) - 绉熸埛ID锛堝搧鐗孖D锛夈€傛潵婧? $.tenant_id
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.site_id
鈥?table_name (STRING) - 鍙版鍚嶇О/缂栧彿銆備緵涓氬姟灞曠ず鐨勫悕绉帮紝濡傗€淎1鈥濄€佲€淏3鈥濄€佲€淰IP1鈥濄€佲€滄柉1鈥濓紙鏂鍏?鍙锋锛夌瓑銆傛潵婧? $.tableName 鎴栧悎鎴愯嚜鍖哄煙+缂栧彿
鈥?table_no (STRING) - 鍙版缂栧彿锛堢函鏁板瓧閮ㄥ垎锛夈€傚鏋滄湁鍗曠嫭缂栧彿瀛楁鍒欒褰曪紝娌℃湁鍒欏彲涓巘able_name鐩稿悓銆傛潵婧? $.tableNo锛堝鏈夛級
鈥?area_id (BIGINT) - 鍙版鍖哄煙ID銆傜敤浜庡尯鍒嗗彴妗屾墍灞炵殑鍖哄煙/鍘咃紝渚嬪A鍖恒€乂IP鍖虹瓑銆傛潵婧? $.tenant_site_region_id 鎴?$.areaId锛堝鏈夛級
鈥?area_name (STRING) - 鍙版鍖哄煙鍚嶇О銆傚鈥淎鍖衡€濃€淰IP鍘呪€濄€傛潵婧? $.area_name 鎴栭€氳繃鍖哄煙ID鍏宠仈鑾峰緱銆?
鈥?table_type (STRING) - 鍙版绫诲瀷銆傛爣璇嗘鍙扮敤浜庝綍绉嶉」鐩紝濡傗€滅編寮忓彴鐞冣€濄€佲€滄柉璇哄厠鈥濄€佲€淜TV鍖呮埧鈥濄€佲€滈夯灏嗘埧鈥濈瓑銆傘€愪笉鍐欐鏋氫妇锛孌WD璁捐缁磋〃銆戞潵婧? $.type 鎴栦粠鍚嶇О/閰嶇疆鎺ㄦ柇锛堜緥濡傚悕绉颁腑鈥滄柉鈥濆紑澶磋〃绀烘柉璇哄厠锛?
鈥?is_vip (TINYINT) - VIP涓撳睘鏍囧織銆?琛ㄧず璇ュ彴涓篤IP涓撶敤锛?琛ㄧず鏅€氥€傛潵婧? 鐢卞悕绉版垨閰嶇疆锛堝鍚嶇О鍖呭惈VIP锛夌‘瀹氾紙鑻ユ簮鏁版嵁鏈夊瓧娈垫洿濂斤級
鈥?status (STRING) - 鍙版鐘舵€併€傚鈥滃惎鐢ㄢ€濄€佲€滃仠鐢ㄢ€濄€傛潵婧? $.status锛堝鏈夋灇涓撅紝鍦ㄧ淮搴﹁〃鏄犲皠锛?
鈥?rate (DECIMAL(10,2)) - 鍙拌垂璐圭巼銆傝嫢姣忓彴妗屽彲鑳芥湁涓嶅悓璁¤垂鍗曚环锛堟瘡灏忔椂浠锋牸锛夛紝鍒欒褰曡鍩虹璐圭巼銆傛潵婧? $.rate锛堝鏈夛級
鈥?description (STRING) - 澶囨敞鎻忚堪銆傚鍙版鐨勯澶栬鏄庯紝濡傚寘鍘㈠ぇ灏忋€佺悆鍙拌鏍肩瓑銆傛潵婧? $.description锛堝鏈夛級
(璇存槑: 鍙版鍒楄〃閫氬父鐩稿闈欐€侊紝ODS灞備繚瀛樼幇鏈夊彴妗岄厤缃€傝〃涓ず渚嬪€煎鈥滆懀浜嬪姙鈥濄€佲€?66鈥濊〃鏄庨儴鍒嗗彴鍙峰彲浣跨敤鑷畾涔夊懡鍚嶃€俛rea鍜宼ype绛夎嫢鏈湪JSON涓槑纭彁渚涳紝DWD灞傚彲閫氳繃缁存姢缁磋〃鎴栬鍒欒ˉ鍏ㄣ€?
table_fee_transactions_LOG锛堝彴璐规祦姘磋〃锛?
鎻忚堪: 璁板綍鍙版浣跨敤锛堣璐癸級娴佹按锛屾瘡鏉¤褰曞搴斾竴绗斿彴妗屼娇鐢ㄦ槑缁嗭紙閫氬父涓庝竴涓鍗曠粦瀹氾級銆傝繖鐩稿綋浜庡浜轰娇鐢ㄤ竴寮犲彴浠庡紑濮嬪埌缁撴潫鎵€浜х敓鐨勫彴璐硅处鍗曘€傚寘鍚璐瑰紑濮嬬粨鏉熸椂闂淬€佹椂闀裤€佸簲鏀惰垂鐢ㄤ互鍙婃姌鎵ｅ噺鍏嶇瓑淇℃伅銆?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 鍙拌垂娴佹按ID锛屽敮涓€鏍囪瘑涓€鏉″彴妗屼娇鐢ㄨ褰曘€傛潵婧怞SON璺緞: $.id
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€傛鍙拌垂鎵€灞炶鍗曠殑缂栧彿銆傛潵婧? $.order_trade_no
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID銆傝鍗曠粨璐﹀崟涓婚敭锛岀敤浜庡叧鑱旂粨璐?灏忕エ璇︽儏銆傛潵婧? $.order_settle_id
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.site_id
鈥?site_table_id (BIGINT) - 鍙版ID銆傚叧鑱擮DS_TABLE_INFO.site_table_id锛屾爣璇嗗摢寮犲彴浜х敓姝よ垂鐢ㄣ€傛潵婧? $.site_table_id
鈥?table_name (STRING) - 鍙版鍚嶇О銆傚啑浣欏瓨鍌ㄤ究浜庣洿鎺ユ煡鐪嬨€傛潵婧? $.tableName
鈥?start_use_time (DATETIME) - 寮€鍙版椂闂淬€傞【瀹㈠紑濮嬩娇鐢ㄨ鍙版鐨勬椂闂淬€傛潵婧? $.start_use_time
鈥?last_use_time (DATETIME) - 缁撴潫鏃堕棿銆傞【瀹㈢粨鏉熶娇鐢?缁撹处鏃堕棿銆傛潵婧? $.last_use_time
鈥?use_duration (INT) - 浣跨敤鏃堕暱锛屽崟浣嶇鎴栧垎閽熴€傚彲鐢卞紑濮嬬粨鏉熸椂闂磋绠楀緱鍒帮紝鎴栨簮鏁版嵁鐩存帴鎻愪緵銆傛潵婧? 璁＄畻(last_use_time - start_use_time)锛屽JSON涓湁 real_table_use_seconds 鍒欑洿鎺ョ敤銆?
鈥?billing_unit_price (DECIMAL(10,2)) - 璁¤垂鍗曚环銆備娇鐢ㄦ椂鐨勬敹璐规爣鍑嗭紙姣忓皬鏃?姣忓崐灏忔椂閲戦锛夈€傛潵婧? $.ledger_unit_price锛坙edger鍗曚环锛?
鈥?billing_count (DECIMAL(10,2)) - 璁¤垂鏁伴噺銆傛寜璁¤垂鍗曚綅绱鐨勬暟閲忋€備緥濡傛寜灏忔椂璁¤垂鐨勬€诲皬鏃舵暟銆傛潵婧? $.ledger_count
鈥?ledger_amount (DECIMAL(10,2)) - 鍘熷鍙拌垂閲戦銆傛牴鎹椂闀垮拰鍗曚环璁＄畻鐨勬湭鎶樻墸璐圭敤銆傛潵婧? $.ledger_amount
鈥?member_discount_amount (DECIMAL(10,2)) - 浼氬憳鎶樻墸閲戦銆傚洜浼氬憳鍗℃姌鎵ｅ噺鍏嶇殑閲戦銆傛潵婧? $.member_discount_amount
鈥?coupon_discount_amount (DECIMAL(10,2)) - 鍒告姷鎵ｉ噾棰濄€備娇鐢ㄥ洟璐埜绛変績閿€鎶垫墸鐨勯噾棰濄€傛潵婧? $.coupon_promotion_amount
鈥?manual_adjust_amount (DECIMAL(10,2)) - 鎵嬪伐璋冩暣閲戦銆傞€氳繃鍙拌垂鎵撴姌娴佹按璁板綍鐨勪汉宸ュ噺鍏嶉噾棰濓紙姝ｅ€艰〃绀哄噺鍏嶄簡澶氬皯閽憋級銆傛潵婧? $.adjust_amount
鈥?service_fee (DECIMAL(10,2)) - 闄勫姞鏈嶅姟璐广€傝嫢鏈夐澶栨湇鍔¤垂锛堜緥濡傚鍦烘湇鍔¤垂锛夎鍏ュ彴璐广€傛潵婧? $.mgmt_fee锛堝瓧娈垫剰涔夋帹娴嬶紝鏍锋湰涓鏈夐潪0鍊煎垯琛ㄧず闄勫姞璐癸級
鈥?final_table_fee (DECIMAL(10,2)) - 鍙拌垂瀹炴敹閲戦銆傚嵆椤惧鏈€缁堜负璇ュ彴鏀粯鐨勮垂鐢?= ledger_amount - 鎵€鏈夋姌鎵ｅ噺鍏?+ 闄勫姞璐广€傛潵婧? $.real_table_charge_money锛堝JSON鎻愪緵锛涘惁鍒橢TL璁＄畻锛?
鈥?member_id (BIGINT) - 浼氬憳ID銆傝嫢璇ユ寮€鍙扮粦瀹氫簡浼氬憳锛屽垯璁板綍浼氬憳璐︽埛ID锛屽惁鍒欎负绌恒€傛潵婧? $.member_id
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D銆傚姙鐞嗗紑鍙?缁撹处鐨勫憳宸ヨ处鍙枫€傛潵婧? $.operator_id
鈥?operator_name (STRING) - 鎿嶄綔鍛樺鍚嶃€傛潵婧? $.operator_name
鈥?salesman_user_id (BIGINT) - 閿€鍞憳ID銆傛瘮濡傜悆鍙版湇鍔¤繃绋嬩腑鐨勮窡鍗曞憳/钀ラ攢鍛樸€傛潵婧? $.salesman_user_id
鈥?salesman_name (STRING) - 閿€鍞憳濮撳悕銆傛潵婧? $.salesman_name
鈥?is_single_order (TINYINT) - 鏄惁鍗曠嫭璁㈠崟鏍囧織銆?琛ㄧず姝ゅ彴浠呰璁㈠崟浣跨敤锛?琛ㄧず鍙兘鏈夎鍗曟媶鍒嗭紙鏋佸皯鎯呭喌锛夈€傛潵婧? $.is_single_order
鈥?is_deleted (TINYINT) - 璁板綍鍒犻櫎鏍囧織銆?琛ㄧず璇ヨ褰曡浣滃簾锛堜緥濡傝鍗曞彇娑堬級锛?姝ｅ父銆傛潵婧? $.is_delete
(璇存槑: 鍙拌垂娴佹按琛ㄨ缁嗚褰曟瘡绗斿彴妗屼娇鐢ㄨ处鐩紝鍖呭惈鍚勭鎶樻墸鎷嗗垎锛孍TL鏃跺簲灏介噺淇濈暀杩欎簺瀛楁銆傚湪DWD姹囨€昏鍗曟椂锛宖inal_table_fee姹囨€昏繘鍏ヨ鍗曟€婚噾棰濓紱鍚勭被鎶樻墸棰濅篃鍙眹鎬荤粺璁°€俶anual_adjust_amount瀛楁瀵瑰簲鍙拌垂鎵撴姌璁板綍涓殑鎿嶄綔锛屽鏋滀负0琛ㄧず鏈仛浜哄伐鍑忓厤銆?
ODS_TABLE_FEE_ADJUST锛堝彴璐规墦鎶樿褰曡〃锛?
鎻忚堪: 璁板綍閽堝鍙拌垂璐﹀崟鐨勪汉宸ヨ皟鏁达紙鎵撴姌鎴栧噺鍏嶈垂鐢級琛屼负銆傛瘡鏉¤褰曡〃绀轰竴娆″鏌愯鍗曞彴璐圭殑鎵嬪伐鍑忓厤鎿嶄綔锛屽苟闈炲彴鐨勪娇鐢ㄨ褰曟湰韬紝鑰屾槸闄勫姞鐨勪竴鏉¤皟鏁存祦姘淬€傞€氬父鐢ㄤ簬璁板綍鏀堕摱鍛樼粰浜堥【瀹㈢殑鍙拌垂鎶樻墸銆?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 鍙拌垂璋冩暣璁板綍ID锛屽敮涓€鏍囪瘑涓€娆″彴璐规墦鎶樻搷浣溿€傛潵婧怞SON璺緞: $.id
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€傛湰璋冩暣鎵€灞炵殑璁㈠崟銆傛潵婧? $.order_trade_no
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID銆傛湰璋冩暣鎵€灞炶鍗曠殑缁撶畻鍗旾D銆傛潵婧? $.order_settle_id
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.site_id锛堝彲鑳介€氳繃siteProfile鑾峰彇锛?
鈥?site_table_id (BIGINT) - 鍙版ID銆傛寚鏄庢娆¤皟鏁撮拡瀵瑰摢寮犲彴妗岀殑璐圭敤銆傛潵婧? $.site_table_id锛堝JSON鎻愪緵锛?
鈥?table_name (STRING) - 鍙版鍚嶇О銆傛潵婧? $.tableName
鈥?adjust_amount (DECIMAL(10,2)) - 鍑忓厤閲戦銆傛鍊艰〃绀哄噺鍏嶄簡澶氬皯閽憋紙鍗冲彴璐归檷浣庨锛夈€傛潵婧? $.adjust_fee 鎴?$.reduce_amount锛堟寜瀹為檯瀛楁锛?
鈥?reason (STRING) - 鎵撴姌鍘熷洜銆傚鏈浜哄伐璋冩暣鐨勮鏄庯紝濡傗€滀細鍛樻姇璇夎ˉ鍋库€濇垨鈥滃簵闀跨壒鎵光€濄€傛潵婧? $.reason锛堝鏈夛級
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D銆傛墽琛屾鎵撴姌鎿嶄綔鐨勫憳宸ヨ处鍙枫€傛潵婧? $.operator_id
鈥?operator_name (STRING) - 鎿嶄綔鍛樺鍚嶃€傛潵婧? $.operator_name
鈥?adjust_time (DATETIME) - 璋冩暣鏃堕棿銆傛潵婧? $.create_time
(璇存槑: 鍙拌垂鎵撴姌璁板綍鍦∣DS_TABLE_USE_LOG涓凡鍙嶆槧涓簃anual_adjust_amount锛屼絾涓轰簡淇濈暀鎿嶄綔鍘熷洜銆佺粡鍔炰汉绛夌粏鑺傦紝ODS浠嶅瓨姝よ〃銆侱WD寤烘ā鏃讹紝鍙皢adjust_amount鍚堝苟璁″叆鍙拌垂鏈€缁堥噾棰濊绠椼€俽eason瀛楁鑻ヤ负鏈夐檺鏋氫妇锛屽彲寤虹珛缁磋〃缁存姢鍚勭鎶樻墸鍘熷洜銆?
assistant_accounts_master锛堝姪鏁欒处鍙疯〃锛?
鎻忚堪: 瀛樺偍闂ㄥ簵涓嬫墍鏈夊姪鏁欙紙鏁欑粌/鏈嶅姟浜哄憳锛屽寘鎷鐞嗚处鍙凤級鐨勫熀纭€閰嶇疆鍜屾。妗堜俊鎭€傛瘡鏉¤褰曞搴斾竴鍚嶅姪鏁欒处鍙凤紝灞炰簬浜轰簨缁村害琛ㄣ€傚瓧娈垫兜鐩栧姪鏁欑殑涓汉淇℃伅銆佽处鍙风姸鎬併€佽璐圭瓥鐣ョ瓑銆?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 鍔╂暀璐﹀彿ID锛屼富閿€傚敮涓€鏍囪瘑涓€涓姪鏁?鍛樺伐璐﹀彿銆傚湪鍔╂暀鏈嶅姟娴佹按绛変簨瀹炶〃涓互site_assistant_id寮曠敤璇D鍏宠仈銆傛潵婧怞SON璺緞: $.id
鈥?user_id (BIGINT) - 绯荤粺鐢ㄦ埛ID銆傚姪鏁欒处鍙峰搴旂殑绯荤粺鐧诲綍璐﹀彿ID锛岀敤浜庡湪涓嶅悓妯″潡涓嬬粺涓€璇嗗埆浜哄憳銆傚尯鍒簬宀椾綅绾х殑id銆傛潵婧? $.user_id
鈥?assistant_no (STRING) - 鍔╂暀宸ュ彿/缂栧彿銆傜敤浜庝笟鍔¤瘑鍒殑缂栧彿锛屽彲鑳戒笉鍞竴锛堜笉鍚屽姪鏁欏彲鑳界紪鍙风浉鍚屼絾id涓嶅悓锛夈€傛潵婧? $.assistantNo
鈥?job_num (STRING) - 鍔╂暀宸ヤ綔璇佺紪鍙枫€傚鐢ㄥ伐鍙峰瓧娈碉紝褰撳墠闂ㄥ簵鍙兘鏈娇鐢ㄣ€傛潵婧? $.job_num
鈥?serial_number (INT) - 搴忓彿銆傜郴缁熷唴閮ㄧ敓鎴愮殑鎺掑簭鍙锋垨杩佺Щ鐢ㄧ殑搴忓垪鍊笺€傛潵婧? $.serial_number
鈥?real_name (STRING) - 鍔╂暀鐪熷疄濮撳悕銆傛潵婧? $.real_name
鈥?nickname (STRING) - 鍔╂暀鏄电О銆傚墠鍙板睍绀虹敤鐨勭话鍙凤紝渚嬪鈥滀匠鎬♀€濄€佲€滃懆鍛ㄢ€濄€傛潵婧? $.nickname
鈥?gender (STRING) - 鎬у埆銆傛潵婧? $.sex锛堜緥濡傗€淢鈥?鈥淔鈥濇垨鈥滅敺鈥?鈥滃コ鈥濓級
鈥?birthday (DATE) - 鍑虹敓鏃ユ湡銆傛潵婧? $.birthday
鈥?mobile (STRING) - 鎵嬫満鍙枫€傚姪鏁欒仈绯绘墜鏈恒€傛潵婧? $.mobile
鈥?id_card (STRING) - 韬唤璇佸彿銆傛潵婧? $.id_card锛堝鏈夛級
鈥?hire_date (DATE) - 鍏ヨ亴鏃ユ湡銆傛潵婧? $.hire_date锛堝鏈夊瓧娈碉級
鈥?resign_date (DATE) - 绂昏亴鏃ユ湡銆傚璐﹀彿宸插簾闄ゅ垯璁板綍绂昏亴鏃堕棿銆傛潵婧? $.resign_date锛堝鏈夛級
鈥?status (STRING) - 鍦ㄨ亴鐘舵€併€傜ず渚嬶細鈥滃湪鑱屸€濄€佲€滅鑱屸€濄€佲€滃仠鐢ㄢ€濈瓑銆傛潵婧? $.status锛堣嫢婧愪负鏁板瓧锛屽湪缁磋〃鏄犲皠锛?
鈥?visible (TINYINT) - 鍓嶅彴鍙鎬с€?琛ㄧず涓嶅湪鍓嶅彴灞曠ず锛?琛ㄧず鍙椤惧鐪嬪埌閫夋嫨銆傛潵婧? $.visible锛堝鏈夛級
鈥?billing_mode (STRING) - 璁¤垂绛栫暐銆傚姪鏁欐湇鍔¤璐规柟寮忥紝濡傗€滄寜灏忔椂璁¤垂鈥濇垨鍥哄畾鍦烘銆傛潵婧? $.billing_mode锛堟帹娴嬪瓧娈碉紝濡傛棤鏄庣‘鍒欏彲鑳介€氳繃鍏宠仈閰嶇疆鍐冲畾锛?
鈥?skill_name (STRING) - 鏈嶅姟鎶€鑳藉悕绉般€備緥濡傗€滃熀纭€璇锯€濃€滈檮鍔犺鈥濈瓑锛岃〃绀鸿鍔╂暀鎻愪緵鏈嶅姟鐨勭被鍒€傛潵婧? $.skillName
鈥?skill_level (STRING) - 鎶€鑳界骇鍒?绛夌骇銆傚鈥滃垵绾р€濃€滈珮绾р€濄€傛潵婧? $.levelName 鎴?$.assistant_level
鈥?team_id (BIGINT) - 鍔╂暀鍥㈤槦ID銆傚皢鍔╂暀鍒嗙粍鐨勫洟闃?鐝粍鏍囪瘑銆傛潵婧? $.assistant_team_id
鈥?team_name (STRING) - 鍔╂暀鍥㈤槦鍚嶇О銆傛潵婧? $.ledger_group_name锛堢寽娴嬪搴斿洟闃熷悕绉板瓧娈碉級
鈥?service_rate (DECIMAL(10,2)) - 鏈嶅姟璐规爣鍑嗐€傚姪鏁欐湇鍔＄殑璐圭巼鎴栨彁鎴愭爣鍑嗐€傛潵婧? $.service_rate锛堝鏈夛級
鈥?comment (STRING) - 澶囨敞銆傚叾浠栬ˉ鍏呰鏄庛€傛潵婧? $.remark锛堝鏈夛級
鈥?tenant_id (BIGINT) - 绉熸埛ID銆傛潵婧? $.tenant_id
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.site_id
(璇存槑: 鍔╂暀璐﹀彿浣滀负缁磋〃锛屽皢閫氳繃id鎴杣ser_id鍏宠仈鍒板姪鏁欐湇鍔℃祦姘淬€佸姪鏁欐帓鐝瓑浜嬪疄銆傚湪褰撳墠鏁版嵁涓寘鍚鐞嗙被璐﹀彿锛寁isible瀛楁鐢ㄤ簬鎺у埗鍏舵槸鍚︽彁渚涚粰椤惧閫夋嫨鏈嶅姟銆俠illing_mode/skill绛夊喅瀹氬叾鏈嶅姟璁¤垂绫诲埆锛屼緥濡傚尯鍒嗗熀纭€璇惧拰闄勫姞璇撅紝鍦ㄥ姪鏁欐祦姘翠腑涔熸湁瀵瑰簲鏋氫妇鍊笺€?
ODS_ASSISTANT_SERVICE_LOG锛堝姪鏁欐祦姘磋〃锛?
鎻忚堪: 璁板綍鍔╂暀鏈嶅姟/闄粌鐨勬槑缁嗘祦姘达紝姣忔潯璁板綍浠ｈ〃涓€娆″姪鏁欎负椤惧鎻愪緵鏈嶅姟鐨勮繃绋嬶紝閫氬父瀵瑰簲璁㈠崟涓殑涓€椤瑰姪鏁欐湇鍔℃秷璐广€傚彲鑳藉寘鍚紑濮嬬粨鏉熸椂闂淬€佹湇鍔¤垂鐢ㄣ€佸姪鏁欒瘎浠风瓑銆傝嫢涓€娆¤鍗曚腑鏇存崲鎴栧娆¤仒璇峰姪鏁欙紝浼氫骇鐢熷鏉¤褰曘€?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 鍔╂暀娴佹按ID锛屽敮涓€鏍囪瘑涓€鏉″姪鏁欐湇鍔¤褰曘€傛潵婧怞SON璺緞: $.id
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€傛爣璇嗘鍔╂暀鏈嶅姟鎵€灞炵殑璁㈠崟銆傛潵婧? $.order_trade_no
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID銆傚叧鑱旂粨璐﹀崟锛岀敤浜庝笌灏忕エ璇︽儏绛夊搴斻€傘€愬綋鍓嶅鍑虹粨璐﹁褰曚负绌猴紝姝ゅ瓧娈典緷鐒朵繚鐣欑敤浜庡叧鑱斻€戞潵婧? $.order_settle_id
鈥?order_assistant_id (BIGINT) - 璁㈠崟鍔╂暀椤笽D銆傜敤浜庡尯鍒嗗悓涓€璁㈠崟涓鏉″姪鏁欐湇鍔￠」鐨勫唴閮↖D銆傛潵婧? $.order_assistant_id
鈥?order_assistant_type (INT) - 鍔╂暀鏈嶅姟绫诲瀷缂栫爜銆傛灇涓惧€硷紝绀轰緥锛?=甯歌鍔╂暀鏈嶅姟锛堝熀纭€璇撅級锛?=闄勫姞鍔╂暀鏈嶅姟锛堝姞璇撅級銆傚搴旂殑鍚箟鍙粠绯荤粺閰嶇疆鑾峰彇銆傘€愭ā鍨嬩腑閫氳繃缁磋〃瑙ｆ瀽銆戞潵婧? $.order_assistant_type
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.site_id
鈥?site_table_id (BIGINT) - 鍙版ID銆傚姪鏁欐湇鍔℃墍鍦ㄧ殑鍙版锛屽鏁欑粌鍦ㄥ摢寮犵悆鍙版湇鍔°€傛潵婧? $.site_table_id
鈥?table_name (STRING) - 鍙版鍚嶇О銆傛潵婧? $.tableName
鈥?site_assistant_id (BIGINT) - 鍔╂暀ID銆傛彁渚涙湇鍔＄殑鍔╂暀璐﹀彿ID锛屽叧鑱擮DS_ASSISTANT_ACCOUNT.id銆傛潵婧? $.site_assistant_id
鈥?assistant_name (STRING) - 鍔╂暀濮撳悕銆傚啑浣欏瓧娈碉紝鏉ユ簮: $.assistantName
鈥?assistant_no (STRING) - 鍔╂暀宸ュ彿銆傛潵婧? $.assistantNo
鈥?skill_name (STRING) - 鏈嶅姟鎶€鑳藉悕绉般€備緥锛氣€滃熀纭€璇锯€濇垨鈥滈檮鍔犺鈥濓紝涓巓rder_assistant_type鐩稿搴斻€傛潵婧? $.skillName
鈥?assistant_level (STRING) - 鍔╂暀绛夌骇/绾у埆銆傚鈥滃垵绾р€濃€滀腑绾р€濄€傛潵婧? $.assistant_level 鎴?$.levelName
鈥?start_time (DATETIME) - 鏈嶅姟寮€濮嬫椂闂淬€傛潵婧? $.start_use_time
鈥?end_time (DATETIME) - 鏈嶅姟缁撴潫鏃堕棿銆傛潵婧? $.last_use_time
鈥?service_duration (INT) - 鏈嶅姟鏃堕暱锛堢锛夈€傛潵婧? $.income_seconds 鎴?$.real_use_seconds锛堝鏈夛級
鈥?ledger_unit_price (DECIMAL(10,2)) - 璁¤垂鍗曚环銆傚姪鏁欐湇鍔¤垂鐜囷紙姣忓崟浣嶆椂闂磋垂鐢級銆傛潵婧? $.ledger_unit_price
鈥?ledger_amount (DECIMAL(10,2)) - 鍘熷鏈嶅姟閲戦銆傛寜鏃堕暱鍜屽崟浠疯绠楃殑璐圭敤銆傛潵婧? $.ledger_amount
鈥?member_discount_amount (DECIMAL(10,2)) - 浼氬憳鎶樻墸閲戦銆備細鍛樹环浼樻儬鐨勯噾棰濄€傛潵婧? $.member_discount_amount
鈥?coupon_deduct_amount (DECIMAL(10,2)) - 鍒告姷鎵ｉ噾棰濄€備娇鐢ㄤ績閿€鍒告姷鎵ｇ殑閲戦銆傛潵婧? $.coupon_deduct_money
鈥?manual_discount_amount (DECIMAL(10,2)) - 鎵嬪伐鍑忓厤閲戦銆備汉宸ョ粰浜堢殑鍑忓厤璐圭敤銆傛潵婧? $.manual_discount_amount
鈥?final_service_fee (DECIMAL(10,2)) - 鍔╂暀鏈嶅姟瀹炴敹閲戦銆? ledger_amount - 鎶樻墸 - 鍒告姷鎵?- 鎵嬪伐鍑忓厤銆傛潵婧? $.service_money锛堟垨ETL璁＄畻锛?
鈥?member_id (BIGINT) - 浼氬憳ID銆傝嫢椤惧涓轰細鍛橈紝姝ゆ湇鍔＄粦瀹氱殑浼氬憳璐﹀彿銆傛潵婧? $.tenant_member_id 鎴?$.member_id锛堟牴鎹瓧娈碉紝鏍锋湰涓彲鑳藉瓨鍦╯ystem_member_id/tenant_member_id鐢ㄤ簬鍖哄埆鍝佺墝浼氬憳锛?
鈥?is_confirm (TINYINT) - 椤惧纭鏍囧織銆?琛ㄧず椤惧宸茬‘璁ゆ湇鍔★紙鍙兘鏈夌瀛楃‘璁ゆ祦绋嬶級锛?鏈‘璁ゃ€傛潵婧? $.is_confirm
鈥?grade_status (TINYINT) - 璇勫垎鐘舵€併€傛爣璇嗛【瀹㈡槸鍚﹀凡瀵规湰娆℃湇鍔¤瘎鍒?璇勪环銆傛潵婧? $.grade_status
鈥?service_grade (INT) - 鏈嶅姟鎬佸害璇勫垎銆傚彲鑳借寖鍥?-5銆傛潵婧? $.service_grade锛堝鏈夎瘎鍒嗗姛鑳斤級
鈥?skill_grade (INT) - 鎶€鑳戒笓涓氬害璇勫垎銆傛潵婧? $.skill_grade
鈥?sum_grade (INT) - 缁煎悎璇勫垎銆傚彲鑳芥槸骞冲潎鎴栨€诲垎銆傛潵婧? $.composite_grade
鈥?grade_time (DATETIME) - 璇勪环鏃堕棿銆傛潵婧? $.composite_grade_time
鈥?get_grade_times (INT) - 鑾疯瘎娆℃暟銆備篃璁歌〃绀鸿鍔╂暀琚瘎浠风殑鎬绘鏁帮紙瀛楁鎰忎箟瀛樼枒锛夈€傛潵婧? $.get_grade_times
鈥?is_not_responding (TINYINT) - 鍔╂暀鏈搷搴旀爣蹇椼€?琛ㄧず鍔╂暀鏈強鏃跺簲绛旀湇鍔¤姹傘€傛潵婧? $.is_not_responding
鈥?is_trash (TINYINT) - 浣滃簾鏍囧織銆?琛ㄧず璇ユ湇鍔¤褰曡搴熷純锛堝彲鑳界敱浜庡姪鏁欐洿鎹?鍙栨秷锛夛紝0姝ｅ父銆傛潵婧? $.is_trash
鈥?trash_reason (STRING) - 搴熼櫎鍘熷洜銆傝嫢is_trash=1锛岃褰曞彇娑堟湇鍔＄殑鍘熷洜璇存槑銆傛潵婧? $.trash_reason
鈥?trash_applicant_id (BIGINT) - 搴熼櫎鐢宠浜篒D銆傝皝鍙戣捣浜嗗彇娑堬紙椤惧鎴栧憳宸ワ級銆傛潵婧? $.trash_applicant_id
鈥?trash_applicant_name (STRING) - 搴熼櫎鐢宠浜哄鍚嶃€傛潵婧? $.trash_applicant_name
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D銆傜櫥璁版鏈嶅姟鐨勬搷浣滃憳璐﹀彿銆傛潵婧? $.operator_id
鈥?operator_name (STRING) - 鎿嶄綔鍛樺鍚嶃€傛潵婧? $.operator_name
鈥?salesman_user_id (BIGINT) - 閿€鍞憳/鎺ㄤ粙浜篒D銆傚鏈変笟鍔″憳鎺ㄨ崘姝ゆ湇鍔★紝鍒欒褰曘€傛潵婧? $.salesman_user_id
鈥?salesman_name (STRING) - 閿€鍞憳濮撳悕銆傛潵婧? $.salesman_name
鈥?remark (STRING) - 澶囨敞銆傞澶栬鏄庛€傛潵婧? $.remark锛堝鏈夛級
(璇存槑: 鍔╂暀鏈嶅姟娴佹按鍖呭惈涓€浜涙湇鍔¤川閲忕浉鍏冲瓧娈碉紙璇勫垎绛夛級锛岃繖鏄秴鍑虹函娑堣垂璁¤垂鐨勫唴瀹癸紝鍙緵浜哄憳缁╂晥鍒嗘瀽銆俰s_trash=1琛ㄧず璇ヨ褰曞搴斾竴娆″姪鏁欐湇鍔¤鍙栨秷鎴栧簾闄わ紝涓庡姪鏁欏簾闄よ〃鐨勬暟鎹浉鍏炽€倀rash_reason绛夋彁渚涘彇娑堝師鍥犮€傚湪DWD灞傚彲缁撳悎鍔╂暀搴熼櫎璁板綍杩涗竴姝ュ垎鏋愩€?

璁¤垂涓庡簾闄よ涔夎鏄庯紙鏂板锛?
鍔╂暀娴佹按璁板綍涓秹鍙婁互涓嬩笌璁¤垂鍜屽簾闄ょ浉鍏崇殑鏃堕棿涓庨噾棰濆瓧娈碉紙瀛楁鍚嶄互 JSON / ODS 瀹為檯瀛楁涓哄噯锛夛細
鈥?real_use_seconds锛氭湰娆″姪鏁欐湇鍔″疄闄呭彂鐢熺殑鏈嶅姟鏃堕暱锛屽崟浣嶇銆?
鈥?income_seconds锛氭湰娆″姪鏁欐湇鍔′腑锛屽彲璁″叆鏀跺叆鐨勬湇鍔℃椂闀匡紝鍗曚綅绉掋€?
o	褰撴湇鍔℃甯稿畬鎴愭椂锛岄€氬父 income_seconds = real_use_seconds銆?
o	褰撴湇鍔′腑閫旇搴熼櫎鏃讹紝鍙兘鍙鍏朵腑涓€閮ㄥ垎鏃堕棿璁¤垂锛屾鏃?income_seconds <= real_use_seconds銆?
鈥?ledger_amount锛堟垨绫讳技瀛楁锛夛細鎸夎鍒掓湇鍔℃椂闀夸笌璐圭巼璁＄畻寰楀埌鐨勫師濮嬪簲鏀堕噾棰濓紙涓嶈€冭檻搴熼櫎锛夈€?
鈥?projected_income锛堟垨 service_money 绛夛級锛氭湰鏉″姪鏁欐湇鍔℃渶缁堣鍏ヨ惀鏀剁殑閲戦锛屽凡鑰冭檻浼氬憳鎶樻墸銆佹墜宸ュ噺鍏嶄互鍙婂簾闄ら€昏緫銆?
鈥?is_trash锛氬姪鏁欐祦姘存槸鍚﹁搴熼櫎鐨勬爣璁般€?
o	is_trash = 0 琛ㄧず姝ｅ父瀹屾垚鐨勬湇鍔°€?
o	is_trash = 1 琛ㄧず璇ユ潯鍔╂暀鏈嶅姟琚簾闄わ紙鍙兘鏄湭寮€濮嬪氨搴熼櫎锛屾垨鑰呬腑閫斿簾闄わ級銆?
搴熼櫎閫昏緫鍦?ODS 灞傜殑璇箟绾﹀畾濡備笅锛?
1.	鏈疄闄呭彂鐢熸湇鍔＄殑搴熼櫎锛?
o	鎯呭喌锛氶【瀹㈢偣浜嗗姪鏁欙紝浣嗗姪鏁欏皻鏈湡姝ｆ湇鍔★紙渚嬪椹笂鎾ゅ洖锛夈€?
o	琛ㄥ緛锛歳eal_use_seconds = 0锛宨ncome_seconds = 0锛宲rojected_income = 0锛宨s_trash = 1銆?
o	鍙ｅ緞锛氳鏉¤褰曚笉浜х敓浠讳綍鏀跺叆锛屼粎浣滀负涓氬姟娴佺▼璁板綍瀛樺湪銆?
2.	宸查儴鍒嗘湇鍔″悗搴熼櫎锛?
o	鎯呭喌锛氬姪鏁欐湇鍔′簡涓€娈垫椂闂村悗琚【瀹㈡垨闂ㄥ簵搴熼櫎锛屼緥濡傛湇鍔?100 鍒嗛挓锛屽彧鎸?60 鍒嗛挓璁¤垂銆?
o	琛ㄥ緛锛歳eal_use_seconds > income_seconds >= 0锛宨s_trash = 1銆?
o	鍙ｅ緞锛?
飩?宸茶璐归儴鍒嗭細income_seconds 瀵瑰簲鐨勯噾棰濊鍏?projected_income锛岃涓烘湁鏁堣惀鏀躲€?
飩?鏈璐归儴鍒嗭細real_use_seconds - income_seconds 瀵瑰簲鐨勬椂闂翠笉璁″叆钀ユ敹锛屼粎浣滀负鏈嶅姟杩囩▼淇℃伅銆?
3.	姝ｅ父瀹屾垚鐨勬湇鍔★細
o	鎯呭喌锛氬姪鏁欐湇鍔℃寜璁″垝姝ｅ父瀹屾垚銆?
o	琛ㄥ緛锛歩s_trash = 0锛岄€氬父 income_seconds = real_use_seconds銆?
o	鍙ｅ緞锛氭寜 projected_income 鍏ㄩ璁″叆钀ユ敹銆?
鍚庣画鍦?DWD / DWS 灞傚叧浜庘€滃姪鏁欐敹鍏モ€濈浉鍏虫寚鏍囷紝缁熶竴浠?projected_income锛堟垨鐩稿簲鐨勫疄鏀堕噾棰濆瓧娈碉級涓哄噯锛屽苟缁撳悎 is_trash銆乮ncome_seconds 涓?real_use_seconds 鍋氬彛寰勬帶鍒讹紝閬垮厤鎶婃湭璁¤垂閮ㄥ垎璇畻鍏ヨ惀涓氭敹鍏ャ€?


ODS_ASSISTANT_CANCEL_LOG锛堝姪鏁欏簾闄よ褰曡〃锛?
鎻忚堪: 璁板綍鍔╂暀鏈嶅姟琚彇娑?搴熼櫎鐨勪簨浠躲€傛瘡鏉¤褰曞搴斾竴娆″姪鏁欐湇鍔℃湭瀹屾垚鐨勬儏鍐碉紙渚嬪椤惧瑕佹眰鏇存崲鍔╂暀鎴栨彁鍓嶇粨鏉熸湇鍔★級銆傝繖浜涜褰曢€氬父涓庡姪鏁欐湇鍔℃祦姘寸殑is_trash鏍囧織瀵瑰簲锛岀敤浜庤缁嗘弿杩板簾闄ゅ師鍥犲拰杩囩▼銆?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 鍔╂暀搴熼櫎璁板綍ID锛屽敮涓€鏍囪瘑涓€娆″姪鏁欐湇鍔″彇娑堜簨浠躲€傛潵婧怞SON璺緞: $.id
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€傝鍙栨秷鏈嶅姟鎵€鍦ㄨ鍗曠殑缂栧彿銆傛潵婧? $.order_trade_no
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID銆傛潵婧? $.order_settle_id
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.siteProfile.id锛堥€氳繃siteProfile瀵硅薄鑾峰彇锛?
鈥?site_table_id (BIGINT) - 鍙版ID銆傛娆℃秹鍙婄殑鍙版銆傛潵婧? $.site_table_id
鈥?table_name (STRING) - 鍙版鍚嶇О銆傛潵婧? $.tableName
鈥?site_assistant_id (BIGINT) - 鍔╂暀ID銆傝鍙栨秷鐨勫姪鏁欒处鍙枫€傛潵婧? $.site_assistant_id
鈥?assistant_name (STRING) - 鍔╂暀濮撳悕銆傛潵婧? $.assistantName
鈥?assistant_no (STRING) - 鍔╂暀宸ュ彿銆傛潵婧? $.assistantNo
鈥?cancel_time (DATETIME) - 搴熼櫎鏃堕棿銆傝褰曟湇鍔¤鍙栨秷鐨勬椂闂淬€傛潵婧? $.create_time锛堟帹娴嬩负璁板綍鍒涘缓鏃堕棿锛?
鈥?cancel_reason (STRING) - 搴熼櫎鍘熷洜鎻忚堪銆傚鈥滈【瀹笉婊℃剰鈥濄€佲€滆秴鏃舵湭鍝嶅簲鈥濈瓑銆傛潵婧? $.reason 鎴栫粍瑁呰嚜 $.trash_reason
鈥?applicant_type (STRING) - 鐢宠鏂圭被鍨嬨€傛爣璇嗙敱璋佸彂璧峰彇娑堬紝渚嬪鈥渃ustomer鈥濇垨鈥渟taff鈥濄€傛潵婧? 鏃犵洿鎺ュ瓧娈碉紝鍙兘渚濇嵁 $.trash_applicant_id 鏄惁涓洪【瀹D鎺ㄦ柇锛屽湪DWD澶勭悊銆?
鈥?applicant_name (STRING) - 鍙栨秷鍙戣捣浜哄鍚嶃€傛潵婧? $.trash_applicant_name
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D銆傚鐞嗗彇娑堢殑宸ヤ綔浜哄憳璐﹀彿銆傛潵婧? $.operator_id锛堝鏈夛級
鈥?operator_name (STRING) - 鎿嶄綔鍛樺鍚嶃€傛潵婧? $.operator_name锛堝鏈夛級
(璇存槑: 鍔╂暀搴熼櫎璁板綍涓庡姪鏁欐湇鍔℃祦姘村瓨鍦ㄥ搴斿叧绯伙細褰撴煇鍔╂暀鏈嶅姟琚簾闄ゆ椂锛屽姪鏁欐祦姘存爣璁癷s_trash=1锛屽悓鏃朵骇鐢熶竴鏉″簾闄よ褰曡鏄庤鎯呫€傚湪ETL涓紝鍙埄鐢╫rder_trade_no鍜宻ite_assistant_id灏嗕袱鑰呭叧鑱旓紝纭繚涓嶄細閲嶅璁＄畻璐圭敤锛堝簾闄ょ殑鏈嶅姟閫氬父涓嶈璐癸級銆傝琛ㄤ负涓氬姟鐩戞帶鏈嶅姟鍙栨秷鎯呭喌鎻愪緵鏁版嵁鏀寔銆?

涓庡姪鏁欐祦姘寸殑鍏宠仈鍙婂簾闄ゅ彛寰勶紙鏂板锛?
鍔╂暀搴熼櫎璁板綍琛ㄤ笌鍔╂暀娴佹按琛ㄤ箣闂寸殑鍏崇郴锛?
鈥?涓€鏉″姪鏁欐湇鍔℃祦姘达紙鍔╂暀娴佹按琛ㄤ腑鐨勪竴鏉¤褰曪級锛屽湪琚簾闄ゆ椂锛屼細鍦ㄥ姪鏁欏簾闄よ〃涓骇鐢熶竴鏉″搴旇褰曘€?
鈥?鍏宠仈閿€氬父鍖呮嫭锛?
o	order_trade_no锛堣鍗曚氦鏄撳彿锛夛紱
o	site_assistant_id锛堝姪鏁橧D锛夛紱
o	蹇呰鏃惰繕鍙粨鍚堝彴妗孖D銆佹椂闂寸獥鍙ｈ繘琛屽尮閰嶃€?
搴熼櫎璁板綍涓昏鎵挎媴鍘熷洜璇存槑鍜岃矗浠诲綊灞炵殑浣滅敤锛屼緥濡傦細
鈥?trash_reason / cancel_reason锛氬簾闄ゅ師鍥狅紝渚嬪鈥滈【瀹㈡洿鎹㈠姪鏁欌€濄€佲€滈【瀹复鏃剁鍦衡€濄€佲€滄湇鍔′笉婊℃剰鈥濈瓑銆?
鈥?trash_applicant_id / trash_applicant_name锛氬彂璧峰簾闄ょ殑涓€鏂癸紙椤惧銆佸€肩彮缁忕悊绛夛級銆?
鍦ㄨ璐瑰彛寰勪笂锛?
鈥?鏄惁璁¤垂銆佽澶氬皯锛屼互鍔╂暀娴佹按涓殑 projected_income銆乮ncome_seconds銆乺eal_use_seconds 瀛楁涓哄噯銆?
鈥?鍔╂暀搴熼櫎琛ㄦ湰韬笉鐩存帴瀛橀噾棰濓紝鍙槸琛ュ厖璇存槑鈥滀负浣曢儴鍒嗗師濮嬪簲鏀舵湭璁″叆钀ヤ笟鏀跺叆鈥濄€?
鍚庣画鍦?DWD / DWS 灞傝繘琛屾敹鍏ュ垎鏋愭椂锛屽嚭鐜扳€滃師濮嬪簲鏀堕珮浜庡疄闄呭叆璐︹€濈殑宸紓锛屽彲閫氳繃鍏宠仈鍔╂暀搴熼櫎琛ㄦ煡鐪嬪師鍥犲垎甯冿紙渚嬪锛氶【瀹㈠師鍥?vs 鍔╂暀鍘熷洜锛夈€?

group_buy_packages锛堝洟璐椁愬畾涔夎〃锛?
鎻忚堪: 瀛樺偍闂ㄥ簵鍙敤鐨勫洟璐椁愬垪琛紝鍗充互鍥㈣喘褰㈠紡鍞崠鐨勪紭鎯犲椁愮殑閰嶇疆銆傛瘡鏉¤褰曞畾涔変竴绉嶅洟璐椁愮殑瑙勫垯锛屽寘鎷悕绉般€侀潰鍊笺€佹湁鏁堟湡銆侀€傜敤鏃舵銆侀檺瀹氬彴妗岀被鍨嬨€佷笂鏋剁姸鎬佺瓑銆?
瀛楁瀹氫箟锛?
鈥?package_id (BIGINT) - 鍥㈣喘濂楅ID锛屼富閿€傚敮涓€鏍囪瘑涓€绉嶅椁愩€傛潵婧怞SON璺緞: $.id
鈥?tenant_id (BIGINT) - 绉熸埛ID銆傛潵婧? $.tenant_id
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.site_id
鈥?package_name (STRING) - 濂楅鍚嶇О銆備緥锛氣€滄棭鍦?灏忔椂鈥濃€滄柉璇哄厠涓ゅ皬鏃垛€濃€淜TV鍥涘皬鏃垛€濄€傛潵婧? $.name
鈥?coupon_value (DECIMAL(10,2)) - 濂楅闈㈠€笺€傝濂楅鍙姷鎵ｇ殑閲戦鎴栨湇鍔℃椂闀垮搴旂殑浠峰€硷紙閫氬父涓哄師浠凤級銆傛潵婧? $.coupon_money
鈥?selling_price (DECIMAL(10,2)) - 閿€鍞环銆傛秷璐硅€呰喘涔版濂楅鎵€浠橀噾棰濓紙閫氬父浣庝簬闈㈠€硷級銆傛潵婧? $.sell_price锛堝鏈夛級
鈥?valid_from (DATE) - 濂楅鏈夋晥鏈熻捣濮嬫棩鏈熴€傛潵婧? $.start_date
鈥?valid_to (DATE) - 濂楅鏈夋晥鏈熺粨鏉熸棩鏈熴€傛潵婧? $.end_date
鈥?valid_time_period (STRING) - 姣忔棩鍙敤鏃舵鎻忚堪銆傚鈥滄瘡鏃?9:00-18:00鍙敤鈥濄€傛潵婧? $.daily_time锛圝SON鍙兘鎻愪緵璧锋鏃堕棿瀛楁锛屾澶勫彲瀛樻枃鏈弿杩版垨鎷嗗垎瀛楁锛?
鈥?limit_table_type (STRING) - 闄愬畾鍙版绫诲瀷銆傝鏄庢鍒稿彲鐢ㄧ殑鍙版鑼冨洿锛屼緥濡傗€滀粎闄愭柉璇哄厠鍖衡€濓紝鈥淜TV鍖呭帰閫傜敤鈥濄€傛潵婧? $.limit_table_type锛堝彲鑳介渶瑕佹牴鎹甁SON瀛楁缁勫悎锛屽闄愬畾鐨勫尯鍩?鍙扮被鍨嬶級
鈥?limit_table_count (INT) - 姣忔鍙敤鍙版暟闄愬埗銆傚涓€涓鍗曚竴娆″彧鑳界敤涓€寮犲埜瀵瑰簲涓€寮犲彴銆傛潵婧? $.limit_table_count锛堝鏈夛級
鈥?status (STRING) - 涓婃灦鐘舵€併€傜ず渚嬶細鈥渁ctive鈥濆湪鍞紝鈥渋nactive鈥濅笅鏋讹紝鈥渆xpired鈥濆凡杩囨湡銆傛潵婧? $.status锛堣嫢涓哄竷灏旀垨浠ｇ爜锛孌WD灏嗙淮琛ㄦ槧灏勶級
鈥?is_expired (TINYINT) - 鏄惁宸茶繃鏈熸爣蹇椼€?琛ㄧず濂楅宸茶繃鏈燂紙褰撳墠鏃ユ湡瓒呰繃valid_to锛夛紝0灏氬湪鏈夋晥鏈熴€傛潵婧? 渚濇嵁valid_to鐢盓TL鍒ゆ柇寰楀埌锛堟簮鏁版嵁濡傛湁鐩存帴瀛楁鍒欎娇鐢級
鈥?platform (STRING) - 閿€鍞钩鍙般€傛寚璇ュ椁愬彂甯冪殑骞冲彴锛屽鈥滅編鍥⑩€濄€佲€滃ぇ浼楃偣璇勨€濓紝濡傛灉浠呴棬搴楄嚜鏈夊垯涓衡€淪ELF鈥濄€傛潵婧? 濡傛灉JSON鎻愪緵 platform 瀛楁鎴栭€氳繃dealId鍓嶇紑鎺ㄦ柇锛屽湪DWD澶勭悊銆?
鈥?deal_id (STRING) - 澶栭儴骞冲彴Deal缂栧彿銆傚搴旂涓夋柟骞冲彴涓婄殑濂楅ID銆傛潵婧? $.dealId锛堝鏈夛級
鈥?created_time (DATETIME) - 濂楅瀹氫箟鍒涘缓鏃堕棿銆傛潵婧? $.create_time
鈥?updated_time (DATETIME) - 鏈€鍚庝慨鏀规椂闂淬€傛潵婧? $.update_time
(璇存槑: 鍥㈣喘濂楅瀹氫箟鐢ㄤ簬鍒嗘瀽鍚勫椁愮殑浣跨敤鍜岄攢鍞儏鍐点€俵imit_table_type绛夊彲浠ュ湪DWD闃舵缁嗗寲涓哄叧鑱斿彴妗岀被鍨嬬淮搴︺€俻latform鑻ユ湁澶氫釜娓犻亾锛屽彲鍦ㄧ淮琛ㄤ腑鏋氫妇銆?
group_buy_packages_LOG锛堝洟璐椁愪娇鐢ㄦ祦姘磋〃锛?
鎻忚堪: 璁板綍鍥㈣喘濂楅鍒歌浣跨敤锛堟牳閿€锛夌殑娴佹按銆傛瘡鏉¤褰曡〃绀轰竴寮犲洟璐埜鍦ㄩ棬搴楃殑涓€娆′娇鐢紝閫氬父瀵瑰簲涓€涓鍗曠殑涓€閮ㄥ垎锛堜緥濡備娇鐢ㄥ埜鎶垫墸浜嗙壒瀹氬彴璐规椂闀匡級銆傚寘鍚鍗曚俊鎭€佹墍鐢ㄥ埜鐨処D/鍚嶇О銆佹姷鎵ｉ噾棰濄€佷互鍙婃搷浣滃憳绛変俊鎭€?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 鍥㈣喘鍒镐娇鐢ㄨ褰旾D锛屽敮涓€鏍囪瘑涓€娆″埜浣跨敤娴佹按銆傛潵婧怞SON璺緞: $.id
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€備娇鐢ㄨ鍒哥殑璁㈠崟缂栧彿銆傛潵婧? $.order_trade_no
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID銆傛潵婧? $.order_settle_id
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.site_id
鈥?site_table_id (BIGINT) - 鍙版ID銆傛湰鍒镐娇鐢ㄥ叧鑱旂殑鍙版锛堥€氬父鍒稿搴旀煇寮犲彴鐨勮垂鐢級銆傛潵婧? $.site_table_id
鈥?table_name (STRING) - 鍙版鍚嶇О銆傛潵婧? $.tableName
鈥?package_id (BIGINT) - 鍥㈣喘濂楅ID銆傛爣璇嗘墍浣跨敤鍒稿睘浜庡摢绉嶅椁愬畾涔夛紝鍏宠仈group_buy_packages.package_id銆傛潵婧? $.deal_id 鎴?$.package_id锛堟牴鎹瓧娈靛惈涔夛紝鍙兘deal_id闇€鍖归厤濂楅瀹氫箟锛?
鈥?package_name (STRING) - 濂楅鍚嶇О銆傚啑浣欒褰曞埜鍚嶇О锛屾潵婧? $.deal_name 鎴?$.package_name锛堝鏈夛級
鈥?coupon_code (STRING) - 鍒哥爜銆傛秷璐硅€呰喘涔板悗鏀跺埌鐨勫埜缂栧彿銆傛潵婧? $.coupon_code锛堝鏈夛級
鈥?deduct_amount (DECIMAL(10,2)) - 鍒告姷鎵ｉ噾棰濄€備娇鐢ㄨ鍒告姷鎵ｇ殑閲戦浠峰€笺€傛潵婧? $.deduct_money 鎴?$.coupon_deduct_money
鈥?remaining_amount (DECIMAL(10,2)) - 鍒稿墿浣欓噾棰?浠峰€笺€傝嫢鍒稿彲閮ㄥ垎浣跨敤锛屽娆℃牳閿€鍒欒褰曞墿浣欏彲鐢ㄤ环鍊笺€傛潵婧? $.remain_money锛堝鏈夛級
鈥?status (STRING) - 鍒镐娇鐢ㄧ姸鎬併€傚彲鑳界粺涓€涓衡€渦sed鈥濓紙宸叉牳閿€锛夛紝濡傛湁寮傚父鍒欐爣璁般€傚婧愭暟鎹彁渚涳紝鐢ㄤ簬纭鍒告垚鍔熶娇鐢ㄣ€傛潵婧? $.status锛堝鍏ㄩ儴宸茬敤鍙笉缁嗗垎锛?
鈥?used_time (DATETIME) - 鍒镐娇鐢ㄦ椂闂淬€傛潵婧? $.create_time
鈥?salesman_user_id (BIGINT) - 閿€鍞憳ID銆傚紩瀵煎敭鍒告垨鏍搁攢鐨勫憳宸ャ€傛潵婧? $.salesman_user_id
鈥?salesman_name (STRING) - 閿€鍞憳濮撳悕銆傛潵婧? $.salesman_name
鈥?operator_id (BIGINT) - 鏍搁攢鎿嶄綔鍛業D銆傚疄闄呭湪绯荤粺涓搷浣滈獙鍒哥殑鍛樺伐璐﹀彿銆傛潵婧? $.operator_id
鈥?operator_name (STRING) - 鏍搁攢鎿嶄綔鍛樺鍚嶃€傛潵婧? $.operator_name
(璇存槑: 鍥㈣喘濂楅浣跨敤璁板綍鍙互甯姪鍒嗘瀽鍥㈣喘鍒稿鏀跺叆鐨勮础鐚€俤educt_amount鍦ㄨ鍗曟眹鎬讳腑浼氫綋鐜颁负涓€绉嶆姌鎵?棰勪粯閮ㄥ垎銆俢oupon_code閫氬父瀵瑰簲绗笁鏂瑰钩鍙板彂鏀剧殑鍒哥爜锛屼絾鐢变簬杩樻湁骞冲彴楠屽埜璁板綍琛紝鍐呴儴璁板綍鍙兘鏈睍绀哄叿浣撳埜鐮併€俻ackage_id/鍚嶇О纭繚鍙叧鑱斿埌濂楅瀹氫箟缁村害銆?
ODS_PLATFORM_COUPON_LOG锛堝钩鍙伴獙鍒歌褰曡〃锛?
鎻忚堪: 璁板綍鏉ヨ嚜绗笁鏂瑰钩鍙扮殑鍥㈣喘鍒稿湪鏈棬搴楄鏍搁攢鐨勪簨浠躲€傛瘡鏉¤褰曞搴斾竴娆＄涓夋柟鍒哥爜鐨勯獙璇佷娇鐢紝鎼哄甫骞冲彴鐩稿叧淇℃伅鍜岄棬搴楀唴閮ㄥ叧鑱斾俊鎭€傞€氬父涓庡洟璐椁愭祦姘村瓨鍦ㄤ竴涓€瀵瑰簲鍏崇郴銆?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 骞冲彴楠屽埜璁板綍ID锛屽敮涓€鏍囪瘑涓€娆＄涓夋柟鍒告牳閿€浜嬩欢銆傛潵婧怞SON璺緞: $.id
鈥?platform (STRING) - 鍒告潵婧愬钩鍙板悕绉般€傚鈥滅編鍥⑩€濄€佲€滃ぇ浼楃偣璇勨€濄€傛潵婧? 閫氳繃$.dealId鍓嶇紑鎴栭厤缃帹鏂钩鍙帮紝鍦―WD鏄犲皠鍒扮淮琛ㄣ€?
鈥?deal_id (STRING) - 骞冲彴Deal ID銆傚搴旂涓夋柟骞冲彴鍥㈣喘椤圭洰鏍囪瘑銆傛潵婧? $.dealId
鈥?certificate_id (STRING) - 鍒哥爜ID銆傜涓夋柟鍒哥殑鍞竴缂栫爜銆傛潵婧? $.certificateId
鈥?order_id (BIGINT) - 闂ㄥ簵鍐呴儴璁㈠崟ID銆傛鍒稿叧鑱旂殑搴楀唴璁㈠崟ID锛堥潪浜ゆ槗鍙凤紝鍙兘瀵瑰簲siteOrderId锛夈€傛潵婧? $.orderId 鎴?$.order_id
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€傛潵婧? 鑻SON鏈洿鎺ョ粰鍑猴紝鍙€氳繃鍐呴儴璁㈠崟ID鍦―WD闃舵鍏宠仈寰楀埌锛涘鏈夊瓧娈电洿鎺ユ彁渚涘垯濉叆銆?
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.siteId
鈥?site_table_id (BIGINT) - 鍙版ID銆傛鍒镐娇鐢ㄦ墍瀵瑰簲鐨勫彴妗屻€傛潵婧? $.site_table_id锛堝鏈夛級
鈥?table_name (STRING) - 鍙版鍚嶇О銆傛潵婧? $.tableName锛堝鏈夛級
鈥?assistant_id (BIGINT) - 鍔╂暀ID銆傚鍒告秹鍙婂姪鏁欐湇鍔★紝鍙褰曠浉鍏冲姪鏁欒处鍙枫€傛潵婧? $.assistant_id锛堢寽娴嬪彲鑳芥病鏈夋瀛楁锛岃嫢鏈夊垯濉級
鈥?used_time (DATETIME) - 鍒告牳閿€鏃堕棿銆傛潵婧? $.create_time
鈥?operator_id (BIGINT) - 鏍搁攢鎿嶄綔鍛業D銆傛潵婧? $.operator_id
鈥?operator_name (STRING) - 鏍搁攢鎿嶄綔鍛樺鍚嶃€傛潵婧? $.operator_name
(璇存槑: 骞冲彴楠屽埜璁板綍閲嶇偣鍦ㄥ閮ㄥ埜淇℃伅锛坧latform, certificate_id绛夛級銆傚畠涓庡唴閮ㄥ洟璐椁愪娇鐢ㄨ褰曢€氳繃璁㈠崟鎴栧埜鐮佸叧鑱旓紝瀹為檯鍒嗘瀽鏃跺彲缁撳悎涓よ〃鏁版嵁銆傛ā鍨嬩腑淇濈暀璇ヨ〃浠ュ畬鏁磋褰曠涓夋柟骞冲彴鍒哥殑浣跨敤鏄庣粏銆俻latform瀛楁鍙兘涓嶇洿鎺ョ粰鍑猴紝鍦‥TL鏃跺彲渚濇嵁deal_id鎴朿ertificate_id缂栫爜瑙勫垯鍒ゆ柇锛屾垨閫氳繃閰嶇疆琛紙濡傚彧鏈夌編鍥竴绉嶅垯鍥哄畾涓虹編鍥級銆?
payment_transactions锛堟敮浠樿褰曡〃锛?
鎻忚堪: 瀛樺偍璁㈠崟鏀粯娴佹按锛屾瘡鏉¤褰曞搴旇鍗曠殑涓€绉嶄粯娆炬笭閬撶殑鏀舵鎯呭喌銆備竴绗旇鍗曞彲鑳芥媶鍒嗗绉嶆敮浠樻柟寮忥紙濡傞儴鍒嗙敤浼氬憳鍗′綑棰濓紝閮ㄥ垎寰俊锛夛紝鍒欎細鏈夊鏉℃敮浠樿褰曘€傝琛ㄥ弽鏄犳敹閾剁姣忕瑪瀹為檯鏀舵銆?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 鏀粯璁板綍ID锛屽敮涓€鏍囪瘑涓€鏉℃敮浠樻祦姘淬€傛潵婧怞SON璺緞: $.id
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€傛鏀粯瀵瑰簲鐨勮鍗曠紪鍙枫€傛潵婧? $.order_trade_no
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID銆傛潵婧? $.order_settle_id
鈥?pay_amount (DECIMAL(10,2)) - 鏀粯閲戦銆傛鏀粯娴佹按娑夊強鐨勯噾棰濄€傛鍊艰〃绀哄簵鍐呮敹娆撅紝璐熷€硷紙鍦ㄩ€€娆捐褰曚腑鍑虹幇锛夎〃绀哄簵鍐呮敮鍑恒€傛潵婧? $.pay_amount
鈥?pay_method (INT) - 鏀粯鏂瑰紡浠ｇ爜銆傝〃绀轰粯娆炬笭閬撶被鍨嬶紝渚嬪1=鐜伴噾銆?=寰俊銆?=鏀粯瀹濄€?=鍌ㄥ€煎崱绛夈€傘€愰渶閫氳繃缁磋〃鏄犲皠鍏蜂綋鍚嶇О銆戞潵婧? $.paymentMethod 鎴?$.pay_type
鈥?pay_method_name (STRING) - 鏀粯鏂瑰紡鍚嶇О銆傚彲浠ュ湪ODS涓洿鎺ュ瓨鍌ㄦ枃瀛楋紝濡傗€滃井淇♀€濄€佲€滅幇閲戔€濓紙濡傛灉婧愮洿鎺ョ粰鍑轰簡锛夛紝鍚﹀垯鍦ㄧ淮搴﹁〃涓淮鎶ゆ槧灏勩€傛潵婧? $.payTypeName锛堝鏈夛級
鈥?pay_status (INT) - 鏀粯鐘舵€佺爜銆?琛ㄧず瀹屾垚锛屽彲鑳?/1琛ㄧず澶勭悊涓?澶辫触绛夛紙鏈暟鎹泦涓潎涓?瀹屾垚锛夈€傛潵婧? $.pay_status
鈥?transaction_id (STRING) - 澶栭儴鏀粯娴佹按鍙枫€傜涓夋柟鏀粯骞冲彴浜ゆ槗ID銆傛潵婧? $.transaction_id锛堝鏈夛級
鈥?pay_time (DATETIME) - 鏀粯鏃堕棿銆傛潵婧? $.pay_time 鎴?$.create_time
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.siteProfile.id锛堟敮浠樿褰旿SON甯︽湁siteProfile蹇収锛?
鈥?operator_id (BIGINT) - 鏀堕摱鎿嶄綔鍛業D銆傛潵婧? $.operator_id锛堝鏈夛級
鈥?operator_name (STRING) - 鏀堕摱鎿嶄綔鍛樺鍚嶃€傛潵婧? $.operator_name
(璇存槑: 鏀粯璁板綍琛ㄤ腑鐨勬瘡鏉¤褰曢€氬父搴斿搴斾簬璁㈠崟鐨勬煇涓敮浠樻柟寮忓疄闄呭埌璐﹂噾棰濄€傚璐﹀拰鍒嗘瀽鍚勬敮浠樻笭閬撴敹鍏ユ椂锛岀敤姝よ〃鐨勬暟鎹€傚浜庡偍鍊煎崱鏀粯锛宲ay_method鍙兘瀵瑰簲浼氬憳鍗℃墸娆撅紱鍏堕噾棰濆湪搴楀唴涓嶅舰鎴愭柊璧勯噾娴佸叆锛岃€屾槸鍐呴儴缁撹浆锛屼絾浠嶄綔涓烘敮浠樻柟寮忎箣涓€璁板綍銆俻ay_status鍩烘湰閮戒細鏄€滃畬鎴愨€濓紝棰濆鐘舵€佸彲蹇界暐鎴栫敤浜庡紓甯哥洃鎺с€?
refund_transactions锛堥€€娆捐褰曡〃锛?
鎻忚堪: 瀛樺偍鍙戠敓鐨勯€€娆炬祦姘达紝姣忔潯璁板綍浠ｈ〃涓€绗旈€€娆炬搷浣滐紙灏嗛挶閫€杩樼粰椤惧鐨勪氦鏄擄級銆傞€氬父涓庢敮浠樿褰曞搴旓紝鐢ㄤ簬璐㈠姟鏍稿閫€娆炬敮鍑恒€?
瀛楁瀹氫箟锛?
鈥?id (BIGINT) - 閫€娆捐褰旾D锛屽敮涓€鏍囪瘑涓€娆￠€€娆句氦鏄撱€傛潵婧怞SON璺緞: $.id
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€傛閫€娆炬墍灞炵殑鍘熻鍗曠紪鍙枫€傛潵婧? $.order_trade_no
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID銆傛潵婧? $.order_settle_id
鈥?refund_amount (DECIMAL(10,2)) - 閫€娆鹃噾棰濄€傝绗旈€€娆炬敮浠樼粰椤惧鐨勯噾棰濓紝閫氬父涓鸿礋鍊艰〃绀烘祦鍑恒€傛潵婧? $.pay_amount锛堟牱鏈腑鍧囦负璐熸暟锛?
鈥?pay_method (INT) - 閫€娆炬笭閬撲唬鐮併€傚搴斿師鏀粯鐨勬笭閬撱€傛潵婧? $.paymentMethod 鎴?$.pay_type锛堝簲涓庢敮浠樿褰曠殑code涓€鑷达級
鈥?pay_method_name (STRING) - 閫€娆炬笭閬撳悕绉般€傛潵婧? $.payTypeName锛堝鏈夛級
鈥?pay_status (INT) - 閫€娆剧姸鎬佺爜銆傚€间负2琛ㄧず閫€娆惧畬鎴愶紙鏍锋湰鍏ㄤ负2锛夛紝0/1鍙兘琛ㄧず鏈鐞?澶勭悊涓€傛潵婧? $.pay_status
鈥?original_pay_id (BIGINT) - 鍘熸敮浠樻祦姘碔D銆傛寚鏄庢湰娆￠€€娆惧搴斿摢绗旀敮浠樿褰曘€傛潵婧? $.relate_pay_id 鎴栫被浼煎瓧娈碉紙濡傛湁锛?
鈥?refund_time (DATETIME) - 閫€娆炬椂闂淬€傛潵婧? $.create_time
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.site_id锛堥€氳繃siteProfile绛夛級
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D銆傛墽琛岄€€娆剧殑鍛樺伐璐﹀彿銆傛潵婧? $.operator_id
鈥?operator_name (STRING) - 鎿嶄綔鍛樺鍚嶃€傛潵婧? $.operator_name
(璇存槑: 閫€娆捐褰曞彲鐢ㄤ簬涓庢敮浠樿褰曟牳瀵瑰簲鏀舵敮骞宠　銆傚湪璁㈠崟姹囨€诲垎鏋愭椂锛岄€€娆鹃€氬父涓嶈鍏ュ綋鏃ユ敹鍏ワ紝鑰屾槸鍐插噺鍘嗗彶璁㈠崟锛屽洜姝WS灞備細鏍规嵁闇€瑕佸鐞嗛€€娆惧奖鍝嶃€傛ā鍨嬩腑浠嶅皢閫€娆句簨瀹炶〃鐙珛瀛樺偍锛屾柟渚挎煡璇㈤€€娆炬€婚銆侀€€娆剧巼绛夋寚鏍囥€?
ODS_ORDER_RECEIPT_DETAIL锛堢粨璐﹀皬绁ㄨ鎯呰〃锛?
鎻忚堪: 瀛樺偍缁撶畻灏忕エ鐨勫畬鏁村揩鐓э紝姣忔潯璁板綍瀵瑰簲涓€寮犵粨璐﹀崟锛堜竴娆¤鍗曠粨绠楋級銆傚叾涓寘鍚棬搴椾俊鎭€佽鍗曟暣鍗曢噾棰濇眹鎬汇€佷細鍛樹娇鐢ㄦ儏鍐点€佷互鍙婅鍗曞唴鍚勫垎椤规槑缁嗭紙鍙拌垂銆佸晢鍝併€佸埜銆佹敮浠橈級绛夌粨鏋勫寲瀛愬璞°€傚彲瑙嗕负瀵圭粨璐﹁褰曠殑鎵╁睍璇︾粏鐗堛€?
瀛楁瀹氫箟锛?
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID锛屼富閿€傚敮涓€鏍囪瘑涓€寮犵粨绠楀崟銆傛潵婧怞SON璺緞: $.orderSettleId
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆傛潵婧? $.data.data.siteId锛堥€氳繃宓屽data鑾峰彇锛?
鈥?tenant_id (BIGINT) - 绉熸埛ID銆傛潵婧? $.data.data.tenantId
鈥?site_name (STRING) - 闂ㄥ簵鍚嶇О銆傛潵婧? $.data.data.shop_name
鈥?site_address (STRING) - 闂ㄥ簵鍦板潃銆傛潵婧? $.data.data.full_address
鈥?site_tel (STRING) - 闂ㄥ簵鐢佃瘽銆傛潵婧? $.data.data.business_tel
鈥?cashier_name (STRING) - 鏀堕摱鍛樺鍚嶃€傚皬绁ㄤ笂鎵撳嵃鐨勬敹閾跺憳锛屽鈥滄敹閾跺憳:寮犱笁鈥濄€傛潵婧? $.data.data.cashierName
鈥?member_name (STRING) - 浼氬憳濮撳悕蹇収銆傝嫢缁撹处鏃剁粦瀹氫簡浼氬憳锛屽垯璁板綍浼氬憳鍚嶇О锛屾湭缁戝畾鍒欏彲鑳芥樉绀衡€滃尶鍚嶇敤鎴封€濄€傛潵婧? $.data.data.memberName
鈥?member_phone (STRING) - 浼氬憳鎵嬫満鍙峰揩鐓с€傛潵婧? $.data.data.memberPhone
鈥?member_point (DECIMAL(10,2)) - 浼氬憳绉垎蹇収銆傜粨璐︽椂浼氬憳绉垎浣欓銆傛潵婧? $.data.data.memberPoint
鈥?total_amount (DECIMAL(10,2)) - 璁㈠崟鎬婚噾棰濓紙鍘熶环鎬昏锛夈€傚嵆鎵€鏈夋秷璐归」鏈姌鎵ｅ墠鍚堣閲戦銆傛潵婧? $.data.data.orderItem[*].price绛夋眹鎬伙紙濡傛棤鐩存帴瀛楁鍒橢TL璁＄畻锛?
鈥?total_discount (DECIMAL(10,2)) - 鏁村崟鎶樻墸鎬婚銆傚寘鍚細鍛樻姌鎵ｅ拰浜哄伐浼樻儬鐨勬€诲拰銆傛潵婧? 鍚勬槑缁嗘姌鎵ｄ箣鍜岋紙濡傛棤鐩存帴瀛楁锛孍TL姹囨€昏绠楋級
鈥?coupon_deduct_total (DECIMAL(10,2)) - 鍒告姷鎵ｆ€婚銆備娇鐢ㄥ洟璐埜绛夋姷鎵ｇ殑鎬婚噾棰濄€傛潵婧? $.data.data.couponItem[*].couponMoney绛夋眹鎬?
鈥?prepaid_deduct (DECIMAL(10,2)) - 浼氬憳鍗″偍鍊兼姷鎵ｉ噾棰濄€傛湰鍗曚娇鐢ㄤ細鍛樺偍鍊煎崱鏀粯鐨勯噾棰濄€傛潵婧? $.data.data.memberDeductAmount
鈥?amount_receivable (DECIMAL(10,2)) - 搴旀敹閲戦銆傚嵆鎵ｉ櫎鎵€鏈夋姌鎵ｅ埜鍚庨【瀹㈤渶鏀粯鐨勯噾棰濄€傛潵婧? 璁＄畻寰楀埌锛坱otal_amount - total_discount - coupon_deduct_total锛夋垨 $.data.data.ledgerAmount
鈥?amount_paid (DECIMAL(10,2)) - 瀹炴敹閲戦銆傞【瀹㈠疄闄呮敮浠樼殑閲戦鎬昏锛堝寘鎷偍鍊煎崱鏀粯鍜屽叾浠栨敮浠橈級銆傛潵婧? $.data.data.actualPayment
鈥?pay_method_count (INT) - 鏀粯鏂瑰紡绉嶇被鏁般€傝璁㈠崟浣跨敤鐨勬敮浠樻笭閬撴暟閲忥紙濡傜敤涓ょ鏂瑰紡鏀粯鍒欎负2锛夈€傛潵婧? 鏀粯鏄庣粏count
鈥?pay_details (STRING) - 鏀粯璇︽儏鎽樿銆傚皢鍚勬敮浠樻柟寮忓強閲戦鎷兼帴鎻忚堪锛屽鈥滃井淇?0鍏?浼氬憳鍗?0鍏冣€濄€傛潵婧? 鏉ヨ嚜鏀粯鏄庣粏鍒楄〃鎷兼帴锛圗TL缁勮锛?
鈥?refund_amount (DECIMAL(10,2)) - 閫€娆鹃噾棰濄€傝嫢璇ヨ鍗曞彂鐢熼€€娆撅紝鍒欒褰曢€€娆炬€婚锛堜竴鑸礋鍊硷級銆傛潵婧? 鍏宠仈閫€娆捐褰曡绠?
鈥?settle_time (DATETIME) - 缁撹处鏃堕棿銆傝鍗曞畬鎴愮粨绠楃殑鏃堕棿銆傛潵婧? $.data.data.createTime 鎴?$.data.data.payTime锛堥渶纭JSON瀛楁锛?
鈥?order_items_json (JSON) - 璁㈠崟鍟嗗搧鏄庣粏JSON銆傚祵鍏ュ師濮嬪晢鍝佸垪琛ㄧ粨鏋勶紝浠SON淇濆瓨锛堝寘鍚瘡涓晢鍝佸悕绉般€佹暟閲忋€佷环鏍肩瓑锛夈€傛潵婧? $.data.data.orderItem 瀵硅薄
鈥?table_fee_json (JSON) - 鍙拌垂鏄庣粏JSON銆傚祵鍏ュ師濮嬪彴璐逛娇鐢ㄦ槑缁嗐€傛潵婧? $.data.data.taiFeeItem
鈥?coupon_json (JSON) - 鍒镐娇鐢ㄦ槑缁咼SON銆傚祵鍏ュ師濮嬪埜椤瑰垪琛ㄣ€傛潵婧? $.data.data.couponItem
鈥?payment_json (JSON) - 鏀粯鏄庣粏JSON銆傚祵鍏ュ師濮嬫敮浠樺垪琛ㄣ€傛潵婧? $.data.data.paymentItem 鎴?$.data.data.payList
(璇存槑: 缁撹处灏忕エ璇︽儏ODS琛ㄧ敱浜庣粨鏋勫鏉傦紝閮ㄥ垎瀛楁浠ュ祵鍏SON褰㈠紡淇濆瓨浠ラ槻淇℃伅涓㈠け锛屼絾鍦―WD灞備細鎷嗚В鏁村悎鍚屾鍒扮浉搴斾簨瀹炶〃銆傝琛ㄤ富瑕佺敤浜庢牳瀵瑰拰琛ュ厖璁㈠崟姹囨€讳俊鎭€備緥濡傛敮浠樿鎯呭彲浠ヨВ鏋愪絾姝ゅ涔熶繚鐣欐枃鏈柟渚挎煡璇€倀otal_amount銆乼otal_discount绛夊彲浠TL闃舵浠庡悇瀛愰」姹囨€诲緱鍒帮紝浠ョ‘淇濆噯纭€俽efund_amount闇€缁撳悎閫€娆捐〃璁＄畻锛屽洜涓哄皬绁ㄨ鎯呭彲鑳戒笉鐩存帴浣撶幇閫€娆俱€傛ODS琛ㄥ湪ETL涓篃鐢ㄤ簬鐢熸垚DWS璁㈠崟姹囨€诲琛ㄣ€?
________________________________________
浠ヤ笂鍒楀嚭浜嗕富瑕丱DS灞傝〃鍙婂瓧娈点€傚鏈夋簮鏁版嵁鏂板妯″潡锛孫DS灞傚彲鎸夌被浼兼柟寮忔墿灞曘€?
3. DWD灞傝〃瀹氫箟锛堟槑缁嗗眰锛岀淮搴﹁〃涓庝簨瀹炶〃锛?
DWD灞傚湪ODS鐨勫熀纭€涓婅繘琛屾竻娲楀姞宸ワ紝寰楀埌浼佷笟涓氬姟鍒嗘瀽鐨勭淮搴﹁〃鍜屼簨瀹炶〃銆傜淮搴﹁〃锛圖IM锛夋暣鐞嗕富鏁版嵁锛屽闂ㄥ簵銆佷細鍛樸€佸晢鍝併€佸姪鏁欑瓑锛屼簨瀹炶〃锛團ACT锛変繚瀛樹笟鍔′簨鍔℃槑缁嗭紝濡傞攢鍞€佸彴璐广€佸姪鏁欐湇鍔°€佹敹娆剧瓑銆侱WD灞傚瓧娈靛懡鍚嶈鑼冪粺涓€銆佸惈涔夋竻鏅帮紝骞跺凡鍓旈櫎鏃犳晥鏁版嵁銆佸叧鑱斿埌鐩稿簲缁村害ID銆傛墍鏈夋灇涓剧被瀛楁鍦ㄦ灞傞€氳繃缁磋〃缈昏瘧鎴栦互缁磋〃ID鏇夸唬锛岄伩鍏嶇洿鎺ュ瓨鍌ㄤ唬鐮併€備互涓嬪垎鍒垪鍑虹淮搴﹁〃鍜屾槑缁嗕簨瀹炶〃璁捐锛?
缁村害琛ㄥ瓧娈垫潵婧愭€讳綋閬靛惊锛?
鈥?鑻ョ淮琛ㄦ槸 ODS 鍚屾鐨勨€滀富鏁版嵁鈥濓紙濡?dim_member, dim_product, dim_table, dim_assistant锛夛紝鍒?DWD 瀛楁涓?ODS 瀛楁鍩烘湰鍚屽悕涓€涓€瀵瑰簲锛屽瓧娈电骇 JSON 璺緞浠?ODS 绔犺妭涓哄噯锛?
鈥?DWD 鍙湪浠ヤ笅鎯呭喌澧炲姞/閲嶅懡鍚嶅瓧娈碉細缁熶竴闂ㄥ簵/绉熸埛涓婚敭锛坱enant_id, site_id锛夈€佹娊鍙栧垎绫?鍥㈤槦绛夋灇涓惧埌涓撻棬缁磋〃銆佸鍔犵姸鎬佹弿杩板瓧娈电瓑銆?
鍙互鍦?PRD 涓粺涓€鍔犱竴鍙ョ害瀹氾紝渚嬪锛?
闄ゆ湰绔犺妭鐗瑰埆娉ㄦ槑鐨勨€滆鐢?閲嶅懡鍚嶅瓧娈碘€濆锛屾墍鏈?DWD 缁村害琛ㄥ瓧娈靛潎涓庡搴?ODS 琛ㄥ瓧娈靛悓鍚嶄竴涓€鏄犲皠锛涘瓧娈电殑 JSON 鏉ユ簮璺緞浠?ODS 琛ㄧ珷鑺傚畾涔変负鍑嗭紝涓嶅湪 DWD 閲嶅銆?

3.1 缁村害琛ㄥ畾涔?
DIM_SITE锛堥棬搴楃淮搴﹁〃锛?
 涓氬姟瀹氫箟

`dim_site` 缁熶竴鎵胯浇闂ㄥ簵涓绘暟鎹紝鏄墍鏈変簨瀹炶〃鍜?DWS 瀹借〃鐨勯棬搴楀綊灞炵淮搴︺€?

- 涓氬姟灞傞潰鐨?*鏍稿績瀹炰綋鏄棬搴楋紙site锛?*锛?
- **鎵€鏈変簨瀹炶〃銆佹眹鎬昏〃鍧囬€氳繃 `site_id` 鍏宠仈鍒?dim_site**锛?
- 绉熸埛/鍝佺墝锛坱enant锛変俊鎭?*涓嶅啀鍗曠嫭寤虹淮琛?*锛屼粎浣滀负 `dim_site` 鐨勫睘鎬у瓨鍦紙濡?`tenant_name`锛夈€?

涓婃父鍚勭被 JSON 涓嚭鐜扮殑 `site_id`銆乣siteProfile` 绛夐棬搴椾俊鎭紝鍦?ODS 灞備互鍘熷蹇収淇濈暀锛屽湪 DWD 灞傜粺涓€鎶藉彇鍒?`dim_site`锛岄伩鍏嶅湪浜嬪疄灞傞噸澶嶅祵鍏?`siteProfile` 缁撴瀯銆?

瀛楁璁捐涓?JSON 鏄犲皠

| 瀛楁鍚?        | 绫诲瀷               | 璇存槑                                                       | 鍏稿瀷 JSON 鏉ユ簮绀轰緥                                      |
|----------------|--------------------|------------------------------------------------------------|---------------------------------------------------------|
| `site_id`      | BIGINT             | 闂ㄥ簵 ID锛屼富閿?                                            | 灏忕エ璇︽儏锛歚$.data.data.siteId`锛?br>鍏跺畠鍚?siteProfile 鐨?JSON 涓殑 `siteProfile.id` |
| `tenant_name`  | VARCHAR(200)       | 鍝佺墝/绉熸埛鍚嶇О锛屼粎浣滀负鎻忚堪灞炴€э紝涓嶄綔涓轰簨瀹炲眰鍏宠仈閿?        | 鍙敱閰嶇疆鎴栭涓棬搴楀揩鐓т汉宸ユ寚瀹氾紝濡傗€滄湕鏈楁鐞冣€濈瓑        |
| `site_code`    | VARCHAR(50)        | 闂ㄥ簵缂栫爜锛堝涓婃父鏈夊崟鐙紪鐮侊紝鍙负绌猴級                     | 灏忕エ璇︽儏锛歚$.data.data.shop_code` 鎴?siteProfile 涓悓涔夊瓧娈?|
| `site_name`    | VARCHAR(200)       | 闂ㄥ簵鍚嶇О                                                   | 灏忕エ璇︽儏锛歚$.data.data.shop_name`锛泂iteProfile.name    |
| `full_address` | VARCHAR(500)       | 闂ㄥ簵瀹屾暣鍦板潃                                               | 灏忕エ璇︽儏锛歚$.data.data.full_address`                   |
| `city_name`    | VARCHAR(100)       | 鍩庡競鍚嶇О锛堝彲鐢卞湴鍧€鎴栧尯鍩?ID 瑙ｆ瀽锛岃В鏋愪笉鍒板垯涓虹┖锛?       | 鐢?`full_address` 鎴?`tenant_site_region_id` 瑙ｆ瀽       |
| `district_name`| VARCHAR(100)       | 鍖?鍘垮悕绉帮紙鍙€夛級                                         | 鍚屼笂                                                   |
| `longitude`    | DECIMAL(10,6)      | 缁忓害                                                       | siteProfile锛歚$.longitude`锛堝鏈夛級                     |
| `latitude`     | DECIMAL(10,6)      | 绾害                                                       | siteProfile锛歚$.latitude`锛堝鏈夛級                      |
| `business_tel` | VARCHAR(50)        | 闂ㄥ簵鐢佃瘽                                                   | 灏忕エ璇︽儏锛歚$.data.data.business_tel`                   |
| `open_date`    | DATE               | 寮€搴楁棩鏈燂紙濡傛棤鍒欎负绌猴紝鍚庣画鍙汉宸ョ淮鎶わ級                   | 鏃犵洿鎺ュ瓧娈垫椂鐢变笟鍔′晶琛ュ綍                               |
| `status`       | VARCHAR(50)        | 闂ㄥ簵鐘舵€侊細钀ヤ笟涓?/ 鍋滀笟 / 绛瑰绛?                         | 濡備笂娓告湁闂ㄥ簵鐘舵€侀厤缃垯鏄犲皠锛涘綋鍓嶅彲榛樿鈥滆惀涓氫腑鈥?       |
| `org_id`       | BIGINT             | 缁勭粐/鍖哄煙 ID锛堝鏈夛紝濡傜鎴蜂晶鐨勫尯鍩熸爲锛?                   | siteProfile锛歚$.tenant_site_region_id` 鎴?`$.org_id`   |
| `remark`       | VARCHAR(500)       | 澶囨敞                                                       | 鏁颁粨渚х淮鎶?                                            |
| `created_at`   | TIMESTAMP          | 璁板綍鍒涘缓鏃堕棿锛堟暟浠擄級                                       | 鏁颁粨 ETL 鐢熸垚                                          |
| `updated_at`   | TIMESTAMP          | 璁板綍鏈€鍚庢洿鏂版椂闂达紙鏁颁粨锛?                                  | 鏁颁粨 ETL 鐢熸垚                                          |

> 璇存槑锛? 
> - 涓婃父 JSON 涓殑 `tenant_id` 鍦?DWD 灞?*涓嶅啀鐢ㄤ簬寤烘ā鍏宠仈**锛屽鏈夐渶瑕佸彲鍦?DIM_SITE 澧炲姞涓€涓?`tenant_code` 瀛楁浣滀负绾弿杩?瀵圭収鐢紱  
> - 浠讳綍鍝佺墝/绉熸埛缁村害鍒嗘瀽锛岀粺涓€閫氳繃锛歚site_id -> dim_site.tenant_name` 瀹炵幇銆?

#### 寤鸿〃 SQL 鑽夋锛圥ostgreSQL锛?

```sql
CREATE TABLE dim_site (
    site_id        BIGINT       PRIMARY KEY,              -- 闂ㄥ簵ID锛屽搴斿悇涓氬姟琛ㄤ腑鐨?site_id
    tenant_name    VARCHAR(200) NOT NULL,                 -- 鍝佺墝/绉熸埛鍚嶇О锛屼粎浣滀负灞炴€?
    site_code      VARCHAR(50),                           -- 闂ㄥ簵缂栫爜锛堥€夊～锛?
    site_name      VARCHAR(200) NOT NULL,                 -- 闂ㄥ簵鍚嶇О
    full_address   VARCHAR(500),                          -- 瀹屾暣鍦板潃
    city_name      VARCHAR(100),                          -- 鍩庡競
    district_name  VARCHAR(100),                          -- 鍖?鍘?
    longitude      DECIMAL(10,6),                         -- 缁忓害
    latitude       DECIMAL(10,6),                         -- 绾害
    business_tel   VARCHAR(50),                           -- 闂ㄥ簵鐢佃瘽
    open_date      DATE,                                  -- 寮€搴楁棩鏈燂紙鍙负绌猴級
    status         VARCHAR(50) DEFAULT '钀ヤ笟涓?,          -- 闂ㄥ簵鐘舵€侊紙榛樿钀ヤ笟涓級
    org_id         BIGINT,                                -- 缁勭粐/鍖哄煙ID锛堝鏈夛級
    remark         VARCHAR(500),                          -- 澶囨敞
    created_at     TIMESTAMP   DEFAULT CURRENT_TIMESTAMP, -- 璁板綍鍒涘缓鏃堕棿锛堟暟浠擄級
    updated_at     TIMESTAMP   DEFAULT CURRENT_TIMESTAMP  -- 璁板綍鏇存柊鏃堕棿锛堟暟浠擄級
);

COMMENT ON TABLE dim_site IS '闂ㄥ簵缁村害琛紝缁熶竴瀛樻斁闂ㄥ簵涓绘暟鎹紝鏀寔澶氶棬搴楁墿灞曪紱绉熸埛/鍝佺墝淇℃伅浠呬綔涓哄睘鎬у瓨鍦?;

COMMENT ON COLUMN dim_site.site_id      IS '闂ㄥ簵ID锛屼笂娓稿悇JSON涓殑site_id缁熶竴鏄犲皠鍒版';
COMMENT ON COLUMN dim_site.tenant_name  IS '鍝佺墝/绉熸埛鍚嶇О锛屼粎浣滀负鎻忚堪灞炴€э紝浜嬪疄琛ㄤ笉鐩存帴鍏宠仈绉熸埛缁?;
COMMENT ON COLUMN dim_site.site_code    IS '闂ㄥ簵缂栫爜锛堝涓婃父鏈夊崟鐙紪鐮侊紝鍙负绌猴級';
COMMENT ON COLUMN dim_site.site_name    IS '闂ㄥ簵鍚嶇О';
COMMENT ON COLUMN dim_site.full_address IS '闂ㄥ簵瀹屾暣鍦板潃';
COMMENT ON COLUMN dim_site.city_name    IS '鍩庡競鍚嶇О';
COMMENT ON COLUMN dim_site.district_name IS '鍖?鍘垮悕绉?;
COMMENT ON COLUMN dim_site.longitude    IS '缁忓害';
COMMENT ON COLUMN dim_site.latitude     IS '绾害';
COMMENT ON COLUMN dim_site.business_tel IS '闂ㄥ簵鐢佃瘽';
COMMENT ON COLUMN dim_site.open_date    IS '寮€搴楁棩鏈?;
COMMENT ON COLUMN dim_site.status       IS '闂ㄥ簵鐘舵€侊細钀ヤ笟涓?鍋滀笟/绛瑰绛?;
COMMENT ON COLUMN dim_site.org_id       IS '闂ㄥ簵鎵€灞炵粍缁?鍖哄煙ID锛堝涓婃父鏈塼enant_site_region_id锛?;
COMMENT ON COLUMN dim_site.remark       IS '澶囨敞';
COMMENT ON COLUMN dim_site.created_at   IS '璁板綍鍒涘缓鏃堕棿锛堟暟浠撲晶锛?;
COMMENT ON COLUMN dim_site.updated_at   IS '璁板綍鏈€鍚庢洿鏂版椂闂达紙鏁颁粨渚э級';
DIM_MEMBER锛堜細鍛樼淮搴﹁〃锛?
鎻忚堪锛?浼氬憳缁村害锛岃褰曚細鍛樹釜浜哄強璐︽埛灞炴€с€傚皢ODS浼氬憳妗ｆ鍜屼細鍛樺崱淇℃伅鍚堝苟锛屾彁渚涘畬鏁翠細鍛樼敾鍍忋€?
涓婚敭: member_id锛堜細鍛樿处鎴稩D锛?
瀛楁:
鈥?member_id (BIGINT) - 浼氬憳ID锛屼富閿€傚搴擮DS_MEMBER_PROFILE.id銆?
鈥?member_name (STRING) - 浼氬憳濮撳悕銆傛潵鑷狾DS_MEMBER_PROFILE.real_name锛屽涓虹┖鍒欑敤鏄电О浠ｆ浛銆?
鈥?nickname (STRING) - 浼氬憳鏄电О銆?
鈥?gender (STRING) - 鎬у埆锛堚€滅敺鈥?鈥滃コ鈥濓級銆傜敱member_profiles.gender浠ｇ爜缈昏瘧寰楀埌銆?
鈥?birthday (DATE) - 鍑虹敓鏃ユ湡銆?
鈥?mobile (STRING) - 鎵嬫満鍙风爜銆?
鈥?member_type_id (BIGINT) - 浼氬憳鍗＄被鍨婭D锛屽閿弬鐓IM_MEMBER_CARD_TYPE.card_type_id銆?
鈥?member_type_name (STRING) - 浼氬憳鍗＄被鍨嬪悕绉般€傚鈥滃偍鍊煎崱鈥濄€佲€滈摱鍗♀€濄€佲€滈噾鍗♀€濈瓑銆?
鈥?status (STRING) - 浼氬憳鐘舵€併€傜炕璇慜DS_MEMBER_PROFILE.status鏋氫妇锛屽鈥滄甯糕€濄€佲€滃仠鐢ㄢ€濄€?
鈥?register_time (DATETIME) - 娉ㄥ唽鏃堕棿/寮€鍗℃椂闂淬€?
鈥?valid_from (DATE) - 浼氬憳鍗℃湁鏁堟湡寮€濮嬨€?
鈥?valid_to (DATE) - 浼氬憳鍗℃湁鏁堟湡鎴銆?
鈥?last_visit_time (DATETIME) - 鏈€杩戞秷璐规椂闂淬€?
鈥?balance (DECIMAL(10,2)) - 褰撳墠鍌ㄥ€间綑棰濓紙鍏冿級銆?
鈥?total_recharge_amount (DECIMAL(10,2)) - 鍘嗗彶鍏呭€兼€婚锛堝厓锛夈€?鍙互鍦‥TL鍒濆鍖栨椂璁＄畻鎴栧悗缁疮璁?
鈥?total_consumed_amount (DECIMAL(10,2)) - 鍘嗗彶娑堣垂鎬婚锛堝偍鍊奸儴鍒嗭紝鍏冿級銆?
鈥?wechat_id (STRING) - 缁戝畾寰俊鍙稩D銆?
鈥?alipay_id (STRING) - 缁戝畾鏀粯瀹濆彿ID銆?
鈥?remark (STRING) - 澶囨敞銆?
(鏉ユ簮: 涓昏鏉ヨ嚜member_profiles瀛楁锛宮ember_type鐩稿叧鍒欑粨鍚圤DS_MEMBER_CARD鎴栭厤缃〃纭畾銆傚鍗＄被鍨嬪拰鏈夋晥鏈熶粠member_stored_value_cards鎻愬彇銆備綑棰濆彇member_profiles.balance锛屼絾鍦ㄥ垎鏋愪腑鏇村彲闈犵殑鏄€氳繃浣欓鍙樻洿娴佹按璁＄畻锛岃繖閲屼繚鐣欎竴涓揩鐓у€笺€傚厖鍊?娑堣垂鎬婚鍙湪ETL鎴朆I灞傞€氳繃浜嬪疄琛ㄦ眹鎬诲緱鍒帮紝涓嶄竴瀹氬湪缁磋〃瀛樺偍銆傚垵濮嬪彲涓嶅～鎴栭€氳繃鍘嗗彶璁＄畻鏇存柊銆侱IM_MEMBER涓庝簨瀹炶〃鍏宠仈鏃讹紝閫氳繃member_id杩炴帴銆?
DIM_MEMBER_CARD_TYPE锛堜細鍛樺崱绫诲瀷缁村害琛級
鎻忚堪锛?浼氬憳鍗＄绫荤淮搴︺€傛弿杩板悇绉嶄細鍛樺崱绾у埆鎴栫被鍨嬬殑瀹氫箟灞炴€э紝渚嬪鍚嶇О銆佹姌鎵ｃ€佹潈鐩娿€傞伩鍏嶅湪妯″瀷涓‖缂栫爜浼氬憳鍗℃灇涓俱€?
涓婚敭: card_type_id
瀛楁:
鈥?card_type_id (BIGINT) - 鍗＄ID锛屼富閿€?
鈥?card_type_name (STRING) - 鍗＄鍚嶇О銆?
鈥?discount_rate (DECIMAL(5,2)) - 榛樿鎶樻墸鐜囥€傚0.90琛ㄧず鎵撲節鎶樸€?
鈥?description (STRING) - 鍗＄鎻忚堪/鏉冪泭璇存槑銆?
鈥?remark (STRING) - 澶囨敞銆?
(鏉ユ簮: 缁撳悎涓氬姟閰嶇疆銆傚綋鍓嶅彲浠嶰DS_MEMBER_CARD涓眹鎬讳笉鍚宑ard_type_id鍙婂悕绉帮紝濉厖杩涙缁磋〃锛屼緥濡傚偍鍊煎崱涓€绫伙紝娆″崱鍙︿竴绫荤瓑锛屽苟璁板綍鍏舵姌鎵ｈ鍒欍€傚鏃犳洿澶氫俊鎭彲鏆傚瓨绌烘弿杩帮紝鐢变笟鍔¤ˉ鍏呫€?
DIM_PRODUCT锛堝晢鍝佺淮搴﹁〃锛?
鎻忚堪锛?鍟嗗搧缁村害锛屾弿杩板搧鐗屽晢鍝佺殑灞炴€с€傜敱ODS_PRODUCT娓呮礂鑰屾潵锛屽苟鍏宠仈鍟嗗搧绫诲埆绛変俊鎭€?
涓婚敭: goods_id
瀛楁:
鈥?goods_id (BIGINT) - 鍟嗗搧ID锛屼富閿€?
鈥?goods_name (STRING) - 鍟嗗搧鍚嶇О銆?
鈥?goods_code (STRING) - 鍟嗗搧缂栫爜銆?
鈥?category_id (BIGINT) - 鍟嗗搧绫诲埆ID锛屽閿弬鐓IM_PRODUCT_CATEGORY.category_id銆?
鈥?category_name (STRING) - 鍟嗗搧绫诲埆鍚嶇О銆?
鈥?unit (STRING) - 璁￠噺鍗曚綅銆?
鈥?is_service (TINYINT) - 鏄惁鏈嶅姟绫诲晢鍝侊紙1鏈嶅姟/0鍟嗗搧锛夈€?
鈥?status (STRING) - 鍟嗗搧鐘舵€侊紙鈥滀笂鏋垛€?鈥滀笅鏋垛€濓級銆?
鈥?site_id (BIGINT) 鈥?闂ㄥ簵ID銆?
(鏉ユ簮: ODS_PRODUCT锛屽幓闄や笉闇€瑕佸垎鏋愮殑瀛楁锛屼粎淇濈暀鏍稿績灞炴€с€俢ategory_id瀵瑰簲DIM_PRODUCT_CATEGORY浠ヨ幏寰楃被鍒悕绉般€俿tatus鐢变唬鐮佽浆鎴愭枃鏈€俿ite_id涓轰簡閾捐矾瀹屾暣涔熷瓨鍌ㄣ€?
DIM_PRODUCT_CATEGORY锛堝晢鍝佺被鍒淮搴﹁〃锛?
鎻忚堪锛?鍟嗗搧鍒嗙被缁村害銆傚瓨鍌ㄥ晢鍝佺殑绫诲埆灞傛淇℃伅锛屽澶х被銆佸瓙绫诲悕绉帮紝鐢ㄤ簬鎸夊搧绫诲垎鏋愰攢鍞€?
涓婚敭: category_id
瀛楁:
鈥?category_id (BIGINT) - 鍒嗙被ID锛屼富閿€?
鈥?category_name (STRING) - 鍒嗙被鍚嶇О銆?
鈥?parent_category_id (BIGINT) - 鐖剁被鍒獻D锛堝鏈変笂涓嬬骇锛夈€?
鈥?parent_category_name (STRING) - 鐖剁被鍒悕绉般€?
鈥?is_active (TINYINT) - 鏄惁鍦ㄧ敤锛?鏄?0鍚︼級銆?
(鏉ユ簮: 搴撳瓨鍙樺寲璁板綍2.json 涓В鏋?goodsCategoryList 鑾峰彇銆傜敱浜庡簱瀛樺彉鍖栬褰?瀹為檯鏄竴浠藉晢鍝佸垎绫婚厤缃爲锛屽叾姣忔潯璁板綍涓轰竴涓垎绫昏妭鐐广€侲TL闇€閬嶅巻鎻愬彇category_id銆乶ame鍜宲arent_id鏋勫缓缁磋〃銆傚垎绫诲眰绾у叧绯诲彲鐢ㄤ簬鎸夊ぇ绫?灏忕被姹囨€婚攢鍞€傚綋鍓嶆暟鎹墍鏈夊垎绫?is_warehousing=1 琛ㄧず鍙備笌搴撳瓨绠＄悊锛屽潎鍙涓烘湁鏁堝垎绫汇€?
DIM_TABLE锛堝彴妗岀淮搴﹁〃锛?
鎻忚堪锛?鍙版缁村害锛屾弿杩伴棬搴楀唴鍚勫彴妗?鍖呭帰鐨勫睘鎬э紝濡傜紪鍙枫€佸尯鍩熴€佺被鍨嬬瓑銆傜敱ODS_TABLE_INFO鍔犲伐寰楀埌銆?
涓婚敭: site_table_id
瀛楁:
鈥?site_table_id (BIGINT) - 鍙版ID锛屼富閿€?
鈥?table_name (STRING) - 鍙版鍚嶇О銆?
鈥?table_no (STRING) - 鍙版缂栧彿锛堢函鏁板瓧搴忓彿锛屽鏈夌殑璇濓級銆?
鈥?area_name (STRING) - 鍖哄煙鍚嶇О銆?
鈥?table_type (STRING) - 鍙版绫诲瀷锛堜緥濡傗€滅編寮忔鈥濄€佲€滄柉璇哄厠妗屸€濄€佲€淜TV鍖呴棿鈥濄€佲€滈夯灏嗘埧鈥濓級銆?
鈥?is_vip (TINYINT) - 鏄惁VIP涓撳睘鍙般€?
鈥?status (STRING) - 鍙版鐘舵€侊紙鈥滃惎鐢ㄢ€?鈥滃仠鐢ㄢ€濓級銆?
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆?
(鏉ユ簮: 涓昏瀛楁鏉ヨ嚜ODS_TABLE_INFO锛宎rea_name鍜宼able_type鍙兘闇€瑕佺粨鍚堥厤缃垨鍚嶇О瑙勫垯濉厖銆備緥濡?area_name 閫氳繃ODS_TABLE_INFO.area_id鍏宠仈闂ㄥ簵鍖哄煙閰嶇疆琛?濡傛灉鏈?鑾峰彇鍚嶇О锛屾病鏈夊垯浠巘able_name瑙ｆ瀽銆倀able_type鍙熀浜巘able_name涓叧閿瓧鏄犲皠锛屽鍚€滄柉鈥濆瓧鐨勪负鏂鍏嬫锛屽湪缁磋〃涓粺涓€绠＄悊鏄犲皠鍏崇郴閬垮厤纭紪鐮併€?
DIM_ASSISTANT锛堝姪鏁欑淮搴﹁〃锛?
鎻忚堪锛?鍔╂暀锛堟湇鍔′汉鍛橈級缁村害锛岃褰曞憳宸?鍔╂暀鐨勫睘鎬с€傜敱assistant_accounts_master娓呮礂寰楀埌锛屽寘鎷叾涓汉淇℃伅鍜岀姸鎬佺瓑銆?
涓婚敭: assistant_id
瀛楁:
鈥?assistant_id (BIGINT) - 鍔╂暀ID锛堣处鍙稩D锛夛紝涓婚敭銆?
鈥?user_id (BIGINT) - 绯荤粺鐢ㄦ埛ID锛堢櫥褰曡处鍙稩D锛夈€?
鈥?assistant_no (STRING) - 鍔╂暀宸ュ彿銆?
鈥?real_name (STRING) - 鍔╂暀濮撳悕銆?
鈥?nickname (STRING) - 鍔╂暀鏄电О銆?
鈥?gender (STRING) - 鎬у埆銆?
鈥?mobile (STRING) - 鎵嬫満鍙枫€?
鈥?status (STRING) - 鍦ㄨ亴鐘舵€侊紙鈥滃湪鑱屸€?鈥滅鑱屸€濈瓑锛夈€?
鈥?visible_flag (TINYINT) - 鍓嶅彴鍙鏍囧織锛?灞曠ず/0闅愯棌锛夈€?
鈥?skill_category (STRING) - 鏈嶅姟鎶€鑳界被鍒€傛瘮濡傗€滃熀纭€璇炬暀缁冣€濄€佲€滈珮绾ц鏁欑粌鈥濈瓑锛屽搴斿叾涓昏鏈嶅姟绫诲瀷銆?
鈥?level (STRING) - 鍔╂暀绛夌骇銆?
鈥?team_name (STRING) - 鎵€灞炲洟闃?鐝粍鍚嶇О銆?
鈥?billing_mode (STRING) - 璁¤垂妯″紡锛堟寜灏忔椂/鎸夊満娆＄瓑锛夈€?
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆?
(鏉ユ簮: assistant_accounts_master瀛楁鏁寸悊锛屽墧闄や笉蹇呰瀛楁濡俿erial_number绛夈€俿tatus鐢辩爜琛ㄨ浆鎹负鏂囨湰銆俿kill_category鍙熀浜庡姪鏁欏叿澶囩殑鎶€鑳界被鍨嬬‘瀹氾紝渚嬪鑻ュ姪鏁欐湁鍩虹璇炬妧鑳藉垯鏍囦负鈥滃熀纭€璇炬暀缁冣€濓紱濡備竴涓姪鏁欒处鍙锋湁澶氱鏈嶅姟绫诲瀷锛屽彲浠ュ～鍐欎富瑕佺被鍨嬫垨鈥滃鎶€鑳解€濄€傚洟闃熷悕绉皌eam_name鑻DS娌℃湁鍙€氳繃assistant_team_id鍏宠仈TEAM缁磋〃鑾峰彇銆?
DIM_ASSISTANT_TEAM锛堝姪鏁欏洟闃熺淮搴﹁〃锛?
鎻忚堪锛?鍔╂暀鍥㈤槦/缁勭粐缁村害銆傚鏋滄湁灏嗗姪鏁欏垝鍒嗗洟闃熸垨閮ㄩ棬鐨勯渶姹傦紝鍒欏缓绔嬫缁磋〃銆傚綋鍓嶆暟鎹湁assistant_team_id浣嗘湭缁欏悕绉帮紝鍙悗缁ˉ鍏呫€?
涓婚敭: team_id
瀛楁:
鈥?team_id (BIGINT) - 鍥㈤槦ID锛屼富閿€?
鈥?team_name (STRING) - 鍥㈤槦鍚嶇О銆?
鈥?site_id (BIGINT) - 闂ㄥ簵ID/缁勭粐褰掑睘ID銆?
鈥?remark (STRING) - 澶囨敞銆?
(鏉ユ簮: 濡備笟鍔￠厤缃湁瀹氫箟鍥㈤槦锛屽垯濉叆銆傚綋鍓嶅彲浠巃ssistant_team_id涓嶅悓鍊兼灇涓惧～榛樿鍚嶇О锛屼緥濡傞兘灞炰簬鈥滄暀缁冪粍鈥濇殏鏃躲€傛缁村害鍦ㄦ暟鎹腑淇℃伅缂轰箯锛屽彲涓嶅己鍒朵娇鐢ㄣ€?
DIM_PAY_METHOD锛堟敮浠樻柟寮忕淮搴﹁〃锛?
鎻忚堪锛?鏀粯鏂瑰紡缁村害銆傜淮鎶ゆ敮浠樻笭閬撶紪鐮佷笌鍚嶇О鐨勫搴斿叧绯汇€傜敤浜庣炕璇戞敮浠樿褰曚腑鐨刾ay_method銆?
涓婚敭: pay_method_code
瀛楁:
鈥?pay_method_code (INT) - 鏀粯鏂瑰紡浠ｇ爜锛屼富閿€?
鈥?pay_method_name (STRING) - 鏀粯鏂瑰紡鍚嶇О銆備緥濡傗€滅幇閲戔€濄€佲€滃井淇♀€濄€佲€滄敮浠樺疂鈥濄€佲€滃偍鍊煎崱鈥濄€?
鈥?method_type (STRING) - 鏀粯绫诲瀷澶х被銆備緥濡傗€滅幇閲戠被鈥濄€佲€滅涓夋柟鏀粯鈥濄€佲€滀細鍛樿处鎴封€濈瓑鍒嗙被銆?
鈥?remark (STRING) - 澶囨敞銆?
(鏉ユ簮: 涓氬姟绯荤粺鏀粯鏂瑰紡閰嶇疆銆傜敱浜庡鍑烘暟鎹腑浠呭嚭鐜?绉峱ay_method浠ｇ爜涓旀湭缁欐枃瀛楋紝闇€涓庝笟鍔＄‘璁ょ紪鐮併€備緥濡傚父瑙佹槧灏勶細1=鐜伴噾,2=寰俊,3=鏀粯瀹?4=閾惰仈,5=鍌ㄥ€煎崱 绛夈€侲TL鍒濆鍖栨椂鍙牴鎹凡鐭ユ敮浠樻柟寮忓～鍏咃紝鍚庣画鑻ユ湁鏂版柟寮忛€氳繃閰嶇疆澧炶ˉ銆傛缁磋〃纭繚鍒嗘瀽鎶ヨ〃鏄剧ず鏀粯鏂瑰紡鏃剁敤鍚嶇О鑰岄潪浠ｇ爜銆?
DIM_ORDER_ASSISTANT_TYPE锛堝姪鏁欐湇鍔＄被鍨嬬淮搴﹁〃锛?
鎻忚堪锛?鍔╂暀鏈嶅姟绫诲瀷缁村害銆傛弿杩拌鍗曚腑鍔╂暀鏈嶅姟鐨勭被鍨嬬紪鐮佸惈涔夈€?
涓婚敭: type_code
瀛楁:
鈥?type_code (INT) - 鍔╂暀鏈嶅姟绫诲瀷鐮侊紝涓婚敭銆?
鈥?type_name (STRING) - 绫诲瀷鍚嶇О銆傚鈥滃熀纭€璇炬湇鍔♀€濄€佲€滈檮鍔犺鏈嶅姟鈥濄€?
鈥?description (STRING) - 鎻忚堪璇存槑銆?
(鏉ユ簮: 鐢变笟鍔￠厤缃垨鏁版嵁鎺ㄦ柇銆傛湰妗堜緥鏍规嵁鍔╂暀娴佹按涓嚭鐜扮殑1鍜?鎺ㄥ畾锛?=鍩虹鏈嶅姟锛?=闄勫姞鏈嶅姟銆傜淮琛ㄩ渶鐢变笟鍔＄‘璁ゅ疄闄呭惈涔夊悗缁存姢銆?
DIM_COUPON_PLATFORM锛堝埜骞冲彴缁村害琛級
鎻忚堪锛?鍒告墍灞炲钩鍙扮淮搴︺€傛爣璇嗗洟璐埜鏉ユ簮鐨勫钩鍙帮紝渚嬪缇庡洟銆佸ぇ浼楃偣璇勭瓑銆傜敤浜庡垎鏋愬悇娓犻亾鍒镐娇鐢ㄦ儏鍐点€?
涓婚敭: platform_code
瀛楁:
鈥?platform_code (STRING) - 骞冲彴浠ｇ爜锛屼富閿€傚鈥淢T鈥濅唬琛ㄧ編鍥€?
鈥?platform_name (STRING) - 骞冲彴鍚嶇О銆傚鈥滅編鍥⑩€濄€?
鈥?company (STRING) - 骞冲彴鍏徃/鎵€灞為泦鍥€?
鈥?remark (STRING) - 澶囨敞銆?
(鏉ユ簮: 涓氬姟缁存姢銆傚彲棰勮甯歌鍥㈣喘骞冲彴銆侲TL鍙牴鎹埜dealId鎴朿ertificateId鏍煎紡鍒ゆ柇骞冲彴锛屽浠?鈥淢T鈥濆紑澶寸殑鍒哥爜褰掔被缇庡洟銆備负绋冲Ε璧疯搴斾汉宸ュ缓绔嬬淮琛紝platform_code鍙敤鎷奸煶缂╁啓鎴栬嫳鏂囥€?
鍏朵粬缁村害璇存槑锛?
闄や笂杩颁富瑕佺淮搴﹀锛屾暟鎹ā鍨嬭繕鍖呮嫭鏃堕棿缁村害锛圖IM_DATE 绛夛級鐢ㄤ簬鏃ユ湡鐨勫睘鎬у垎鏋愶紝姣忔棩鍙淮鎶や竴鏉¤嚜鐒舵棩鏈熻褰曪紝鍖呮嫭骞淬€佹湀銆佹棩銆佹槦鏈熴€佽妭鍋囨棩鏍囪瘑绛夛紝鐢ㄤ簬鎸夋棩缁熻锛堟湰娆℃湭璇﹀垪瀛楁锛夈€傜敱浜庤姹傛寜鑷劧鏃ユ眹鎬伙紝涓嶈€冭檻钀ヤ笟鏃舵鍒掑垎锛屽洜姝ゆ椂闂寸淮搴﹀彧闇€鎸夋棩鍘嗘棩绮掑害璁捐锛屾棤闇€闂叉椂/蹇欐椂绛夊睘鎬с€?
3.2 鏄庣粏浜嬪疄琛ㄥ畾涔?
FACT_SALE_ITEM锛堝晢鍝侀攢鍞槑缁嗕簨瀹炶〃锛?
鎻忚堪锛?璁板綍鍟嗗搧閿€鍞殑鏈€缁嗙矑搴︽槑缁嗭紝姣忔潯璁板綍浠ｈ〃璁㈠崟涓敭鍑虹殑涓€涓晢鍝侀」锛圫KU琛岋級銆傜矑搴︼細涓€浠跺晢鍝侀攢鍞褰曘€?
涓婚敭: (order_trade_no, site_goods_id, sequence_no) 澶嶅悎閿紝鎴栫郴缁熷唴閮ㄧ敓鎴愮殑娴佹按ID銆?
澶栭敭鍏宠仈: 鍏宠仈缁村害琛?DIM_SITE銆丏IM_PRODUCT銆丏IM_TABLE锛堣嫢闇€瑕佺煡閬撳湪鍝紶鍙版秷璐癸紝鍙€氳繃璁㈠崟鍏宠仈鍙拌垂琛ㄨ幏鍙栵紝涓嶇洿鎺ュ叧鑱攖able锛夈€丏IM_MEMBER锛堝鏋滆鍗曟湁鍏宠仈浼氬憳锛岄€氳繃璁㈠崟姹囨€诲彲鎷垮埌锛屼笉鐩存帴鍦ㄨ鍏宠仈锛夈€?
瀛楁:
DWD 瀛楁鍚?涓氬姟鍚箟	鏉ユ簮 ODS 瀛楁 / 璁＄畻鍏紡
sale_item_id	鍟嗗搧閿€鍞槑缁咺D锛屼富閿?ods_store_sale_item.id
order_trade_no	璁㈠崟浜ゆ槗鍙?ods_store_sale_item.order_trade_no
order_settle_id	璁㈠崟缁撶畻ID	ods_store_sale_item.order_settle_id
site_id	闂ㄥ簵ID	ods_store_sale_item.site_id
site_goods_id	闂ㄥ簵鍟嗗搧ID	ods_store_sale_item.site_goods_id
goods_id	鍝佺墝鍟嗗搧ID	ods_store_sale_item.goods_id锛坱enant_goods_id锛?
goods_name	鍟嗗搧鍚嶇О锛堥攢鍞椂鍐椾綑锛?ods_store_sale_item.goods_name
category_id	鍟嗗搧鍒嗙被ID	ods_store_sale_item.category_id 鎴栭€氳繃 site_goods_id 鍏宠仈 ods_store_product 鍙?category_id
quantity	閿€鍞暟閲?ods_store_sale_item.quantity
unit_price	閿€鍞崟浠?ods_store_sale_item.unit_price
discount_amount	鎶樻墸閲戦锛堜細鍛樻姌鎵?鎵嬪伐浼樻儬娣峰悎锛?ods_store_sale_item.discount_amount锛坉iscount_money锛?
final_amount	瀹炴敹閲戦	浼樺厛鐢?ods_store_sale_item.actual_amount锛涘鏃狅紝鍒?unit_price * quantity - discount_amount
is_gift	鏄惁璧犲搧	ods_store_sale_item.is_gift
sale_time	閿€鍞椂闂?榛樿锛歰ds_store_sale_item.sales_time锛涘闇€缁熶竴浠ョ粨璐︽椂闂达紝鍙€氳繃 order_settle_id 鍏宠仈 ods_order_receipt_detail.settle_time 瑕嗙洊
member_id	浼氬憳ID锛堢粺涓€浠庤鍗曠淮搴﹁幏鍙栵級	ods_order_receipt_detail.member_id锛堟寜 order_settle_id 鍏宠仈锛?
salesman_id	鎺ㄩ攢鍛業D	ods_store_sale_item.salesman_user_id
operator_id	鎿嶄綔鍛業D	ods_store_sale_item.operator_id
is_refunded	鏄惁宸查€€娆撅紙鏍囪涓哄悗缁閫€娆剧殑閿€鍞級	鑻?ods_store_sale_item.is_refunded 瀛楁鏈夋晥鍒欑洿鎺ユ槧灏勶紝鍚﹀垯渚濇嵁 fact_refund 涓叧鑱旂殑 sale_item_id 琛嶇敓

鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙凤紝鏍囪瘑灞炰簬鍝釜璁㈠崟銆?
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID锛屼究浜庝笌缁撶畻/鏀粯鍏宠仈銆?
鈥?site_id (BIGINT) - 闂ㄥ簵ID锛屽叧鑱擠IM_SITE銆?
鈥?goods_id (BIGINT) - 鍝佺墝鍟嗗搧ID锛屽叧鑱擠IM_PRODUCT.goods_id銆?
鈥?site_goods_id (BIGINT) - 闂ㄥ簵鍟嗗搧ID锛屽叧鑱擠IM_PRODUCT锛堝彲閫氳繃璇D鎵惧埌鍟嗗搧锛屼篃鍙笉閲嶅瀛樺偍site_goods_id锛屽洜宸茶兘閫氳繃goods_id+site_id瀹氫綅锛岃繖閲屼繚鐣欐柟渚跨洿鎺ヨ繛鎺DS鍙傝€冿級銆?
鈥?goods_name (STRING) - 鍟嗗搧鍚嶇О鍐椾綑銆?
鈥?category_id (BIGINT) - 鍟嗗搧绫诲埆ID锛屽叧鑱擠IM_PRODUCT_CATEGORY锛岀敤浜庢柟渚挎寜绫诲埆缁熻銆?
鈥?quantity (DECIMAL(10,2)) - 閿€鍞暟閲忋€?
鈥?unit_price (DECIMAL(10,2)) - 鍘熷崟浠枫€傝鍟嗗搧鍘熶环锛堟湭鎶樻墸鏃剁殑鍗曚环锛夈€?
鈥?discount_amount (DECIMAL(10,2)) - 鎶樻墸閲戦銆傝琛屽晢鍝佷韩鍙楃殑鎶樻墸鎬婚銆?
鈥?final_amount (DECIMAL(10,2)) - 瀹炴敹閲戦銆? unit_price*quantity - discount_amount銆?
鈥?is_gift (TINYINT) - 鏄惁璧犲搧鏍囧織銆?=璧犻€侊紝0=姝ｅ父閿€鍞€傝禒鍝佺殑final_amount閫氬父涓?銆?
鈥?sale_time (DATETIME) - 閿€鍞椂闂?璁㈠崟鏃堕棿銆傚彇璁㈠崟鐨勭粨璐︽椂闂存垨鍟嗗搧鍔犲叆璁㈠崟鏃堕棿銆傜敤浜庢棩绮掑害鍒嗘瀽銆?
鈥?member_id (BIGINT) - 浼氬憳ID銆傝嫢璁㈠崟鏈変細鍛橈紝鍒欐椤瑰綊灞炶浼氬憳锛屽惁鍒欎负绌恒€?
鈥?salesman_id (BIGINT) - 鎺ㄩ攢鍛業D銆傚鏈夋寚瀹氱殑閿€鍞汉鍛樸€?
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D銆傚綍鍏ユ閿€鍞殑鏀堕摱鍛樸€?
鏉ユ簮鍙婇€昏緫锛?鐢監DS_STORE_SALE_ITEM娓呮礂寰楀埌銆傜洿鎺ユ槧灏勫ぇ閮ㄥ垎瀛楁锛歲uantity, unit_price, discount_amount 鏉ヨ嚜ODS瀵瑰簲瀛楁锛沠inal_amount鍦∣DS涓彲璁＄畻鎴栧凡鎻愪緵銆俶ember_id骞舵湭鐩存帴鍦∣DS閿€鍞涓嚭鐜帮紝浣嗚嫢璇ヨ鍗曠粦瀹氫細鍛橈紝鍒欓€氳繃璁㈠崟姹囨€诲叧鑱斿埌鎵€鏈夎锛孍TL鍙互鍦ㄥ姞杞芥椂濉叆鍚屼竴order_trade_no涓嬬殑member_id锛堣繖瑕佹眰ETL鍦ㄥ鐞嗚鍗曟椂鏈変細鍛樻槧灏勶級銆俿ale_time鍙彇璁㈠崟缁撹处鏃堕棿锛屼互渚挎墍鏈夎浣跨敤鍚屼竴缁撶畻鏃堕棿渚夸簬瀵归綈鏃ユ湡銆傝嫢鏈夐€€娆惧彂鐢燂紝fact_sale_item涓嶅垹闄ゅ師閿€鍞褰曪紝鑰屾槸鍦‵ACT_REFUND涓褰曢€€娆撅紝鎴栧彲澧炲姞涓€涓爣璁癷s_refunded銆傝繖閲屼繚鐣檌s_refund鏍囧織浠ヤ緵杩囨护閫€璐ч」锛屼絾閲戦涓嶈皟鏁达紝鍑€閿€鍞鐨勮绠楀皢鍦ㄦ眹鎬诲眰鑰冭檻閫€娆俱€?
FACT_TABLE_USAGE锛堝彴璐逛娇鐢ㄦ槑缁嗕簨瀹炶〃锛?
鎻忚堪: 璁板綍鍙版浣跨敤浜х敓鐨勫彴璐规槑缁嗐€傛瘡鏉¤褰曚唬琛ㄩ【瀹娇鐢ㄤ竴寮犲彴妗屼竴娆＄殑鏀惰垂鎯呭喌銆傜矑搴︼細涓€绗斿彴璐硅处鍗曪紙閫氬父瀵瑰簲涓€涓鍗曠殑鍙拌垂閮ㄥ垎锛夈€?
涓婚敭: id锛堝彴璐规祦姘碔D锛夈€?
澶栭敭鍏宠仈: site_id鈫扗IM_SITE锛宻ite_table_id鈫扗IM_TABLE锛宮ember_id鈫扗IM_MEMBER锛堝閫傜敤锛夛紝assistant_id鏃犵洿鎺ュ叧鑱旇繖閲岋紝鍥犱负鍔╂暀鏀惰垂鐙珛璁板綍銆?
瀛楁:
DWD 瀛楁鍚?涓氬姟鍚箟	鏉ユ簮 ODS 瀛楁 / 璁＄畻鍏紡
table_usage_id	鍙拌垂娴佹按ID锛屼富閿?table_fee_transactions_log.id
order_trade_no	璁㈠崟浜ゆ槗鍙?table_fee_transactions_log.order_trade_no
order_settle_id	璁㈠崟缁撶畻ID	table_fee_transactions_log.order_settle_id
site_id	闂ㄥ簵ID	table_fee_transactions_log.site_id
site_table_id	鍙版ID	table_fee_transactions_log.site_table_id
table_name	鍙版鍚嶇О	table_fee_transactions_log.table_name
start_time	寮€鍙版椂闂?table_fee_transactions_log.start_use_time
end_time	绂诲彴鏃堕棿	table_fee_transactions_log.last_use_time
duration_minutes	浣跨敤鏃堕暱锛堝垎閽燂級	鑻?real_table_use_seconds 鏈夊€硷細real_table_use_seconds / 60锛涘惁鍒欙細EXTRACT(EPOCH FROM (last_use_time - start_use_time))/60
billing_unit_price	璁¤垂鍗曚环锛堝彲閫変繚鐣欙級	table_fee_transactions_log.billing_unit_price锛堝嵆 ledger_unit_price锛?
鏁版嵁浠撳簱寤烘ā涓?ETL 瀵规帴 PRD
billing_count	璁¤垂鏁伴噺锛堝彲閫変繚鐣欙級	table_fee_transactions_log.billing_count锛堝嵆 ledger_count锛?
base_fee	鍙拌垂鍘熶环灏忚锛堟湭鎶樻墸锛?table_fee_transactions_log.ledger_amount
member_discount	浼氬憳鎶樻墸閲戦	table_fee_transactions_log.member_discount_amount
coupon_deduction	鍒告姷鎵ｉ噾棰?table_fee_transactions_log.coupon_discount_amount锛坈oupon_promotion_amount锛?
manual_discount	浜哄伐鍑忓厤閲戦	浼樺厛锛歰ds_table_use_log.manual_adjust_amount锛涘鏃狅紝鍒?危 ods_table_fee_adjust.adjust_amount锛堟寜 order_settle_id+site_table_id 姹囨€伙級
鏁版嵁浠撳簱寤烘ā涓?ETL 瀵规帴 PRD
service_fee	闄勫姞鏈嶅姟璐?绠＄悊璐?table_fee_transactions_log.service_fee锛坢gmt_fee锛?
final_table_fee	鍙拌垂瀹炴敹閲戦	浼樺厛鐢?table_fee_transactions_log.final_table_fee锛坮eal_table_charge_money锛夛紱濡傛棤锛屽垯 base_fee - member_discount - coupon_deduction - manual_discount + service_fee
member_id	鍏宠仈浼氬憳ID锛堝彲绌猴級	table_fee_transactions_log.member_id
operator_id	鎿嶄綔鍛業D	table_fee_transactions_log.operator_id
salesman_id	鎺ㄩ攢鍛業D锛堝鏈夛級	table_fee_transactions_log.salesman_user_id
is_adjusted	鏄惁鍋氳繃浜哄伐璋冩暣锛?/1锛?CASE WHEN manual_discount > 0 THEN 1 ELSE 0 END
is_canceled	鍙拌垂璁板綍鏄惁浣滃簾/鍒犻櫎锛?/1锛?CASE WHEN table_fee_transactions_log.is_deleted = 1 THEN 1 ELSE 0 END


鈥?table_usage_id (BIGINT) - 鍙拌垂娴佹按ID锛團ACT涓婚敭锛屽搴擮DS_TABLE_USE_LOG.id锛夈€?
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€?
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID銆?
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆?
鈥?site_table_id (BIGINT) - 鍙版ID锛屽叧鑱擠IM_TABLE銆?
鈥?table_name (STRING) - 鍙版鍚嶇О銆傚啑浣欐柟渚挎煡闃呫€?
鈥?start_time (DATETIME) - 寮€鍙版椂闂淬€?
鈥?end_time (DATETIME) - 绂诲彴鏃堕棿銆?
鈥?duration_minutes (INT) - 浣跨敤鏃堕暱锛堝垎閽燂級銆傚彲鐢眘tart/end璁＄畻鎴栫洿鎺ュ彇ODS real_table_use_seconds鎹㈢畻銆?
鈥?base_fee (DECIMAL(10,2)) - 鍘熷彴璐归噾棰濓紙鏈墸鍑忓墠璐圭敤锛夈€?
鈥?member_discount (DECIMAL(10,2)) - 浼氬憳鎶樻墸鍑忓厤閲戦銆?
鈥?coupon_deduction (DECIMAL(10,2)) - 鍒告姷鎵ｉ噾棰濄€?
鈥?manual_discount (DECIMAL(10,2)) - 鎵嬪伐鍑忓厤璐圭敤銆?
鈥?service_fee (DECIMAL(10,2)) - 闄勫姞鏈嶅姟璐广€?
鈥?final_table_fee (DECIMAL(10,2)) - 瀹炴敹鍙拌垂閲戦銆? base_fee + service_fee - member_discount - coupon_deduction - manual_discount銆?
鈥?member_id (BIGINT) - 浼氬憳ID锛堝鏋滆寮€鍙扮粦瀹氫細鍛橈級銆?
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D锛堝紑鍙?缁撹处缁忓姙浜猴級銆?
鈥?salesman_id (BIGINT) - 钀ラ攢鍛業D锛堝鏋滄湁鍦ㄥ満鏈嶅姟鍛橈級銆?
鈥?is_adjusted (TINYINT) - 鏄惁鏈変汉宸ヨ皟鏁淬€?琛ㄧず鏈夋墜宸ユ墦鎶橈紙manual_discount>0锛夛紝0鏃犮€?
鈥?is_canceled (TINYINT) - 鏄惁浣滃簾銆?琛ㄧず姝ゅ彴璐硅褰曡鍙栨秷鏈敹璐癸紙鐢变簬璁㈠崟鍙栨秷绛夛級锛?姝ｅ父銆?



鏉ユ簮鍙婇€昏緫锛?鐢監DS_TABLE_USE_LOG鐩存帴鏁寸悊銆俠ase_fee瀵瑰簲ODS鐨刲edger_amount锛宮ember_discount, coupon_deduction, manual_discount, service_fee鐩存帴鏉ヨ嚜鍚屽悕瀛楁锛宖inal_table_fee鍙朞DS.real_table_charge_money鏍￠獙璁＄畻銆俰s_adjusted鏍囧織=1褰搈anual_discount>0鎴朼djust_amount鏈夊€笺€俰s_canceled鍙牴鎹甇DS.is_delete鎴栬鍗曞彇娑堟儏鍐佃瀹氾紙鑻ヨ鍗曟湭缁撶畻瀵艰嚧姝よ褰曟棤鏁堬級銆傛敞鎰忥細 manual_discount鏉ヨ嚜鍗曠嫭鐨凮DS_TABLE_FEE_ADJUST璁板綍锛屽鏋淥DS_USE_LOG閲屽凡鏈塧djust_amount瀛楁锛屽垯ETL闇€瑕佷笌璋冩暣琛ㄦ牳瀵圭‘淇濅竴鑷淬€傛墍鏈夐噾棰濆瓧娈靛崟浣嶅潎涓哄厓銆侳ACT_TABLE_USAGE涓鸿鍗曟眹鎬绘椂鍙拌垂鎬婚鐨勬潵婧愩€?
FACT_ASSISTANT_SERVICE锛堝姪鏁欐湇鍔℃槑缁嗕簨瀹炶〃锛?
鎻忚堪: 璁板綍鍔╂暀鏈嶅姟/鏁欑粌闄粌鐨勬槑缁嗐€傛瘡鏉¤褰曞搴旈【瀹韩鍙楃殑涓€娆″姪鏁欐湇鍔°€傜矑搴︼細涓€鏉″姪鏁欐湇鍔¤褰曘€?
涓婚敭: id锛堝姪鏁欐祦姘碔D锛夈€?
澶栭敭鍏宠仈: site_id鈫扗IM_SITE锛宎ssistant_id鈫扗IM_ASSISTANT锛宮ember_id鈫扗IM_MEMBER锛宻ite_table_id鈫扗IM_TABLE锛堝鍒嗘瀽闇€瑕侊紝鍙繚鐣欏瓧娈典絾涓嶄竴瀹氬己鍏宠仈锛夛紝service_type鈫扗IM_ORDER_ASSISTANT_TYPE銆?
瀛楁:
DWD 瀛楁鍚?涓氬姟鍚箟	鏉ユ簮 ODS 瀛楁 / 璁＄畻鍏紡
assistant_service_id	鍔╂暀鏈嶅姟娴佹按ID锛屼富閿?ods_assistant_service_log.id
order_trade_no	璁㈠崟浜ゆ槗鍙?ods_assistant_service_log.order_trade_no
order_settle_id	璁㈠崟缁撶畻ID	ods_assistant_service_log.order_settle_id
site_id	闂ㄥ簵ID	ods_assistant_service_log.site_id
site_assistant_id	闂ㄥ簵鍔╂暀璐﹀彿ID	ods_assistant_service_log.site_assistant_id
assistant_name	鍔╂暀鍚嶇О鍐椾綑	ods_assistant_service_log.assistant_name 鎴栧叧鑱?assistant_accounts_master.real_name/nickname
member_id	浼氬憳ID	ods_assistant_service_log.member_id
service_start_time	鏈嶅姟寮€濮嬫椂闂?ods_assistant_service_log.start_time
service_end_time	鏈嶅姟缁撴潫鏃堕棿	ods_assistant_service_log.end_time
service_duration_minutes	鏈嶅姟鏃堕暱锛堝垎閽燂級	鑻?ODS 鏈夋€荤鏁板瓧娈碉細seconds/60锛涘惁鍒?EXTRACT(EPOCH FROM (end_time - start_time))/60
service_type_id	鍔╂暀鏈嶅姟绫诲瀷锛堝熀纭€璇?闄勫姞璇剧瓑锛?ods_assistant_service_log.service_type锛堝湪 DWD 鍏宠仈 dim_order_assist_type 杞箟锛?
base_fee	鍔╂暀鍩虹璇?鍗曚环璁¤垂閲戦锛堝師浠凤級	ods_assistant_service_log.base_fee锛屾垨鎸夊崟浠访楁椂闀胯绠楋紙瑙佹牱鏈瓧娈碉級
member_discount	鍔╂暀鏈嶅姟浼氬憳鎶樻墸閲戦	ods_assistant_service_log.member_discount_amount
manual_discount	鍔╂暀鏈嶅姟浜哄伐鎶樻墸閲戦	ods_assistant_service_log.manual_discount_amount
coupon_deduction	鍒告姷鎵ｉ噾棰濓紙濡傚洟璐埜鍒嗘憡鍒板姪鏁欙級	鑻?ODS 鏈夊搴斿瓧娈靛垯鐩存帴鏄犲皠锛涜嫢鏃犲垯榛樿 0锛岀敱 fact_coupon_usage 涓嶅啀鍒嗘憡鍒板姪鏁?
final_service_fee	鍔╂暀鏈嶅姟瀹炴敹閲戦	浼樺厛锛歰ds_assistant_service_log.final_service_fee锛涘惁鍒?base_fee - member_discount - manual_discount - coupon_deduction
operator_id	鎿嶄綔鍛業D	ods_assistant_service_log.operator_id
salesman_id	鎺ㄩ攢鍛業D	ods_assistant_service_log.salesman_user_id锛堝鏈夛級
is_canceled	璇ユ潯鍔╂暀鏈嶅姟鏄惁琚€滃簾闄も€?CASE WHEN (ods_assistant_service_log.is_trash = 1 OR 鍦?ods_assistant_cancel_log 鏈夊尮閰嶈褰? THEN 1 ELSE 0 END
鏁版嵁浠撳簱寤烘ā涓?ETL 瀵规帴 PRD
cancel_reason	搴熼櫎鍘熷洜	鑻ュ瓨鍦?ods_assistant_cancel_log 璁板綍锛屽垯鍙栧叾 reason锛涘惁鍒欎负绌?
service_score	鏈嶅姟璇勫垎	ods_assistant_service_log.service_grade
skill_score	鎶€鑳借瘎鍒?ods_assistant_service_log.skill_grade
overall_score	缁煎悎璇勫垎	ods_assistant_service_log.sum_grade

鈥?assistant_service_id (BIGINT) - 鍔╂暀鏈嶅姟娴佹按ID锛堜富閿級銆?
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€?
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID銆?
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆?
鈥?site_table_id (BIGINT) - 鍙版ID锛堝姪鏁欐湇鍔″彂鐢熺殑鍙版锛夈€?
鈥?assistant_id (BIGINT) - 鍔╂暀ID锛屽叧鑱擠IM_ASSISTANT銆?
鈥?assistant_name (STRING) - 鍔╂暀濮撳悕鍐椾綑銆?
鈥?service_type (INT) - 鍔╂暀鏈嶅姟绫诲瀷浠ｇ爜锛屽叧鑱擠IM_ORDER_ASSISTANT_TYPE鑾峰彇绫诲瀷鍚嶇О銆?
鈥?start_time (DATETIME) - 鏈嶅姟寮€濮嬫椂闂淬€?
鈥?end_time (DATETIME) - 鏈嶅姟缁撴潫鏃堕棿銆?
鈥?duration_minutes (INT) - 鏈嶅姟鏃堕暱锛堝垎閽燂級銆?
鈥?base_fee (DECIMAL(10,2)) - 鍘熸湇鍔￠噾棰濄€?
鈥?member_discount (DECIMAL(10,2)) - 浼氬憳鎶樻墸閲戦銆?
鈥?coupon_deduction (DECIMAL(10,2)) - 鍒告姷鎵ｉ噾棰濄€?
鈥?manual_discount (DECIMAL(10,2)) - 鎵嬪伐鍑忓厤閲戦銆?
鈥?final_fee (DECIMAL(10,2)) - 瀹炴敹鏈嶅姟璐归噾棰濄€? base_fee - 鍚勭被鎶樻墸鍑忓厤銆?
鈥?member_id (BIGINT) - 浼氬憳ID锛堜韩鍙楁湇鍔＄殑椤惧锛屽鏈変細鍛樼粦瀹氾級銆?
鈥?is_canceled (TINYINT) - 鏄惁琚彇娑堛€?琛ㄧず璇ユ湇鍔″疄闄呮湭瀹屾垚锛堣搴熼櫎锛夛紝0姝ｅ父瀹屾垚銆?
鈥?cancel_reason (STRING) - 鍙栨秷鍘熷洜鎻忚堪锛堝鏈夛級銆?
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D锛堝綍鍏?纭姝ゆ湇鍔＄殑鍛樺伐锛夈€?
鈥?salesman_id (BIGINT) - 鎺ㄩ攢鍛業D锛堝鏈夎惀閿€浜哄憳淇冩垚姝ゆ湇鍔★級銆?
鈥?service_score (INT) - 鏈嶅姟璇勫垎锛堥【瀹㈠鏈嶅姟鎬佸害鐨勮瘎鍒嗭級銆?
鈥?skill_score (INT) - 鎶€鑳借瘎鍒嗐€?
鈥?overall_score (INT) - 缁煎悎璇勫垎銆?
鈥?score_time (DATETIME) - 璇勪环鏃堕棿銆?
鏉ユ簮鍙婇€昏緫锛?鐢監DS_ASSISTANT_SERVICE_LOG鏁寸悊銆傚ぇ閮ㄥ垎瀛楁鐩存帴鏄犲皠锛歜ase_fee=ledger_amount, member_discount/manual_discount/coupon_deduction鏉ユ簮瀵瑰簲瀛楁锛宖inal_fee=service_money銆俤uration璁＄畻绉掓暟杞崲鍒嗛挓銆俿ervice_type浠DS.order_assistant_type濉厖銆俰s_canceled鍩轰簬ODS.is_trash鍒ゆ柇锛屽涓?鍒欐湰璁板綍鍦ㄤ笟鍔′笂琚彇娑堬紝涓嶈鍏ユ渶缁堟敹璐癸紙final_fee搴旇涓?鎴栧拷鐣ワ級銆傚浜庡彇娑堣褰曪紝鍙繘涓€姝ュ弬鑰僌DS_ASSISTANT_CANCEL_LOG浠ヨ幏鍙朿ancel_reason绛夛紝鍦‥TL涓€氳繃order_trade_no鍜宎ssistant_id鍖归厤灏嗗師鍥犲～鍏ャ€傝瘎鍒嗗瓧娈电洿鎺ュ彇ODS涓殑service_grade/skill_grade/sum_grade锛屽鏈夌殑璇濄€傛敞鎰忥細 宸插彇娑堢殑鍔╂暀鏈嶅姟涓嶅簲璁″叆璁㈠崟瀹為檯鏀嚭锛屽洜姝ゅ湪姹囨€绘椂搴旀帓闄ゆ垨final_fee=0銆侳ACT_ASSISTANT_SERVICE涓鸿鍗曟眹鎬诲眰鍔╂暀璐归儴鍒嗘潵婧愶紝涔熺敤浜庝汉鍔涚哗鏁堢粺璁★紙濡傚崟涓姪鏁欐湇鍔℃鏁般€佽瘎鍒嗭級銆?

搴熼櫎璁¤垂閫昏緫涓庢淳鐢熷瓧娈碉紙鏂板锛?
鍦?DWD 灞傦紝鎴戜滑灏?ODS 鍔╂暀娴佹按涓殑鏃堕棿涓庨噾棰濆瓧娈垫爣鍑嗗寲涓轰互涓嬫牳蹇冩寚鏍囷紙瀛楁鍚嶄互鏈簨瀹炶〃瀹為檯鍛藉悕涓哄噯锛夛細
鈥?service_duration_sec锛氭湇鍔″疄闄呭彂鐢熸椂闀匡紙绉掞級锛屾潵婧愪簬 ODS real_use_seconds銆?
鈥?charge_duration_sec锛氳璐规椂闀匡紙绉掞級锛屾潵婧愪簬 ODS income_seconds銆?
鈥?base_fee锛氬師濮嬪簲鏀堕噾棰濓紝鏉ユ簮浜?ODS ledger_amount銆?
鈥?final_fee锛氭湰鏉℃湇鍔℃渶缁堣鍏ヨ惀鏀剁殑閲戦锛屾潵婧愪簬 ODS projected_income / service_money銆?
鈥?is_canceled锛氭槸鍚﹀簾闄ゆ爣蹇楋紝鏉ユ簮浜?ODS is_trash銆?
DWD 灞傜粺涓€绾﹀畾锛?
1.	鏀跺叆缁熻鍙ｅ緞锛?
o	鎵€鏈夆€滃姪鏁欐敹鍏モ€濈被鎸囨爣锛岀粺涓€浣跨敤 final_fee 浣滀负璁℃敹鍏ュ彛寰勩€?
o	涓嶅啀鐩存帴浣跨敤 base_fee 姹囨€伙紝浠ラ伩鍏嶅皢搴熼櫎鐨勬湭璁¤垂閮ㄥ垎绠楀叆鏀跺叆銆?
2.	搴熼櫎鏈嶅姟鐨勫鐞嗭細
o	is_canceled = 1 鐨勮褰曚粛淇濈暀鍦ㄤ簨瀹炶〃涓紝鐢ㄤ簬鍒嗘瀽鈥滆搴熼櫎鐨勬湇鍔℃暟閲?/ 鏃堕暱 / 鍘熷閲戦鈥濄€?
o	鍦ㄢ€滆惀鏀剁被鎶ヨ〃鈥濅腑锛岃嫢涓嶇壒鍒鏄庯紝缁熶竴鎸?final_fee 姹囨€伙紝鍥犳搴熼櫎鏈嶅姟涓湭璁¤垂閮ㄥ垎涓嶄細杩涘叆钀ヤ笟鏀跺叆銆?
o	濡傞渶缁熻鈥滃簾闄ゅ鑷寸殑鏀跺叆鎹熷け鈥濓紝鍒欏彲浣跨敤锛歭ost_fee = base_fee - final_fee锛堜粎瀵?is_canceled = 1 鐨勮褰曠粺璁★級銆?
3.	鏈嶅姟鏃堕暱鐩稿叧鍒嗘瀽锛?
o	瀹為檯鏈嶅姟鎶曞叆浜哄姏鏃堕暱浣跨敤 service_duration_sec锛?
o	鍙璐规椂闀夸娇鐢?charge_duration_sec锛?
o	涓よ€呭樊鍊?service_duration_sec - charge_duration_sec 鍙敤浜庤　閲忊€滈潪璁¤垂鎶曞叆鈥濓紙渚嬪鍏嶈垂鏈嶅姟銆佹姇璇夎ˉ鍋跨瓑锛夈€?


FACT_COUPON_USAGE锛堝洟璐埜浣跨敤鏄庣粏浜嬪疄琛級
鎻忚堪: 璁板綍鍥㈣喘浼樻儬鍒革紙鍥㈣喘濂楅鍒革級鐨勪娇鐢ㄦ儏鍐点€傛瘡鏉¤褰曚唬琛ㄤ竴寮犲埜琚娇鐢ㄤ竴娆★紙鏍搁攢锛夈€傜矑搴︼細涓€娆″洟璐埜鏍搁攢浜嬩欢銆?
涓婚敭: id锛堝埜浣跨敤娴佹按ID锛夈€?
澶栭敭鍏宠仈: site_id鈫扗IM_SITE锛宲ackage_id鈫扗IM_GROUP_PACKAGE锛堥渶鍦―WD寤虹珛鍥㈣喘濂楅缁村害锛夛紝platform_code鈫扗IM_COUPON_PLATFORM銆?
瀛楁:

DWD 瀛楁鍚?涓氬姟鍚箟	鏉ユ簮 ODS 瀛楁 / 璁＄畻鍏紡
coupon_usage_id	鍥㈣喘鍒镐娇鐢ㄦ祦姘碔D	group_buy_packages_log.id
order_trade_no	璁㈠崟浜ゆ槗鍙?group_buy_packages_log.order_trade_no
order_settle_id	璁㈠崟缁撶畻ID	group_buy_packages_log.order_settle_id
site_id	闂ㄥ簵ID	group_buy_packages_log.site_id
coupon_code	鍒哥爜/鏍搁攢鐮?ods_platform_coupon_log.coupon_code 鎴?verify_code锛堟寜瀹為檯瀛楁锛?
coupon_platform_id	鍒稿钩鍙癐D锛堢編鍥?鐐硅瘎绛夛級	ods_platform_coupon_log.platform_id锛堝湪 DWD 鍏宠仈 dim_coupon_platform锛?
group_package_id	鍥㈣喘濂楅瀹氫箟ID	group_buy_packages_log.group_package_id
group_package_name	鍥㈣喘濂楅鍚嶇О	group_buy_packages.group_package_name锛堥€氳繃 ID 鍏宠仈锛?
coupon_face_value	鍒告爣绉板師浠凤紙甯傚満浠凤級	group_buy_packages.face_value 鎴栧钩鍙拌褰曚腑鐨?original_price
coupon_settle_price	鍒哥粨绠椾环锛堥棬搴楀疄闄呬粠骞冲彴鏀跺埌鐨勯噾棰濓級	ods_platform_coupon_log.settle_price
deduct_amount	鏈鏍搁攢鎶垫墸鍒拌鍗曠殑閲戦锛堢敤浜庤鍗曡璐︽祦姘达級	涓€鑸瓑浜?coupon_settle_price锛涘鏈夊樊棰濓紙渚嬪澶氬埜鍙犲姞锛夊彲鍙?group_buy_packages_log.deduct_amount
verify_time	鏍搁攢鏃堕棿	ods_platform_coupon_log.verify_time
member_id	缁戝畾浼氬憳ID锛堝鏈夛級	鑻ュ埜鏍搁攢涓庝細鍛樼粦瀹氾紝鍒欏彇 group_buy_packages_log.member_id锛涙棤鍒欎负绌?

鈥?coupon_usage_id (BIGINT) - 鍒镐娇鐢ㄨ褰旾D锛堜富閿級銆?
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€?
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID銆?
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆?
鈥?site_table_id (BIGINT) - 鍙版ID锛堝埜瀵瑰簲鐨勫彴妗屾秷璐癸級銆?
鈥?assistant_id (BIGINT) - 鍔╂暀ID锛堝鍒稿寘鍚姪鏁欐湇鍔★紝鍙褰曞叧鑱旓紝鍚﹀垯涓虹┖锛夈€?
鈥?package_id (BIGINT) - 濂楅ID锛屽叧鑱擠IM_GROUP_PACKAGE銆?
鈥?package_name (STRING) - 濂楅鍚嶇О鍐椾綑銆?
鈥?platform_code (STRING) - 鍒告潵婧愬钩鍙颁唬鐮侊紝鍏宠仈DIM_COUPON_PLATFORM鑾峰緱鍚嶇О銆?
鈥?coupon_code (STRING) - 鍒哥爜缂栧彿銆?
鈥?deduct_amount (DECIMAL(10,2)) - 鎶垫墸閲戦銆傝鍒告牳閿€鎶垫墸鐨勯噾棰濅环鍊笺€?
鈥?used_time (DATETIME) - 鍒镐娇鐢ㄦ椂闂淬€?
鈥?operator_id (BIGINT) - 鏍搁攢鎿嶄綔鍛業D銆?
鈥?salesman_id (BIGINT) - 閿€鍞憳ID锛堝鏋滄湁锛夈€?
鈥?status (STRING) - 鍒镐娇鐢ㄧ姸鎬侊紙閫氬父涓衡€滃凡浣跨敤鈥濓紝濡傛湁闇€瑕佸彲鏍囪瘑寮傚父锛夈€?
鏉ユ簮鍙婇€昏緫锛?缁煎悎group_buy_packages_LOG鍜孫DS_PLATFORM_COUPON_LOG鐨勬暟鎹€傝€冭檻鍒颁竴寮犲埜浣跨敤浼氬湪涓ゅ紶琛ㄥ悇鏈変竴鏉¤褰曪紝DWD灞傚彲灏嗕袱鑰呭悎骞讹細浠DS_GROUP_PACKAGE_LOG涓轰富锛屽洜涓哄畠鍖呭惈鎶垫墸閲戦绛夐棬搴楀唴閮ㄤ俊鎭紝琛ュ厖骞冲彴淇℃伅锛坧latform_code, coupon_code绛変粠ODS_PLATFORM_COUPON_LOG鑾峰彇锛夈€傚悎骞堕€昏緫锛氬尮閰嶆潯浠跺彲浠ユ槸璁㈠崟鍙?鍒窱D鎴栧埜鐮併€傜敱浜巆oupon_code鍦∣DS_GROUP_PACKAGE_LOG鏈繀鏈夛紝鑰屽湪骞冲彴琛ㄦ湁certificateId锛岄渶瑕侀€氳繃deal_id鎴杘rder鍏宠仈鏍稿銆傚鏋滃尮閰嶅洶闅撅紝涔熷彲涓嶅悎骞讹紝涓ゅ紶浜嬪疄琛ㄥ垎鍒缓锛涗絾涓烘柟渚垮垎鏋愶紝鍚堝苟鎴愪竴寮燜ACT_COUPON_USAGE鍖呭惈涓昏瀛楁銆俤educt_amount鐩存帴鍙栧椁愭祦姘寸殑deduct_money锛沺latform_code閫氳繃骞冲彴琛ㄦ垨deal_id鏄犲皠锛沜oupon_code鍙杙latform琛ㄧ殑certificateId锛堝埜鐮侊級銆傚鏋滄湁鏈尮閰嶇殑骞冲彴鍒歌褰曪紝涔熷彲鐙珛鍒嗘瀽锛屾澶勪互涓氬姟鎴愬姛浣跨敤涓轰富銆侳ACT_COUPON_USAGE鐨刣educt_amount浼氬弬涓庤鍗曟眹鎬荤殑浼樻儬鎬婚璁＄畻锛屼篃鍙敤浜庣粺璁″洟璐础鐚敹鍏ャ€?
FACT_PAYMENT锛堟敮浠樹簨瀹炶〃锛?
鎻忚堪: 璁板綍璁㈠崟鐨勬敹娆炬槑缁嗭紝姣忔潯璁板綍浠ｈ〃搴楀唴鏀跺埌涓€绗旀椤广€備笌payment_transactions涓€鑷达紝浣嗗湪DWD灞傚皢鏀粯鏂瑰紡浠ｇ爜杞瘧锛屽叧鑱旇鍗曠瓑銆傜矑搴︼細涓€绗旀敮浠樻祦姘淬€?
涓婚敭: id锛堟敮浠樻祦姘碔D锛夈€?
澶栭敭鍏宠仈: site_id鈫扗IM_SITE锛宲ay_method_code鈫扗IM_PAY_METHOD锛宮ember_id鈫扗IM_MEMBER锛堝鏀粯鏂瑰紡涓哄偍鍊煎崱鎵ｆ锛屽彲鍏宠仈瀵瑰簲浼氬憳锛夈€?
瀛楁:

DWD 瀛楁鍚?涓氬姟鍚箟	鏉ユ簮 ODS 瀛楁 / 璁＄畻鍏紡
payment_id	鏀粯娴佹按ID锛屼富閿?payment_transactions.id
order_trade_no	璁㈠崟浜ゆ槗鍙?payment_transactions.order_trade_no
order_settle_id	璁㈠崟缁撶畻ID	payment_transactions.order_settle_id
site_id	闂ㄥ簵ID	payment_transactions.site_id
member_id	浼氬憳ID锛堝鏀粯涓庝細鍛樼粦瀹氾級	payment_transactions.member_id
pay_method_code	鏀粯鏂瑰紡缂栫爜锛堢幇閲?寰俊/鍌ㄥ€煎崱绛夛級	payment_transactions.pay_type锛堝湪 DWD 鍏宠仈 dim_pay_method锛?
pay_amount	鏀粯閲戦	payment_transactions.amount
pay_time	鏀粯鏃堕棿	payment_transactions.pay_time
transaction_id	绗笁鏂逛氦鏄撴祦姘村彿	payment_transactions.third_transaction_id锛堟寜瀹為檯瀛楁锛?
operator_id	鎿嶄綔鍛業D	payment_transactions.operator_id
remark	澶囨敞	payment_transactions.remark

鈥?payment_id (BIGINT) - 鏀粯娴佹按ID锛堜富閿級銆?
鈥?order_trade_no (BIGINT) - 璁㈠崟浜ゆ槗鍙枫€?
鈥?order_settle_id (BIGINT) - 璁㈠崟缁撶畻ID銆?
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆?
鈥?pay_method_code (INT) - 鏀粯鏂瑰紡浠ｇ爜锛屽叧鑱擠IM_PAY_METHOD鑾峰彇鍚嶇О銆?
鈥?pay_method_name (STRING) - 鏀粯鏂瑰紡鍚嶇О鍐椾綑銆?
鈥?pay_amount (DECIMAL(10,2)) - 鏀粯閲戦锛堟鍊硷紝鍏冿級銆?
鈥?pay_time (DATETIME) - 鏀粯瀹屾垚鏃堕棿銆?
鈥?transaction_id (STRING) - 绗笁鏂规敮浠樻祦姘村彿銆?
鈥?member_id (BIGINT) - 浼氬憳ID锛堝鏋滄槸鍌ㄥ€煎崱鏀粯锛屾澶勮褰曚細鍛樿处鍙凤紝鍚﹀垯涓虹┖锛夈€?
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D锛堟敹娆炬敹閾跺憳锛夈€?
鏉ユ簮鍙婇€昏緫锛?鐩存帴鏉ユ簮payment_transactions娓呮礂銆俻ay_method_code鏇挎崲鍘熸湁鏀粯鏂瑰紡瀛楁锛宲ay_method_name鍙€氳繃缁磋〃濉叆鎴栫洿鎺ヤ繚鐣橭DS涓殑鏂囨湰銆俶ember_id涓€鑸笉鍦ㄦ敮浠樿褰曞嚭鐜帮紝浣嗗綋鏀粯鏂瑰紡鏄€滃偍鍊煎崱鈥濇椂锛屽彲浠ユ帹瀵煎搴斿摢涓細鍛橈細鏀粯璁板綍鏈韩鎴栬鍗曟湁浼氬憳鍏宠仈銆侲TL鍙互鍦ㄩ亣鍒板偍鍊煎崱鏀粯锛堜緥濡俻ay_method_code=5鍌ㄥ€煎崱锛夋椂锛屽皢璇ヨ鍗曠殑member_id濉厖姝ゅ瓧娈碉紝琛ㄧず杩欑瑪鏀粯浠庤浼氬憳璐︽埛鎵ｆ銆傚叾浠栨敮浠樻柟寮忓垯member_id鐣欑┖銆侳ACT_PAYMENT鏁版嵁鐢ㄤ簬鍒嗘瀽浠樻鏂瑰紡鍗犳瘮锛屼篃鐢ㄤ簬璁㈠崟姹囨€昏绠楀疄鏀堕噾棰濇牎楠屻€?
FACT_REFUND锛堥€€娆句簨瀹炶〃锛?
鎻忚堪: 璁板綍閫€娆句氦鏄撴槑缁嗭紝姣忔潯璁板綍浠ｈ〃搴楅噷閫€鍑轰竴绗旀缁欓【瀹€備笌refund_transactions瀵瑰簲銆傜矑搴︼細涓€绗旈€€娆炬祦姘淬€?
涓婚敭: id锛堥€€娆炬祦姘碔D锛夈€?
澶栭敭鍏宠仈: site_id鈫扗IM_SITE锛宲ay_method_code鈫扗IM_PAY_METHOD銆?
瀛楁:

DWD 瀛楁鍚?涓氬姟鍚箟	鏉ユ簮 ODS 瀛楁 / 璁＄畻鍏紡
refund_id	閫€娆炬祦姘碔D锛屼富閿?refund_transactions.id
order_trade_no	鍘熻鍗曚氦鏄撳彿	refund_transactions.order_trade_no
order_settle_id	鍘熻鍗曠粨绠桰D	refund_transactions.order_settle_id
site_id	闂ㄥ簵ID	refund_transactions.site_id
member_id	浼氬憳ID	refund_transactions.member_id
refund_amount	閫€娆鹃噾棰?refund_transactions.amount
pay_method_code	鍘熸敮浠樻柟寮忕紪鐮?refund_transactions.pay_type
refund_time	閫€娆炬椂闂?refund_transactions.refund_time
operator_id	鎿嶄綔鍛業D	refund_transactions.operator_id
reason	閫€娆惧師鍥?refund_transactions.reason
related_payment_id	鍏宠仈鏀粯娴佹按ID锛堝鏈夛級	refund_transactions.payment_id 鎴栭€氳繃绗笁鏂规祦姘村彿鍖归厤


鈥?refund_id (BIGINT) - 閫€娆炬祦姘碔D锛堜富閿級銆?
鈥?order_trade_no (BIGINT) - 鍘熻鍗曚氦鏄撳彿銆?
鈥?order_settle_id (BIGINT) - 鍘熻鍗曠粨绠桰D銆?
鈥?site_id (BIGINT) - 闂ㄥ簵ID銆?
鈥?pay_method_code (INT) - 閫€娆炬笭閬撲唬鐮侊紝鍏宠仈DIM_PAY_METHOD銆?
鈥?pay_method_name (STRING) - 閫€娆炬笭閬撳悕绉板啑浣欍€?
鈥?refund_amount (DECIMAL(10,2)) - 閫€娆鹃噾棰濓紙姝ｅ€艰〃绀洪€€杩樼粰椤惧鐨勯挶锛屽厓锛夈€?
鈥?refund_time (DATETIME) - 閫€娆炬椂闂淬€?
鈥?original_payment_id (BIGINT) - 鍘熸敮浠樻祦姘碔D銆?
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D锛堟墽琛岄€€娆剧殑鍛樺伐锛夈€?
鏉ユ簮鍙婇€昏緫锛?鐢監DS_REFUND_RECORD娓呮礂銆俽efund_amount鍙栫粷瀵瑰€硷紙鍥犱负ODS鍙兘瀛樹负璐熷€硷紝鎴戜滑鍦╢act涓敤姝ｅ€煎瓧娈佃〃绀洪€€杩橀噾棰濓紝浣嗗湪姹囨€昏绠楁椂浼氫綔涓哄噺椤癸級銆俻ay_method_code璇戠爜锛屽悓鏀粯鏂瑰紡缁磋〃銆俹riginal_payment_id鍙敤浜庡叧鑱旀壘鍑烘槸鍝瑪鏀粯琚€€锛堜絾鍒嗘瀽鐢ㄥ涓嶅ぇ锛屽彲閫変繚鐣欙級銆侳ACT_REFUND涓昏鐢ㄤ簬璐㈠姟鏍稿鍜岃绠楀噣鏀跺叆=鏀舵-閫€娆俱€傚璁㈠崟姹囨€荤殑褰卞搷鍦ㄤ簬濡傛灉鏌愯鍗曞綋鍦洪€€娆撅紝DWS璁㈠崟姹囨€诲彲鍑忓幓閫€娆鹃锛涘鏋滈€€娆惧彂鐢熷湪涓嶅悓鏃ュ垯瑙嗗垎鏋愬彛寰勫喅瀹氬浣曞鐞嗐€?
FACT_BALANCE_CHANGE锛堜綑棰濆彉鍔ㄤ簨瀹炶〃锛?
鎻忚堪: 璁板綍浼氬憳鍌ㄥ€间綑棰濈殑姣忔鍙樺姩鏄庣粏銆傛瘡鏉¤褰曞搴斾綑棰濆鍑忎簨浠躲€備笌member_balance_changes绫讳技锛屼絾杩涜娓呮礂鍜屽叧鑱斻€傜矑搴︼細涓€娆′綑棰濆彉鍔ㄣ€?
涓婚敭: id锛堜綑棰濆彉鍔↖D锛夈€?
澶栭敭鍏宠仈: member_id鈫扗IM_MEMBER锛宻ite_id鈫扗IM_SITE锛宑hange_type鈫扗IM_BALANCE_CHANGE_TYPE锛堝鏋滈渶瑕侊紝瀵圭被鍨嬭繘琛屾弿杩版槧灏勶級銆?
瀛楁:

DWD 瀛楁鍚?涓氬姟鍚箟	鏉ユ簮 ODS 瀛楁 / 璁＄畻鍏紡
balance_change_id	浣欓鍙樺姩璁板綍ID锛屼富閿?member_balance_changes.id
member_id	浼氬憳ID	member_balance_changes.member_id
site_id	闂ㄥ簵ID	member_balance_changes.site_id
change_amount	鍙樺姩閲戦锛堟=澧炲姞锛岃礋=鍑忓皯锛?member_balance_changes.change_amount
balance_before	鍙樺姩鍓嶄綑棰?member_balance_changes.balance_before
balance_after	鍙樺姩鍚庝綑棰?member_balance_changes.balance_after
change_type_code	鍙樺姩绫诲瀷缂栫爜锛堝厖鍊?娑堣垂/璋冩暣鈥︼級	member_balance_changes.change_type锛孌WD 鍏宠仈 dim_balance_change_type
relate_id	鍏宠仈涓氬姟璁板綍ID	member_balance_changes.relate_id
pay_method_code	娑夊強鏀粯鏂瑰紡锛堜粎瀵瑰厖鍊肩被鏈夋剰涔夛級	member_balance_changes.pay_method 鎴栫敱 ods_recharge_record.pay_method 鍥炲～
change_time	鍙樺姩鏃堕棿	member_balance_changes.change_time
operator_id	鎿嶄綔鍛業D	member_balance_changes.operator_id
remark	澶囨敞	member_balance_changes.remark

鈥?change_id (BIGINT) - 浣欓鍙樺姩ID锛堜富閿級銆?
鈥?member_id (BIGINT) - 浼氬憳ID锛屽叧鑱擠IM_MEMBER銆?
鈥?change_type_code (INT) - 鍙樺姩绫诲瀷缂栫爜锛屽叧鑱擠IM_BALANCE_CHANGE_TYPE缁磋〃銆?
鈥?change_type_name (STRING) - 鍙樺姩绫诲瀷鍚嶇О锛堝鈥滃厖鍊煎埌璐︹€濄€佲€滄秷璐规墸娆锯€濄€佲€滃悗鍙拌皟鏁粹€濓級銆?
鈥?related_id (BIGINT) - 鍏宠仈涓氬姟ID锛堝厖鍊艰褰旾D鎴栬鍗曠粨绠桰D绛夛級銆?
鈥?change_amount (DECIMAL(10,2)) - 鍙樺姩閲戦锛?澧炲姞/-鍑忓皯锛夈€?
鈥?balance_after (DECIMAL(10,2)) - 鍙樺姩鍚庝綑棰濄€?
鈥?change_time (DATETIME) - 鍙樺姩鏃堕棿銆?
鈥?pay_method_code (INT) - 鏀粯鏂瑰紡缂栫爜锛堜粎褰揷hange_type涓哄厖鍊兼椂鏈夋剰涔夛級銆?
鈥?pay_method_name (STRING) - 鏀粯鏂瑰紡鍚嶇О銆?
鈥?operator_id (BIGINT) - 鎿嶄綔鍛業D銆?
鏉ユ簮鍙婇€昏緫锛?鐢監DS_BALANCE_CHANGE娓呮礂銆傜敱浜庝綑棰濆彉鍔ㄦ湰韬笉鏄牳蹇冨垎鏋愭寚鏍囷紙澶ч儴鍒嗗彲浠ヤ粠鍏呭€煎拰娑堣垂鎺ㄥ锛夛紝姝act鍙€夈€傚鏋滀繚鐣欙細change_type_code缁熶竴缂栫爜锛岄渶寤虹珛DIM_BALANCE_CHANGE_TYPE锛屽1=鍏呭€笺€?=娑堣垂銆?=璋冩暣绛夈€傚彉鍔ㄧ被鍨嬪悕绉伴€氳繃缁磋〃缁欏嚭鎴栫洿鎺ュ啓鏄庛€俽elated_id鐢ㄤ簬鐏垫椿鍏宠仈瀵瑰簲浜嬪疄锛屽鍏呭€煎搴擣ACT_RECHARGE.id锛屾秷璐瑰搴擣ACT_PAYMENT/FACT_ORDER_SUMMARY.id锛堝彲鑳芥瘮杈冨鏉傛槧灏勶紝鍙湪ETL涓儴鍒嗗疄鐜帮紝瀵瑰簲涓嶄笂鍒欑暀瀛業D澶囩敤锛夈€傛敮浠樻柟寮忎粎瀵瑰厖鍊煎瀷鐨勬湁鎰忎箟锛岀洿鎺ヤ粠ODS鍙栥€侳ACT_BALANCE_CHANGE鏈夊姪浜庢牳瀵逛細鍛樿祫閲戞祦锛屼絾鍏舵暟鎹熀鏈彲浠ョ敱鍏朵粬浜嬪疄鎺ㄧ畻锛屽洜姝ゅ湪鏁版嵁閲忎笉澶ф椂淇濈暀浠ュ妫€鏌ャ€?
________________________________________
浠ヤ笂浜嬪疄琛ㄦ兜鐩栦細鍛樻秷璐圭殑涓昏鏄庣粏銆傛墍鏈変簨瀹炶〃鍧囧寘鍚玸ite_id浠ユ敮鎸佸搴楀垎寮€缁熻锛屼互鍙婂寘鍚浉搴旂殑缁村害ID鏉ヨ繛鎺ョ淮搴﹁〃锛屼粠鑰岃幏寰椾赴瀵岀淮搴﹀睘鎬с€?
鍦ㄤ簨瀹炴暟鎹竻娲楄繃绋嬩腑锛岄渶瑕佺‘淇濓細
- 鎵€鏈夊叧鑱旈敭鏈夋晥锛堝閿€鍞褰曢噷鍟嗗搧ID銆佽鍗曞彿鑳芥壘鍒板搴旂淮琛ㄦ垨浜嬪疄锛夈€?
- 閲戦瀛楁鍗曚綅缁熶竴涓哄厓锛岀被鍨嬬粺涓€浣跨敤DECIMAL(10,2)銆?
- 鏃堕棿瀛楁鏍囧噯鍖栦负Timestamp鎴朌ATETIME锛屼笖瀵瑰簲鏈湴鏃跺尯锛堟棩鍒囨寜鑷劧鏃?0:00锛夈€?
4. DWS灞傝〃瀹氫箟锛堟眹鎬诲眰锛?
DWS 灞備富瑕侀潰鍚戝垎鏋愰渶姹傦紝瀵规槑缁嗕簨瀹烇紙DWD锛夎繘琛屾眹鎬诲拰閲嶆瀯锛屽舰鎴愪究浜庣洿鎺ュ彇鐢ㄧ殑璁㈠崟绾у琛ㄥ拰涓婚姹囨€昏〃銆傛湰鏂规閲嶇偣璁捐璁㈠崟缁撶畻姹囨€诲琛?DWS_ORDER_SUMMARY锛屼互銆屾瘡绗旂粨璐﹁褰曚竴琛屻€嶄负绮掑害锛屾暣鍚堜竴寮犺鍗?缁撶畻鍗曠殑涓昏鎸囨爣锛岀敤浜庝粠璁㈠崟瑙嗚鍒嗘瀽锛?
鈥?瀹㈠崟浠蜂笌娑堣垂缁撴瀯锛堝彴璐?鍟嗗搧/鍔╂暀/鍥㈣喘锛?
鈥?浼樻儬鏋勬垚锛堜細鍛樻姌鎵ｃ€佹墜宸ユ姌鎵ｃ€佸洟璐埜锛?
鈥?鏀粯涓庤祫閲戝彛寰勶紙鍚偍鍊?/ 闈炲偍鍊笺€侀€€娆俱€佹湁鏁堟祦姘达級
鈥?浼氬憳璐＄尞涓庤涓猴紙浼氬憳鏍囪瘑銆佷細鍛樺揩鐓х瓑锛?
濡傞渶鏃ユ姤绛夊叾浠栨眹鎬伙紝鍙湪鏈〃鍩虹涓婃寜鏃ユ湡銆侀棬搴楃瓑缁村害杩涜浜屾姹囨€伙紙鏈涓嶅睍寮€锛夈€?
________________________________________
4.1 DWS_ORDER_SUMMARY锛堣鍗曠粨绠楁眹鎬昏〃锛夋杩?
鈥?琛ㄥ悕锛欴WS_ORDER_SUMMARY锛堣鍗曠粨绠楁眹鎬昏〃锛?
鈥?绮掑害锛氫竴绗旇鍗曠粨绠?/ 缁撹处鍗曪紙order_settle_id锛?
鈥?涓婚敭锛歰rder_settle_id锛堣鍗曠粨绠?ID锛?
鈥?鑱氬悎閿細site_id + order_settle_id锛堥棬搴楃淮搴︿笅鍞竴锛?
鈥?涓昏鐢ㄩ€旓細
o	璁㈠崟绾х粡钀ュ垎鏋愶細瀹㈠崟浠枫€佹秷璐圭粨鏋勩€佹姌鎵ｇ粨鏋勩€佹敮浠樼粨鏋勩€佷細鍛樿础鐚?
o	璧勯噾瑙嗚鍒嗘瀽锛氭湁鏁堟祦姘达紙鍚厖鍊硷級銆佸噣鏀跺叆
o	閰嶅悎 DWD 浜嬪疄鍜岀淮琛紝鏀拺澶氱淮 OLAP 涓庢姤琛?
鏃堕棿涓庨噾棰濆彛寰勭害瀹?
鈥?璁㈠崟鏃ユ湡锛歰rder_date = DATE(settle_time)锛屾寜鑷劧鏃ュ垝鍒嗭紝涓嶅啀鍋?4 鐐瑰垏鏃ャ€?
鈥?鏀粯缁熻锛氭墍鏈夆€滄敮浠橀噾棰濃€濈粺璁″熀浜?FACT_PAYMENT锛屼粎鍖呭惈鏀粯鏄庣粏锛屼笉鍚€€娆撅紱
閫€娆惧崟鐙€氳繃 refund_amount 瀛楁鍜岄€€娆句簨瀹炶〃浣撶幇銆?
鈥?閲戦瀛楁锛氶櫎鐗瑰埆璇存槑澶栵紝鍧囦负鈥滆鍗曠骇姹囨€诲€尖€濓紝鍗冲悓涓€璁㈠崟涓嬬浉鍏虫槑缁嗛噾棰濈殑姹囨€荤粨鏋溿€?
鈥?浼樻儬鎷嗗垎锛氬彴璐广€佸晢鍝併€佸姪鏁欐槑缁嗕腑娑夊強浼氬憳鎶樻墸銆佹墜宸ユ姌鎵ｃ€佸洟璐埜鎶垫墸绛夛紝鍧囧湪璁㈠崟绾ц繘琛屽綊骞躲€?
鏉ユ簮浼樺厛绾х害瀹?
鈥?鑻ユ煇璁㈠崟绾ф寚鏍囧彲鍚屾椂浠庡皬绁?ODS 琛ㄤ笌 DWD fact 姹囨€诲緱鍒帮細
o	鎺ㄨ崘浠?DWD fact 涓轰富锛堝缓妯＄粺涓€鍙ｅ緞锛夛紱
o	ODS 灏忕エ閲戦鐢ㄤ簬瀵硅处涓庢牎楠岋紱
o	瀵硅处涓嶄竴鑷存椂锛屼互瀹為檯涓氬姟绾﹀畾涓哄噯骞跺湪 ETL 瑙勫垯涓浐鍖栥€?
________________________________________
4.2 瀛楁璁捐
浠ヤ笅鎸夊姛鑳藉垎缁勫垪鍑哄瓧娈点€傚瓧娈电被鍨嬪彲鏍规嵁鐩爣鏁颁粨瀹炵幇寰皟锛岄粯璁ら噾棰濈被涓?DECIMAL(18,2)锛屾暟閲忕被涓?INT 鎴?DECIMAL(18,2)锛屾爣蹇楃被涓?TINYINT銆?
4.2.1 鍩虹缁村害涓庝富閿俊鎭?
鈥?order_settle_id (BIGINT)
璁㈠崟缁撶畻 ID锛屼富閿€備竴绗旇鍗曠粨绠楃殑鍞竴鏍囪瘑銆?
鈥?order_trade_no (BIGINT)
璁㈠崟浜ゆ槗鍙枫€備笌 order_settle_id 涓€涓€瀵瑰簲锛堝綋鍓嶅亣瀹氫竴鍗曚竴缁擄紝濡傚悗缁瓨鍦ㄥ娆＄粨绠楅渶鍐嶆槑纭鍒欙級銆?
鈥?order_type (STRING)
璁㈠崟绫诲瀷鏍囪瘑銆?娑堣垂鍗? = 瀛樺湪鍙拌垂鐨勬秷璐?锛?鍔╂暀鍗? =浠呭姪鏁欐湇鍔★紱鈥欏厖鍊煎崟鈥?浠呭厖鍊兼棤娑堣垂銆傜敤浜庡湪 ETL 涓喅瀹氭湁鏁堟祦姘寸殑鍒嗘憡鏂瑰紡銆?
鈥?site_id (BIGINT)
闂ㄥ簵 ID锛屽叧鑱?DIM_SITE 鑾峰彇闂ㄥ簵鍚嶇О銆佸尯鍩熺瓑淇℃伅銆?
鈥?order_date (DATE)
璁㈠崟鏃ユ湡锛堣嚜鐒舵棩锛夈€備粠 settle_time 鎻愬彇鏃ユ湡閮ㄥ垎锛岀敤浜庢寜鏃ユ眹鎬汇€?
鈥?settle_time (DATETIME)
缁撹处瀹屾垚鏃堕棿锛屽嵆璁㈠崟瀹為檯鍏抽棴鏃堕棿銆?
鈥?member_id (BIGINT, 鍙┖)
璁㈠崟缁戝畾鐨勪細鍛?ID锛屾棤浼氬憳鍒欎负绌恒€?
鈥?member_flag (TINYINT)
浼氬憳鏍囪瘑锛? 琛ㄧず浼氬憳鍗曪紙member_id 闈炵┖锛夛紝0 琛ㄧず闈炰細鍛樺崟锛屼究浜庣瓫閫夌粺璁°€?
4.2.2 璁㈠崟绾ч噾棰濆瓧娈碉紙娑堣垂涓庝紭鎯犳媶鍒嗭級
鈥?total_table_fee (DECIMAL(18,2))
鍙拌垂瀹炴敹鎬婚銆傝璁㈠崟鎵€鏈夊彴璐瑰疄闄呮敹鍙栭噾棰濅箣鍜岋紙宸叉墸闄ゆ姌鎵ｄ笌鍒告姷鎵ｏ級銆?
鈥?total_product_amount (DECIMAL(18,2))
鍟嗗搧瀹炴敹鎬婚銆傝鍗曚腑鎵€鏈夊晢鍝佸疄鏀堕噾棰濅箣鍜岋紙涓嶅惈閫€娆?浣滃簾琛岋級銆?
鈥?total_assistant_fee (DECIMAL(18,2))
鍔╂暀鏈嶅姟瀹炴敹鎬婚銆傝鍗曚腑鎵€鏈夋湭浣滃簾鍔╂暀鏈嶅姟瀹為檯鏀惰垂鎬婚銆?
鈥?total_coupon_deduction (DECIMAL(18,2))
鍥㈣喘鍒告姷鎵ｆ€婚銆傛寜鍒糕€滄姷鎵ｉ噾棰濃€濓紙璁拌处渚х殑鐢ㄥ埜鎶垫墸锛夋眹鎬汇€?
鈥?manual_discount_amount (DECIMAL(18,2))
鎵嬪伐浼樻儬鎬婚銆傚寘鍚彴璐广€佸姪鏁欙紙浠ュ強濡傛湁鍙瘑鍒殑鍟嗗搧鎵嬪伐鎶樻墸锛夌殑浜哄伐鍑忓厤閲戦銆?
鈥?member_discount_amount (DECIMAL(18,2))
浼氬憳鎶樻墸鎬婚銆傚洜浼氬憳韬唤浜彈鐨勪紭鎯犳€诲拰锛堝彲鍚彴璐广€佸姪鏁欍€佸晢鍝佺殑浼氬憳鎶樻墸锛夈€?
鈥?order_original_amount (DECIMAL(18,2))
璁㈠崟鍘熶环鎬婚锛堟湭鎵ｅ噺浠讳綍浼樻儬/鍒哥殑搴斾粯閲戦锛夛紝瀹氫箟涓猴細
order_original_amount = total_table_fee + total_product_amount + total_assistant_fee + member_discount_amount + manual_discount_amount + total_coupon_deduction銆?
鈥?order_final_amount (DECIMAL(18,2))
璁㈠崟搴旀敹閲戦銆傛墸闄ゆ墍鏈変紭鎯犱笌鍒告姷鎵ｅ悗鐨勫疄鏀堕噾棰濓紝鐞嗚涓婂簲婊¤冻锛?
order_final_amount = total_table_fee + total_product_amount + total_assistant_fee锛?
骞朵笌灏忕エ ODS 涓殑璁㈠崟搴旀敹閲戦瀛楁淇濇寔瀵归綈锛屽瀛樺湪宸紓锛屼互灏忕エ瀹為檯鍙ｅ緞涓哄噯骞跺湪 ETL 灞傝繘琛岃皟鏁淬€?
4.2.3 鏀粯鎷嗗垎涓庨€€娆俱€佸噣鏀跺叆瀛楁
鈥?total_paid_amount (DECIMAL(18,2))
瀹炰粯閲戦鎬昏銆傞【瀹㈠疄闄呮敮浠樼殑鎬婚噾棰濓紙鍖呮嫭鐜伴噾/鐢靛瓙鏀粯 + 鍌ㄥ€煎崱鏀粯锛夈€?
鈥?stored_card_deduct (DECIMAL(18,2))
鍌ㄥ€煎崱鏀粯閲戦銆傝璁㈠崟鐢变細鍛樺偍鍊间綑棰濇敮浠樼殑閲戦銆?
鈥?external_paid_amount (DECIMAL(18,2))
澶栭儴鏀粯閲戦锛堥潪鍌ㄥ€肩被鏀粯锛?= total_paid_amount - stored_card_deduct銆?
鈥?pay_cash (DECIMAL(18,2), 鍙€?
鐜伴噾鏀粯閲戦銆?
鈥?pay_wechat (DECIMAL(18,2), 鍙€?
寰俊鏀粯閲戦銆?
鈥?pay_alipay (DECIMAL(18,2), 鍙€?
鏀粯瀹濇敮浠橀噾棰濄€?
鈥?pay_other (DECIMAL(18,2), 鍙€?
鍏朵粬鏀粯娓犻亾閲戦锛堝閾惰仈鍗°€佸叾浠栫涓夋柟鏀粯绛夛級锛屽彲浣滀负闄ょ幇閲?寰俊/鏀粯瀹?鍌ㄥ€煎崱涔嬪鐨勬眹鎬汇€?
璇存槑锛氬嚭浜庘€滈伩鍏嶅啓姝绘敮浠樻柟寮忔灇涓锯€濈殑鍘熷垯锛屽叿浣撴敮浠樻笭閬撳垪锛坧ay_xxx锛夊彲鎸夊疄闄呴渶瑕侀€夋嫨鏄惁鍦ㄥ琛ㄥ浐鍖栵紝濡傛敮浠樻柟寮忓彉鍖栭绻侊紝鍙粎淇濈暀鍏抽敭鍖哄垎锛堝鍌ㄥ€?闈炲偍鍊硷級锛屽叾浣欏湪鎶ヨ〃灞傞€氳繃鍏宠仈鏀粯缁磋〃閫忚銆?
鈥?pay_method_count (INT)
鏈崟浣跨敤鐨勬敮浠樻柟寮忕绫绘暟锛圖ISTINCT 鏀粯鏂瑰紡缂栫爜锛夈€?
鈥?refund_amount (DECIMAL(18,2))
閫€娆鹃噾棰濄€傛湰璁㈠崟鐩稿叧閫€娆炬€婚锛堟寜姝ｆ暟瀛樺偍锛夛紝鍖呭惈鍏ㄩ鎴栭儴鍒嗛€€娆俱€?
鈥?net_income (DECIMAL(18,2))
鍑€鏀舵閲戦銆傛爣鍑嗗彛寰勪负锛?
net_income = total_paid_amount - refund_amount銆?
琛ㄧず璇ヨ鍗曞湪鏀舵瑙嗚涓婄殑鍑€鍏ヨ处閲戦銆?
4.2.4 鏁伴噺绫讳笌杈呭姪鍒嗘瀽瀛楁
鈥?item_count (INT)
鍟嗗搧琛屾暟銆傝鍗曚腑涓嶅悓鍟嗗搧琛岀殑鏁伴噺锛堝幓閲嶅悗鐨勮鏁帮級銆?
鈥?total_item_quantity (DECIMAL(18,2))
鍟嗗搧鎬绘暟閲忋€傛寜浠舵暟/閲嶉噺绛夊崟浣嶆眹鎬荤殑鎬绘暟銆?
鈥?assistant_count (INT)
鍔╂暀鏈嶅姟鎬绘鏁般€傝鍗曚腑鍙戠敓鐨勬湭浣滃簾鍔╂暀鏈嶅姟璁板綍鏁般€?
鈥?table_count (INT)
浣跨敤鐨勫彴妗屾暟閲忋€傝鍗曟秹鍙婄殑涓嶅悓鍙版鏁帮紙鎹㈠彴鍦烘櫙鍙兘澶т簬 1锛夈€?
鈥?duration_total (INT)
鍙版浣跨敤鎬绘椂闀匡紙鍒嗛挓锛夈€傚鏈夊鍙版锛屼細杩涜绱姞銆?
鈥?avg_item_price (DECIMAL(18,2))
鍟嗗搧骞冲潎鍗曚环锛堝疄鏀?/ 鏁伴噺锛夛紝瀹氫箟涓猴細
CASE WHEN total_item_quantity > 0 THEN total_product_amount / total_item_quantity ELSE NULL END銆?
4.2.5 璁㈠崟绾у揩鐓х淮搴﹀瓧娈?
鈥?member_name_snapshot (STRING)
缁撹处鏃朵細鍛樺鍚嶅揩鐓с€傛潵鑷皬绁?ODS锛涚敤浜庡弽鏄犲綋鏃朵細鍛樹俊鎭紙浼氬憳璧勬枡鍚庣画鍙兘鍙樻洿锛夈€?
鈥?member_mobile_snapshot (STRING)
缁撹处鏃朵細鍛樻墜鏈哄彿蹇収銆?
鈥?cashier_name (STRING)
鏀堕摱鍛樺鍚嶃€傚鐞嗘璁㈠崟缁撹处鐨勬搷浣滃憳锛屽彲鐢?ODS 鏀堕摱鍛樺瓧娈垫竻娲楀緱鍒般€?
鈥?remark (STRING)
璁㈠崟澶囨敞銆傚灏忕エ鎴栬鍗曚腑鐨勯檮鍔犺鏄庛€?
4.2.6 璁拌处娴佹按瀛楁锛圔ook Flow锛?
鐢ㄤ簬浠庘€滅粡钀ョ粨鏋?/ 璁拌处绉戠洰鈥濊瑙掞紝鍒嗘瀽鍙拌垂銆佸姪鏁欍€佸晢鍝併€佸洟璐湪钀ヤ笟棰濅腑鐨勬瀯鎴愶紝涓嶅叧娉ㄦ敮浠樻柟寮忋€?
鈥?book_table_flow (DECIMAL(18,2))
鍙拌垂璁拌处娴佹按銆傝璁㈠崟鍦ㄢ€滃彴璐光€濈鐩笅鐨勮惀涓氭敹鍏ワ紙鍚偍鍊兼敮浠橈紝涓嶅惈浣滃簾/鍙栨秷锛夈€?
鈥?book_assistant_flow (DECIMAL(18,2))
鍔╂暀璁拌处娴佹按銆傝璁㈠崟鍦ㄢ€滃姪鏁欐湇鍔♀€濈鐩笅鐨勮惀涓氭敹鍏ワ紙浠呯粺璁℃湭浣滃簾涓斿疄闄呰璐圭殑鍔╂暀鏈嶅姟锛夈€?
鈥?book_goods_flow (DECIMAL(18,2))
鍟嗗搧璁拌处娴佹按銆傝璁㈠崟鍦ㄢ€滃晢鍝侀攢鍞€濈鐩笅鐨勮惀涓氭敹鍏ワ紙涓嶅惈璧犲搧锛夈€?
鈥?book_group_flow (DECIMAL(18,2))
鍥㈣喘璁拌处娴佹按銆傝璁㈠崟浣跨敤鍥㈣喘鍒稿舰鎴愮殑鏀跺叆锛屾寜鍥㈣喘鈥滃钩鍙扮粨绠椾环鈥濆叆璐︺€?
鈥?book_order_flow (DECIMAL(18,2))
璁㈠崟璁拌处鎬绘祦姘达紝鐢ㄤ簬缁忚惀缁撴瀯鍒嗘瀽銆傚畾涔変负锛?
book_order_flow = book_table_flow + book_assistant_flow + book_goods_flow + book_group_flow銆?
4.2.7 璁㈠崟鏈夋晥娴佹按瀛楁锛圗ffective Order Flow锛?
浠庘€滆祫閲戣瑙?+ 鍚厖鍊尖€濈殑璐㈠姟鍙ｅ緞瀹氫箟璁㈠崟瀵归棬搴楀疄闄呰祫閲戞祦鍏ョ殑璐＄尞銆?
鈥?order_effective_consume_cash (DECIMAL(18,2))
闈炲偍鍊肩被鏀粯涓紝鐢ㄤ簬娑堣垂锛堝彴璐?+ 鍔╂暀 + 鍟嗗搧 + 鍥㈣喘锛夌殑閲戦銆?
鈥?order_effective_recharge_cash (DECIMAL(18,2))
闈炲偍鍊肩被鏀粯涓紝鐢ㄤ簬鍏呭€肩殑閲戦锛堢函鍏呭€煎崟锛夈€?
鈥?order_effective_flow (DECIMAL(18,2))
璁㈠崟鏈夋晥娴佹按銆傚畾涔変负锛?
order_effective_flow = order_effective_consume_cash + order_effective_recharge_cash + book_group_flow銆?
璇存槑锛?
鈥?鎸夌害瀹氾紝鈥滅幇閲戞敮浠樷€濈悊瑙ｄ负鈥滈潪鍌ㄥ€肩被鏀粯鈥濓紙鐜伴噾 / 寰俊 / 鏀粯瀹?/ 閾惰鍗＄瓑锛夛紱
鍌ㄥ€煎崱鎵ｆ浠呰涓哄唴閮ㄧ粨杞紝涓嶈涓烘柊澧炶祫閲戞祦鍏ャ€?
鈥?鍥㈣喘浣跨敤鎸夆€滃钩鍙扮粨绠椾环鈥濊鍏ユ湁鏁堟祦姘达紙閫氳繃 book_group_flow 浣撶幇锛夛紝涓嶆寜鍒搁潰鍊笺€?
________________________________________
4.3 鏉ユ簮鍙婃眹鎬婚€昏緫璇存槑
鏈〃涓昏閫氳繃璁㈠崟 ID / 浜ゆ槗鍙峰湪鍚?DWD 浜嬪疄琛ㄩ棿鍏宠仈锛屽苟鎸夎鍗曡仛鍚堝緱鍒般€備互涓嬩负鍏抽敭瀛楁鐨勬潵婧愪笌鍙ｅ緞銆?
4.3.1 娑堣垂涓庝紭鎯犵被閲戦瀛楁
1.	total_table_fee锛堝彴璐瑰疄鏀跺悎璁★級
o	鏉ユ簮锛欶ACT_TABLE_USAGE.final_table_fee
o	杩囨护锛歩s_canceled = 0锛堟湭浣滃簾鍙拌垂璁板綍锛?
o	鑱氬悎锛氭寜 site_id, order_settle_id 鎴?order_trade_no 鍒嗙粍姹傚拰銆?
o	濡?ODS 灏忕エ涓湁鍙拌垂姹囨€诲瓧娈碉紝鍙敤浜庡璐︺€?
2.	total_product_amount锛堝晢鍝佸疄鏀跺悎璁★級
o	鏉ユ簮锛欶ACT_SALE_ITEM.final_amount
o	寤鸿杩囨护锛歩s_refunded = 0 鎴栨寜瀹為檯涓氬姟鏍囪瘑鎺掗櫎宸查€€娆?浣滃簾琛屻€?
o	鑱氬悎锛氭寜璁㈠崟缁村害姹傚拰銆?
3.	total_assistant_fee锛堝姪鏁欐湇鍔″疄鏀跺悎璁★級
o	鏉ユ簮锛欶ACT_ASSISTANT_SERVICE.final_service_fee / final_fee
o	杩囨护锛歩s_canceled = 0锛堟帓闄ゅ姪鏁欏簾闄よ褰曪級
o	鑱氬悎锛氭寜璁㈠崟缁村害姹傚拰銆?
鍔╂暀鐩稿叧閲戦鍙ｅ緞璇存槑锛堟柊澧烇級
DWS 灞傛墍鏈夆€滃姪鏁欑浉鍏抽噾棰濃€濆瓧娈碉紝缁熶竴閬靛惊浠ヤ笅鍙ｅ緞锛?
鈥?璁㈠崟缁村害鐨勫姪鏁欓噾棰濓紙濡傗€滃姪鏁欏熀纭€璇炬湰绗旇鍗曟€婚鈥濄€佲€滃姪鏁欓檮鍔犺鏈瑪璁㈠崟鎬婚鈥濓級鍧囩敱 DWD 鍔╂暀鏈嶅姟浜嬪疄琛ㄤ腑 final_fee 姹囨€昏€屾潵锛?
o	鍩虹璇鹃噾棰濓細姹囨€?service_type = 鍩虹璇?涓?final_fee 鐨勯噾棰濓紱
o	闄勫姞璇鹃噾棰濓細姹囨€?service_type = 闄勫姞璇?涓?final_fee 鐨勯噾棰濄€?
鈥?is_canceled = 1 鐨勫簾闄よ褰曪細
o	鍏?final_fee 鍙兘涓?0锛堝畬鍏ㄦ湭璁¤垂锛夋垨涓洪儴鍒嗚璐归噾棰濓紙宸叉湇鍔￠儴鍒嗚璐癸紝鏈湇鍔￠儴鍒嗕笉璁¤垂锛夛紱
o	DWS 璁㈠崟灞備粎鎸?final_fee 姹囨€伙紝鍥犳搴熼櫎鏈璐归儴鍒嗕笉浼氳鍏ヨ鍗曟湁鏁堟祦姘淬€?
濡傞渶鍒嗘瀽鈥滃姪鏁欐湇鍔″師鏈簲鏀朵笌瀹為檯鍏ヨ处鈥濈殑宸锛屽彲鍦ㄤ笓棰樻姤琛ㄤ腑浣跨敤 DWD 鍔╂暀浜嬪疄琛ㄧ殑 base_fee 涓?final_fee 宸€硷紝骞剁粨鍚堝姪鏁欏簾闄よ〃涓殑鍘熷洜瀛楁杩涜鎷嗚В銆?

4.	total_coupon_deduction锛堝洟璐埜鎶垫墸閲戦锛?
o	鏉ユ簮锛欶ACT_COUPON_USAGE.deduct_amount
o	杩囨护锛氱姸鎬佷负姝ｅ父鏍搁攢锛堝瀛樺湪 status 瀛楁闇€鎺掗櫎寮傚父鐘舵€侊級
o	鑱氬悎锛氭寜璁㈠崟缁村害姹傚拰銆?
5.	member_discount_amount 涓?manual_discount_amount
o	鍙拌垂銆佸姪鏁欏眰闈㈤€氬父瀛樺湪鏄庣‘鐨勪細鍛樻姌鎵ｅ瓧娈靛拰鎵嬪伐鎶樻墸瀛楁锛?
o	鍟嗗搧灞傞潰鑻ユ棤娉曞尯鍒嗘姌鎵ｇ被鍨嬶紝鍙噰鐢ㄤ繚瀹堣鍒欙細
飩?灏嗗晢鍝?discount_amount 缁熶竴璁″叆 member_discount_amount锛堟垨鐢变笟鍔″彛寰勭粺涓€褰掔被锛夛紱
飩?manual_discount_amount 鑷冲皯鍖呮嫭鍙拌垂涓庡姪鏁欑殑鎵嬪伐鎶樻墸锛?
o	鑻ユ湭鏉ュ晢鍝佹姌鎵ｅ彲鎷嗗垎涓衡€滀細鍛樻姌鎵?vs 鎵嬪伐鎶樻墸鈥濓紝瀵瑰簲瀛楁鍙啀璋冩暣鎷嗗垎閫昏緫銆?
6.	order_original_amount銆乷rder_final_amount
o	鎸夊叕寮忚绠楋紝纭繚涓庢槑缁嗗拰灏忕エ閲戦涓€鑷达紱
o	浼樺厛浠?DWD 姹囨€讳负涓伙紝灏忕エ ODS 鐢ㄤ簬瀵硅处鍜屽紓甯告鏌ャ€?
4.3.2 璁拌处娴佹按鍙ｅ緞锛圔ook Flow锛?
璁拌处娴佹按鍙叧娉ㄢ€滄秷璐圭粨鏋勭鐩€濓紝涓嶅叧蹇冩敮浠樻柟寮忎笌璧勯噾鏉ユ簮锛屼笉鍖呭惈鍏呭€硷紝涔熶笉鐩存帴鍥炴粴閫€娆俱€?
1.	book_table_flow锛堝彴璐硅璐︽祦姘达級
o	鏉ユ簮琛細FACT_TABLE_USAGE
o	杩囨护锛歰rder_trade_no = 褰撳墠璁㈠崟锛宨s_canceled = 0
o	鑱氬悎锛歜ook_table_flow = SUM(final_table_fee)
o	鍚箟锛氬凡缁忔墸闄ゆ墍鏈変紭鎯犲拰鍒告姷鎵ｅ悗璁板叆鈥滃彴璐光€濈鐩殑钀ヤ笟鏀跺叆銆?
2.	book_assistant_flow锛堝姪鏁欒璐︽祦姘达級
o	鏉ユ簮琛細FACT_ASSISTANT_SERVICE
o	杩囨护锛歰rder_trade_no = 褰撳墠璁㈠崟锛宨s_canceled = 0
o	鑱氬悎锛歜ook_assistant_flow = SUM(final_fee)
o	鍚箟锛氫粎缁熻瀹為檯瀹屾垚骞惰璐圭殑鍔╂暀鏈嶅姟銆?
3.	book_goods_flow锛堝晢鍝佽璐︽祦姘达級
o	鏉ユ簮琛細FACT_SALE_ITEM
o	杩囨护锛歰rder_trade_no = 褰撳墠璁㈠崟锛宨s_gift = 0锛堟帓闄よ禒鍝侊級
o	鑱氬悎锛歜ook_goods_flow = SUM(final_amount)
o	鍚箟锛氫笉璁″叆璧犻€佸晢鍝佺殑閲戦锛岃禒鍝佷笉鏋勬垚钀ヤ笟鏀跺叆銆?
4.	book_group_flow锛堝洟璐璐︽祦姘达級
o	鏉ユ簮琛細FACT_COUPON_USAGE
o	杩囨护锛歰rder_trade_no = 褰撳墠璁㈠崟锛岀姸鎬佷负姝ｅ父鏍搁攢
o	鑱氬悎锛歜ook_group_flow = SUM(settle_price)
o	鍚箟锛氭寜鍥㈣喘鈥滃钩鍙扮粨绠椾环鈥濆叆璐︼紝鑰岄潪鍒搁潰鍊笺€傚寮犲埜绱姞銆?
5.	book_order_flow锛堣鍗曡璐︽€绘祦姘达級
o	瀹氫箟锛?
book_order_flow = book_table_flow + book_assistant_flow + book_goods_flow + book_group_flow
o	鐢ㄩ€旓細
飩?鍥炵瓟鈥滆繖绗旇鍗曞湪鍙拌垂 / 鍔╂暀 / 鍟嗗搧 / 鍥㈣喘鍚勮鍏ヤ簡澶氬皯钀ヤ笟鏀跺叆鈥濓紱
飩?涓哄悇绉戠洰钀ヤ笟缁撴瀯鍗犳瘮鍒嗘瀽鎻愪緵鍩虹銆?
o	閫€娆撅細璁拌处娴佹按涓嶇洿鎺ュ啿鍑忛€€娆撅紱閫€娆惧湪 FACT_REFUND 鍜?refund_amount 涓崟鐙綋鐜般€傚闇€鈥滆璐﹀噣娴佹按鈥濆彛寰勶紝鍙湪鎶ヨ〃灞傦細
璁拌处鍑€娴佹按 = SUM(book_order_flow) - 瀵瑰簲閫€娆炬姌杩旈噾棰濄€?
4.3.3 璁㈠崟鏈夋晥娴佹按鍙ｅ緞锛圗ffective Order Flow锛?
璁㈠崟鏈夋晥娴佹按浠庤祫閲戝疄闄呮祦鍏ヨ瑙掑畾涔夛紝鍏虫敞鈥滄柊澧炲閮ㄨ祫閲?+ 鍥㈣喘缁撶畻鏀跺叆鈥濄€?
鍩烘湰鍘熷垯
鈥?鍌ㄥ€煎崱鏀粯锛氳涓哄唴閮ㄨ祫閲戝湪鍌ㄥ€艰处鎴蜂笌娑堣垂涔嬮棿杞Щ锛屼笉璁″叆鈥滄柊澧炶祫閲戞祦鍏モ€濓紝浣嗗叾瀵瑰簲鐨勬秷璐逛粛璁″叆鍚?book_* 娴佹按銆?
鈥?闈炲偍鍊肩被鏀粯锛堢幇閲戙€佸井淇°€佹敮浠樺疂銆侀摱琛屽崱绛夛級锛氳涓洪棬搴楃湡瀹炴祦鍏ヨ祫閲戙€?
鈥?鍏呭€硷細
o	鍏呭€煎彂鐢熸椂锛堥潪鍌ㄥ€兼敮浠樺厖鍊煎埌鍌ㄥ€艰处鎴凤級璁″叆鏈夋晥娴佹按锛?
o	涔嬪悗浣跨敤鍌ㄥ€煎崱娑堣垂鏃朵笉鍐嶉噸澶嶈鍏ユ湁鏁堟祦姘淬€?
鈥?鍥㈣喘锛氭寜骞冲彴缁撶畻浠疯鍏ユ湁鏁堟祦姘达紙閫氳繃 book_group_flow 鍙嶆槧锛夈€?
1锛夐潪鍌ㄥ€兼秷璐规 order_effective_consume_cash
鈥?鏉ユ簮锛欶ACT_PAYMENT + 褰撳墠璁㈠崟绫诲瀷鍒ゆ柇銆?
鈥?鏀粯杩囨护锛?
o	浠呯粺璁℃湰璁㈠崟涓敮浠樻柟寮忎负鈥滈潪鍌ㄥ€肩被鈥濈殑鏀粯璁板綍锛堝 pay_method_code 鈭堛€愮幇閲戙€佸井淇°€佹敮浠樺疂銆侀摱琛屽崱鈥︺€戯級锛屾帓闄ゅ偍鍊煎崱銆?
鈥?涓氬姟鍓嶆彁锛?
o	褰撳墠椤圭洰绾﹀畾鍗曠瑪璁㈠崟涓嶄細鍚屾椂鍖呭惈鈥滄秷璐?+ 鍏呭€尖€濓紝鍗宠鍗曡涔堟槸娑堣垂鍗曪紝瑕佷箞鏄厖鍊煎崟锛?
o	鍦ㄦ鍓嶆彁涓嬪彲閲囩敤绠€鍗曞彛寰勶細
飩?鑻ヨ鍗曚负娑堣垂鍗曪紙瀛樺湪鍙拌垂/鍟嗗搧/鍔╂暀绛夋秷璐癸紝涓旀棤鍏呭€艰锛夛細
飩?order_effective_consume_cash = 璇ヨ鍗曟墍鏈夐潪鍌ㄥ€兼敮浠樻€婚
飩?order_effective_recharge_cash = 0
飩?濡傛湭鏉ュ嚭鐜板悓鍗曟棦娑堣垂鍙堝厖鍊肩殑澶嶆潅鍦烘櫙锛屽垯闇€鍦?ETL 涓寜鏄庣粏鎷嗗垎闈炲偍鍊奸噾棰濆苟鎸夋秷璐逛笌鍏呭€兼瘮渚嬪垎鎽娿€?
2锛夐潪鍌ㄥ€煎厖鍊兼 order_effective_recharge_cash
鈥?鏉ユ簮锛欶ACT_PAYMENT + 鍏呭€肩被浜嬪疄锛堝 FACT_RECHARGE 鎴?FACT_BALANCE_CHANGE 涓殑鍏呭€艰褰曪級銆?
鈥?瀵逛簬鏍囪涓衡€滃厖鍊间笟鍔♀€濈殑璁㈠崟锛堟棤娑堣垂锛屼粎鍏呭€硷級锛?
o	order_effective_recharge_cash = 鏈鍗曟墍鏈夐潪鍌ㄥ€肩被鏀粯鎬婚
o	order_effective_consume_cash = 0
鈥?鍚箟锛氳〃绀洪棬搴楅€氳繃鏈鍗曞悜浼氬憳璐︽埛鈥滃瓨鍏モ€濈殑鐪熷疄璧勯噾锛屽湪鍏呭€兼椂璁″叆鏈夋晥娴佹按锛屽悗缁秷璐瑰彧鍦ㄦ秷璐圭鍙嶆槧 book_* 娴佹按銆?
3锛夎鍗曟湁鏁堟祦姘?order_effective_flow
鈥?瀹氫箟锛?
order_effective_flow = order_effective_consume_cash + order_effective_recharge_cash + book_group_flow
鈥?瑙ｉ噴锛?
o	order_effective_consume_cash锛氶潪鍌ㄥ€兼敮浠樼洿鎺ュ舰鎴愮殑娑堣垂鏀跺叆锛?
o	order_effective_recharge_cash锛氶潪鍌ㄥ€兼敮浠樺舰鎴愮殑鍏呭€兼敹鍏ワ紱
o	book_group_flow锛氬洟璐钩鍙颁互缁撶畻浠锋柟寮忎负闂ㄥ簵甯︽潵鐨勬敹鍏ワ紙鏈川涓婃槸骞冲彴浠ｆ敹鍚庣粨绠楋級銆?
鈥?鍚箟锛?
o	浠庤储鍔¤搴︼紝鍙畝鍗曠悊瑙ｄ负鈥滄湰璁㈠崟涓洪棬搴楀甫鏉ョ殑瀵瑰鐜伴噾鏀跺叆鈥濓紝鍖呭惈娑堣垂绫绘敹鍏ヤ笌鍏呭€肩被鏀跺叆锛屽苟灏嗗洟璐粨绠椾环绾冲叆瑙嗕负涓€绫诲閮ㄨ祫閲戞祦鍏ャ€?
鈥?鑱氬悎浣跨敤锛?
o	鏌愪竴鍛ㄦ湡锛堣嚜鐒舵棩 / 鑷劧鏈堢瓑锛夌殑鏈夋晥娴佹按锛?
飩?SUM(order_effective_flow)
o	鑻ラ渶鍑€鏈夋晥娴佹按鍙ｅ緞锛屽彲鍦ㄦ姤琛ㄥ眰鎸夛細
飩?鍑€鏈夋晥娴佹按 = SUM(order_effective_flow) - SUM(refund_amount)
飩?鏄惁灏嗛€€娆惧啿鍑忔湁鏁堟祦姘村彇鍐充簬璐㈠姟瑕佹眰锛屽彲鍦ㄦ寚鏍囧畾涔変腑杩涗竴姝ュ浐鍖栥€?
4) 鍏呭€煎崟璇嗗埆锛?
鑻ユ煇 order_settle_id 鍦?FACT_TABLE_USAGE / FACT_SALE_ITEM / FACT_ASSISTANT_SERVICE 涓潎鏃犺褰曪紝
浣嗗湪 FACT_RECHARGE 鎴?BALANCE_CHANGE锛坱ype=鍏呭€硷級涓瓨鍦ㄨ褰曪紝鍒欏皢璇ヨ鍗曟爣璁颁负 '鍏呭€艰鍗?锛?
鍏跺搴旂殑闈炲偍鍊兼敮浠橀噾棰濆綊鍏?order_effective_recharge_cash銆?
________________________________________
4.4 鎸囨爣绀轰緥涓庡垎鏋愬彛寰?
鍩轰簬 DWS_ORDER_SUMMARY锛屽彲鐩存帴鎴栬鐢熷嚭甯哥敤鍒嗘瀽鎸囨爣锛屽寘鎷絾涓嶉檺浜庯細
鈥?瀹㈠崟浠凤細
o	鍙敤 order_final_amount 鎴?total_paid_amount 鍋氫负瀹㈠崟娑堣垂棰濓紱
o	鍛ㄦ湡瀹㈠崟浠?= 鍛ㄦ湡鍐呮秷璐规€婚 / 璁㈠崟鏁般€?
鈥?浼氬憳璐＄尞鐜囷細
o	浼氬憳璁㈠崟鍗犳瘮锛歮ember_flag = 1 鐨勮鍗曟暟 / 鎬昏鍗曟暟锛?
o	浼氬憳閲戦璐＄尞锛歋UM(order_final_amount WHERE member_flag = 1) / SUM(order_final_amount)銆?
鈥?鎶樻墸鐜囷細
o	璁㈠崟鎶樻墸鐜囷細
(member_discount_amount + manual_discount_amount + total_coupon_deduction) / order_original_amount銆?
鈥?鍟嗗搧涓板瘜搴︿笌骞冲潎浠舵暟锛?
o	姣忓崟鍟嗗搧鏁帮細AVG(total_item_quantity)锛?
o	鍟嗗搧琛屾暟涓庡钩鍧囪鏁帮細AVG(item_count)銆?
鈥?鏀粯缁撴瀯锛?
o	闈炲偍鍊?vs 鍌ㄥ€硷細external_paid_amount 涓?stored_card_deduct 鐨勫崰姣旓紱
o	鑻ヤ繚鐣?pay_xxx 瀛楁锛屽彲鐩存帴鍒嗘瀽鍚勬敮浠樻笭閬撶粨鏋勩€?
鈥?缁忚惀缁撴瀯锛堣璐︽祦姘磋瑙掞級锛?
o	鍙拌垂 / 鍟嗗搧 / 鍔╂暀 / 鍥㈣喘鍗犳瘮锛?
鍚?book_*_flow / book_order_flow銆?
鈥?鏈夋晥娴佹按涓庡噣鏀跺叆锛?
o	鏈夋晥娴佹按锛歋UM(order_effective_flow)锛?
o	鍑€鏀跺叆锛堣祫閲戝彛寰勶級锛歋UM(order_effective_flow) - SUM(refund_amount) 鎴栫洿鎺ヤ娇鐢?SUM(net_income)锛屼袱鑰呭彛寰勯渶鍦ㄦ姤琛ㄥ眰缁熶竴銆?
________________________________________
4.5 娉ㄦ剰浜嬮」
鈥?鏃堕棿鍙ｅ緞缁熶竴鎸夎嚜鐒舵棩锛坥rder_date锛夎繘琛屾棩绮掑害姹囨€伙紝鏆備笉鍖哄垎鏃舵锛堥棽鏃?蹇欐椂锛夌被鍒€?
鈥?鏀粯鏂瑰紡銆佽鍗曠姸鎬佺瓑鏋氫妇鍊煎簲閫氳繃缁磋〃杞箟锛孌WS 灞傚彧淇濈暀蹇呰鐨勪唬鐮佷笌灏戦噺鍏抽敭鏍囩锛岄伩鍏嶅湪瀹借〃涓啓姝讳笟鍔℃灇涓俱€?
鈥?澶氶棬搴楁墿灞曪細site_id 鏄富閿拰鍒嗙粍缁村害鐨勪竴閮ㄥ垎锛屽彲鐩存帴鎸夐棬搴椼€佸煄甯傘€佸尯鍩熺瓑缁村害杩涜姹囨€诲垎鏋愩€?
鈥?閫€娆撅細
o	涓嶇洿鎺ュ洖婊氳璐︽祦姘村瓧娈碉紙book_*锛夊拰鏈夋晥娴佹按瀛楁锛?
o	閫氳繃 refund_amount 鍦ㄦ姤琛ㄥ眰瀹氫箟鈥滃噣鏀跺叆 / 鍑€鏈夋晥娴佹按鈥濈瓑鎸囨爣瀹炵幇鍐插噺銆?


