Commit 04c763f4 by xuxu

修改异常

parent 04f6c9b1
File added
# Default ignored files
/workspace.xml
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/zhichan.iml" filepath="$PROJECT_DIR$/.idea/zhichan.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="PyDocumentationSettings">
<option name="format" value="PLAIN" />
<option name="myDocStringFormat" value="Plain" />
</component>
<component name="TemplatesService">
<option name="TEMPLATE_CONFIGURATION" value="Jinja2" />
<option name="TEMPLATE_FOLDERS">
<list>
<option value="$MODULE_DIR$/entprofile/templates" />
</list>
</option>
</component>
</module>
\ No newline at end of file
No preview for this file type
...@@ -26,10 +26,23 @@ def RecommendationBusinessMain(): ...@@ -26,10 +26,23 @@ def RecommendationBusinessMain():
if request.method == 'POST': if request.method == 'POST':
request_data = request.json request_data = request.json
print(request_data) print(request_data)
if not request_data['industryId'] or not request_data['secondIndustry'] or not request_data['data'] or not request_data['storeTypeId']: try:
return {"status": -1, "msg": "failed", "data": "参数错误"} industryId = request_data['industryId']
result = recommend_function(request_data) secondIndustry = request_data['secondIndustry']
return result data = request_data['data']
storeTypeId = request_data['storeTypeId']
platformCode = request_data['platformCode']
isImports = request_data['isImports']
result = recommend_function(request_data)
return {"status": 0, "msg": "success", "data": result}
except Exception as error:
return {"status": -1, "msg": "failed", "data": str(error)}
if __name__ == '__main__': if __name__ == '__main__':
server.run(debug=True,host='0.0.0.0',port=8081) server.run(debug=True,host='0.0.0.0',port=80)
\ No newline at end of file \ No newline at end of file
...@@ -46,7 +46,8 @@ def recommend_function(select_data): ...@@ -46,7 +46,8 @@ def recommend_function(select_data):
#检测不通过 #检测不通过
if len(have_use) != 0: if len(have_use) != 0:
result_data['isPass'] = False result_data['isPass'] = False
product_result_data = qualificationsproductdao.get_recommend(have_use) have_on_use = list(set(have_use))
product_result_data = qualificationsproductdao.get_recommend(have_on_use)
for product_item in product_result_data: for product_item in product_result_data:
data = { data = {
"id":product_item['product_id'], "id":product_item['product_id'],
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment