hk-cdp 1.0.88__py3-none-any.whl → 1.0.89__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hk_cdp/models/db_models/analysis/__init__.py +1 -1
- hk_cdp/models/db_models/analysis/analysis_goods_related_model.py +53 -0
- hk_cdp/models/db_models/analysis/analysis_goods_repurchase_model.py +66 -0
- hk_cdp/models/db_models/analysis/analysis_report_model.py +1 -1
- {hk_cdp-1.0.88.dist-info → hk_cdp-1.0.89.dist-info}/METADATA +1 -1
- {hk_cdp-1.0.88.dist-info → hk_cdp-1.0.89.dist-info}/RECORD +9 -7
- {hk_cdp-1.0.88.dist-info → hk_cdp-1.0.89.dist-info}/LICENSE +0 -0
- {hk_cdp-1.0.88.dist-info → hk_cdp-1.0.89.dist-info}/WHEEL +0 -0
- {hk_cdp-1.0.88.dist-info → hk_cdp-1.0.89.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
@Author: HuangJianYi
|
|
4
|
+
@Date: 2024-10-15 18:30:21
|
|
5
|
+
@LastEditTime: 2025-07-15 17:20:19
|
|
6
|
+
@LastEditors: HuangJianYi
|
|
7
|
+
@Description:
|
|
8
|
+
"""
|
|
9
|
+
from seven_framework.mysql import MySQLHelper
|
|
10
|
+
from seven_framework.base_model import *
|
|
11
|
+
from seven_cloudapp_frame.models.cache_model import *
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class AnalysisGoodsRelatedModel(CacheModel):
|
|
15
|
+
def __init__(self, db_connect_key='db_cloudapp', db_config_dict=None, sub_table=None, db_transaction=None, context=None, is_auto=False):
|
|
16
|
+
super(AnalysisGoodsRelatedModel, self).__init__(AnalysisGoodsRelated, sub_table)
|
|
17
|
+
if not db_config_dict:
|
|
18
|
+
db_config_dict = config.get_value(db_connect_key)
|
|
19
|
+
self.db = MySQLHelper(self.convert_db_config(db_config_dict, is_auto))
|
|
20
|
+
self.db_connect_key = db_connect_key
|
|
21
|
+
self.db_transaction = db_transaction
|
|
22
|
+
self.db.context = context
|
|
23
|
+
|
|
24
|
+
# 方法扩展请继承此类
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class AnalysisGoodsRelated:
|
|
28
|
+
def __init__(self):
|
|
29
|
+
self.id = 0 # 唯一键,根据业务md5int生成
|
|
30
|
+
self.business_id = 0 # 商家标识
|
|
31
|
+
self.platform_id = 0 # 平台标识(1-淘宝 2-抖音 3-京东 4-微信)
|
|
32
|
+
self.store_id = 0 # 店铺标识
|
|
33
|
+
self.a_goods_id = '' # A商品ID
|
|
34
|
+
self.a_buyer_count = 0 # 购买A商品人数
|
|
35
|
+
self.b_goods_id = '' # B商品ID
|
|
36
|
+
self.b_buyer_count = 0 # 购买B商品人数
|
|
37
|
+
self.a_and_b_buyer_count = 0 # 同时购买A和B人数
|
|
38
|
+
self.buy_rate = 0 # 购买连带率
|
|
39
|
+
self.recommend_buyer_count = 0 # 可推荐人数
|
|
40
|
+
self.rank_num = 0 # 排行号
|
|
41
|
+
self.stat_date = 0 # 统计时间(20241231)
|
|
42
|
+
self.create_date = '1970-01-01 00:00:00.000' # 创建时间
|
|
43
|
+
|
|
44
|
+
@classmethod
|
|
45
|
+
def get_field_list(self):
|
|
46
|
+
return ['id', 'business_id', 'platform_id', 'store_id', 'a_goods_id', 'a_buyer_count', 'b_goods_id', 'b_buyer_count', 'a_and_b_buyer_count', 'buy_rate', 'recommend_buyer_count', 'rank_num', 'stat_date', 'create_date']
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def get_primary_key(self):
|
|
50
|
+
return "id"
|
|
51
|
+
|
|
52
|
+
def __str__(self):
|
|
53
|
+
return "analysis_goods_related_tb"
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""
|
|
3
|
+
@Author: HuangJianYi
|
|
4
|
+
@Date: 2024-12-31 11:25:23
|
|
5
|
+
@LastEditTime: 2025-07-15 17:27:35
|
|
6
|
+
@LastEditors: HuangJianYi
|
|
7
|
+
@Description:
|
|
8
|
+
"""
|
|
9
|
+
# -*- coding: utf-8 -*-
|
|
10
|
+
"""
|
|
11
|
+
@Author: HuangJianYi
|
|
12
|
+
@Date: 2024-10-15 18:30:21
|
|
13
|
+
@LastEditTime: 2025-07-11 10:31:39
|
|
14
|
+
@LastEditors: HuangJianYi
|
|
15
|
+
@Description:
|
|
16
|
+
"""
|
|
17
|
+
from seven_framework.mysql import MySQLHelper
|
|
18
|
+
from seven_framework.base_model import *
|
|
19
|
+
from seven_cloudapp_frame.models.cache_model import *
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class AnalysisGoodsRepurchaseModel(CacheModel):
|
|
23
|
+
def __init__(self, db_connect_key='db_cloudapp', db_config_dict=None, sub_table=None, db_transaction=None, context=None, is_auto=False):
|
|
24
|
+
super(AnalysisGoodsRepurchaseModel, self).__init__(AnalysisGoodsRepurchase, sub_table)
|
|
25
|
+
if not db_config_dict:
|
|
26
|
+
db_config_dict = config.get_value(db_connect_key)
|
|
27
|
+
self.db = MySQLHelper(self.convert_db_config(db_config_dict, is_auto))
|
|
28
|
+
self.db_connect_key = db_connect_key
|
|
29
|
+
self.db_transaction = db_transaction
|
|
30
|
+
self.db.context = context
|
|
31
|
+
|
|
32
|
+
# 方法扩展请继承此类
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class AnalysisGoodsRepurchase:
|
|
36
|
+
def __init__(self):
|
|
37
|
+
self.id = 0 # 唯一键,根据业务md5int生成
|
|
38
|
+
self.business_id = 0 # 商家标识
|
|
39
|
+
self.platform_id = 0 # 平台标识(1-淘宝 2-抖音 3-京东 4-微信)
|
|
40
|
+
self.store_id = 0 # 店铺标识
|
|
41
|
+
self.goods_id = '' # 商品ID
|
|
42
|
+
self.total_sales = 0 # 总销量
|
|
43
|
+
self.buyer_count = 0 # 购买人数
|
|
44
|
+
self.repurchase_count = 0 # 复购人数
|
|
45
|
+
self.repurchase_rate = 0 # 复购率
|
|
46
|
+
self.avg_purchase_times = 0 # 人均购买次数
|
|
47
|
+
self.avg_repurchase_cycle = 0 # 平均复购周期(天)
|
|
48
|
+
self.today_expired_count = 0 # 今日到期未购买人数
|
|
49
|
+
self.recent_7days_expired_count = 0 # 近7日到期未购买人数
|
|
50
|
+
self.stat_date = 0 # 统计时间(20241231)
|
|
51
|
+
self.modify_date = '1970-01-01 00:00:00.000' # 创建时间
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def get_field_list(self):
|
|
55
|
+
return [
|
|
56
|
+
'id', 'business_id', 'platform_id', 'store_id',
|
|
57
|
+
'scheme_id', 'cycle_type', 'report_type',
|
|
58
|
+
'stat_date', 'report_data', 'modify_date'
|
|
59
|
+
]
|
|
60
|
+
|
|
61
|
+
@classmethod
|
|
62
|
+
def get_primary_key(self):
|
|
63
|
+
return "id"
|
|
64
|
+
|
|
65
|
+
def __str__(self):
|
|
66
|
+
return "analysis_goods_repurchase_tb"
|
|
@@ -34,7 +34,7 @@ class AnalysisReport:
|
|
|
34
34
|
def __init__(self):
|
|
35
35
|
self.id = 0 # 唯一键,根据业务md5int生成
|
|
36
36
|
self.business_id = 0 # 商家标识
|
|
37
|
-
self.platform_id = 0 # 平台标识(1-淘宝 2-抖音 3-京东)
|
|
37
|
+
self.platform_id = 0 # 平台标识(1-淘宝 2-抖音 3-京东 4-微信)
|
|
38
38
|
self.store_id = 0 # 店铺标识
|
|
39
39
|
self.scheme_id = 0 # 会员体系标识
|
|
40
40
|
self.cycle_type = 2 # 周期类型(1-年 2-月 3-日)
|
|
@@ -12,8 +12,10 @@ hk_cdp/models/__init__.py,sha256=iwhKnzeBJLKxpRVjvzwiRE63_zNpIBfaKLITauVph-0,24
|
|
|
12
12
|
hk_cdp/models/cdp_model.py,sha256=GxC3zXZ0po2iFkaFeTYcnq8S7hGXQ-vUb9rYoka-BMI,5948
|
|
13
13
|
hk_cdp/models/enum.py,sha256=0-kP-3RguGLZXHaamyBqlQMSNGOOH09yqksrz-o8ZrE,2381
|
|
14
14
|
hk_cdp/models/db_models/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
hk_cdp/models/db_models/analysis/__init__.py,sha256=
|
|
16
|
-
hk_cdp/models/db_models/analysis/
|
|
15
|
+
hk_cdp/models/db_models/analysis/__init__.py,sha256=IpZEFGpkWi_f826jxDE3qsGHtRi4bBQpAL_Vmi5FSWY,259
|
|
16
|
+
hk_cdp/models/db_models/analysis/analysis_goods_related_model.py,sha256=xG-eOeloVsFVZdn2TDyqiHHd2nZummVyUFmkqayIKAY,2116
|
|
17
|
+
hk_cdp/models/db_models/analysis/analysis_goods_repurchase_model.py,sha256=ZmNduiUPgmJdWf8Lc5vfXAaXyTJhlvWBw0m3L_fdFcg,2347
|
|
18
|
+
hk_cdp/models/db_models/analysis/analysis_report_model.py,sha256=Iof44KQYOyi-J5-0771q8qvvnarsX17jLFGiry_ybR4,2010
|
|
17
19
|
hk_cdp/models/db_models/cap/__init__.py,sha256=QsbOTFmhrR2g4CCwzXfpcoqWeVdGU-gS7wMt8NzUnFw,218
|
|
18
20
|
hk_cdp/models/db_models/cap/cap_business_info_model.py,sha256=GnRMcS2n1bHgNIELHsLZ5zUZTdLgmThNDLYZea6jV-0,1616
|
|
19
21
|
hk_cdp/models/db_models/cap/cap_store_info_model.py,sha256=qewjcGdPnlK-R8yY564qogP7IuiqhcxyMAJrrNjprqY,1716
|
|
@@ -64,8 +66,8 @@ hk_cdp/models/db_models/user/__init__.py,sha256=O_F1_TiR_075ATAHcahxTKJwUdYeY-Qz
|
|
|
64
66
|
hk_cdp/models/db_models/user/user_data_model.py,sha256=Z8Hr9xarLXvlKWKV0o25KVVVJiiOVyLOwYY7KfNLDrs,2742
|
|
65
67
|
hk_cdp/models/db_models/user/user_info_model.py,sha256=TywpvlFGkch9hO_szyhin-ed4xfTWBM7L59IU96SfxU,4138
|
|
66
68
|
hk_cdp/models/db_models/user/user_trends_model.py,sha256=oxJCBnJQEvFr1_heV_cxRrPIic6_oSoLqARc6ldp2LM,1592
|
|
67
|
-
hk_cdp-1.0.
|
|
68
|
-
hk_cdp-1.0.
|
|
69
|
-
hk_cdp-1.0.
|
|
70
|
-
hk_cdp-1.0.
|
|
71
|
-
hk_cdp-1.0.
|
|
69
|
+
hk_cdp-1.0.89.dist-info/LICENSE,sha256=hKHSuDoDoyOk6vOrpkYnOXZ640PvhUa-BTQbRRtFsUk,1061
|
|
70
|
+
hk_cdp-1.0.89.dist-info/METADATA,sha256=pGs2kid8XLT0Fbst0pmPZixyEqhBZoElMGACXHjJy_0,7101
|
|
71
|
+
hk_cdp-1.0.89.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
|
|
72
|
+
hk_cdp-1.0.89.dist-info/top_level.txt,sha256=omzIr_m5qnzhfcdscOVr4P4JUB49wlP6KztqvlqDntw,7
|
|
73
|
+
hk_cdp-1.0.89.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|