style: linker
This commit is contained in:
@@ -11,8 +11,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type AutoCodeExampleApi struct {
|
||||
}
|
||||
type AutoCodeExampleApi struct{}
|
||||
|
||||
var autoCodeExampleService = service.ServiceGroupApp.AutoCodeServiceGroup.AutoCodeExampleService
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@ type ApiGroup struct {
|
||||
FileUploadAndDownloadApi
|
||||
}
|
||||
|
||||
var excelService = service.ServiceGroupApp.ExampleServiceGroup.ExcelService
|
||||
var customerService = service.ServiceGroupApp.ExampleServiceGroup.CustomerService
|
||||
var fileUploadAndDownloadService = service.ServiceGroupApp.ExampleServiceGroup.FileUploadAndDownloadService
|
||||
var (
|
||||
excelService = service.ServiceGroupApp.ExampleServiceGroup.ExcelService
|
||||
customerService = service.ServiceGroupApp.ExampleServiceGroup.CustomerService
|
||||
fileUploadAndDownloadService = service.ServiceGroupApp.ExampleServiceGroup.FileUploadAndDownloadService
|
||||
)
|
||||
|
||||
@@ -11,8 +11,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type CustomerApi struct {
|
||||
}
|
||||
type CustomerApi struct{}
|
||||
|
||||
// @Tags ExaCustomer
|
||||
// @Summary 创建客户
|
||||
|
||||
@@ -9,8 +9,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type ExcelApi struct {
|
||||
}
|
||||
type ExcelApi struct{}
|
||||
|
||||
// /excel/importExcel 接口,与upload接口作用类似,只是把文件存到resource/excel目录下,用于导入Excel时存放Excel文件(ExcelImport.xlsx)
|
||||
// /excel/loadExcel接口,用于读取resource/excel目录下的文件((ExcelImport.xlsx)并加载为[]model.SysBaseMenu类型的示例数据
|
||||
|
||||
@@ -10,8 +10,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type FileUploadAndDownloadApi struct {
|
||||
}
|
||||
type FileUploadAndDownloadApi struct{}
|
||||
|
||||
// @Tags ExaFileUploadAndDownload
|
||||
// @Summary 上传文件示例
|
||||
|
||||
@@ -18,17 +18,19 @@ type ApiGroup struct {
|
||||
DictionaryDetailApi
|
||||
}
|
||||
|
||||
var apiService = service.ServiceGroupApp.SystemServiceGroup.ApiService
|
||||
var jwtService = service.ServiceGroupApp.SystemServiceGroup.JwtService
|
||||
var menuService = service.ServiceGroupApp.SystemServiceGroup.MenuService
|
||||
var userService = service.ServiceGroupApp.SystemServiceGroup.UserService
|
||||
var initDBService = service.ServiceGroupApp.SystemServiceGroup.InitDBService
|
||||
var casbinService = service.ServiceGroupApp.SystemServiceGroup.CasbinService
|
||||
var autoCodeService = service.ServiceGroupApp.SystemServiceGroup.AutoCodeService
|
||||
var baseMenuService = service.ServiceGroupApp.SystemServiceGroup.BaseMenuService
|
||||
var authorityService = service.ServiceGroupApp.SystemServiceGroup.AuthorityService
|
||||
var dictionaryService = service.ServiceGroupApp.SystemServiceGroup.DictionaryService
|
||||
var systemConfigService = service.ServiceGroupApp.SystemServiceGroup.SystemConfigService
|
||||
var operationRecordService = service.ServiceGroupApp.SystemServiceGroup.OperationRecordService
|
||||
var autoCodeHistoryService = service.ServiceGroupApp.SystemServiceGroup.AutoCodeHistoryService
|
||||
var dictionaryDetailService = service.ServiceGroupApp.SystemServiceGroup.DictionaryDetailService
|
||||
var (
|
||||
apiService = service.ServiceGroupApp.SystemServiceGroup.ApiService
|
||||
jwtService = service.ServiceGroupApp.SystemServiceGroup.JwtService
|
||||
menuService = service.ServiceGroupApp.SystemServiceGroup.MenuService
|
||||
userService = service.ServiceGroupApp.SystemServiceGroup.UserService
|
||||
initDBService = service.ServiceGroupApp.SystemServiceGroup.InitDBService
|
||||
casbinService = service.ServiceGroupApp.SystemServiceGroup.CasbinService
|
||||
autoCodeService = service.ServiceGroupApp.SystemServiceGroup.AutoCodeService
|
||||
baseMenuService = service.ServiceGroupApp.SystemServiceGroup.BaseMenuService
|
||||
authorityService = service.ServiceGroupApp.SystemServiceGroup.AuthorityService
|
||||
dictionaryService = service.ServiceGroupApp.SystemServiceGroup.DictionaryService
|
||||
systemConfigService = service.ServiceGroupApp.SystemServiceGroup.SystemConfigService
|
||||
operationRecordService = service.ServiceGroupApp.SystemServiceGroup.OperationRecordService
|
||||
autoCodeHistoryService = service.ServiceGroupApp.SystemServiceGroup.AutoCodeHistoryService
|
||||
dictionaryDetailService = service.ServiceGroupApp.SystemServiceGroup.DictionaryDetailService
|
||||
)
|
||||
|
||||
@@ -13,8 +13,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type SystemApiApi struct {
|
||||
}
|
||||
type SystemApiApi struct{}
|
||||
|
||||
// @Tags SysApi
|
||||
// @Summary 创建基础api
|
||||
|
||||
@@ -13,8 +13,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type AuthorityApi struct {
|
||||
}
|
||||
type AuthorityApi struct{}
|
||||
|
||||
// @Tags Authority
|
||||
// @Summary 创建角色
|
||||
|
||||
@@ -10,11 +10,10 @@ import (
|
||||
)
|
||||
|
||||
// 当开启多服务器部署时,替换下面的配置,使用redis共享存储验证码
|
||||
//var store = captcha.NewDefaultRedisStore()
|
||||
// var store = captcha.NewDefaultRedisStore()
|
||||
var store = base64Captcha.DefaultMemStore
|
||||
|
||||
type BaseApi struct {
|
||||
}
|
||||
type BaseApi struct{}
|
||||
|
||||
// @Tags Base
|
||||
// @Summary 生成验证码
|
||||
@@ -27,7 +26,7 @@ func (b *BaseApi) Captcha(c *gin.Context) {
|
||||
// 字符,公式,验证码配置
|
||||
// 生成默认数字的driver
|
||||
driver := base64Captcha.NewDriverDigit(global.GVA_CONFIG.Captcha.ImgHeight, global.GVA_CONFIG.Captcha.ImgWidth, global.GVA_CONFIG.Captcha.KeyLong, 0.7, 80)
|
||||
//cp := base64Captcha.NewCaptcha(driver, store.UseWithCtx(c)) // v8下使用redis
|
||||
// cp := base64Captcha.NewCaptcha(driver, store.UseWithCtx(c)) // v8下使用redis
|
||||
cp := base64Captcha.NewCaptcha(driver, store)
|
||||
if id, b64s, err := cp.Generate(); err != nil {
|
||||
global.GVA_LOG.Error("验证码获取失败!", zap.Error(err))
|
||||
|
||||
@@ -10,8 +10,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type CasbinApi struct {
|
||||
}
|
||||
type CasbinApi struct{}
|
||||
|
||||
// @Tags Casbin
|
||||
// @Summary 更新角色api权限
|
||||
|
||||
@@ -10,8 +10,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type DictionaryApi struct {
|
||||
}
|
||||
type DictionaryApi struct{}
|
||||
|
||||
// @Tags SysDictionary
|
||||
// @Summary 创建SysDictionary
|
||||
|
||||
@@ -10,8 +10,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type DictionaryDetailApi struct {
|
||||
}
|
||||
type DictionaryDetailApi struct{}
|
||||
|
||||
// @Tags SysDictionaryDetail
|
||||
// @Summary 创建SysDictionaryDetail
|
||||
|
||||
@@ -8,8 +8,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type JwtApi struct {
|
||||
}
|
||||
type JwtApi struct{}
|
||||
|
||||
// @Tags Jwt
|
||||
// @Summary jwt加入黑名单
|
||||
|
||||
@@ -13,8 +13,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type AuthorityMenuApi struct {
|
||||
}
|
||||
type AuthorityMenuApi struct{}
|
||||
|
||||
// @Tags AuthorityMenu
|
||||
// @Summary 获取用户动态路由
|
||||
|
||||
@@ -11,8 +11,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type OperationRecordApi struct {
|
||||
}
|
||||
type OperationRecordApi struct{}
|
||||
|
||||
// @Tags SysOperationRecord
|
||||
// @Summary 创建SysOperationRecord
|
||||
|
||||
@@ -11,8 +11,7 @@ import (
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type SystemApi struct {
|
||||
}
|
||||
type SystemApi struct{}
|
||||
|
||||
// @Tags System
|
||||
// @Summary 获取配置文件内容
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"strconv"
|
||||
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/global"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
|
||||
@@ -8,7 +10,6 @@ import (
|
||||
systemReq "github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
|
||||
systemRes "github.com/flipped-aurora/gin-vue-admin/server/model/system/response"
|
||||
"github.com/flipped-aurora/gin-vue-admin/server/utils"
|
||||
"strconv"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/go-redis/redis/v8"
|
||||
|
||||
Reference in New Issue
Block a user