Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FLIPPED-AURORA
gin-vue-admin
提交
1ecd5803
G
gin-vue-admin
项目概览
FLIPPED-AURORA
/
gin-vue-admin
大约 1 年 前同步成功
通知
333
Star
18155
Fork
5506
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gin-vue-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
1ecd5803
编写于
8月 07, 2021
作者:
Mr.奇淼(
提交者:
GitHub
8月 07, 2021
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into master
上级
4517e07e
734d8b6b
变更
15
展开全部
显示空白变更内容
内联
并排
Showing
15 changed file
with
1297 addition
and
741 deletion
+1297
-741
server/api/v1/autocode/autocodeExample.go
server/api/v1/autocode/autocodeExample.go
+2
-2
server/api/v1/example/exa_customer.go
server/api/v1/example/exa_customer.go
+2
-2
server/api/v1/system/sys_captcha.go
server/api/v1/system/sys_captcha.go
+2
-1
server/api/v1/system/sys_dictionary.go
server/api/v1/system/sys_dictionary.go
+2
-2
server/api/v1/system/sys_dictionary_detail.go
server/api/v1/system/sys_dictionary_detail.go
+2
-2
server/api/v1/system/sys_operation_record.go
server/api/v1/system/sys_operation_record.go
+2
-2
server/api/v1/system/sys_user.go
server/api/v1/system/sys_user.go
+1
-1
server/docs/docs.go
server/docs/docs.go
+466
-259
server/docs/swagger.json
server/docs/swagger.json
+466
-259
server/docs/swagger.yaml
server/docs/swagger.yaml
+324
-198
server/go.mod
server/go.mod
+0
-2
server/resource/template/server/api.go.tpl
server/resource/template/server/api.go.tpl
+2
-2
server/resource/template/web/api.js.tpl
server/resource/template/web/api.js.tpl
+2
-2
server/service/system/sys_autocode_history.go
server/service/system/sys_autocode_history.go
+12
-1
server/utils/captcha/redis.go
server/utils/captcha/redis.go
+12
-6
未找到文件。
server/api/v1/autocode/autocodeExample.go
浏览文件 @
1ecd5803
...
...
@@ -78,7 +78,7 @@ func (autoCodeExampleApi *AutoCodeExampleApi) UpdateAutoCodeExample(c *gin.Conte
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y autocode.AutoCodeExample true "用id查询AutoCodeExample"
// @Param data
quer
y autocode.AutoCodeExample true "用id查询AutoCodeExample"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /autoCodeExample/findAutoCodeExample [get]
func
(
autoCodeExampleApi
*
AutoCodeExampleApi
)
FindAutoCodeExample
(
c
*
gin
.
Context
)
{
...
...
@@ -101,7 +101,7 @@ func (autoCodeExampleApi *AutoCodeExampleApi) FindAutoCodeExample(c *gin.Context
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y autocodeReq.AutoCodeExampleSearch true "页码, 每页大小, 搜索条件"
// @Param data
quer
y autocodeReq.AutoCodeExampleSearch true "页码, 每页大小, 搜索条件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /autoCodeExample/getAutoCodeExampleList [get]
func
(
autoCodeExampleApi
*
AutoCodeExampleApi
)
GetAutoCodeExampleList
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/example/exa_customer.go
浏览文件 @
1ecd5803
...
...
@@ -94,7 +94,7 @@ func (e *CustomerApi) UpdateExaCustomer(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y example.ExaCustomer true "客户ID"
// @Param data
quer
y example.ExaCustomer true "客户ID"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/customer [get]
func
(
e
*
CustomerApi
)
GetExaCustomer
(
c
*
gin
.
Context
)
{
...
...
@@ -118,7 +118,7 @@ func (e *CustomerApi) GetExaCustomer(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y request.PageInfo true "页码, 每页大小"
// @Param data
quer
y request.PageInfo true "页码, 每页大小"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /customer/customerList [get]
func
(
e
*
CustomerApi
)
GetExaCustomerList
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/system/sys_captcha.go
浏览文件 @
1ecd5803
...
...
@@ -10,7 +10,7 @@ import (
)
// 当开启多服务器部署时,替换下面的配置,使用redis共享存储验证码
//
var store = captcha.NewDefaultRedisStore()
//var store = captcha.NewDefaultRedisStore()
var
store
=
base64Captcha
.
DefaultMemStore
type
BaseApi
struct
{
...
...
@@ -27,6 +27,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
)
if
id
,
b64s
,
err
:=
cp
.
Generate
();
err
!=
nil
{
global
.
GVA_LOG
.
Error
(
"验证码获取失败!"
,
zap
.
Any
(
"err"
,
err
))
...
...
server/api/v1/system/sys_dictionary.go
浏览文件 @
1ecd5803
...
...
@@ -75,7 +75,7 @@ func (s *DictionaryApi) UpdateSysDictionary(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y system.SysDictionary true "ID或字典英名"
// @Param data
quer
y system.SysDictionary true "ID或字典英名"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /sysDictionary/findSysDictionary [get]
func
(
s
*
DictionaryApi
)
FindSysDictionary
(
c
*
gin
.
Context
)
{
...
...
@@ -94,7 +94,7 @@ func (s *DictionaryApi) FindSysDictionary(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y request.SysDictionarySearch true "页码, 每页大小, 搜索条件"
// @Param data
quer
y request.SysDictionarySearch true "页码, 每页大小, 搜索条件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /sysDictionary/getSysDictionaryList [get]
func
(
s
*
DictionaryApi
)
GetSysDictionaryList
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/system/sys_dictionary_detail.go
浏览文件 @
1ecd5803
...
...
@@ -75,7 +75,7 @@ func (s *DictionaryDetailApi) UpdateSysDictionaryDetail(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y system.SysDictionaryDetail true "用id查询SysDictionaryDetail"
// @Param data
quer
y system.SysDictionaryDetail true "用id查询SysDictionaryDetail"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /sysDictionaryDetail/findSysDictionaryDetail [get]
func
(
s
*
DictionaryDetailApi
)
FindSysDictionaryDetail
(
c
*
gin
.
Context
)
{
...
...
@@ -98,7 +98,7 @@ func (s *DictionaryDetailApi) FindSysDictionaryDetail(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y request.SysDictionaryDetailSearch true "页码, 每页大小, 搜索条件"
// @Param data
quer
y request.SysDictionaryDetailSearch true "页码, 每页大小, 搜索条件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /sysDictionaryDetail/getSysDictionaryDetailList [get]
func
(
s
*
DictionaryDetailApi
)
GetSysDictionaryDetailList
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/system/sys_operation_record.go
浏览文件 @
1ecd5803
...
...
@@ -76,7 +76,7 @@ func (s *OperationRecordApi) DeleteSysOperationRecordByIds(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y system.SysOperationRecord true "Id"
// @Param data
quer
y system.SysOperationRecord true "Id"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /sysOperationRecord/findSysOperationRecord [get]
func
(
s
*
OperationRecordApi
)
FindSysOperationRecord
(
c
*
gin
.
Context
)
{
...
...
@@ -99,7 +99,7 @@ func (s *OperationRecordApi) FindSysOperationRecord(c *gin.Context) {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y request.SysOperationRecordSearch true "页码, 每页大小, 搜索条件"
// @Param data
quer
y request.SysOperationRecordSearch true "页码, 每页大小, 搜索条件"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /sysOperationRecord/getSysOperationRecordList [get]
func
(
s
*
OperationRecordApi
)
GetSysOperationRecordList
(
c
*
gin
.
Context
)
{
...
...
server/api/v1/system/sys_user.go
浏览文件 @
1ecd5803
...
...
@@ -14,7 +14,7 @@ import (
"github.com/dgrijalva/jwt-go"
"github.com/gin-gonic/gin"
"github.com/go-redis/redis"
"github.com/go-redis/redis
/v8
"
"go.uber.org/zap"
)
...
...
server/docs/docs.go
浏览文件 @
1ecd5803
此差异已折叠。
点击以展开。
server/docs/swagger.json
浏览文件 @
1ecd5803
此差异已折叠。
点击以展开。
server/docs/swagger.yaml
浏览文件 @
1ecd5803
...
...
@@ -387,27 +387,6 @@ definitions:
$ref
:
'
#/definitions/system.SysBaseMenu'
type
:
array
type
:
object
request.AutoCodeExampleSearch
:
properties
:
autoCodeExampleField
:
description
:
展示值
type
:
string
createdAt
:
description
:
创建时间
type
:
string
id
:
description
:
主键ID
type
:
integer
page
:
description
:
页码
type
:
integer
pageSize
:
description
:
每页大小
type
:
integer
updatedAt
:
description
:
更新时间
type
:
string
type
:
object
request.AutoHistoryByID
:
properties
:
id
:
...
...
@@ -588,123 +567,6 @@ definitions:
description
:
每页大小
type
:
integer
type
:
object
request.SysDictionaryDetailSearch
:
properties
:
createdAt
:
description
:
创建时间
type
:
string
id
:
description
:
主键ID
type
:
integer
label
:
description
:
展示值
type
:
string
page
:
description
:
页码
type
:
integer
pageSize
:
description
:
每页大小
type
:
integer
sort
:
description
:
排序标记
type
:
integer
status
:
description
:
启用状态
type
:
boolean
sysDictionaryID
:
description
:
关联标记
type
:
integer
updatedAt
:
description
:
更新时间
type
:
string
value
:
description
:
字典值
type
:
integer
type
:
object
request.SysDictionarySearch
:
properties
:
createdAt
:
description
:
创建时间
type
:
string
desc
:
description
:
描述
type
:
string
id
:
description
:
主键ID
type
:
integer
name
:
description
:
字典名(中)
type
:
string
page
:
description
:
页码
type
:
integer
pageSize
:
description
:
每页大小
type
:
integer
status
:
description
:
状态
type
:
boolean
sysDictionaryDetails
:
items
:
$ref
:
'
#/definitions/system.SysDictionaryDetail'
type
:
array
type
:
description
:
字典名(英)
type
:
string
updatedAt
:
description
:
更新时间
type
:
string
type
:
object
request.SysOperationRecordSearch
:
properties
:
agent
:
description
:
代理
type
:
string
body
:
description
:
请求Body
type
:
string
createdAt
:
description
:
创建时间
type
:
string
error_message
:
description
:
错误信息
type
:
string
id
:
description
:
主键ID
type
:
integer
ip
:
description
:
请求ip
type
:
string
latency
:
description
:
延迟
type
:
string
method
:
description
:
请求方法
type
:
string
page
:
description
:
页码
type
:
integer
pageSize
:
description
:
每页大小
type
:
integer
path
:
description
:
请求路径
type
:
string
resp
:
description
:
响应Body
type
:
string
status
:
description
:
请求状态
type
:
integer
updatedAt
:
description
:
更新时间
type
:
string
user
:
$ref
:
'
#/definitions/system.SysUser'
user_id
:
description
:
用户id
type
:
integer
type
:
object
response.SysAuthorityCopyResponse
:
properties
:
authority
:
...
...
@@ -1659,12 +1521,22 @@ paths:
consumes
:
-
application/json
parameters
:
-
description
:
用id查询AutoCodeExample
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/autocode.AutoCodeExample'
-
description
:
展示值
in
:
query
name
:
autoCodeExampleField
type
:
string
-
description
:
创建时间
in
:
query
name
:
createdAt
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
produces
:
-
application/json
responses
:
...
...
@@ -1682,12 +1554,30 @@ paths:
consumes
:
-
application/json
parameters
:
-
description
:
页码, 每页大小, 搜索条件
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/request.AutoCodeExampleSearch'
-
description
:
展示值
in
:
query
name
:
autoCodeExampleField
type
:
string
-
description
:
创建时间
in
:
query
name
:
createdAt
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
页码
in
:
query
name
:
page
type
:
integer
-
description
:
每页大小
in
:
query
name
:
pageSize
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
produces
:
-
application/json
responses
:
...
...
@@ -1831,12 +1721,34 @@ paths:
consumes
:
-
application/json
parameters
:
-
description
:
客户ID
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/example.ExaCustomer'
-
description
:
创建时间
in
:
query
name
:
createdAt
type
:
string
-
description
:
客户名
in
:
query
name
:
customerName
type
:
string
-
description
:
客户手机号
in
:
query
name
:
customerPhoneData
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
管理角色ID
in
:
query
name
:
sysUserAuthorityID
type
:
string
-
description
:
管理ID
in
:
query
name
:
sysUserId
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
produces
:
-
application/json
responses
:
...
...
@@ -1898,12 +1810,14 @@ paths:
consumes
:
-
application/json
parameters
:
-
description
:
页码, 每页大小
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/request.PageInfo'
-
description
:
页码
in
:
query
name
:
page
type
:
integer
-
description
:
每页大小
in
:
query
name
:
pageSize
type
:
integer
produces
:
-
application/json
responses
:
...
...
@@ -2438,12 +2352,34 @@ paths:
consumes
:
-
application/json
parameters
:
-
description
:
ID或字典英名
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/system.SysDictionary'
-
description
:
创建时间
in
:
query
name
:
createdAt
type
:
string
-
description
:
描述
in
:
query
name
:
desc
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
字典名(中)
in
:
query
name
:
name
type
:
string
-
description
:
状态
in
:
query
name
:
status
type
:
boolean
-
description
:
字典名(英)
in
:
query
name
:
type
type
:
string
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
produces
:
-
application/json
responses
:
...
...
@@ -2461,12 +2397,42 @@ paths:
consumes
:
-
application/json
parameters
:
-
description
:
页码, 每页大小, 搜索条件
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/request.SysDictionarySearch'
-
description
:
创建时间
in
:
query
name
:
createdAt
type
:
string
-
description
:
描述
in
:
query
name
:
desc
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
字典名(中)
in
:
query
name
:
name
type
:
string
-
description
:
页码
in
:
query
name
:
page
type
:
integer
-
description
:
每页大小
in
:
query
name
:
pageSize
type
:
integer
-
description
:
状态
in
:
query
name
:
status
type
:
boolean
-
description
:
字典名(英)
in
:
query
name
:
type
type
:
string
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
produces
:
-
application/json
responses
:
...
...
@@ -2553,12 +2519,38 @@ paths:
consumes
:
-
application/json
parameters
:
-
description
:
用id查询SysDictionaryDetail
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/system.SysDictionaryDetail'
-
description
:
创建时间
in
:
query
name
:
createdAt
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
展示值
in
:
query
name
:
label
type
:
string
-
description
:
排序标记
in
:
query
name
:
sort
type
:
integer
-
description
:
启用状态
in
:
query
name
:
status
type
:
boolean
-
description
:
关联标记
in
:
query
name
:
sysDictionaryID
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
-
description
:
字典值
in
:
query
name
:
value
type
:
integer
produces
:
-
application/json
responses
:
...
...
@@ -2576,12 +2568,46 @@ paths:
consumes
:
-
application/json
parameters
:
-
description
:
页码, 每页大小, 搜索条件
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/request.SysDictionaryDetailSearch'
-
description
:
创建时间
in
:
query
name
:
createdAt
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
展示值
in
:
query
name
:
label
type
:
string
-
description
:
页码
in
:
query
name
:
page
type
:
integer
-
description
:
每页大小
in
:
query
name
:
pageSize
type
:
integer
-
description
:
排序标记
in
:
query
name
:
sort
type
:
integer
-
description
:
启用状态
in
:
query
name
:
status
type
:
boolean
-
description
:
关联标记
in
:
query
name
:
sysDictionaryID
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
-
description
:
字典值
in
:
query
name
:
value
type
:
integer
produces
:
-
application/json
responses
:
...
...
@@ -2691,12 +2717,58 @@ paths:
consumes
:
-
application/json
parameters
:
-
description
:
Id
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/system.SysOperationRecord'
-
description
:
代理
in
:
query
name
:
agent
type
:
string
-
description
:
请求Body
in
:
query
name
:
body
type
:
string
-
description
:
创建时间
in
:
query
name
:
createdAt
type
:
string
-
description
:
错误信息
in
:
query
name
:
error_message
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
请求ip
in
:
query
name
:
ip
type
:
string
-
description
:
延迟
in
:
query
name
:
latency
type
:
string
-
description
:
请求方法
in
:
query
name
:
method
type
:
string
-
description
:
请求路径
in
:
query
name
:
path
type
:
string
-
description
:
响应Body
in
:
query
name
:
resp
type
:
string
-
description
:
请求状态
in
:
query
name
:
status
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
-
description
:
用户id
in
:
query
name
:
user_id
type
:
integer
produces
:
-
application/json
responses
:
...
...
@@ -2714,12 +2786,66 @@ paths:
consumes
:
-
application/json
parameters
:
-
description
:
页码, 每页大小, 搜索条件
in
:
body
name
:
data
required
:
true
schema
:
$ref
:
'
#/definitions/request.SysOperationRecordSearch'
-
description
:
代理
in
:
query
name
:
agent
type
:
string
-
description
:
请求Body
in
:
query
name
:
body
type
:
string
-
description
:
创建时间
in
:
query
name
:
createdAt
type
:
string
-
description
:
错误信息
in
:
query
name
:
error_message
type
:
string
-
description
:
主键ID
in
:
query
name
:
id
type
:
integer
-
description
:
请求ip
in
:
query
name
:
ip
type
:
string
-
description
:
延迟
in
:
query
name
:
latency
type
:
string
-
description
:
请求方法
in
:
query
name
:
method
type
:
string
-
description
:
页码
in
:
query
name
:
page
type
:
integer
-
description
:
每页大小
in
:
query
name
:
pageSize
type
:
integer
-
description
:
请求路径
in
:
query
name
:
path
type
:
string
-
description
:
响应Body
in
:
query
name
:
resp
type
:
string
-
description
:
请求状态
in
:
query
name
:
status
type
:
integer
-
description
:
更新时间
in
:
query
name
:
updatedAt
type
:
string
-
description
:
用户id
in
:
query
name
:
user_id
type
:
integer
produces
:
-
application/json
responses
:
...
...
server/go.mod
浏览文件 @
1ecd5803
...
...
@@ -10,7 +10,6 @@ require (
github.com/baiyubin/aliyun-sts-go-sdk v0.0.0-20180326062324-cfa1a18b161f // indirect
github.com/casbin/casbin/v2 v2.11.0
github.com/casbin/gorm-adapter/v3 v3.0.2
github.com/cpuguy83/go-md2man/v2 v2.0.0 // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/fastly/go-utils v0.0.0-20180712184237-d95a45783239 // indirect
github.com/fsnotify/fsnotify v1.4.9
...
...
@@ -37,7 +36,6 @@ require (
github.com/pkg/errors v0.9.1 // indirect
github.com/qiniu/api.v7/v7 v7.4.1
github.com/robfig/cron/v3 v3.0.1
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/satori/go.uuid v1.2.0
github.com/shirou/gopsutil v3.21.1+incompatible
github.com/spf13/afero v1.2.2 // indirect
...
...
server/resource/template/server/api.go.tpl
浏览文件 @
1ecd5803
...
...
@@ -103,7 +103,7 @@ func ({{.Abbreviation}}Api *{{.StructName}}Api) Update{{.StructName}}(c *gin.Con
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y autocode.{{.StructName}} true "用id查询{{.StructName}}"
// @Param data
quer
y autocode.{{.StructName}} true "用id查询{{.StructName}}"
// @Success 200
{
string
}
string "
{
"success"
:
true
,
"data"
:
{}
,
"msg"
:
"查询成功"
}
"
// @Router /{{.Abbreviation}}/find{{.StructName}} [get]
func ({{.Abbreviation}}Api *{{.StructName}}Api) Find{{.StructName}}(c *gin.Context) {
...
...
@@ -123,7 +123,7 @@ func ({{.Abbreviation}}Api *{{.StructName}}Api) Find{{.StructName}}(c *gin.Conte
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y autocodeReq.{{.StructName}}Search true "分页获取{{.StructName}}列表"
// @Param data
quer
y autocodeReq.{{.StructName}}Search true "分页获取{{.StructName}}列表"
// @Success 200
{
string
}
string "
{
"success"
:
true
,
"data"
:
{}
,
"msg"
:
"获取成功"
}
"
// @Router /{{.Abbreviation}}/get{{.StructName}}List [get]
func ({{.Abbreviation}}Api *{{.StructName}}Api) Get{{.StructName}}List(c *gin.Context) {
...
...
server/resource/template/web/api.js.tpl
浏览文件 @
1ecd5803
...
...
@@ -69,7 +69,7 @@ export const update{{.StructName}} = (data) => {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y model.{{.StructName}} true "用id查询{{.StructName}}"
// @Param data
quer
y model.{{.StructName}} true "用id查询{{.StructName}}"
// @Success 200
{
string
}
string "
{
"success"
:
true
,
"data"
:
{}
,
"msg"
:
"查询成功"
}
"
// @Router /{{.Abbreviation}}/find{{.StructName}} [get]
export const find{{.StructName}} = (params) => {
...
...
@@ -85,7 +85,7 @@ export const find{{.StructName}} = (params) => {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data
bod
y request.PageInfo true "分页获取{{.StructName}}列表"
// @Param data
quer
y request.PageInfo true "分页获取{{.StructName}}列表"
// @Success 200
{
string
}
string "
{
"success"
:
true
,
"data"
:
{}
,
"msg"
:
"获取成功"
}
"
// @Router /{{.Abbreviation}}/get{{.StructName}}List [get]
export const get{{.StructName}}List = (params) => {
...
...
server/service/system/sys_autocode_history.go
浏览文件 @
1ecd5803
package
system
import
(
"fmt"
"gin-vue-admin/global"
"gin-vue-admin/model/common/request"
"gin-vue-admin/model/system"
"gin-vue-admin/utils"
"path/filepath"
"strings"
"time"
"go.uber.org/zap"
)
...
...
@@ -55,8 +58,16 @@ func (autoCodeHistoryService *AutoCodeHistoryService) RollBack(id uint) error {
}
}
// 删除文件
for
_
,
path
:=
range
strings
.
Split
(
md
.
AutoCodePath
,
";"
)
{
_
=
utils
.
DeLFile
(
path
)
// 迁移
nPath
:=
filepath
.
Join
(
global
.
GVA_CONFIG
.
AutoCode
.
Root
,
"rm_file"
,
time
.
Now
()
.
Format
(
"20060102"
),
filepath
.
Base
(
filepath
.
Dir
(
filepath
.
Dir
(
path
))),
filepath
.
Base
(
filepath
.
Dir
(
path
)),
filepath
.
Base
(
path
))
err
=
utils
.
FileMove
(
path
,
nPath
)
if
err
!=
nil
{
fmt
.
Println
(
">>>>>>>>>>>>>>>>>>>"
,
err
)
}
//_ = utils.DeLFile(path)
}
// 清除注入
for
_
,
v
:=
range
strings
.
Split
(
md
.
InjectionMeta
,
";"
)
{
...
...
server/utils/captcha/redis.go
浏览文件 @
1ecd5803
package
captcha
import
(
"context"
"gin-vue-admin/global"
"time"
"github.com/mojocn/base64Captcha"
"go.uber.org/zap"
"time"
)
func
NewDefaultRedisStore
()
base64Captcha
.
Store
{
func
NewDefaultRedisStore
()
*
Redis
Store
{
return
&
RedisStore
{
Expiration
:
time
.
Second
*
180
,
PreKey
:
"CAPTCHA_"
,
...
...
@@ -18,23 +18,29 @@ func NewDefaultRedisStore() base64Captcha.Store {
type
RedisStore
struct
{
Expiration
time
.
Duration
PreKey
string
Context
context
.
Context
}
func
(
rs
*
RedisStore
)
UseWithCtx
(
ctx
context
.
Context
)
base64Captcha
.
Store
{
rs
.
Context
=
ctx
return
rs
}
func
(
rs
*
RedisStore
)
Set
(
id
string
,
value
string
)
{
err
:=
global
.
GVA_REDIS
.
Set
(
rs
.
PreKey
+
id
,
value
,
rs
.
Expiration
)
.
Err
()
err
:=
global
.
GVA_REDIS
.
Set
(
rs
.
Context
,
rs
.
PreKey
+
id
,
value
,
rs
.
Expiration
)
.
Err
()
if
err
!=
nil
{
global
.
GVA_LOG
.
Error
(
"RedisStoreSetError!"
,
zap
.
Error
(
err
))
}
}
func
(
rs
*
RedisStore
)
Get
(
key
string
,
clear
bool
)
string
{
val
,
err
:=
global
.
GVA_REDIS
.
Get
(
key
)
.
Result
()
val
,
err
:=
global
.
GVA_REDIS
.
Get
(
rs
.
Context
,
key
)
.
Result
()
if
err
!=
nil
{
global
.
GVA_LOG
.
Error
(
"RedisStoreGetError!"
,
zap
.
Error
(
err
))
return
""
}
if
clear
{
err
:=
global
.
GVA_REDIS
.
Del
(
key
)
.
Err
()
err
:=
global
.
GVA_REDIS
.
Del
(
rs
.
Context
,
key
)
.
Err
()
if
err
!=
nil
{
global
.
GVA_LOG
.
Error
(
"RedisStoreClearError!"
,
zap
.
Error
(
err
))
return
""
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录