hk-cdp 1.0.77__tar.gz → 1.0.79__tar.gz
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-1.0.77 → hk_cdp-1.0.79}/PKG-INFO +1 -1
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/libs/customize/cdp_helper.py +12 -1
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/cdp/cdp_work_info_model.py +9 -6
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/member/member_asset_log_model.py +4 -2
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/member/member_level_log_model.py +4 -2
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp.egg-info/PKG-INFO +1 -1
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/setup.py +1 -1
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/README.md +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/handler/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/handler/cdp_base.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/libs/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/libs/customize/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/libs/customize/asset_base_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/libs/customize/rainbow_helper.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/libs/customize/tiktok_spi_helper.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/libs/customize/work_base_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/cdp_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/analysis/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/analysis/analysis_report_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/cap/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/cap/cap_business_info_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/cap/cap_store_info_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/cdp/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/cdp/cdp_store_info_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/member/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/member/member_asset_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/member/member_asset_valid_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/member/member_event_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/member/member_info_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/prefix/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/prefix/prefix_info_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/queue/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/queue/queue_work_log_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/scheme/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/scheme/scheme_growth_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/scheme/scheme_info_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/scheme/scheme_integral_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/scheme/scheme_level_info_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/scheme/scheme_level_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/store/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/store/store_base_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/store/store_goods_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/store/store_prefix_log_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/sync/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/sync/sync_user_data_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/taobao/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/taobao/taobao_rds_item_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/taobao/taobao_rds_refund_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/taobao/taobao_rds_trade_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/taobao/taobao_source_buyer_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/taobao/taobao_source_history_member_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/trade/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/trade/trade_give_info_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/trade/trade_info_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/trade/trade_order_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/trade/trade_status_info_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/tt/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/tt/tt_rds_item_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/tt/tt_rds_refund_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/tt/tt_rds_trade_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/tt/tt_source_buyer_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/tt/tt_source_history_member_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/user/__init__.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/user/user_data_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/user/user_info_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/user/user_trends_model.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/enum.py +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp.egg-info/SOURCES.txt +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp.egg-info/dependency_links.txt +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp.egg-info/requires.txt +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp.egg-info/top_level.txt +0 -0
- {hk_cdp-1.0.77 → hk_cdp-1.0.79}/setup.cfg +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"""
|
|
3
3
|
@Author: HuangJianYi
|
|
4
4
|
@Date: 2024-11-18 18:57:33
|
|
5
|
-
@LastEditTime: 2025-
|
|
5
|
+
@LastEditTime: 2025-05-27 15:23:13
|
|
6
6
|
@LastEditors: HuangJianYi
|
|
7
7
|
@Description: 帮助类
|
|
8
8
|
"""
|
|
@@ -13,7 +13,18 @@ from seven_cloudapp_frame.libs.customize.seven_helper import *
|
|
|
13
13
|
from seven_cloudapp_frame.libs.customize.safe_helper import *
|
|
14
14
|
from hk_cdp.models.enum import *
|
|
15
15
|
|
|
16
|
+
|
|
16
17
|
class CdpHelper:
|
|
18
|
+
|
|
19
|
+
@classmethod
|
|
20
|
+
def decrypt_cdp_db_config(self, cdp_db_config):
|
|
21
|
+
"""
|
|
22
|
+
:description: 获取对应的数据库名
|
|
23
|
+
:param business_code: 商家代码
|
|
24
|
+
:param cdp_db_config: 数据库连接串
|
|
25
|
+
:last_editors: HuangJianYi
|
|
26
|
+
"""
|
|
27
|
+
return cdp_db_config
|
|
17
28
|
|
|
18
29
|
@classmethod
|
|
19
30
|
def get_business_db(self, business_code, cdp_db_config):
|
|
@@ -22,39 +22,42 @@ class CdpWorkInfoModel(CacheModel):
|
|
|
22
22
|
|
|
23
23
|
# 方法扩展请继承此类
|
|
24
24
|
|
|
25
|
-
def start_work(self, store_id, work_name, progress_type=0, dependency_key=''):
|
|
25
|
+
def start_work(self, store_id, work_name, progress_type=0, dependency_key='', scheme_id=0):
|
|
26
26
|
"""
|
|
27
27
|
开始作业
|
|
28
28
|
:param store_id: 店铺标识
|
|
29
29
|
:param work_name: 作业名称
|
|
30
30
|
:param progress_type: 当前进度值
|
|
31
31
|
:param dependency_key: 依赖建
|
|
32
|
+
:param scheme_id: 体系标识
|
|
32
33
|
:return:
|
|
33
34
|
"""
|
|
34
35
|
if progress_type == 0:
|
|
35
|
-
self.update_table("run_start_date=%s,progress_type=1", "store_id=%s and work_name=%s", params=[TimeHelper.get_now_format_time(), store_id, work_name])
|
|
36
|
+
self.update_table("run_start_date=%s,progress_type=1", "scheme_id=%s and store_id=%s and work_name=%s", params=[TimeHelper.get_now_format_time(), scheme_id, store_id, work_name])
|
|
36
37
|
self.delete_dependency_key(dependency_key)
|
|
37
38
|
|
|
38
|
-
def end_work(self, store_id, work_name, run_desc='处理结束', dependency_key=''):
|
|
39
|
+
def end_work(self, store_id, work_name, run_desc='处理结束', dependency_key='', scheme_id=0):
|
|
39
40
|
"""
|
|
40
41
|
结束作业
|
|
41
42
|
:param store_id: 店铺标识
|
|
42
43
|
:param work_name: 作业名称
|
|
43
44
|
:param run_desc: 运行描述
|
|
44
45
|
:param dependency_key: 依赖建
|
|
46
|
+
:param scheme_id: 体系标识
|
|
45
47
|
:return:
|
|
46
48
|
"""
|
|
47
|
-
self.update_table("run_desc=%s,run_end_date=%s,progress_type=2", "store_id=%s and work_name=%s", params=[run_desc, TimeHelper.get_now_format_time(), store_id, work_name])
|
|
49
|
+
self.update_table("run_desc=%s,run_end_date=%s,progress_type=2", "scheme_id=%s and store_id=%s and work_name=%s", params=[run_desc, TimeHelper.get_now_format_time(), scheme_id, store_id, work_name])
|
|
48
50
|
self.delete_dependency_key(dependency_key)
|
|
49
51
|
|
|
50
|
-
def run_work(self, store_id, work_name):
|
|
52
|
+
def run_work(self, store_id, work_name, scheme_id=0):
|
|
51
53
|
"""
|
|
52
54
|
运行作业
|
|
53
55
|
:param store_id: 店铺标识
|
|
54
56
|
:param work_name: 作业名称
|
|
57
|
+
:param scheme_id: 体系标识
|
|
55
58
|
:return:
|
|
56
59
|
"""
|
|
57
|
-
return self.update_table("run_last_date=%s", "store_id=%s and work_name=%s", params=[TimeHelper.get_now_format_time(), store_id, work_name])
|
|
60
|
+
return self.update_table("run_last_date=%s", "scheme_id=%s and store_id=%s and work_name=%s", params=[TimeHelper.get_now_format_time(), scheme_id, store_id, work_name])
|
|
58
61
|
|
|
59
62
|
|
|
60
63
|
class CdpWorkInfo:
|
|
@@ -27,6 +27,7 @@ class MemberAssetLog:
|
|
|
27
27
|
super(MemberAssetLog, self).__init__()
|
|
28
28
|
self.id = 0
|
|
29
29
|
self.business_id = 0 # 商家标识
|
|
30
|
+
self.scheme_id = 0 # 体系标识
|
|
30
31
|
self.change_no = "" # 变更流水号
|
|
31
32
|
self.one_id = "" # one_id
|
|
32
33
|
self.user_id = "" # 客户ID
|
|
@@ -53,7 +54,8 @@ class MemberAssetLog:
|
|
|
53
54
|
@classmethod
|
|
54
55
|
def get_field_list(self):
|
|
55
56
|
return [
|
|
56
|
-
'id', 'business_id', 'change_no', 'one_id', 'user_id', 'log_title', 'asset_type', 'asset_object_id', 'store_id', 'business_type', 'source_type', 'source_object_id', 'source_object_name', 'operate_type', 'operate_value', 'surplus_value', 'history_value',
|
|
57
|
+
'id', 'business_id', 'scheme_id', 'change_no', 'one_id', 'user_id', 'log_title', 'asset_type', 'asset_object_id', 'store_id', 'business_type', 'source_type', 'source_object_id', 'source_object_name', 'operate_type', 'operate_value', 'surplus_value', 'history_value',
|
|
58
|
+
'processed_price', 'valid_type', 'valid_end_date', 'remark', 'operate_user_id', 'operate_user_name', 'create_date'
|
|
57
59
|
]
|
|
58
60
|
|
|
59
61
|
@classmethod
|
|
@@ -61,4 +63,4 @@ class MemberAssetLog:
|
|
|
61
63
|
return "id"
|
|
62
64
|
|
|
63
65
|
def __str__(self):
|
|
64
|
-
return "member_asset_log_tb"
|
|
66
|
+
return "member_asset_log_tb"
|
|
@@ -27,6 +27,7 @@ class MemberLevelLog:
|
|
|
27
27
|
super(MemberLevelLog, self).__init__()
|
|
28
28
|
self.id = 0
|
|
29
29
|
self.business_id = 0 # 商家标识
|
|
30
|
+
self.scheme_id = 0 # 体系标识
|
|
30
31
|
self.change_no = "" # 变更流水号
|
|
31
32
|
self.one_id = "" # one_id
|
|
32
33
|
self.log_title = "" # 标题
|
|
@@ -46,7 +47,8 @@ class MemberLevelLog:
|
|
|
46
47
|
@classmethod
|
|
47
48
|
def get_field_list(self):
|
|
48
49
|
return [
|
|
49
|
-
'id', 'business_id', 'change_no', 'one_id', 'log_title', 'source_type', 'source_object_id', 'source_object_name', 'operate_type', 'old_level_id', 'new_level_id', 'valid_type', 'level_valid_date', 'remark', 'operate_user_id', 'operate_user_name',
|
|
50
|
+
'id', 'business_id', 'scheme_id', 'change_no', 'one_id', 'log_title', 'source_type', 'source_object_id', 'source_object_name', 'operate_type', 'old_level_id', 'new_level_id', 'valid_type', 'level_valid_date', 'remark', 'operate_user_id', 'operate_user_name',
|
|
51
|
+
'create_date'
|
|
50
52
|
]
|
|
51
53
|
|
|
52
54
|
@classmethod
|
|
@@ -54,4 +56,4 @@ class MemberLevelLog:
|
|
|
54
56
|
return "id"
|
|
55
57
|
|
|
56
58
|
def __str__(self):
|
|
57
|
-
return "member_level_log_tb"
|
|
59
|
+
return "member_level_log_tb"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/taobao/taobao_source_history_member_model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{hk_cdp-1.0.77 → hk_cdp-1.0.79}/hk_cdp/models/db_models/tt/tt_source_history_member_model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|