V2.5.2beta (#1101)

* fix: zap无法在运行时进行切割日志, config.docker.yaml与config.yaml同步 #1094

* feat: 为定时任务增加秒级控制

* feat: 调整代码结构,err更改为后置

* css 样式调整

Co-authored-by: SliverHorn <503551462@qq.com>
Co-authored-by: songzhibin97 <718428482@qq.com>
This commit is contained in:
奇淼(piexlmax
2022-05-28 19:22:23 +08:00
committed by GitHub
parent b25c128051
commit 83141b3564
49 changed files with 490 additions and 456 deletions

View File

@@ -76,7 +76,7 @@ func (s *SystemApiApi) GetApiList(c *gin.Context) {
response.FailWithMessage(err.Error(), c)
return
}
if err, list, total := apiService.GetAPIInfoList(pageInfo.SysApi, pageInfo.PageInfo, pageInfo.OrderKey, pageInfo.Desc); err != nil {
if list, total, err := apiService.GetAPIInfoList(pageInfo.SysApi, pageInfo.PageInfo, pageInfo.OrderKey, pageInfo.Desc); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Error(err))
response.FailWithMessage("获取失败", c)
} else {
@@ -89,7 +89,6 @@ func (s *SystemApiApi) GetApiList(c *gin.Context) {
}
}
// todo
// @Tags SysApi
// @Summary 根据id获取api
// @Security ApiKeyAuth
@@ -105,7 +104,7 @@ func (s *SystemApiApi) GetApiById(c *gin.Context) {
response.FailWithMessage(err.Error(), c)
return
}
err, api := apiService.GetApiById(idInfo.ID)
api, err := apiService.GetApiById(idInfo.ID)
if err != nil {
global.GVA_LOG.Error("获取失败!", zap.Error(err))
response.FailWithMessage("获取失败", c)
@@ -145,7 +144,7 @@ func (s *SystemApiApi) UpdateApi(c *gin.Context) {
// @Success 200 {object} response.Response{data=systemRes.SysAPIListResponse,msg=string} "获取所有的Api 不分页,返回包括api列表"
// @Router /api/getAllApis [post]
func (s *SystemApiApi) GetAllApis(c *gin.Context) {
if err, apis := apiService.GetAllApis(); err != nil {
if apis, err := apiService.GetAllApis(); err != nil {
global.GVA_LOG.Error("获取失败!", zap.Error(err))
response.FailWithMessage("获取失败", c)
} else {