hk-cdp 1.0.78__tar.gz → 1.0.80__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.78 → hk_cdp-1.0.80}/PKG-INFO +1 -1
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/libs/customize/asset_base_model.py +8 -5
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/libs/customize/cdp_helper.py +12 -1
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/member/member_asset_log_model.py +4 -2
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/member/member_level_log_model.py +4 -2
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp.egg-info/PKG-INFO +1 -1
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/setup.py +1 -1
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/README.md +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/handler/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/handler/cdp_base.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/libs/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/libs/customize/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/libs/customize/rainbow_helper.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/libs/customize/tiktok_spi_helper.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/libs/customize/work_base_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/cdp_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/analysis/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/analysis/analysis_report_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/cap/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/cap/cap_business_info_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/cap/cap_store_info_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/cdp/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/cdp/cdp_store_info_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/cdp/cdp_work_info_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/member/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/member/member_asset_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/member/member_asset_valid_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/member/member_event_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/member/member_info_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/prefix/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/prefix/prefix_info_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/queue/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/queue/queue_work_log_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/scheme/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/scheme/scheme_growth_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/scheme/scheme_info_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/scheme/scheme_integral_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/scheme/scheme_level_info_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/scheme/scheme_level_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/store/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/store/store_base_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/store/store_goods_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/store/store_prefix_log_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/sync/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/sync/sync_user_data_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/taobao/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/taobao/taobao_rds_item_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/taobao/taobao_rds_refund_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/taobao/taobao_rds_trade_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/taobao/taobao_source_buyer_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/taobao/taobao_source_history_member_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/trade/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/trade/trade_give_info_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/trade/trade_info_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/trade/trade_order_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/trade/trade_status_info_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/tt/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/tt/tt_rds_item_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/tt/tt_rds_refund_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/tt/tt_rds_trade_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/tt/tt_source_buyer_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/tt/tt_source_history_member_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/user/__init__.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/user/user_data_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/user/user_info_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/db_models/user/user_trends_model.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp/models/enum.py +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp.egg-info/SOURCES.txt +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp.egg-info/dependency_links.txt +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp.egg-info/requires.txt +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/hk_cdp.egg-info/top_level.txt +0 -0
- {hk_cdp-1.0.78 → hk_cdp-1.0.80}/setup.cfg +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"""
|
|
3
3
|
:Author: HuangJianYi
|
|
4
4
|
:Date: 2020-05-12 20:11:48
|
|
5
|
-
@LastEditTime: 2025-
|
|
5
|
+
@LastEditTime: 2025-05-29 16:22:19
|
|
6
6
|
@LastEditors: HuangJianYi
|
|
7
7
|
:description:
|
|
8
8
|
"""
|
|
@@ -89,7 +89,8 @@ class AssetBaseModel():
|
|
|
89
89
|
remark='',
|
|
90
90
|
operate_user_id='',
|
|
91
91
|
operate_user_name='',
|
|
92
|
-
valid_end_date=None
|
|
92
|
+
valid_end_date=None,
|
|
93
|
+
scheme_id=0):
|
|
93
94
|
"""
|
|
94
95
|
:description: 变更资产
|
|
95
96
|
:param business_id:商家标识
|
|
@@ -109,13 +110,14 @@ class AssetBaseModel():
|
|
|
109
110
|
:param operate_user_id:操作用户标识
|
|
110
111
|
:param operate_user_name:操作用户名称
|
|
111
112
|
:param valid_end_date:有效期结束时间(时间格式,不传或默认时间,则表示永久有效)
|
|
113
|
+
:param scheme_id:体系标识
|
|
112
114
|
:return: 返回实体InvokeResultData
|
|
113
115
|
:last_editors: HuangJianYi
|
|
114
116
|
"""
|
|
115
117
|
|
|
116
118
|
invoke_result_data = InvokeResultData()
|
|
117
119
|
|
|
118
|
-
if not one_id or not asset_type or not asset_value:
|
|
120
|
+
if not one_id or not asset_type or not asset_value or not scheme_id:
|
|
119
121
|
invoke_result_data.success = False
|
|
120
122
|
invoke_result_data.error_code = "param_error"
|
|
121
123
|
invoke_result_data.error_message = "参数不能为空或等于0"
|
|
@@ -187,6 +189,7 @@ class AssetBaseModel():
|
|
|
187
189
|
|
|
188
190
|
member_asset_log = MemberAssetLog()
|
|
189
191
|
member_asset_log.business_id = business_id
|
|
192
|
+
member_asset_log.scheme_id = scheme_id
|
|
190
193
|
member_asset_log.change_no = SevenHelper.create_order_id() # 18位随机
|
|
191
194
|
member_asset_log.one_id = one_id
|
|
192
195
|
member_asset_log.user_id = user_id
|
|
@@ -212,7 +215,7 @@ class AssetBaseModel():
|
|
|
212
215
|
else:
|
|
213
216
|
member_asset_log.valid_type = 1
|
|
214
217
|
member_asset_log.create_date = now_datetime
|
|
215
|
-
|
|
218
|
+
|
|
216
219
|
|
|
217
220
|
# 开始事务
|
|
218
221
|
db_transaction.begin_transaction()
|
|
@@ -362,7 +365,7 @@ class AssetBaseModel():
|
|
|
362
365
|
params.append(end_date)
|
|
363
366
|
if business_type != -1:
|
|
364
367
|
condition_where.add_condition("business_type=%s")
|
|
365
|
-
params.append(business_type)
|
|
368
|
+
params.append(business_type)
|
|
366
369
|
if source_type:
|
|
367
370
|
if type(source_type) == str:
|
|
368
371
|
condition_where.add_condition(SevenHelper.get_condition_by_int_list("source_type", [int(item) for item in source_type.split(",")]))
|
|
@@ -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):
|
|
@@ -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.78 → hk_cdp-1.0.80}/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.78 → hk_cdp-1.0.80}/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
|