Commit 5f4cbb56 authored by 桂秋月's avatar 桂秋月

1

parent 0e28af8c
...@@ -6,10 +6,8 @@ ...@@ -6,10 +6,8 @@
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="65ec9bc1-9334-4fb0-a73d-621c8e760de6" name="Default Changelist" comment=""> <list default="true" id="65ec9bc1-9334-4fb0-a73d-621c8e760de6" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/logs/2022-02-08.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/2022-02-08.log" afterDir="false" /> <change beforePath="$PROJECT_DIR$/logs/2022-02-09.log" beforeDir="false" afterPath="$PROJECT_DIR$/logs/2022-02-09.log" afterDir="false" />
<change beforePath="$PROJECT_DIR$/model_data_api/handler/Automatic_Handler.py" beforeDir="false" afterPath="$PROJECT_DIR$/model_data_api/handler/Automatic_Handler.py" afterDir="false" /> <change beforePath="$PROJECT_DIR$/model_data_api/model/base_model.py" beforeDir="false" afterPath="$PROJECT_DIR$/model_data_api/model/base_model.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/model_data_api/handler/logic.py" beforeDir="false" afterPath="$PROJECT_DIR$/model_data_api/handler/logic.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/startup.py" beforeDir="false" afterPath="$PROJECT_DIR$/startup.py" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />
......
[2022-02-09 14:28:16 autoreload.py:_check_file:201 INFO] /Users/dm/Desktop/python_script/model-data-test/model_data_api/model/base_model.py modified; restarting server
[2022-02-09 14:28:54 autoreload.py:_check_file:201 INFO] /Users/dm/Desktop/python_script/model-data-test/model_data_api/model/base_model.py modified; restarting server
[2022-02-09 14:29:01 autoreload.py:_check_file:201 INFO] /Users/dm/Desktop/python_script/model-data-test/model_data_api/model/base_model.py modified; restarting server
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
# 引入需要的模块 # 引入需要的模块
# from sqlalchemy import create_engine # from sqlalchemy import create_engine
import logging
from sqlalchemy.orm import sessionmaker from sqlalchemy.orm import sessionmaker
# 使用MySQL数据库 # 使用MySQL数据库
from collections import Iterable from collections import Iterable
...@@ -59,7 +61,7 @@ class BaseManager: ...@@ -59,7 +61,7 @@ class BaseManager:
def get_json(self,result): def get_json(self,result):
try: try:
print('base result:',result,type(result)) logging.ERROR('base result:'+str(result)+str(type(result)))
if isinstance(result, Iterable): if isinstance(result, Iterable):
tmp = [dict(zip(res.__dict__.keys(), res.__dict__.values())) for res in result] tmp = [dict(zip(res.__dict__.keys(), res.__dict__.values())) for res in result]
for t in tmp: for t in tmp:
......
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