mns-common 1.4.3.8__py3-none-any.whl → 1.4.4.3__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.
Potentially problematic release.
This version of mns-common might be problematic. Click here for more details.
- mns_common/api/em/gd/east_money_stock_gdfx_free_top_10_api.py +17 -7
- {mns_common-1.4.3.8.dist-info → mns_common-1.4.4.3.dist-info}/METADATA +1 -1
- {mns_common-1.4.3.8.dist-info → mns_common-1.4.4.3.dist-info}/RECORD +5 -5
- {mns_common-1.4.3.8.dist-info → mns_common-1.4.4.3.dist-info}/WHEEL +0 -0
- {mns_common-1.4.3.8.dist-info → mns_common-1.4.4.3.dist-info}/top_level.txt +0 -0
|
@@ -166,14 +166,19 @@ def sync_stock_gdfx_free_top_10(stock_gdfx_free_top_10_em_df, period, symbol, st
|
|
|
166
166
|
stock_gdfx_free_top_10_em_df['str_day'] = str_day
|
|
167
167
|
|
|
168
168
|
stock_gdfx_free_top_10_em_df['symbol'] = symbol
|
|
169
|
-
stock_gdfx_free_top_10_em_df['_id'] = symbol +
|
|
169
|
+
stock_gdfx_free_top_10_em_df['_id'] = symbol + '_' + period+'_'+stock_gdfx_free_top_10_em_df.shareholder_name
|
|
170
170
|
stock_gdfx_free_top_10_em_df['period'] = period
|
|
171
171
|
|
|
172
172
|
query_exist = {'symbol': symbol, 'period': period}
|
|
173
|
-
|
|
173
|
+
exist_df = mongodb_util.find_query_data(db_name_constant.STOCK_GDFX_FREE_TOP_10, query_exist)
|
|
174
174
|
# 不存在的时候更新创建时间
|
|
175
|
-
if
|
|
175
|
+
if exist_df.shape[0] == 0:
|
|
176
176
|
stock_gdfx_free_top_10_em_df['create_day'] = str_day
|
|
177
|
+
else:
|
|
178
|
+
if 'create_day' in exist_df.columns:
|
|
179
|
+
stock_gdfx_free_top_10_em_df['create_day'] = list(exist_df['create_day'])[0]
|
|
180
|
+
else:
|
|
181
|
+
stock_gdfx_free_top_10_em_df['create_day'] = str_day
|
|
177
182
|
mongodb_util.save_mongo(stock_gdfx_free_top_10_em_df, db_name_constant.STOCK_GDFX_FREE_TOP_10)
|
|
178
183
|
|
|
179
184
|
|
|
@@ -182,14 +187,19 @@ def sync_stock_gdfx_top_10(stock_gdfx_top_10_em_df, period, symbol, str_day):
|
|
|
182
187
|
if stock_gdfx_top_10_em_df is not None and stock_gdfx_top_10_em_df.shape[0] > 0:
|
|
183
188
|
stock_gdfx_top_10_em_df['str_day'] = str_day
|
|
184
189
|
stock_gdfx_top_10_em_df['symbol'] = symbol
|
|
185
|
-
stock_gdfx_top_10_em_df['_id'] = symbol +
|
|
190
|
+
stock_gdfx_top_10_em_df['_id'] = symbol + '_' + period+'_'+stock_gdfx_top_10_em_df.shareholder_name
|
|
186
191
|
stock_gdfx_top_10_em_df['period'] = period
|
|
187
192
|
|
|
188
193
|
query_exist = {'symbol': symbol, 'period': period}
|
|
189
|
-
|
|
194
|
+
exist_df = mongodb_util.find_query_data(db_name_constant.STOCK_GDFX_TOP_10, query_exist)
|
|
190
195
|
# 不存在的时候更新创建时间
|
|
191
|
-
if
|
|
196
|
+
if exist_df.shape[0] == 0:
|
|
192
197
|
stock_gdfx_top_10_em_df['create_day'] = str_day
|
|
198
|
+
else:
|
|
199
|
+
if 'create_day' in exist_df.columns:
|
|
200
|
+
stock_gdfx_top_10_em_df['create_day'] = list(exist_df['create_day'])[0]
|
|
201
|
+
else:
|
|
202
|
+
stock_gdfx_top_10_em_df['create_day'] = str_day
|
|
193
203
|
mongodb_util.save_mongo(stock_gdfx_top_10_em_df, db_name_constant.STOCK_GDFX_TOP_10)
|
|
194
204
|
|
|
195
205
|
|
|
@@ -211,4 +221,4 @@ if __name__ == '__main__':
|
|
|
211
221
|
now_date = datetime.now()
|
|
212
222
|
str_day_test = now_date.strftime('%Y-%m-%d')
|
|
213
223
|
logger.info('同步所有股票前十大流通股本')
|
|
214
|
-
|
|
224
|
+
sync_stock_gdfx_free_top_10_one_day(str_day_test)
|
|
@@ -11,7 +11,7 @@ mns_common/api/em/__init__.py,sha256=2U9DiKslxsWwLLEcZKjS8UiQPN1QgALvnK3HiJNIZE0
|
|
|
11
11
|
mns_common/api/em/concept/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
12
12
|
mns_common/api/em/concept/em_concept_index_api.py,sha256=PP87ES8a_y0o3SKLzBsPrc7DCPI3MBCD-4SmoUUirl0,8285
|
|
13
13
|
mns_common/api/em/gd/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
14
|
-
mns_common/api/em/gd/east_money_stock_gdfx_free_top_10_api.py,sha256
|
|
14
|
+
mns_common/api/em/gd/east_money_stock_gdfx_free_top_10_api.py,sha256=XCJ0JQwgHFA2dmhfaxkc0dXlBcE4fAxrh06QgpGlD64,10515
|
|
15
15
|
mns_common/api/em/real_time/__init__.py,sha256=wEg73KlZo-dU0yKGwpA1C2y6LZm4IBb94tNda1tqLeg,163
|
|
16
16
|
mns_common/api/em/real_time/east_money_debt_api.py,sha256=jMvMZtlrDfExl_4jZ1hepHX8rUoeVLoLSOIhRBjkUGk,14753
|
|
17
17
|
mns_common/api/em/real_time/east_money_etf_api.py,sha256=tCyH4fNx-KfVRFuNGkgM8d_xkvR0oAfr8T3e7_XrjTM,14414
|
|
@@ -156,7 +156,7 @@ mns_common/utils/date_handle_util.py,sha256=XS-MyA8_7k35LOCFAYOHgVcVkMft_Kc4Wa9U
|
|
|
156
156
|
mns_common/utils/db_util.py,sha256=hSmfNAN4vEeEaUva6_cicZEhb2jSnib-Gvk2reke1vc,2590
|
|
157
157
|
mns_common/utils/file_util.py,sha256=egWu6PenGPRp_ixrNTHKarT4dAnOT6FETR82EHUZJnQ,1042
|
|
158
158
|
mns_common/utils/ip_util.py,sha256=UTcYfz_uytB__6nlBf7T-izuI7hi4XdB6ET0sJgEel4,969
|
|
159
|
-
mns_common-1.4.3.
|
|
160
|
-
mns_common-1.4.3.
|
|
161
|
-
mns_common-1.4.3.
|
|
162
|
-
mns_common-1.4.3.
|
|
159
|
+
mns_common-1.4.4.3.dist-info/METADATA,sha256=8k3NSSMxbMt_fwRcsf-MkGlPbdkh_kC-yIOTwpWae1U,61
|
|
160
|
+
mns_common-1.4.4.3.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
|
161
|
+
mns_common-1.4.4.3.dist-info/top_level.txt,sha256=ZC58kAR-8Hvc6U2xhYNBNLAh3mb6sZazbdj5nZpvEkQ,11
|
|
162
|
+
mns_common-1.4.4.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|