!15 RuoYi-Vue3-FastAPI v1.3.1
Merge pull request !15 from insistence/develop
This commit is contained in:
11
README.md
11
README.md
@@ -1,22 +1,17 @@
|
|||||||
<p align="center">
|
<p align="center">
|
||||||
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-d3d0a9303e11d522a06cd263f3079027715.png">
|
<img alt="logo" src="https://oscimg.oschina.net/oscnet/up-d3d0a9303e11d522a06cd263f3079027715.png">
|
||||||
</p>
|
</p>
|
||||||
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi-Vue3-FastAPI v1.3.0</h1>
|
<h1 align="center" style="margin: 30px 0 30px; font-weight: bold;">RuoYi-Vue3-FastAPI v1.3.1</h1>
|
||||||
<h4 align="center">基于RuoYi-Vue3+FastAPI前后端分离的快速开发框架</h4>
|
<h4 align="center">基于RuoYi-Vue3+FastAPI前后端分离的快速开发框架</h4>
|
||||||
<p align="center">
|
<p align="center">
|
||||||
<a href="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI/stargazers"><img src="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI/badge/star.svg?theme=dark"></a>
|
<a href="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI/stargazers"><img src="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI/badge/star.svg?theme=dark"></a>
|
||||||
<a href="https://github.com/insistence/RuoYi-Vue3-FastAPI"><img src="https://img.shields.io/github/stars/insistence/RuoYi-Vue3-FastAPI?style=social"></a>
|
<a href="https://github.com/insistence/RuoYi-Vue3-FastAPI"><img src="https://img.shields.io/github/stars/insistence/RuoYi-Vue3-FastAPI?style=social"></a>
|
||||||
<a href="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI"><img src="https://img.shields.io/badge/RuoYiVue3FastAPI-v1.3.0-brightgreen.svg"></a>
|
<a href="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI"><img src="https://img.shields.io/badge/RuoYiVue3FastAPI-v1.3.1-brightgreen.svg"></a>
|
||||||
<a href="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
<a href="https://gitee.com/insistence2022/RuoYi-Vue3-FastAPI/blob/master/LICENSE"><img src="https://img.shields.io/github/license/mashape/apistatus.svg"></a>
|
||||||
<img src="https://img.shields.io/badge/python-≥3.8-blue">
|
<img src="https://img.shields.io/badge/python-≥3.9-blue">
|
||||||
<img src="https://img.shields.io/badge/MySQL-≥5.7-blue">
|
<img src="https://img.shields.io/badge/MySQL-≥5.7-blue">
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## 平台简介
|
## 平台简介
|
||||||
|
|
||||||
RuoYi-Vue3-FastAPI是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
RuoYi-Vue3-FastAPI是一套全部开源的快速开发平台,毫无保留给个人及企业免费使用。
|
||||||
|
@@ -10,7 +10,7 @@ APP_HOST = '0.0.0.0'
|
|||||||
# 应用端口
|
# 应用端口
|
||||||
APP_PORT = 9099
|
APP_PORT = 9099
|
||||||
# 应用版本
|
# 应用版本
|
||||||
APP_VERSION= '1.3.0'
|
APP_VERSION= '1.3.1'
|
||||||
# 应用是否开启热重载
|
# 应用是否开启热重载
|
||||||
APP_RELOAD = true
|
APP_RELOAD = true
|
||||||
# 应用是否开启IP归属区域查询
|
# 应用是否开启IP归属区域查询
|
||||||
|
@@ -10,7 +10,7 @@ APP_HOST = '0.0.0.0'
|
|||||||
# 应用端口
|
# 应用端口
|
||||||
APP_PORT = 9099
|
APP_PORT = 9099
|
||||||
# 应用版本
|
# 应用版本
|
||||||
APP_VERSION= '1.3.0'
|
APP_VERSION= '1.3.1'
|
||||||
# 应用是否开启热重载
|
# 应用是否开启热重载
|
||||||
APP_RELOAD = false
|
APP_RELOAD = false
|
||||||
# 应用是否开启IP归属区域查询
|
# 应用是否开启IP归属区域查询
|
||||||
|
@@ -76,7 +76,7 @@ class JobConstant:
|
|||||||
"""
|
"""
|
||||||
定时任务常量
|
定时任务常量
|
||||||
|
|
||||||
JOB_ERROR_LIST: 定时任务禁止调用模块列表
|
JOB_ERROR_LIST: 定时任务禁止调用模块及违规字符串列表
|
||||||
JOB_WHITE_LIST: 定时任务允许调用模块列表
|
JOB_WHITE_LIST: 定时任务允许调用模块列表
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -84,11 +84,46 @@ class JobConstant:
|
|||||||
'app',
|
'app',
|
||||||
'config',
|
'config',
|
||||||
'exceptions',
|
'exceptions',
|
||||||
|
'import ',
|
||||||
'middlewares',
|
'middlewares',
|
||||||
'module_admin',
|
'module_admin',
|
||||||
|
'open(',
|
||||||
|
'os.',
|
||||||
'server',
|
'server',
|
||||||
'sub_applications',
|
'sub_applications',
|
||||||
|
'subprocess.',
|
||||||
|
'sys.',
|
||||||
'utils',
|
'utils',
|
||||||
|
'while ',
|
||||||
|
'__import__',
|
||||||
|
'"',
|
||||||
|
"'",
|
||||||
|
',',
|
||||||
|
'?',
|
||||||
|
':',
|
||||||
|
';',
|
||||||
|
'/',
|
||||||
|
'|',
|
||||||
|
'+',
|
||||||
|
'-',
|
||||||
|
'=',
|
||||||
|
'~',
|
||||||
|
'!',
|
||||||
|
'#',
|
||||||
|
'$',
|
||||||
|
'%',
|
||||||
|
'^',
|
||||||
|
'&',
|
||||||
|
'*',
|
||||||
|
'<',
|
||||||
|
'>',
|
||||||
|
'(',
|
||||||
|
')',
|
||||||
|
'[',
|
||||||
|
']',
|
||||||
|
'{',
|
||||||
|
'}',
|
||||||
|
' ',
|
||||||
]
|
]
|
||||||
JOB_WHITE_LIST = ['module_task']
|
JOB_WHITE_LIST = ['module_task']
|
||||||
|
|
||||||
|
@@ -15,6 +15,8 @@ from module_admin.service.log_service import LoginLogService, OperationLogServic
|
|||||||
from module_admin.service.login_service import LoginService
|
from module_admin.service.login_service import LoginService
|
||||||
from config.enums import BusinessType
|
from config.enums import BusinessType
|
||||||
from config.env import AppConfig
|
from config.env import AppConfig
|
||||||
|
from exceptions.exception import LoginException, ServiceException, ServiceWarning
|
||||||
|
from utils.response_util import ResponseUtil
|
||||||
|
|
||||||
|
|
||||||
class Log:
|
class Log:
|
||||||
@@ -111,8 +113,17 @@ class Log:
|
|||||||
loginTime=oper_time.strftime('%Y-%m-%d %H:%M:%S'),
|
loginTime=oper_time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||||
)
|
)
|
||||||
kwargs['form_data'].login_info = login_log
|
kwargs['form_data'].login_info = login_log
|
||||||
# 调用原始函数
|
try:
|
||||||
result = await func(*args, **kwargs)
|
# 调用原始函数
|
||||||
|
result = await func(*args, **kwargs)
|
||||||
|
except LoginException as e:
|
||||||
|
result = ResponseUtil.failure(data=e.data, msg=e.message)
|
||||||
|
except ServiceException as e:
|
||||||
|
result = ResponseUtil.error(data=e.data, msg=e.message)
|
||||||
|
except ServiceWarning as e:
|
||||||
|
result = ResponseUtil.failure(data=e.data, msg=e.message)
|
||||||
|
except Exception as e:
|
||||||
|
result = ResponseUtil.error(msg=str(e))
|
||||||
# 获取请求耗时
|
# 获取请求耗时
|
||||||
cost_time = float(time.time() - start_time) * 100
|
cost_time = float(time.time() - start_time) * 100
|
||||||
# 判断请求是否来自api文档
|
# 判断请求是否来自api文档
|
||||||
@@ -281,8 +292,17 @@ def log_decorator(
|
|||||||
loginTime=oper_time.strftime('%Y-%m-%d %H:%M:%S'),
|
loginTime=oper_time.strftime('%Y-%m-%d %H:%M:%S'),
|
||||||
)
|
)
|
||||||
kwargs['form_data'].login_info = login_log
|
kwargs['form_data'].login_info = login_log
|
||||||
# 调用原始函数
|
try:
|
||||||
result = await func(*args, **kwargs)
|
# 调用原始函数
|
||||||
|
result = await func(*args, **kwargs)
|
||||||
|
except LoginException as e:
|
||||||
|
result = ResponseUtil.failure(data=e.data, msg=e.message)
|
||||||
|
except ServiceException as e:
|
||||||
|
result = ResponseUtil.error(data=e.data, msg=e.message)
|
||||||
|
except ServiceWarning as e:
|
||||||
|
result = ResponseUtil.failure(data=e.data, msg=e.message)
|
||||||
|
except Exception as e:
|
||||||
|
result = ResponseUtil.error(msg=str(e))
|
||||||
# 获取请求耗时
|
# 获取请求耗时
|
||||||
cost_time = float(time.time() - start_time) * 100
|
cost_time = float(time.time() - start_time) * 100
|
||||||
# 判断请求是否来自api文档
|
# 判断请求是否来自api文档
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "vfadmin",
|
"name": "vfadmin",
|
||||||
"version": "1.3.0",
|
"version": "1.3.1",
|
||||||
"description": "vfadmin管理系统",
|
"description": "vfadmin管理系统",
|
||||||
"author": "insistence",
|
"author": "insistence",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
Reference in New Issue
Block a user