|
@@ -124,7 +124,7 @@ class TaskDetail(BaseModel):
|
|
source_name: str = Field('内部创意', description='数据来源名称')
|
|
source_name: str = Field('内部创意', description='数据来源名称')
|
|
query_word: str = Field('红包', description='关键词')
|
|
query_word: str = Field('红包', description='关键词')
|
|
stat_date: str = Field('2021-11-11', description='日期')
|
|
stat_date: str = Field('2021-11-11', description='日期')
|
|
- script_num: int = Field(180, description='脚本数量')
|
|
|
|
|
|
+ script_num: str = Field('', description='脚本数量')
|
|
task_status: str = Field('执行成功', description='状态')
|
|
task_status: str = Field('执行成功', description='状态')
|
|
number: int = Field(0, description='序号')
|
|
number: int = Field(0, description='序号')
|
|
|
|
|
|
@@ -347,6 +347,11 @@ def get_query_word_task_info_lst(item: QueryWordTaskInfoLst):
|
|
df = df[['source_name', 'query_word', 'stat_date', 'script_num', 'task_status']]
|
|
df = df[['source_name', 'query_word', 'stat_date', 'script_num', 'task_status']]
|
|
df.sort_values(['stat_date', 'source_name', 'query_word'], ascending=False, inplace=True)
|
|
df.sort_values(['stat_date', 'source_name', 'query_word'], ascending=False, inplace=True)
|
|
df['number'] = list(range(1, len(df) + 1))
|
|
df['number'] = list(range(1, len(df) + 1))
|
|
|
|
+
|
|
|
|
+ # script_num 字段类型由 np.array 转化为 str 类型,解决返回 np.nan 时, responseModel 验证不通过
|
|
|
|
+ df['script_num'] = df['script_num'].astype(str)
|
|
|
|
+ df.replace('nan', '', inplace=True)
|
|
|
|
+
|
|
total_num = df.shape[0]
|
|
total_num = df.shape[0]
|
|
detail = df.iloc[(item.page_num - 1) * item.page_size: item.page_num * item.page_size].to_dict('records')
|
|
detail = df.iloc[(item.page_num - 1) * item.page_size: item.page_num * item.page_size].to_dict('records')
|
|
|
|
|