|
@@ -43,7 +43,8 @@ pd.set_option('display.max_rows', None)
|
|
def get_and_update_gh_ids(run_dt):
|
|
def get_and_update_gh_ids(run_dt):
|
|
gh = get_odps_df_of_max_partition(ODS_PROJECT, GH_DETAIL, {'dt': run_dt})
|
|
gh = get_odps_df_of_max_partition(ODS_PROJECT, GH_DETAIL, {'dt': run_dt})
|
|
gh = gh.to_pandas()
|
|
gh = gh.to_pandas()
|
|
- gh = gh[gh['type'] == AutoReplyAccountType.SELF_OWNED_GZH.value]
|
|
|
|
|
|
+ gh_type = AutoReplyAccountType.SELF_OWNED_GZH.value
|
|
|
|
+ gh = gh.query(f'type == {gh_type} and is_delete == 0')
|
|
# default单独处理
|
|
# default单独处理
|
|
if 'default' not in gh['gh_id'].values:
|
|
if 'default' not in gh['gh_id'].values:
|
|
new_row = pd.DataFrame({'gh_id': ['default'], 'gh_name': ['默认'], 'type': [2], 'category1': ['泛生活']},
|
|
new_row = pd.DataFrame({'gh_id': ['default'], 'gh_name': ['默认'], 'type': [2], 'category1': ['泛生活']},
|