update 数据导出优化
This commit is contained in:
@@ -39,5 +39,4 @@ class ConfigInfo:
|
||||
'ym_2507': ('2025-07-01', '2025-07-31'),
|
||||
'ym_2508': ('2025-08-01', '2025-08-31'),
|
||||
'ym_2509': ('2025-09-01', '2025-09-30')
|
||||
}
|
||||
|
||||
}
|
||||
49
base/Config_2024.py
Normal file
49
base/Config_2024.py
Normal file
@@ -0,0 +1,49 @@
|
||||
class ConfigInfo:
|
||||
# 数据库配置
|
||||
db_hk_kline_1d = {
|
||||
'host': 'localhost',
|
||||
'user': 'root',
|
||||
'password': 'bzskmysql',
|
||||
'database': 'hk_kline_1d'
|
||||
}
|
||||
|
||||
|
||||
"""
|
||||
映射表发生变化时,流通值计算的 sql 语句同样需要进行修改
|
||||
"""
|
||||
# 表头映射配置
|
||||
HEADER_MAP = {
|
||||
'stock_code': '股票代码',
|
||||
'stock_name': '股票名称',
|
||||
'ym_2401': '2024年01月',
|
||||
'ym_2402': '2024年02月',
|
||||
'ym_2403': '2024年03月',
|
||||
'ym_2404': '2024年04月',
|
||||
'ym_2405': '2024年05月',
|
||||
'ym_2406': '2024年06月',
|
||||
'ym_2407': '2024年07月',
|
||||
'ym_2408': '2024年08月',
|
||||
'ym_2409': '2024年09月',
|
||||
'ym_2410': '2024年10月',
|
||||
'ym_2411': '2024年11月',
|
||||
'ym_2412': '2024年12月',
|
||||
'avg_all': '月度均值',
|
||||
'in_out':'是否在港股通'
|
||||
}
|
||||
|
||||
# 月份范围配置
|
||||
MONTH_RANGES = {
|
||||
'ym_2401': ('2024-01-01', '2024-01-31'),
|
||||
'ym_2402': ('2024-02-01', '2024-02-29'),
|
||||
'ym_2403': ('2024-03-01', '2024-03-31'),
|
||||
'ym_2404': ('2024-04-01', '2024-04-30'),
|
||||
'ym_2405': ('2024-05-01', '2024-05-31'),
|
||||
'ym_2406': ('2024-06-01', '2024-06-30'),
|
||||
'ym_2407': ('2024-07-01', '2024-07-31'),
|
||||
'ym_2408': ('2024-08-01', '2024-08-31'),
|
||||
'ym_2409': ('2024-09-01', '2024-09-30'),
|
||||
'ym_2410': ('2024-10-01', '2024-10-31'),
|
||||
'ym_2411': ('2024-11-01', '2024-11-30'),
|
||||
'ym_2412': ('2024-12-01', '2024-12-31')
|
||||
}
|
||||
|
||||
@@ -98,6 +98,7 @@ class MySQLHelper:
|
||||
:param params: 参数,可以是元组、列表或字典
|
||||
:return: 影响的行数
|
||||
"""
|
||||
|
||||
try:
|
||||
affected_rows = self.cursor.execute(sql, params)
|
||||
self.connection.commit()
|
||||
|
||||
Reference in New Issue
Block a user