فهرست منبع

Merge branch 'master' of https://github.com/flipped-aurora/gin-vue-admin into gva_gormv2_dev

 Conflicts:
	server/model/request/common.go
pixel 3 سال پیش
والد
کامیت
d4ce19bced

+ 4 - 4
README.md

@@ -166,7 +166,7 @@ npm run serve
 
 ### 2.2 server端
 
-使用 goland等编辑工具,打开server目录,不可以打开 gin-vue-admin目录
+使用 goland等编辑工具,打开server目录,不可以打开 gin-vue-admin目录
 
 ```bash
 # 使用 go.mod
@@ -223,12 +223,12 @@ zap:
 
 #### 2.3.1 安装 swagger
 
-##### (1)可以翻墙
+##### (1)可以科学上网
 ````
 go get -u github.com/swaggo/swag/cmd/swag
 ````
 
-##### (2)无法翻墙
+##### (2)无法科学上网
 
 由于国内没法安装 go.org/x 包下面的东西,推荐使用 [goproxy.io](https://goproxy.io/zh/)
 
@@ -249,7 +249,7 @@ go get -u github.com/swaggo/swag/cmd/swag
 cd server
 swag init
 ````
-执行上面的命令后,server目录下会出现docs文件夹,登录http://localhost:8888/swagger/index.html,即可查看swagger文档
+执行上面的命令后,server目录下会出现docs文件夹,登录 http://localhost:8888/swagger/index.html ,即可查看swagger文档
 
 
 ## 3. 技术选型

+ 3 - 3
server/config/captcha.go

@@ -1,7 +1,7 @@
 package config
 
 type Captcha struct {
-	KeyLong   int `mapstructure:"key-long" json:"keyLong" yaml:"key-long"`
-	ImgWidth  int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"`
-	ImgHeight int `mapstructure:"img-height" json:"imgHeight" yaml:"img-height"`
+	KeyLong   int `mapstructure:"key-long" json:"keyLong" yaml:"key-long"`       // 验证码长度
+	ImgWidth  int `mapstructure:"img-width" json:"imgWidth" yaml:"img-width"`    // 图片宽度
+	ImgHeight int `mapstructure:"img-height" json:"imgHeight" yaml:"img-height"` // 图片高度
 }

+ 1 - 1
server/config/casbin.go

@@ -1,5 +1,5 @@
 package config
 
 type Casbin struct {
-	ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"`
+	ModelPath string `mapstructure:"model-path" json:"modelPath" yaml:"model-path"` // Model路径
 }

+ 7 - 7
server/config/email.go

@@ -1,11 +1,11 @@
 package config
 
 type Email struct {
-	To       string `mapstructure:"to" json:"to" yaml:"to"`
-	Port     int    `mapstructure:"port" json:"port" yaml:"port"`
-	From     string `mapstructure:"from" json:"from" yaml:"from"`
-	Host     string `mapstructure:"host" json:"host" yaml:"host"`
-	IsSSL    bool   `mapstructure:"is-ssl" json:"isSSL" yaml:"is-ssl"`
-	Secret   string `mapstructure:"secret" json:"secret" yaml:"secret"`
-	Nickname string `mapstructure:"nickname" json:"nickname" yaml:"nickname"`
+	To       string `mapstructure:"to" json:"to" yaml:"to"`                   // 收件人
+	Port     int    `mapstructure:"port" json:"port" yaml:"port"`             // 端口
+	From     string `mapstructure:"from" json:"from" yaml:"from"`             // 收件人
+	Host     string `mapstructure:"host" json:"host" yaml:"host"`             // 服务器地址
+	IsSSL    bool   `mapstructure:"is-ssl" json:"isSSL" yaml:"is-ssl"`        // 是否SSL
+	Secret   string `mapstructure:"secret" json:"secret" yaml:"secret"`       // 密钥
+	Nickname string `mapstructure:"nickname" json:"nickname" yaml:"nickname"` // 昵称
 }

+ 4 - 4
server/config/gorm.go

@@ -1,11 +1,11 @@
 package config
 
 type Mysql struct {
-	Path         string `mapstructure:"path" json:"path" yaml:"path"`
+	Path         string `mapstructure:"path" json:"path" yaml:"path"` // 服务器地址:端口
 	Config       string `mapstructure:"config" json:"config" yaml:"config"`
-	Dbname       string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`
-	Username     string `mapstructure:"username" json:"username" yaml:"username"`
-	Password     string `mapstructure:"password" json:"password" yaml:"password"`
+	Dbname       string `mapstructure:"db-name" json:"dbname" yaml:"db-name"`     // 数据库名
+	Username     string `mapstructure:"username" json:"username" yaml:"username"` // 数据库用户名
+	Password     string `mapstructure:"password" json:"password" yaml:"password"` // 数据库密码
 	MaxIdleConns int    `mapstructure:"max-idle-conns" json:"maxIdleConns" yaml:"max-idle-conns"`
 	MaxOpenConns int    `mapstructure:"max-open-conns" json:"maxOpenConns" yaml:"max-open-conns"`
 	LogMode      bool   `mapstructure:"log-mode" json:"logMode" yaml:"log-mode"`

+ 3 - 3
server/config/jwt.go

@@ -1,7 +1,7 @@
 package config
 
 type JWT struct {
-	SigningKey  string `mapstructure:"signing-key" json:"signingKey" yaml:"signing-key"`
-	ExpiresTime int64  `mapstructure:"expires-time" json:"expiresTime" yaml:"expires-time"`
-	BufferTime  int64  `mapstructure:"buffer-time" json:"bufferTime" yaml:"buffer-time"`
+	SigningKey  string `mapstructure:"signing-key" json:"signingKey" yaml:"signing-key"`    // jwt签名
+	ExpiresTime int64  `mapstructure:"expires-time" json:"expiresTime" yaml:"expires-time"` // 过期时间
+	BufferTime  int64  `mapstructure:"buffer-time" json:"bufferTime" yaml:"buffer-time"`    // 缓冲时间
 }

+ 8 - 8
server/config/oss.go

@@ -1,17 +1,17 @@
 package config
 
 type Local struct {
-	Path string `mapstructure:"path" json:"path" yaml:"path" `
+	Path string `mapstructure:"path" json:"path" yaml:"path"` // 本地文件路径
 }
 
 type Qiniu struct {
-	Zone          string `mapstructure:"zone" json:"zone" yaml:"zone"`
-	Bucket        string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`
-	ImgPath       string `mapstructure:"img-path" json:"imgPath" yaml:"img-path"`
-	UseHTTPS      bool   `mapstructure:"use-https" json:"useHttps" yaml:"use-https"`
-	AccessKey     string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"`
-	SecretKey     string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"`
-	UseCdnDomains bool   `mapstructure:"use-cdn-domains" json:"useCdnDomains" yaml:"use-cdn-domains"`
+	Zone          string `mapstructure:"zone" json:"zone" yaml:"zone"`                                // 存储区域
+	Bucket        string `mapstructure:"bucket" json:"bucket" yaml:"bucket"`                          // 空间名称
+	ImgPath       string `mapstructure:"img-path" json:"imgPath" yaml:"img-path"`                     // CDN加速域名
+	UseHTTPS      bool   `mapstructure:"use-https" json:"useHttps" yaml:"use-https"`                  // 是否使用https
+	AccessKey     string `mapstructure:"access-key" json:"accessKey" yaml:"access-key"`               // accessKey
+	SecretKey     string `mapstructure:"secret-key" json:"secretKey" yaml:"secret-key"`               // secretKey
+	UseCdnDomains bool   `mapstructure:"use-cdn-domains" json:"useCdnDomains" yaml:"use-cdn-domains"` // 上传是否使用CDN上传加速
 }
 
 type AliyunOSS struct {

+ 2 - 2
server/config/redis.go

@@ -2,6 +2,6 @@ package config
 
 type Redis struct {
 	DB       int    `mapstructure:"db" json:"db" yaml:"db"`
-	Addr     string `mapstructure:"addr" json:"addr" yaml:"addr"`
-	Password string `mapstructure:"password" json:"password" yaml:"password"`
+	Addr     string `mapstructure:"addr" json:"addr" yaml:"addr"`             // 服务器地址:端口
+	Password string `mapstructure:"password" json:"password" yaml:"password"` // 密码
 }

+ 5 - 5
server/config/system.go

@@ -1,9 +1,9 @@
 package config
 
 type System struct {
-	Env           string `mapstructure:"env" json:"env" yaml:"env"`
-	Addr          int    `mapstructure:"addr" json:"addr" yaml:"addr"`
-	DbType        string `mapstructure:"db-type" json:"dbType" yaml:"db-type"`
-	OssType       string `mapstructure:"oss-type" json:"ossType" yaml:"oss-type"`
-	UseMultipoint bool   `mapstructure:"use-multipoint" json:"useMultipoint" yaml:"use-multipoint"`
+	Env           string `mapstructure:"env" json:"env" yaml:"env"`                                 // 环境值
+	Addr          int    `mapstructure:"addr" json:"addr" yaml:"addr"`                              // 端口值
+	DbType        string `mapstructure:"db-type" json:"dbType" yaml:"db-type"`                      // 数据库类型:mysql(默认)|sqlite|sqlserver|postgresql
+	OssType       string `mapstructure:"oss-type" json:"ossType" yaml:"oss-type"`                   // Oss类型
+	UseMultipoint bool   `mapstructure:"use-multipoint" json:"useMultipoint" yaml:"use-multipoint"` // 多点登录拦截
 }

+ 9 - 9
server/config/zap.go

@@ -1,13 +1,13 @@
 package config
 
 type Zap struct {
-	Level         string `mapstructure:"level" json:"level" yaml:"level"`
-	Format        string `mapstructure:"format" json:"format" yaml:"format"`
-	Prefix        string `mapstructure:"prefix" json:"prefix" yaml:"prefix"`
-	Director      string `mapstructure:"director" json:"director"  yaml:"director"`
-	LinkName      string `mapstructure:"link-name" json:"linkName" yaml:"link-name"`
-	ShowLine      bool   `mapstructure:"show-line" json:"showLine" yaml:"showLine"`
-	EncodeLevel   string `mapstructure:"encode-level" json:"encodeLevel" yaml:"encode-level"`
-	StacktraceKey string `mapstructure:"stacktrace-key" json:"stacktraceKey" yaml:"stacktrace-key"`
-	LogInConsole  bool   `mapstructure:"log-in-console" json:"logInConsole" yaml:"log-in-console"`
+	Level         string `mapstructure:"level" json:"level" yaml:"level"`                           // 级别
+	Format        string `mapstructure:"format" json:"format" yaml:"format"`                        // 输出
+	Prefix        string `mapstructure:"prefix" json:"prefix" yaml:"prefix"`                        // 日志前缀
+	Director      string `mapstructure:"director" json:"director"  yaml:"director"`                 // 日志文件夹
+	LinkName      string `mapstructure:"link-name" json:"linkName" yaml:"link-name"`                // 软链接名称
+	ShowLine      bool   `mapstructure:"show-line" json:"showLine" yaml:"showLine"`                 // 显示行
+	EncodeLevel   string `mapstructure:"encode-level" json:"encodeLevel" yaml:"encode-level"`       // 编码级
+	StacktraceKey string `mapstructure:"stacktrace-key" json:"stacktraceKey" yaml:"stacktrace-key"` // 栈名
+	LogInConsole  bool   `mapstructure:"log-in-console" json:"logInConsole" yaml:"log-in-console"`  // 输出控制台
 }

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 125 - 76
server/docs/docs.go


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 124 - 75
server/docs/swagger.json


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 231 - 34
server/docs/swagger.yaml


+ 4 - 4
server/global/model.go

@@ -6,8 +6,8 @@ import (
 )
 
 type GVA_MODEL struct {
-	ID        uint `gorm:"primarykey"`
-	CreatedAt time.Time
-	UpdatedAt time.Time
-	DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
+	ID        uint           `gorm:"primarykey"` // 主键ID
+	CreatedAt time.Time      // 创建时间
+	UpdatedAt time.Time      // 更新时间
+	DeletedAt gorm.DeletedAt `gorm:"index" json:"-"` // 删除时间
 }

+ 5 - 5
server/model/exa_customer.go

@@ -6,9 +6,9 @@ import (
 
 type ExaCustomer struct {
 	global.GVA_MODEL
-	CustomerName       string  `json:"customerName" form:"customerName" gorm:"comment:客户名"`
-	CustomerPhoneData  string  `json:"customerPhoneData" form:"customerPhoneData" gorm:"comment:客户手机号"`
-	SysUserID          uint    `json:"sysUserId" form:"sysUserId" gorm:"comment:管理ID"`
-	SysUserAuthorityID string  `json:"sysUserAuthorityID" form:"sysUserAuthorityID" gorm:"comment:管理角色ID"`
-	SysUser            SysUser `json:"sysUser" form:"sysUser" gorm:"comment:管理详情"`
+	CustomerName       string  `json:"customerName" form:"customerName" gorm:"comment:客户名"`                // 客户名
+	CustomerPhoneData  string  `json:"customerPhoneData" form:"customerPhoneData" gorm:"comment:客户手机号"`    // 客户手机号
+	SysUserID          uint    `json:"sysUserId" form:"sysUserId" gorm:"comment:管理ID"`                     // 管理ID
+	SysUserAuthorityID string  `json:"sysUserAuthorityID" form:"sysUserAuthorityID" gorm:"comment:管理角色ID"` // 管理角色ID
+	SysUser            SysUser `json:"sysUser" form:"sysUser" gorm:"comment:管理详情"`                         // 管理详情
 }

+ 1 - 1
server/model/exa_excel.go

@@ -1,6 +1,6 @@
 package model
 
 type ExcelInfo struct {
-	FileName string        `json:"fileName"`
+	FileName string        `json:"fileName"` // 文件名
 	InfoList []SysBaseMenu `json:"infoList"`
 }

+ 4 - 4
server/model/exa_file_upload_download.go

@@ -6,8 +6,8 @@ import (
 
 type ExaFileUploadAndDownload struct {
 	global.GVA_MODEL
-	Name string `json:"name" gorm:"comment:文件名"`
-	Url  string `json:"url" gorm:"comment:文件地址"`
-	Tag  string `json:"tag" gorm:"comment:文件标签"`
-	Key  string `json:"key" gorm:"comment:编号"`
+	Name string `json:"name" gorm:"comment:文件名"` // 文件名
+	Url  string `json:"url" gorm:"comment:文件地址"` // 文件地址
+	Tag  string `json:"tag" gorm:"comment:文件标签"` // 文件标签
+	Key  string `json:"key" gorm:"comment:编号"`   // 编号
 }

+ 3 - 3
server/model/request/common.go

@@ -2,8 +2,8 @@ package request
 
 // Paging common input parameter structure
 type PageInfo struct {
-	Page     int `json:"page" form:"page"`
-	PageSize int `json:"pageSize" form:"pageSize"`
+	Page     int `json:"page" form:"page"`         // 页码
+	PageSize int `json:"pageSize" form:"pageSize"` // 每页大小
 }
 
 // Find by id structure
@@ -17,7 +17,7 @@ type IdsReq struct {
 
 // Get role by id structure
 type GetAuthorityId struct {
-	AuthorityId string
+	AuthorityId string // 角色ID
 }
 
 type Empty struct{}

+ 2 - 2
server/model/request/sys_api.go

@@ -6,6 +6,6 @@ import "gin-vue-admin/model"
 type SearchApiParams struct {
 	model.SysApi
 	PageInfo
-	OrderKey string `json:"orderKey"`
-	Desc     bool   `json:"desc"`
+	OrderKey string `json:"orderKey"` // 排序
+	Desc     bool   `json:"desc"`     // 排序方式:升序false(默认)|降序true
 }

+ 3 - 3
server/model/request/sys_casbin.go

@@ -2,12 +2,12 @@ package request
 
 // Casbin info structure
 type CasbinInfo struct {
-	Path   string `json:"path"`
-	Method string `json:"method"`
+	Path   string `json:"path"`   // 路径
+	Method string `json:"method"` // 方法
 }
 
 // Casbin structure for input parameters
 type CasbinInReceive struct {
-	AuthorityId string       `json:"authorityId"`
+	AuthorityId string       `json:"authorityId"` // 权限id
 	CasbinInfos []CasbinInfo `json:"casbinInfos"`
 }

+ 5 - 5
server/model/request/sys_init.go

@@ -1,9 +1,9 @@
 package request
 
 type InitDB struct {
-	Host     string `json:"host"`
-	Port     string `json:"port"`
-	UserName string `json:"userName" binding:"required"`
-	Password string `json:"password"`
-	DBName   string `json:"dbName" binding:"required"`
+	Host     string `json:"host"`                        // 服务器地址
+	Port     string `json:"port"`                        // 数据库连接端口
+	UserName string `json:"userName" binding:"required"` // 数据库用户名
+	Password string `json:"password"`                    // 数据库密码
+	DBName   string `json:"dbName" binding:"required"`   // 数据库名
 }

+ 1 - 1
server/model/request/sys_menu.go

@@ -5,5 +5,5 @@ import "gin-vue-admin/model"
 // Add menu authority info structure
 type AddMenuAuthorityInfo struct {
 	Menus       []model.SysBaseMenu
-	AuthorityId string
+	AuthorityId string // 角色ID
 }

+ 9 - 9
server/model/request/sys_user.go

@@ -13,21 +13,21 @@ type Register struct {
 
 // User login structure
 type Login struct {
-	Username  string `json:"username"`
-	Password  string `json:"password"`
-	Captcha   string `json:"captcha"`
-	CaptchaId string `json:"captchaId"`
+	Username  string `json:"username"`  // 用户名
+	Password  string `json:"password"`  // 密码
+	Captcha   string `json:"captcha"`   // 验证码
+	CaptchaId string `json:"captchaId"` // 验证码ID
 }
 
 // Modify password structure
 type ChangePasswordStruct struct {
-	Username    string `json:"username"`
-	Password    string `json:"password"`
-	NewPassword string `json:"newPassword"`
+	Username    string `json:"username"`    // 用户名
+	Password    string `json:"password"`    // 密码
+	NewPassword string `json:"newPassword"` // 新密码
 }
 
 // Modify  user's auth structure
 type SetUserAuth struct {
-	UUID        uuid.UUID `json:"uuid"`
-	AuthorityId string    `json:"authorityId"`
+	UUID        uuid.UUID `json:"uuid"`        // 用户UUID
+	AuthorityId string    `json:"authorityId"` // 角色ID
 }

+ 4 - 4
server/model/sys_api.go

@@ -6,8 +6,8 @@ import (
 
 type SysApi struct {
 	global.GVA_MODEL
-	Path        string `json:"path" gorm:"comment:api路径"`
-	Description string `json:"description" gorm:"comment:api中文描述"`
-	ApiGroup    string `json:"apiGroup" gorm:"comment:api组"`
-	Method      string `json:"method" gorm:"default:POST" gorm:"comment:方法"`
+	Path        string `json:"path" gorm:"comment:api路径"`                    // api路径
+	Description string `json:"description" gorm:"comment:api中文描述"`           // api中文描述
+	ApiGroup    string `json:"apiGroup" gorm:"comment:api组"`                 // api组
+	Method      string `json:"method" gorm:"default:POST" gorm:"comment:方法"` // 方法:创建POST(默认)|查看GET|更新PUT|删除DELETE
 }

+ 4 - 4
server/model/sys_authority.go

@@ -8,11 +8,11 @@ type SysAuthority struct {
 	CreatedAt       time.Time
 	UpdatedAt       time.Time
 	DeletedAt       *time.Time     `sql:"index"`
-	AuthorityId     string         `json:"authorityId" gorm:"not null;unique;primary_key;comment:角色ID;size:90"`
-	AuthorityName   string         `json:"authorityName" gorm:"comment:角色名"`
-	ParentId        string         `json:"parentId" gorm:"comment:父角色ID"`
+	AuthorityId     string         `json:"authorityId" gorm:"not null;unique;primary_key;comment:角色ID;size:90"` // 角色ID
+	AuthorityName   string         `json:"authorityName" gorm:"comment:角色名"` // 角色名
+	ParentId        string         `json:"parentId" gorm:"comment:父角色ID"` // 父角色ID
 	DataAuthorityId []SysAuthority `json:"dataAuthorityId" gorm:"many2many:sys_data_authority_id"`
 	Children        []SysAuthority `json:"children" gorm:"-"`
 	SysBaseMenus    []SysBaseMenu  `json:"menus" gorm:"many2many:sys_authority_menus;"`
-	DefaultRouter   string         `json:"defaultRouter" gorm:"comment:默认菜单;default:dashboard"`
+	DefaultRouter   string         `json:"defaultRouter" gorm:"comment:默认菜单;default:dashboard"` // 默认菜单(默认dashboard)
 }

+ 17 - 17
server/model/sys_auto_code.go

@@ -4,27 +4,27 @@ import "errors"
 
 // 初始版本自动化代码工具
 type AutoCodeStruct struct {
-	StructName         string   `json:"structName"`
-	TableName          string   `json:"tableName"`
-	PackageName        string   `json:"packageName"`
-	Abbreviation       string   `json:"abbreviation"`
-	Description        string   `json:"description"`
-	AutoCreateApiToSql bool     `json:"autoCreateApiToSql"`
-	AutoMoveFile       bool     `json:"autoMoveFile"`
+	StructName         string   `json:"structName"`         // Struct名称
+	TableName          string   `json:"tableName"`          // 表名
+	PackageName        string   `json:"packageName"`        // 文件名称
+	Abbreviation       string   `json:"abbreviation"`       // Struct简称
+	Description        string   `json:"description"`        // Struct中文名称
+	AutoCreateApiToSql bool     `json:"autoCreateApiToSql"` // 是否自动创建api
+	AutoMoveFile       bool     `json:"autoMoveFile"`       // 是否自动移动文件
 	Fields             []*Field `json:"fields"`
 }
 
 type Field struct {
-	FieldName       string `json:"fieldName"`
-	FieldDesc       string `json:"fieldDesc"`
-	FieldType       string `json:"fieldType"`
-	FieldJson       string `json:"fieldJson"`
-	DataType        string `json:"dataType"`
-	DataTypeLong    string `json:"dataTypeLong"`
-	Comment         string `json:"comment"`
-	ColumnName      string `json:"columnName"`
-	FieldSearchType string `json:"fieldSearchType"`
-	DictType        string `json:"dictType"`
+	FieldName       string `json:"fieldName"`       // Field名
+	FieldDesc       string `json:"fieldDesc"`       // 中文名
+	FieldType       string `json:"fieldType"`       // Field数据类型
+	FieldJson       string `json:"fieldJson"`       // FieldJson
+	DataType        string `json:"dataType"`        // 数据库字段类型
+	DataTypeLong    string `json:"dataTypeLong"`    // 数据库字段长度
+	Comment         string `json:"comment"`         // 数据库字段描述
+	ColumnName      string `json:"columnName"`      // 数据库字段
+	FieldSearchType string `json:"fieldSearchType"` // 搜索条件
+	DictType        string `json:"dictType"`        // 字典
 }
 
 var AutoMoveErr error = errors.New("创建代码成功并移动文件成功")

+ 16 - 16
server/model/sys_base_menu.go

@@ -6,31 +6,31 @@ import (
 
 type SysBaseMenu struct {
 	global.GVA_MODEL
-	MenuLevel     uint   `json:"-"`
-	ParentId      string `json:"parentId" gorm:"comment:父菜单ID"`
-	Path          string `json:"path" gorm:"comment:路由path"`
-	Name          string `json:"name" gorm:"comment:路由name"`
-	Hidden        bool   `json:"hidden" gorm:"comment:是否在列表隐藏"`
-	Component     string `json:"component" gorm:"comment:对应前端文件路径"`
-	Sort          int    `json:"sort" gorm:"comment:排序标记"`
-	Meta          `json:"meta" gorm:"comment:附加属性"`
+	MenuLevel     uint                   `json:"-"`
+	ParentId      string                 `json:"parentId" gorm:"comment:父菜单ID"`     // 父菜单ID
+	Path          string                 `json:"path" gorm:"comment:路由path"`        // 路由path
+	Name          string                 `json:"name" gorm:"comment:路由name"`        // 路由name
+	Hidden        bool                   `json:"hidden" gorm:"comment:是否在列表隐藏"`     // 是否在列表隐藏
+	Component     string                 `json:"component" gorm:"comment:对应前端文件路径"` // 对应前端文件路径
+	Sort          int                    `json:"sort" gorm:"comment:排序标记"`          // 排序标记
+	Meta          `json:"meta" gorm:"comment:附加属性"`                                 // 附加属性
 	SysAuthoritys []SysAuthority         `json:"authoritys" gorm:"many2many:sys_authority_menus;"`
 	Children      []SysBaseMenu          `json:"children" gorm:"-"`
 	Parameters    []SysBaseMenuParameter `json:"parameters"`
 }
 
 type Meta struct {
-	KeepAlive   bool   `json:"keepAlive" gorm:"comment:是否缓存"`
-	DefaultMenu bool   `json:"defaultMenu" gorm:"comment:是否是基础路由(开发中)"`
-	Title       string `json:"title" gorm:"comment:菜单名"`
-	Icon        string `json:"icon" gorm:"comment:菜单图标"`
-	CloseTab    bool   `json:"closeTab" gorm:"comment:自动关闭tab"`
+	KeepAlive   bool   `json:"keepAlive" gorm:"comment:是否缓存"`           // 是否缓存
+	DefaultMenu bool   `json:"defaultMenu" gorm:"comment:是否是基础路由(开发中)"` // 是否是基础路由(开发中)
+	Title       string `json:"title" gorm:"comment:菜单名"`                // 菜单名
+	Icon        string `json:"icon" gorm:"comment:菜单图标"`                // 菜单图标
+	CloseTab    bool   `json:"closeTab" gorm:"comment:自动关闭tab"`         // 自动关闭tab
 }
 
 type SysBaseMenuParameter struct {
 	global.GVA_MODEL
 	SysBaseMenuID uint
-	Type          string `json:"type" gorm:"comment:地址栏携带参数为params还是query"`
-	Key           string `json:"key" gorm:"comment:地址栏携带参数的key"`
-	Value         string `json:"value" gorm:"comment:地址栏携带参数的值"`
+	Type          string `json:"type" gorm:"comment:地址栏携带参数为params还是query"` // 地址栏携带参数为params还是query
+	Key           string `json:"key" gorm:"comment:地址栏携带参数的key"`            // 地址栏携带参数的key
+	Value         string `json:"value" gorm:"comment:地址栏携带参数的值"`            // 地址栏携带参数的值
 }

+ 4 - 4
server/model/sys_dictionary.go

@@ -8,9 +8,9 @@ import (
 // 如果含有time.Time 请自行import time包
 type SysDictionary struct {
 	global.GVA_MODEL
-	Name                 string                `json:"name" form:"name" gorm:"column:name;comment:字典名(中)"`
-	Type                 string                `json:"type" form:"type" gorm:"column:type;comment:字典名(英)"`
-	Status               *bool                 `json:"status" form:"status" gorm:"column:status;comment:状态"`
-	Desc                 string                `json:"desc" form:"desc" gorm:"column:desc;comment:描述"`
+	Name                 string                `json:"name" form:"name" gorm:"column:name;comment:字典名(中)"`   // 字典名(中)
+	Type                 string                `json:"type" form:"type" gorm:"column:type;comment:字典名(英)"`   // 字典名(英)
+	Status               *bool                 `json:"status" form:"status" gorm:"column:status;comment:状态"` // 状态
+	Desc                 string                `json:"desc" form:"desc" gorm:"column:desc;comment:描述"`       // 描述
 	SysDictionaryDetails []SysDictionaryDetail `json:"sysDictionaryDetails" form:"sysDictionaryDetails"`
 }

+ 5 - 5
server/model/sys_dictionary_detail.go

@@ -8,9 +8,9 @@ import (
 // 如果含有time.Time 请自行import time包
 type SysDictionaryDetail struct {
 	global.GVA_MODEL
-	Label           string `json:"label" form:"label" gorm:"column:label;comment:展示值"`
-	Value           int    `json:"value" form:"value" gorm:"column:value;comment:字典值"`
-	Status          *bool  `json:"status" form:"status" gorm:"column:status;comment:启用状态"`
-	Sort            int    `json:"sort" form:"sort" gorm:"column:sort;comment:排序标记"`
-	SysDictionaryID int    `json:"sysDictionaryID" form:"sysDictionaryID" gorm:"column:sys_dictionary_id;comment:关联标记"`
+	Label           string `json:"label" form:"label" gorm:"column:label;comment:展示值"`                                  // 展示值
+	Value           int    `json:"value" form:"value" gorm:"column:value;comment:字典值"`                                  // 字典值
+	Status          *bool  `json:"status" form:"status" gorm:"column:status;comment:启用状态"`                              // 启用状态
+	Sort            int    `json:"sort" form:"sort" gorm:"column:sort;comment:排序标记"`                                    // 排序标记
+	SysDictionaryID int    `json:"sysDictionaryID" form:"sysDictionaryID" gorm:"column:sys_dictionary_id;comment:关联标记"` // 关联标记
 }

+ 10 - 10
server/model/sys_operation_record.go

@@ -9,15 +9,15 @@ import (
 // 如果含有time.Time 请自行import time包
 type SysOperationRecord struct {
 	global.GVA_MODEL
-	Ip           string        `json:"ip" form:"ip" gorm:"column:ip;comment:请求ip"`
-	Method       string        `json:"method" form:"method" gorm:"column:method;comment:请求方法"`
-	Path         string        `json:"path" form:"path" gorm:"column:path;comment:请求路径"`
-	Status       int           `json:"status" form:"status" gorm:"column:status;comment:请求状态"`
-	Latency      time.Duration `json:"latency" form:"latency" gorm:"column:latency;comment:延迟"`
-	Agent        string        `json:"agent" form:"agent" gorm:"column:agent;comment:代理"`
-	ErrorMessage string        `json:"error_message" form:"error_message" gorm:"column:error_message;comment:错误信息"`
-	Body         string        `json:"body" form:"body" gorm:"type:longtext;column:body;comment:请求Body"`
-	Resp         string        `json:"resp" form:"resp" gorm:"type:longtext;column:resp;comment:响应Body"`
-	UserID       int           `json:"user_id" form:"user_id" gorm:"column:user_id;comment:用户id"`
+	Ip           string        `json:"ip" form:"ip" gorm:"column:ip;comment:请求ip"`                                   // 请求ip
+	Method       string        `json:"method" form:"method" gorm:"column:method;comment:请求方法"`                       // 请求方法
+	Path         string        `json:"path" form:"path" gorm:"column:path;comment:请求路径"`                             // 请求路径
+	Status       int           `json:"status" form:"status" gorm:"column:status;comment:请求状态"`                       // 请求状态
+	Latency      time.Duration `json:"latency" form:"latency" gorm:"column:latency;comment:延迟" swaggertype:"string"` // 延迟
+	Agent        string        `json:"agent" form:"agent" gorm:"column:agent;comment:代理"`                            // 代理
+	ErrorMessage string        `json:"error_message" form:"error_message" gorm:"column:error_message;comment:错误信息"`  // 错误信息
+	Body         string        `json:"body" form:"body" gorm:"type:longtext;column:body;comment:请求Body"`             // 请求Body
+	Resp         string        `json:"resp" form:"resp" gorm:"type:longtext;column:resp;comment:响应Body"`             // 响应Body
+	UserID       int           `json:"user_id" form:"user_id" gorm:"column:user_id;comment:用户id"`                    // 用户id
 	User         SysUser       `json:"user"`
 }

+ 6 - 6
server/model/sys_user.go

@@ -7,11 +7,11 @@ import (
 
 type SysUser struct {
 	global.GVA_MODEL
-	UUID        uuid.UUID    `json:"uuid" gorm:"comment:用户UUID"`
-	Username    string       `json:"userName" gorm:"comment:用户登录名"`
-	Password    string       `json:"-"  gorm:"comment:用户登录密码"`
-	NickName    string       `json:"nickName" gorm:"default:系统用户;comment:用户昵称" `
-	HeaderImg   string       `json:"headerImg" gorm:"default:http://qmplusimg.henrongyi.top/head.png;comment:用户头像"`
+	UUID        uuid.UUID    `json:"uuid" gorm:"comment:用户UUID"`                                                    // 用户UUID
+	Username    string       `json:"userName" gorm:"comment:用户登录名"`                                                 // 用户登录名
+	Password    string       `json:"-"  gorm:"comment:用户登录密码"`                                                      // 用户登录密码
+	NickName    string       `json:"nickName" gorm:"default:系统用户;comment:用户昵称"`                                     // 用户昵称"
+	HeaderImg   string       `json:"headerImg" gorm:"default:http://qmplusimg.henrongyi.top/head.png;comment:用户头像"` // 用户头像
 	Authority   SysAuthority `json:"authority" gorm:"foreignKey:AuthorityId;references:AuthorityId;comment:用户角色"`
-	AuthorityId string       `json:"authorityId" gorm:"default:888;comment:用户角色ID"`
+	AuthorityId string       `json:"authorityId" gorm:"default:888;comment:用户角色ID"` // 用户角色ID
 }

+ 1 - 1
web/src/view/systemTools/system/system.vue

@@ -247,7 +247,7 @@
           <el-input v-model="config.qiniu.imgPath"></el-input>
         </el-form-item>
         <el-form-item label="是否使用https">
-          <el-checkbox v-model="config.qiniu.imgPath">开启</el-checkbox>
+          <el-checkbox v-model="config.qiniu.useHttps">开启</el-checkbox>
         </el-form-item>
         <el-form-item label="accessKey">
           <el-input v-model="config.qiniu.accessKey"></el-input>

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است