增加导出json方式
This commit is contained in:
1 parent
767b09c84e
commit
2078619916
4 files changed
+35
-5
No files matched your search
+10
-2
@@ -335,15 +335,23 @@ def export():
|
||||
return ReJson(1002, body={"start_time": start_time, "end_time": end_time})
|
||||
|
||||
elif export_type == "csv":
|
||||
outpath = os.path.join(outpath, username)
|
||||
if not os.path.exists(outpath):
|
||||
os.makedirs(outpath)
|
||||
code, ret = analyzer.export_csv(username, os.path.join(outpath, username), read_session(g.sf, "msg_path"))
|
||||
code, ret = analyzer.export_csv(username, outpath, read_session(g.sf, "msg_path"))
|
||||
if code:
|
||||
return ReJson(0, ret)
|
||||
else:
|
||||
return ReJson(2001, body=ret)
|
||||
elif export_type == "json":
|
||||
pass
|
||||
outpath = os.path.join(outpath, username)
|
||||
if not os.path.exists(outpath):
|
||||
os.makedirs(outpath)
|
||||
code, ret = analyzer.export_json(username, outpath, read_session(g.sf, "msg_path"))
|
||||
if code:
|
||||
return ReJson(0, ret)
|
||||
else:
|
||||
return ReJson(2001, body=ret)
|
||||
elif export_type == "html":
|
||||
chat_type_tups = []
|
||||
for ct in chat_type:
|
||||
|
||||
Reference in new issue
Block a user