Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mancheng
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mancheng
Commits
dda3c2a7
Commit
dda3c2a7
authored
Feb 15, 2023
by
dong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix202302015
parent
73693353
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
10 deletions
+5
-10
apps/view_360company/view.py
+2
-1
apps/view_atlas/view.py
+3
-9
No files found.
apps/view_360company/view.py
View file @
dda3c2a7
...
...
@@ -239,7 +239,8 @@ def search():
try
:
es
=
Elasticsearch
([{
'host'
:
'39.100.39.50'
,
'port'
:
9200
}])
data
=
es
.
search
(
index
=
"jincheng_pictext_index_202301131004_a6181e52"
,
body
=
body
)
# data = es.search(index="jincheng_pictext_index_202301131004_a6181e52", body=body)
data
=
es
.
search
(
index
=
"jincheng_pictext_index_202302151628_bedd5ee8"
,
body
=
body
)
data_list
=
[]
# print(data_list)
size
=
data
[
"hits"
][
'total'
]
...
...
apps/view_atlas/view.py
View file @
dda3c2a7
...
...
@@ -90,20 +90,14 @@ def get_cluster():
def
industry_cluster
():
req_dic
=
request
.
get_json
()
industry_name
=
req_dic
[
'industry_name'
]
# industry_id = req_dic['industry_id']
flag
=
req_dic
[
'flag'
]
# # 查询redis
# try:
# result = redis_store.get('industry_id_{}'.format(industry_id)).decode()
# except Exception as e:
# current_app.logger.error(e)
# return jsonify(code=RET.DBERR, msg="redis数据库异常")
try
:
industry_obj
=
IndustryChain
.
query
.
filter_by
(
industry_name
=
industry_name
)
.
first
()
industry_id
=
industry_obj
.
id
chain_id
=
industry_obj
.
chain_id
if
flag
==
2
:
# 查询redis
result
=
redis_store
.
get
(
'chain_id_{}'
.
format
(
industry_id
))
if
result
:
...
...
@@ -117,7 +111,7 @@ def industry_cluster():
except
Exception
as
e
:
current_app
.
logger
.
error
(
e
)
return
jsonify
(
code
=
RET
.
DBERR
,
msg
=
"数据异常"
)
if
flag
==
2
:
try
:
redis_store
.
setex
(
"chain_id_
%
s"
%
industry_id
,
constants
.
INDUSTRY_ENTERPRISE_REDIS_EXPIRES
,
json
.
dumps
(
result
))
# 保存发送给这个手机号的记录,防止用户在60s内再次出发发送短信的操作
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment