chengqian 2 rokov pred
rodič
commit
a6edd786cb
100 zmenil súbory, kde vykonal 1337 pridanie a 413 odobranie
  1. 5 5
      server/Dockerfile
  2. 2 2
      server/README.md
  3. 4 2
      server/api/v1/enter.go
  4. 13 0
      server/api/v1/example/enter.go
  5. 148 0
      server/api/v1/example/exa_breakpoint_continue.go
  6. 176 0
      server/api/v1/example/exa_customer.go
  7. 110 0
      server/api/v1/example/exa_file_upload_download.go
  8. 141 0
      server/api/v1/system/app_dept.go
  9. 210 0
      server/api/v1/system/app_file.go
  10. 5 1
      server/api/v1/system/enter.go
  11. 7 7
      server/api/v1/system/sys_api.go
  12. 6 6
      server/api/v1/system/sys_authority.go
  13. 3 3
      server/api/v1/system/sys_authority_btn.go
  14. 6 6
      server/api/v1/system/sys_auto_code.go
  15. 4 4
      server/api/v1/system/sys_auto_code_history.go
  16. 3 3
      server/api/v1/system/sys_captcha.go
  17. 5 5
      server/api/v1/system/sys_casbin.go
  18. 3 3
      server/api/v1/system/sys_dictionary.go
  19. 5 5
      server/api/v1/system/sys_dictionary_detail.go
  20. 15 15
      server/api/v1/system/sys_export_template.go
  21. 3 3
      server/api/v1/system/sys_initdb.go
  22. 4 4
      server/api/v1/system/sys_jwt_blacklist.go
  23. 7 7
      server/api/v1/system/sys_menu.go
  24. 6 6
      server/api/v1/system/sys_operation_record.go
  25. 5 5
      server/api/v1/system/sys_system.go
  26. 40 14
      server/api/v1/system/sys_user.go
  27. 6 6
      server/config.docker.yaml
  28. 8 13
      server/config.yaml
  29. 10 10
      server/core/internal/cutter.go
  30. 7 7
      server/core/internal/file_rotatelogs.go
  31. 1 1
      server/core/internal/zap.go
  32. 3 3
      server/core/server.go
  33. 6 6
      server/core/viper.go
  34. 3 3
      server/core/zap.go
  35. 24 24
      server/docs/docs.go
  36. 24 24
      server/docs/swagger.json
  37. 24 24
      server/docs/swagger.yaml
  38. 3 3
      server/global/global.go
  39. 18 15
      server/go.mod
  40. 33 42
      server/go.sum
  41. 2 2
      server/initialize/db_list.go
  42. 3 3
      server/initialize/ensure_tables.go
  43. 5 3
      server/initialize/gorm.go
  44. 5 5
      server/initialize/gorm_mssql.go
  45. 3 3
      server/initialize/gorm_mysql.go
  46. 3 3
      server/initialize/gorm_oracle.go
  47. 3 3
      server/initialize/gorm_pgsql.go
  48. 3 3
      server/initialize/gorm_sqlite.go
  49. 1 1
      server/initialize/internal/gorm.go
  50. 1 1
      server/initialize/internal/logger.go
  51. 3 3
      server/initialize/mongo.go
  52. 2 2
      server/initialize/other.go
  53. 4 4
      server/initialize/plugin.go
  54. 6 19
      server/initialize/redis.go
  55. 2 2
      server/initialize/register_init.go
  56. 9 4
      server/initialize/router.go
  57. 2 2
      server/initialize/timer.go
  58. 1 1
      server/initialize/validator.go
  59. 3 3
      server/main.go
  60. 4 4
      server/middleware/casbin_rbac.go
  61. 2 2
      server/middleware/cors.go
  62. 5 5
      server/middleware/email.go
  63. 1 1
      server/middleware/error.go
  64. 5 5
      server/middleware/jwt.go
  65. 2 2
      server/middleware/limit_ip.go
  66. 4 4
      server/middleware/operation.go
  67. 1 1
      server/model/example/exa_breakpoint_continue.go
  68. 2 2
      server/model/example/exa_customer.go
  69. 1 1
      server/model/example/exa_file_upload_download.go
  70. 1 1
      server/model/example/response/exa_breakpoint_continue.go
  71. 1 1
      server/model/example/response/exa_customer.go
  72. 1 1
      server/model/example/response/exa_file_upload_download.go
  73. 18 0
      server/model/system/app_dept.go
  74. 24 0
      server/model/system/app_file.go
  75. 21 0
      server/model/system/request/app_dept.go
  76. 38 0
      server/model/system/request/app_file.go
  77. 2 2
      server/model/system/request/sys_api.go
  78. 1 1
      server/model/system/request/sys_auto_history.go
  79. 2 2
      server/model/system/request/sys_dictionary_detail.go
  80. 2 2
      server/model/system/request/sys_export_template.go
  81. 1 1
      server/model/system/request/sys_init.go
  82. 2 2
      server/model/system/request/sys_menu.go
  83. 2 2
      server/model/system/request/sys_operation_record.go
  84. 11 1
      server/model/system/request/sys_user.go
  85. 1 1
      server/model/system/response/sys_api.go
  86. 1 1
      server/model/system/response/sys_authority.go
  87. 1 1
      server/model/system/response/sys_casbin.go
  88. 1 1
      server/model/system/response/sys_menu.go
  89. 1 1
      server/model/system/response/sys_system.go
  90. 1 1
      server/model/system/response/sys_user.go
  91. 1 1
      server/model/system/sys_api.go
  92. 1 1
      server/model/system/sys_auto_code.go
  93. 2 2
      server/model/system/sys_autocode_history.go
  94. 1 1
      server/model/system/sys_base_menu.go
  95. 1 1
      server/model/system/sys_dictionary.go
  96. 1 1
      server/model/system/sys_dictionary_detail.go
  97. 1 1
      server/model/system/sys_export_template.go
  98. 1 1
      server/model/system/sys_jwt_blacklist.go
  99. 1 1
      server/model/system/sys_menu_btn.go
  100. 0 0
      server/model/system/sys_operation_record.go

+ 5 - 5
server/Dockerfile

@@ -1,6 +1,6 @@
 FROM golang:alpine as builder
 
-WORKDIR /go/src/github.com/flipped-aurora/gin-vue-admin/server
+WORKDIR /go/src/server
 COPY . .
 
 RUN go env -w GO111MODULE=on \
@@ -14,11 +14,11 @@ FROM alpine:latest
 
 LABEL MAINTAINER="SliverHorn@sliver_horn@qq.com"
 
-WORKDIR /go/src/github.com/flipped-aurora/gin-vue-admin/server
+WORKDIR /go/src/server
 
-COPY --from=0 /go/src/github.com/flipped-aurora/gin-vue-admin/server/server ./
-COPY --from=0 /go/src/github.com/flipped-aurora/gin-vue-admin/server/resource ./resource/
-COPY --from=0 /go/src/github.com/flipped-aurora/gin-vue-admin/server/config.docker.yaml ./
+COPY --from=0 /go/src/server/server ./
+COPY --from=0 /go/src/server/resource ./resource/
+COPY --from=0 /go/src/server/config.docker.yaml ./
 
 EXPOSE 8888
 ENTRYPOINT ./server -c config.docker.yaml

+ 2 - 2
server/README.md

@@ -13,7 +13,7 @@
 ├── model
 │   ├── request
 │   └── response
-├── packfile
+├── packdept
 ├── resource
 │   ├── excel
 │   ├── page
@@ -40,7 +40,7 @@
 | `model`      | 模型层                  | 模型对应数据表              |
 | `--request`  | 入参结构体              | 接收前端发送到后端的数据。  |
 | `--response` | 出参结构体              | 返回给前端的数据结构体      |
-| `packfile`   | 静态文件打包            | 静态文件打包 |
+| `packdept`   | 静态文件打包            | 静态文件打包 |
 | `resource`   | 静态资源文件夹          | 负责存放静态文件                |
 | `--excel` | excel导入导出默认路径 | excel导入导出默认路径 |
 | `--page` | 表单生成器 | 表单生成器 打包后的dist |

+ 4 - 2
server/api/v1/enter.go

@@ -1,11 +1,13 @@
 package v1
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/api/v1/system"
+	"server/api/v1/example"
+	"server/api/v1/system"
 )
 
 type ApiGroup struct {
-	SystemApiGroup system.ApiGroup
+	SystemApiGroup  system.ApiGroup
+	ExampleApiGroup example.ApiGroup
 }
 
 var ApiGroupApp = new(ApiGroup)

+ 13 - 0
server/api/v1/example/enter.go

@@ -0,0 +1,13 @@
+package example
+
+import "server/service"
+
+type ApiGroup struct {
+	CustomerApi
+	FileUploadAndDownloadApi
+}
+
+var (
+	customerService              = service.ServiceGroupApp.ExampleServiceGroup.CustomerService
+	fileUploadAndDownloadService = service.ServiceGroupApp.ExampleServiceGroup.FileUploadAndDownloadService
+)

+ 148 - 0
server/api/v1/example/exa_breakpoint_continue.go

@@ -0,0 +1,148 @@
+package example
+
+import (
+	"fmt"
+	"github.com/gin-gonic/gin"
+	"go.uber.org/zap"
+	"io"
+	"mime/multipart"
+	"server/global"
+	"server/model/common/response"
+	"server/model/example"
+	exampleRes "server/model/example/response"
+	"server/utils"
+	"strconv"
+)
+
+// BreakpointContinue
+// @Tags      ExaFileUploadAndDownload
+// @Summary   断点续传到服务器
+// @Security  ApiKeyAuth
+// @accept    multipart/form-data
+// @Produce   application/json
+// @Param     file  formData  file                           true  "an example for breakpoint resume, 断点续传示例"
+// @Success   200   {object}  response.Response{msg=string}  "断点续传到服务器"
+// @Router    /fileUploadAndDownload/breakpointContinue [post]
+func (b *FileUploadAndDownloadApi) BreakpointContinue(c *gin.Context) {
+	fileMd5 := c.Request.FormValue("fileMd5")
+	fileName := c.Request.FormValue("fileName")
+	chunkMd5 := c.Request.FormValue("chunkMd5")
+	chunkNumber, _ := strconv.Atoi(c.Request.FormValue("chunkNumber"))
+	chunkTotal, _ := strconv.Atoi(c.Request.FormValue("chunkTotal"))
+	_, FileHeader, err := c.Request.FormFile("file")
+	if err != nil {
+		global.GVA_LOG.Error("接收文件失败!", zap.Error(err))
+		response.FailWithMessage("接收文件失败", c)
+		return
+	}
+	f, err := FileHeader.Open()
+	if err != nil {
+		global.GVA_LOG.Error("文件读取失败!", zap.Error(err))
+		response.FailWithMessage("文件读取失败", c)
+		return
+	}
+	defer func(f multipart.File) {
+		err := f.Close()
+		if err != nil {
+			fmt.Println(err)
+		}
+	}(f)
+	cen, _ := io.ReadAll(f)
+	if !utils.CheckMd5(cen, chunkMd5) {
+		global.GVA_LOG.Error("检查md5失败!", zap.Error(err))
+		response.FailWithMessage("检查md5失败", c)
+		return
+	}
+	file, err := fileUploadAndDownloadService.FindOrCreateFile(fileMd5, fileName, chunkTotal)
+	if err != nil {
+		global.GVA_LOG.Error("查找或创建记录失败!", zap.Error(err))
+		response.FailWithMessage("查找或创建记录失败", c)
+		return
+	}
+	pathC, err := utils.BreakPointContinue(cen, fileName, chunkNumber, chunkTotal, fileMd5)
+	if err != nil {
+		global.GVA_LOG.Error("断点续传失败!", zap.Error(err))
+		response.FailWithMessage("断点续传失败", c)
+		return
+	}
+
+	if err = fileUploadAndDownloadService.CreateFileChunk(file.ID, pathC, chunkNumber); err != nil {
+		global.GVA_LOG.Error("创建文件记录失败!", zap.Error(err))
+		response.FailWithMessage("创建文件记录失败", c)
+		return
+	}
+	response.OkWithMessage("切片创建成功", c)
+}
+
+// FindFile
+// @Tags      ExaFileUploadAndDownload
+// @Summary   查找文件
+// @Security  ApiKeyAuth
+// @accept    multipart/form-data
+// @Produce   application/json
+// @Param     file  formData  file                                                        true  "Find the file, 查找文件"
+// @Success   200   {object}  response.Response{data=exampleRes.FileResponse,msg=string}  "查找文件,返回包括文件详情"
+// @Router    /fileUploadAndDownload/findFile [post]
+func (b *FileUploadAndDownloadApi) FindFile(c *gin.Context) {
+	fileMd5 := c.Query("fileMd5")
+	fileName := c.Query("fileName")
+	chunkTotal, _ := strconv.Atoi(c.Query("chunkTotal"))
+	file, err := fileUploadAndDownloadService.FindOrCreateFile(fileMd5, fileName, chunkTotal)
+	if err != nil {
+		global.GVA_LOG.Error("查找失败!", zap.Error(err))
+		response.FailWithMessage("查找失败", c)
+	} else {
+		response.OkWithDetailed(exampleRes.FileResponse{File: file}, "查找成功", c)
+	}
+}
+
+// BreakpointContinueFinish
+// @Tags      ExaFileUploadAndDownload
+// @Summary   创建文件
+// @Security  ApiKeyAuth
+// @accept    multipart/form-data
+// @Produce   application/json
+// @Param     file  formData  file                                                            true  "上传文件完成"
+// @Success   200   {object}  response.Response{data=exampleRes.FilePathResponse,msg=string}  "创建文件,返回包括文件路径"
+// @Router    /fileUploadAndDownload/findFile [post]
+func (b *FileUploadAndDownloadApi) BreakpointContinueFinish(c *gin.Context) {
+	fileMd5 := c.Query("fileMd5")
+	fileName := c.Query("fileName")
+	filePath, err := utils.MakeFile(fileName, fileMd5)
+	if err != nil {
+		global.GVA_LOG.Error("文件创建失败!", zap.Error(err))
+		response.FailWithDetailed(exampleRes.FilePathResponse{FilePath: filePath}, "文件创建失败", c)
+	} else {
+		response.OkWithDetailed(exampleRes.FilePathResponse{FilePath: filePath}, "文件创建成功", c)
+	}
+}
+
+// RemoveChunk
+// @Tags      ExaFileUploadAndDownload
+// @Summary   删除切片
+// @Security  ApiKeyAuth
+// @accept    multipart/form-data
+// @Produce   application/json
+// @Param     file  formData  file                           true  "删除缓存切片"
+// @Success   200   {object}  response.Response{msg=string}  "删除切片"
+// @Router    /fileUploadAndDownload/removeChunk [post]
+func (b *FileUploadAndDownloadApi) RemoveChunk(c *gin.Context) {
+	var file example.ExaFile
+	err := c.ShouldBindJSON(&file)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.RemoveChunk(file.FileMd5)
+	if err != nil {
+		global.GVA_LOG.Error("缓存切片删除失败!", zap.Error(err))
+		return
+	}
+	err = fileUploadAndDownloadService.DeleteFileChunk(file.FileMd5, file.FilePath)
+	if err != nil {
+		global.GVA_LOG.Error(err.Error(), zap.Error(err))
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	response.OkWithMessage("缓存切片删除成功", c)
+}

+ 176 - 0
server/api/v1/example/exa_customer.go

@@ -0,0 +1,176 @@
+package example
+
+import (
+	"github.com/gin-gonic/gin"
+	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/request"
+	"server/model/common/response"
+	"server/model/example"
+	exampleRes "server/model/example/response"
+	"server/utils"
+)
+
+type CustomerApi struct{}
+
+// CreateExaCustomer
+// @Tags      ExaCustomer
+// @Summary   创建客户
+// @Security  ApiKeyAuth
+// @accept    application/json
+// @Produce   application/json
+// @Param     data  body      example.ExaCustomer            true  "客户用户名, 客户手机号码"
+// @Success   200   {object}  response.Response{msg=string}  "创建客户"
+// @Router    /customer/customer [post]
+func (e *CustomerApi) CreateExaCustomer(c *gin.Context) {
+	var customer example.ExaCustomer
+	err := c.ShouldBindJSON(&customer)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(customer, utils.CustomerVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	customer.SysUserID = utils.GetUserID(c)
+	customer.SysUserAuthorityID = utils.GetUserAuthorityId(c)
+	err = customerService.CreateExaCustomer(customer)
+	if err != nil {
+		global.GVA_LOG.Error("创建失败!", zap.Error(err))
+		response.FailWithMessage("创建失败", c)
+		return
+	}
+	response.OkWithMessage("创建成功", c)
+}
+
+// DeleteExaCustomer
+// @Tags      ExaCustomer
+// @Summary   删除客户
+// @Security  ApiKeyAuth
+// @accept    application/json
+// @Produce   application/json
+// @Param     data  body      example.ExaCustomer            true  "客户ID"
+// @Success   200   {object}  response.Response{msg=string}  "删除客户"
+// @Router    /customer/customer [delete]
+func (e *CustomerApi) DeleteExaCustomer(c *gin.Context) {
+	var customer example.ExaCustomer
+	err := c.ShouldBindJSON(&customer)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(customer.GVA_MODEL, utils.IdVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = customerService.DeleteExaCustomer(customer)
+	if err != nil {
+		global.GVA_LOG.Error("删除失败!", zap.Error(err))
+		response.FailWithMessage("删除失败", c)
+		return
+	}
+	response.OkWithMessage("删除成功", c)
+}
+
+// UpdateExaCustomer
+// @Tags      ExaCustomer
+// @Summary   更新客户信息
+// @Security  ApiKeyAuth
+// @accept    application/json
+// @Produce   application/json
+// @Param     data  body      example.ExaCustomer            true  "客户ID, 客户信息"
+// @Success   200   {object}  response.Response{msg=string}  "更新客户信息"
+// @Router    /customer/customer [put]
+func (e *CustomerApi) UpdateExaCustomer(c *gin.Context) {
+	var customer example.ExaCustomer
+	err := c.ShouldBindJSON(&customer)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(customer.GVA_MODEL, utils.IdVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(customer, utils.CustomerVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = customerService.UpdateExaCustomer(&customer)
+	if err != nil {
+		global.GVA_LOG.Error("更新失败!", zap.Error(err))
+		response.FailWithMessage("更新失败", c)
+		return
+	}
+	response.OkWithMessage("更新成功", c)
+}
+
+// GetExaCustomer
+// @Tags      ExaCustomer
+// @Summary   获取单一客户信息
+// @Security  ApiKeyAuth
+// @accept    application/json
+// @Produce   application/json
+// @Param     data  query     example.ExaCustomer                                                true  "客户ID"
+// @Success   200   {object}  response.Response{data=exampleRes.ExaCustomerResponse,msg=string}  "获取单一客户信息,返回包括客户详情"
+// @Router    /customer/customer [get]
+func (e *CustomerApi) GetExaCustomer(c *gin.Context) {
+	var customer example.ExaCustomer
+	err := c.ShouldBindQuery(&customer)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(customer.GVA_MODEL, utils.IdVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	data, err := customerService.GetExaCustomer(customer.ID)
+	if err != nil {
+		global.GVA_LOG.Error("获取失败!", zap.Error(err))
+		response.FailWithMessage("获取失败", c)
+		return
+	}
+	response.OkWithDetailed(exampleRes.ExaCustomerResponse{Customer: data}, "获取成功", c)
+}
+
+// GetExaCustomerList
+// @Tags      ExaCustomer
+// @Summary   分页获取权限客户列表
+// @Security  ApiKeyAuth
+// @accept    application/json
+// @Produce   application/json
+// @Param     data  query     request.PageInfo                                        true  "页码, 每页大小"
+// @Success   200   {object}  response.Response{data=response.PageResult,msg=string}  "分页获取权限客户列表,返回包括列表,总数,页码,每页数量"
+// @Router    /customer/customerList [get]
+func (e *CustomerApi) GetExaCustomerList(c *gin.Context) {
+	var pageInfo request.PageInfo
+	err := c.ShouldBindQuery(&pageInfo)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(pageInfo, utils.PageInfoVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	customerList, total, err := customerService.GetCustomerInfoList(utils.GetUserAuthorityId(c), pageInfo)
+	if err != nil {
+		global.GVA_LOG.Error("获取失败!", zap.Error(err))
+		response.FailWithMessage("获取失败"+err.Error(), c)
+		return
+	}
+	response.OkWithDetailed(response.PageResult{
+		List:     customerList,
+		Total:    total,
+		Page:     pageInfo.Page,
+		PageSize: pageInfo.PageSize,
+	}, "获取成功", c)
+}

+ 110 - 0
server/api/v1/example/exa_file_upload_download.go

@@ -0,0 +1,110 @@
+package example
+
+import (
+	"github.com/gin-gonic/gin"
+	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/request"
+	"server/model/common/response"
+	"server/model/example"
+	exampleRes "server/model/example/response"
+)
+
+type FileUploadAndDownloadApi struct{}
+
+// UploadFile
+// @Tags      ExaFileUploadAndDownload
+// @Summary   上传文件示例
+// @Security  ApiKeyAuth
+// @accept    multipart/form-data
+// @Produce   application/json
+// @Param     file  formData  file                                                           true  "上传文件示例"
+// @Success   200   {object}  response.Response{data=exampleRes.ExaFileResponse,msg=string}  "上传文件示例,返回包括文件详情"
+// @Router    /fileUploadAndDownload/upload [post]
+func (b *FileUploadAndDownloadApi) UploadFile(c *gin.Context) {
+	var file example.ExaFileUploadAndDownload
+	noSave := c.DefaultQuery("noSave", "0")
+	_, header, err := c.Request.FormFile("file")
+	if err != nil {
+		global.GVA_LOG.Error("接收文件失败!", zap.Error(err))
+		response.FailWithMessage("接收文件失败", c)
+		return
+	}
+	file, err = fileUploadAndDownloadService.UploadFile(header, noSave) // 文件上传后拿到文件路径
+	if err != nil {
+		global.GVA_LOG.Error("修改数据库链接失败!", zap.Error(err))
+		response.FailWithMessage("修改数据库链接失败", c)
+		return
+	}
+	response.OkWithDetailed(exampleRes.ExaFileResponse{File: file}, "上传成功", c)
+}
+
+// EditFileName 编辑文件名或者备注
+func (b *FileUploadAndDownloadApi) EditFileName(c *gin.Context) {
+	var file example.ExaFileUploadAndDownload
+	err := c.ShouldBindJSON(&file)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = fileUploadAndDownloadService.EditFileName(file)
+	if err != nil {
+		global.GVA_LOG.Error("编辑失败!", zap.Error(err))
+		response.FailWithMessage("编辑失败", c)
+		return
+	}
+	response.OkWithMessage("编辑成功", c)
+}
+
+// DeleteFile
+// @Tags      ExaFileUploadAndDownload
+// @Summary   删除文件
+// @Security  ApiKeyAuth
+// @Produce   application/json
+// @Param     data  body      example.ExaFileUploadAndDownload  true  "传入文件里面id即可"
+// @Success   200   {object}  response.Response{msg=string}     "删除文件"
+// @Router    /fileUploadAndDownload/deleteFile [post]
+func (b *FileUploadAndDownloadApi) DeleteFile(c *gin.Context) {
+	var file example.ExaFileUploadAndDownload
+	err := c.ShouldBindJSON(&file)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	if err := fileUploadAndDownloadService.DeleteFile(file); err != nil {
+		global.GVA_LOG.Error("删除失败!", zap.Error(err))
+		response.FailWithMessage("删除失败", c)
+		return
+	}
+	response.OkWithMessage("删除成功", c)
+}
+
+// GetFileList
+// @Tags      ExaFileUploadAndDownload
+// @Summary   分页文件列表
+// @Security  ApiKeyAuth
+// @accept    application/json
+// @Produce   application/json
+// @Param     data  body      request.PageInfo                                        true  "页码, 每页大小"
+// @Success   200   {object}  response.Response{data=response.PageResult,msg=string}  "分页文件列表,返回包括列表,总数,页码,每页数量"
+// @Router    /fileUploadAndDownload/getFileList [post]
+func (b *FileUploadAndDownloadApi) GetFileList(c *gin.Context) {
+	var pageInfo request.PageInfo
+	err := c.ShouldBindJSON(&pageInfo)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	list, total, err := fileUploadAndDownloadService.GetFileRecordInfoList(pageInfo)
+	if err != nil {
+		global.GVA_LOG.Error("获取失败!", zap.Error(err))
+		response.FailWithMessage("获取失败", c)
+		return
+	}
+	response.OkWithDetailed(response.PageResult{
+		List:     list,
+		Total:    total,
+		Page:     pageInfo.Page,
+		PageSize: pageInfo.PageSize,
+	}, "获取成功", c)
+}

+ 141 - 0
server/api/v1/system/app_dept.go

@@ -0,0 +1,141 @@
+package system
+
+import (
+	"github.com/gin-gonic/gin"
+	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/request"
+	"server/model/common/response"
+	"server/model/system"
+	request2 "server/model/system/request"
+	"server/utils"
+)
+
+type DeptApi struct{}
+
+func (a *DeptApi) GetDeptList(c *gin.Context) {
+	var pageInfo request.PageInfo
+	err := c.ShouldBindJSON(&pageInfo)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(pageInfo, utils.PageInfoVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	list, total, err := deptService.GetAppRootDept(pageInfo)
+
+	if err != nil {
+		global.GVA_LOG.Error("获取失败!", zap.Error(err))
+		response.FailWithMessage("获取失败", c)
+		return
+	}
+	response.OkWithDetailed(response.PageResult{
+		List:     list,
+		Total:    total,
+		Page:     pageInfo.Page,
+		PageSize: pageInfo.PageSize,
+	}, "获取成功", c)
+}
+
+// 创建部门
+func (a *DeptApi) Establish(c *gin.Context) {
+	var r request2.ReqDept
+	err := c.ShouldBindJSON(&r)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	dept := &system.Dept{DeptName: r.DeptName, Responsible: r.Responsible, ParentId: r.ParentId, Phone: r.Phone, Remark: r.Remark}
+	err = deptService.Establish(*dept)
+	if err != nil {
+		global.GVA_LOG.Error("新增失败!", zap.Error(err))
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	response.OkWithMessage("新增成功", c)
+}
+
+// 修改部门信息
+func (a *DeptApi) SetDeptInfo(c *gin.Context) {
+	var dept request2.ChangeDeptInfo
+	err := c.ShouldBindJSON(&dept)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(dept, utils.IdVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = deptService.SetDeptInfo(system.Dept{
+		ID:          dept.ID,
+		DeptName:    dept.DeptName,
+		ParentId:    dept.ParentId,
+		Remark:      dept.Remark,
+		Responsible: dept.Responsible,
+		Phone:       dept.Phone,
+	})
+	if err != nil {
+		global.GVA_LOG.Error("设置失败!", zap.Error(err))
+		response.FailWithMessage("设置失败", c)
+		return
+	}
+	response.OkWithMessage("设置成功", c)
+}
+
+// 删除部门
+func (a *DeptApi) DeleteDept(c *gin.Context) {
+	var reqId request.GetById
+	err := c.ShouldBindJSON(&reqId)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(reqId, utils.IdVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = deptService.DeleteDept(reqId.ID)
+	if err != nil {
+		global.GVA_LOG.Error("删除失败!", zap.Error(err))
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	response.OkWithMessage("删除成功", c)
+}
+
+func (a *DeptApi) GetDepts(c *gin.Context) {
+	depts, err := deptService.GetChildDepts()
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	users, err := deptService.GetAllUsers()
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+
+	deptSysUsersMap := make(map[int][]system.SysUser)
+	for _, user := range users {
+		deptSysUsersMap[user.DeptId] = append(deptSysUsersMap[user.DeptId], user)
+	}
+
+	var deptSysUsers []system.Dept
+	for _, dept := range depts {
+		users := deptSysUsersMap[dept.ID]
+		if users != nil {
+			deptSysUsers = append(deptSysUsers, system.Dept{
+				ID:       dept.ID,
+				DeptName: dept.DeptName,
+				Users:    users,
+			})
+		}
+	}
+	response.OkWithData(deptSysUsers, c)
+}

+ 210 - 0
server/api/v1/system/app_file.go

@@ -0,0 +1,210 @@
+package system
+
+import (
+	"context"
+	"github.com/gin-gonic/gin"
+	"go.uber.org/zap"
+	"google.golang.org/grpc"
+	"google.golang.org/grpc/credentials/insecure"
+	"os"
+	"path"
+	"path/filepath"
+	"server/global"
+	"server/model/common/request"
+	"server/model/common/response"
+	"server/model/system"
+	systemReq "server/model/system/request"
+	proto "server/proto"
+	"server/utils"
+	"strconv"
+	"strings"
+	"time"
+)
+
+type FileApi struct{}
+
+func (b *FileApi) GetFileList(c *gin.Context) {
+	var search systemReq.SearchAppFileParams
+	err := c.ShouldBindJSON(&search)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(search.PageInfo, utils.PageInfoVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	list, total, err := fileService.GetFileInfoList(search)
+	if err != nil {
+		global.GVA_LOG.Error("获取失败!", zap.Error(err))
+		response.FailWithMessage("获取失败", c)
+		return
+	}
+	response.OkWithDetailed(response.PageResult{
+		List:     list,
+		Total:    total,
+		Page:     search.PageInfo.Page,
+		PageSize: search.PageInfo.PageSize,
+	}, "获取成功", c)
+}
+
+func (b *FileApi) Upload(c *gin.Context) {
+	id := utils.GetUserID(c)
+	// 获取表单字段的值
+	categoryName := c.PostForm("categoryName")
+	str := c.PostForm("authId")
+	authId := strings.Replace(str, ",", "", -1)
+	// 获取上传的文件
+	file, err := c.FormFile("file")
+	if err != nil {
+		global.GVA_LOG.Error("获取文件数据失败", zap.Error(err))
+		response.FailWithMessage("获取文件数据失败", c)
+		return
+	}
+	//获取后缀
+	sufx := path.Ext(file.Filename)
+	//利用时间戳生成文件名
+	fileNameInt := time.Now().Unix()
+	fileNameStr := strconv.FormatInt(fileNameInt, 10)
+	//新的文件名
+	newfileName := fileNameStr + sufx
+	_, err = os.Stat("uploadfiles")
+	if os.IsNotExist(err) {
+		os.Mkdir("./uploadfiles", os.ModePerm)
+	}
+	//保存文件
+	filePath := filepath.Join("uploadfiles", "/", newfileName)
+	c.SaveUploadedFile(file, filePath)
+
+	savePath := "uploadfiles/" + newfileName
+	currentTimeValue := time.Now()
+	err = fileService.Upload(system.File{
+		OriginalName:  strings.TrimSuffix(file.Filename, filepath.Ext(file.Filename)),
+		EncryptedName: file.Filename,
+		SavePath:      savePath,
+		CategoryName:  categoryName,
+		AuthId:        authId,
+		SuffixName:    path.Ext(file.Filename),
+		UploadTime:    &currentTimeValue,
+		Uploader:      int(id),
+		Icon:          strings.TrimPrefix(path.Ext(file.Filename), ".") + ".png",
+	})
+	if err != nil {
+		global.GVA_LOG.Error("上传失败!", zap.Error(err))
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	response.OkWithMessage("上传成功", c)
+}
+
+func (b *FileApi) SetFileInfo(c *gin.Context) {
+	var file systemReq.ChangeFileInfo
+	err := c.ShouldBindJSON(&file)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(file, utils.IdVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	// 将整数数组转换为字符串切片
+	var result string
+	for _, v := range file.AuthId {
+		result += strconv.Itoa(v)
+	}
+
+	err = fileService.SetFileInfo(system.File{
+		ID:           file.ID,
+		CategoryName: file.CategoryName,
+		AuthId:       result,
+	})
+	if err != nil {
+		global.GVA_LOG.Error("设置失败!", zap.Error(err))
+		response.FailWithMessage("设置失败", c)
+		return
+	}
+	response.OkWithMessage("设置成功", c)
+}
+
+func (b *FileApi) DeleteBaseFile(c *gin.Context) {
+	var reqId request.GetById
+	err := c.ShouldBindJSON(&reqId)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(reqId, utils.IdVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = fileService.DeleteFile(reqId.ID)
+	if err != nil {
+		global.GVA_LOG.Error("删除失败!", zap.Error(err))
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	response.OkWithMessage("删除成功", c)
+}
+
+func (b *FileApi) Distribute(c *gin.Context) {
+	id := utils.GetUserID(c)
+	var file systemReq.Distribute
+	err := c.ShouldBindJSON(&file)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	err = utils.Verify(file, utils.IdVerify)
+	if err != nil {
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+
+	users, err := deptService.GetDeptsUsers(file.Depts)
+	if err != nil {
+		global.GVA_LOG.Error("操作失败!", zap.Error(err))
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+	var userFile []systemReq.UserFile
+	var usersId []int64
+	for _, user := range users {
+		userFile = append(userFile, systemReq.UserFile{
+			Operator:        int(id),
+			Receiver:        int(user.ID),
+			FileId:          file.ID,
+			EffectiveDate:   file.EfectiveDate,
+			OperationStatus: "下发",
+			IsDeleted:       0,
+		})
+
+		usersId = append(usersId, int64(user.ID))
+	}
+	err = fileService.Distribute(userFile)
+	if err != nil {
+		global.GVA_LOG.Error("下发失败!", zap.Error(err))
+		response.FailWithMessage(err.Error(), c)
+		return
+	}
+
+	//下发消息
+	conn, err := grpc.Dial("127.0.0.1:9090", grpc.WithTransportCredentials(insecure.NewCredentials()))
+	if err != nil {
+		global.GVA_LOG.Error("grpc远程连接错误!", zap.Error(err))
+		response.FailWithMessage(err.Error(), c)
+	}
+	defer conn.Close()
+	//建立连接
+	client := proto.NewSendMessageClient(conn)
+
+	resp, err := client.Distribution(context.Background(), &proto.DistributionRequest{Users: usersId})
+	if resp.GetCode() != 200 && err != nil {
+		global.GVA_LOG.Error("消息通知失败!", zap.Error(err))
+		response.FailWithMessage(err.Error(), c)
+	}
+	response.OkWithMessage("下发成功", c)
+}

+ 5 - 1
server/api/v1/system/enter.go

@@ -1,6 +1,6 @@
 package system
 
-import "github.com/flipped-aurora/gin-vue-admin/server/service"
+import "server/service"
 
 type ApiGroup struct {
 	DBApi
@@ -18,6 +18,8 @@ type ApiGroup struct {
 	DictionaryDetailApi
 	AuthorityBtnApi
 	SysExportTemplateApi
+	DeptApi
+	FileApi
 }
 
 var (
@@ -36,4 +38,6 @@ var (
 	autoCodeHistoryService  = service.ServiceGroupApp.SystemServiceGroup.AutoCodeHistoryService
 	dictionaryDetailService = service.ServiceGroupApp.SystemServiceGroup.DictionaryDetailService
 	authorityBtnService     = service.ServiceGroupApp.SystemServiceGroup.AuthorityBtnService
+	deptService             = service.ServiceGroupApp.SystemServiceGroup.DeptService
+	fileService             = service.ServiceGroupApp.SystemServiceGroup.FileService
 )

+ 7 - 7
server/api/v1/system/sys_api.go

@@ -1,13 +1,13 @@
 package system
 
 import (
-	"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"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	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"
+	"server/global"
+	"server/model/common/request"
+	"server/model/common/response"
+	"server/model/system"
+	systemReq "server/model/system/request"
+	systemRes "server/model/system/response"
+	"server/utils"
 
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"

+ 6 - 6
server/api/v1/system/sys_authority.go

@@ -1,12 +1,12 @@
 package system
 
 import (
-	"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"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	systemRes "github.com/flipped-aurora/gin-vue-admin/server/model/system/response"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
+	"server/global"
+	"server/model/common/request"
+	"server/model/common/response"
+	"server/model/system"
+	systemRes "server/model/system/response"
+	"server/utils"
 
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"

+ 3 - 3
server/api/v1/system/sys_authority_btn.go

@@ -1,11 +1,11 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/response"
+	"server/model/system/request"
 )
 
 type AuthorityBtnApi struct{}

+ 6 - 6
server/api/v1/system/sys_auto_code.go

@@ -7,10 +7,10 @@ import (
 	"os"
 	"strings"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
+	"server/global"
+	"server/model/common/response"
+	"server/model/system"
+	"server/utils"
 
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
@@ -95,7 +95,7 @@ func (autoApi *AutoCodeApi) CreateTemp(c *gin.Context) {
 			_ = os.Remove("./ginvueadmin.zip")
 		}
 	} else {
-		c.Writer.Header().Add("Content-Disposition", fmt.Sprintf("attachment; filename=%s", "ginvueadmin.zip")) // fmt.Sprintf("attachment; filename=%s", filename)对下载的文件重命名
+		c.Writer.Header().Add("Content-Disposition", fmt.Sprintf("attachment; deptname=%s", "ginvueadmin.zip")) // fmt.Sprintf("attachment; deptname=%s", deptname)对下载的文件重命名
 		c.Writer.Header().Add("Content-Type", "application/json")
 		c.Writer.Header().Add("success", "true")
 		c.File("./ginvueadmin.zip")
@@ -281,7 +281,7 @@ func (autoApi *AutoCodeApi) AutoPlug(c *gin.Context) {
 // @Security  ApiKeyAuth
 // @accept    multipart/form-data
 // @Produce   application/json
-// @Param     plug  formData  file                                              true  "this is a test file"
+// @Param     plug  formData  dept                                              true  "this is a test dept"
 // @Success   200   {object}  response.Response{data=[]interface{},msg=string}  "安装插件成功"
 // @Router    /autoCode/installPlugin [post]
 func (autoApi *AutoCodeApi) InstallPlugin(c *gin.Context) {

+ 4 - 4
server/api/v1/system/sys_auto_code_history.go

@@ -1,12 +1,12 @@
 package system
 
 import (
-	"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"
-	systemReq "github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/request"
+	"server/model/common/response"
+	systemReq "server/model/system/request"
 )
 
 type AutoCodeHistoryApi struct{}

+ 3 - 3
server/api/v1/system/sys_captcha.go

@@ -3,12 +3,12 @@ package system
 import (
 	"time"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
-	systemRes "github.com/flipped-aurora/gin-vue-admin/server/model/system/response"
 	"github.com/gin-gonic/gin"
 	"github.com/mojocn/base64Captcha"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/response"
+	systemRes "server/model/system/response"
 )
 
 // 当开启多服务器部署时,替换下面的配置,使用redis共享存储验证码

+ 5 - 5
server/api/v1/system/sys_casbin.go

@@ -1,13 +1,13 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
-	"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"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/response"
+	"server/model/system/request"
+	systemRes "server/model/system/response"
+	"server/utils"
 )
 
 type CasbinApi struct{}

+ 3 - 3
server/api/v1/system/sys_dictionary.go

@@ -1,11 +1,11 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/response"
+	"server/model/system"
 )
 
 type DictionaryApi struct{}

+ 5 - 5
server/api/v1/system/sys_dictionary_detail.go

@@ -1,13 +1,13 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/response"
+	"server/model/system"
+	"server/model/system/request"
+	"server/utils"
 )
 
 type DictionaryDetailApi struct{}

+ 15 - 15
server/api/v1/system/sys_export_template.go

@@ -2,16 +2,16 @@ package system
 
 import (
 	"fmt"
-	"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"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	systemReq "github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
-	"github.com/flipped-aurora/gin-vue-admin/server/service"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
 	"net/http"
+	"server/global"
+	"server/model/common/request"
+	"server/model/common/response"
+	"server/model/system"
+	systemReq "server/model/system/request"
+	"server/service"
+	"server/utils"
 )
 
 type SysExportTemplateApi struct {
@@ -196,13 +196,13 @@ func (sysExportTemplateApi *SysExportTemplateApi) ExportExcel(c *gin.Context) {
 		response.FailWithMessage("模板ID不能为空", c)
 		return
 	}
-	if file, name, err := sysExportTemplateService.ExportExcel(templateID, queryParams); err != nil {
+	if dept, name, err := sysExportTemplateService.ExportExcel(templateID, queryParams); err != nil {
 		global.GVA_LOG.Error("获取失败!", zap.Error(err))
 		response.FailWithMessage("获取失败", c)
 	} else {
-		c.Header("Content-Disposition", fmt.Sprintf("attachment; filename=%s", name+utils.RandomString(6)+".xlsx")) // 对下载的文件重命名
+		c.Header("Content-Disposition", fmt.Sprintf("attachment; deptname=%s", name+utils.RandomString(6)+".xlsx")) // 对下载的文件重命名
 		c.Header("success", "true")
-		c.Data(http.StatusOK, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", file.Bytes())
+		c.Data(http.StatusOK, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", dept.Bytes())
 	}
 }
 
@@ -219,13 +219,13 @@ func (sysExportTemplateApi *SysExportTemplateApi) ExportTemplate(c *gin.Context)
 		response.FailWithMessage("模板ID不能为空", c)
 		return
 	}
-	if file, name, err := sysExportTemplateService.ExportTemplate(templateID); err != nil {
+	if dept, name, err := sysExportTemplateService.ExportTemplate(templateID); err != nil {
 		global.GVA_LOG.Error("获取失败!", zap.Error(err))
 		response.FailWithMessage("获取失败", c)
 	} else {
-		c.Header("Content-Disposition", fmt.Sprintf("attachment; filename=%s", name+"模板.xlsx")) // 对下载的文件重命名
+		c.Header("Content-Disposition", fmt.Sprintf("attachment; deptname=%s", name+"模板.xlsx")) // 对下载的文件重命名
 		c.Header("success", "true")
-		c.Data(http.StatusOK, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", file.Bytes())
+		c.Data(http.StatusOK, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", dept.Bytes())
 	}
 }
 
@@ -242,13 +242,13 @@ func (sysExportTemplateApi *SysExportTemplateApi) ImportExcel(c *gin.Context) {
 		response.FailWithMessage("模板ID不能为空", c)
 		return
 	}
-	file, err := c.FormFile("file")
+	dept, err := c.FormFile("dept")
 	if err != nil {
 		global.GVA_LOG.Error("文件获取失败!", zap.Error(err))
 		response.FailWithMessage("文件获取失败", c)
 		return
 	}
-	if err := sysExportTemplateService.ImportExcel(templateID, file); err != nil {
+	if err := sysExportTemplateService.ImportExcel(templateID, dept); err != nil {
 		global.GVA_LOG.Error(err.Error(), zap.Error(err))
 		response.FailWithMessage(err.Error(), c)
 	} else {

+ 3 - 3
server/api/v1/system/sys_initdb.go

@@ -1,10 +1,10 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/response"
+	"server/model/system/request"
 
 	"github.com/gin-gonic/gin"
 )

+ 4 - 4
server/api/v1/system/sys_jwt_blacklist.go

@@ -1,12 +1,12 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/response"
+	"server/model/system"
+	"server/utils"
 )
 
 type JwtApi struct{}

+ 7 - 7
server/api/v1/system/sys_menu.go

@@ -1,13 +1,13 @@
 package system
 
 import (
-	"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"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	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"
+	"server/global"
+	"server/model/common/request"
+	"server/model/common/response"
+	"server/model/system"
+	systemReq "server/model/system/request"
+	systemRes "server/model/system/response"
+	"server/utils"
 
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"

+ 6 - 6
server/api/v1/system/sys_operation_record.go

@@ -1,14 +1,14 @@
 package system
 
 import (
-	"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"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	systemReq "github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/request"
+	"server/model/common/response"
+	"server/model/system"
+	systemReq "server/model/system/request"
+	"server/utils"
 )
 
 type OperationRecordApi struct{}

+ 5 - 5
server/api/v1/system/sys_system.go

@@ -1,13 +1,13 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	systemRes "github.com/flipped-aurora/gin-vue-admin/server/model/system/response"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/common/response"
+	"server/model/system"
+	systemRes "server/model/system/response"
+	"server/utils"
 )
 
 type SystemApi struct{}

+ 40 - 14
server/api/v1/system/sys_user.go

@@ -2,15 +2,16 @@ package system
 
 import (
 	"strconv"
+	"strings"
 	"time"
 
-	"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"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	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"
+	"server/global"
+	"server/model/common/request"
+	"server/model/common/response"
+	"server/model/system"
+	systemReq "server/model/system/request"
+	systemRes "server/model/system/response"
+	"server/utils"
 
 	"github.com/gin-gonic/gin"
 	"github.com/redis/go-redis/v9"
@@ -71,6 +72,13 @@ func (b *BaseApi) Login(c *gin.Context) {
 			response.FailWithMessage("用户名不存在或者密码错误", c)
 			return
 		}
+		if user.AuthorityId != 888 {
+			global.GVA_LOG.Error("登陆失败!您没有权限!")
+			// 验证码次数+1
+			global.BlackCache.Increment(key, 1)
+			response.FailWithMessage("登陆失败!您没有权限", c)
+			return
+		}
 		if user.Enable != 1 {
 			global.GVA_LOG.Error("登陆失败! 用户被禁止登录!")
 			// 验证码次数+1
@@ -78,6 +86,7 @@ func (b *BaseApi) Login(c *gin.Context) {
 			response.FailWithMessage("用户被禁止登录", c)
 			return
 		}
+
 		b.TokenNext(c, *user)
 		return
 	}
@@ -172,7 +181,16 @@ func (b *BaseApi) Register(c *gin.Context) {
 			AuthorityId: v,
 		})
 	}
-	user := &system.SysUser{Username: r.Username, NickName: r.NickName, Password: r.Password, HeaderImg: r.HeaderImg, AuthorityId: r.AuthorityId, Authorities: authorities, Enable: r.Enable, Phone: r.Phone, Email: r.Email}
+
+	// 将整数数组转换为字符串切片
+	strSlice := make([]string, len(r.AuthId))
+	for i, num := range r.AuthId {
+		strSlice[i] = strconv.Itoa(num)
+	}
+	// 使用 strings.Join() 函数连接字符串切片
+	authstr := strings.Join(strSlice, "")
+
+	user := &system.SysUser{Username: r.Username, NickName: r.NickName, Password: r.Password, HeaderImg: r.HeaderImg, AuthorityId: r.AuthorityId, Authorities: authorities, Enable: r.Enable, Phone: r.Phone, Email: r.Email, DeptId: r.DeptId, AuthId: authstr}
 	userReturn, err := userService.Register(*user)
 	if err != nil {
 		global.GVA_LOG.Error("注册失败!", zap.Error(err))
@@ -223,18 +241,18 @@ func (b *BaseApi) ChangePassword(c *gin.Context) {
 // @Success   200   {object}  response.Response{data=response.PageResult,msg=string}  "分页获取用户列表,返回包括列表,总数,页码,每页数量"
 // @Router    /user/getUserList [post]
 func (b *BaseApi) GetUserList(c *gin.Context) {
-	var pageInfo request.PageInfo
-	err := c.ShouldBindJSON(&pageInfo)
+	var search systemReq.SearchAppUserParams
+	err := c.ShouldBindJSON(&search)
 	if err != nil {
 		response.FailWithMessage(err.Error(), c)
 		return
 	}
-	err = utils.Verify(pageInfo, utils.PageInfoVerify)
+	err = utils.Verify(search.PageInfo, utils.PageInfoVerify)
 	if err != nil {
 		response.FailWithMessage(err.Error(), c)
 		return
 	}
-	list, total, err := userService.GetUserInfoList(pageInfo)
+	list, total, err := userService.GetUserInfoList(search)
 	if err != nil {
 		global.GVA_LOG.Error("获取失败!", zap.Error(err))
 		response.FailWithMessage("获取失败", c)
@@ -243,8 +261,8 @@ func (b *BaseApi) GetUserList(c *gin.Context) {
 	response.OkWithDetailed(response.PageResult{
 		List:     list,
 		Total:    total,
-		Page:     pageInfo.Page,
-		PageSize: pageInfo.PageSize,
+		Page:     search.PageInfo.Page,
+		PageSize: search.PageInfo.PageSize,
 	}, "获取成功", c)
 }
 
@@ -379,6 +397,12 @@ func (b *BaseApi) SetUserInfo(c *gin.Context) {
 			return
 		}
 	}
+	// 将整数数组转换为字符串切片
+	var result string
+	for _, v := range user.AuthId {
+		result += strconv.Itoa(v)
+	}
+
 	err = userService.SetUserInfo(system.SysUser{
 		GVA_MODEL: global.GVA_MODEL{
 			ID: user.ID,
@@ -389,6 +413,8 @@ func (b *BaseApi) SetUserInfo(c *gin.Context) {
 		Email:     user.Email,
 		SideMode:  user.SideMode,
 		Enable:    user.Enable,
+		DeptId:    user.DeptId,
+		AuthId:    result,
 	})
 	if err != nil {
 		global.GVA_LOG.Error("设置失败!", zap.Error(err))

+ 6 - 6
server/config.docker.yaml

@@ -1,4 +1,4 @@
-# github.com/flipped-aurora/gin-vue-admin/server Global Configuration
+# server Global Configuration
 
 # jwt configuration
 jwt:
@@ -10,7 +10,7 @@ jwt:
 zap:
   level: info
   format: console
-  prefix: "[github.com/flipped-aurora/gin-vue-admin/server]"
+  prefix: "[server]"
   director: log
   show-line: true
   encode-level: LowercaseColorLevelEncoder
@@ -117,8 +117,8 @@ db-list:
 
 # local configuration
 local:
-  path: uploads/file
-  store-path: uploads/file
+  path: uploads/dept
+  store-path: uploads/dept
 
 # autocode configuration
 autocode:
@@ -165,7 +165,7 @@ tencent-cos:
   secret-id: your-secret-id
   secret-key: your-secret-key
   base-url: https://gin.vue.admin
-  path-prefix: github.com/flipped-aurora/gin-vue-admin/server
+  path-prefix: server
 
 # aws s3 configuration (minio compatible)
 aws-s3:
@@ -177,7 +177,7 @@ aws-s3:
   secret-id: your-secret-id
   secret-key: your-secret-key
   base-url: https://gin.vue.admin
-  path-prefix: github.com/flipped-aurora/gin-vue-admin/server
+  path-prefix: server
 
 # huawei obs configuration
 hua-wei-obs:

+ 8 - 13
server/config.yaml

@@ -27,7 +27,7 @@ aws-s3:
     secret-id: your-secret-id
     secret-key: your-secret-key
     base-url: https://gin.vue.admin
-    path-prefix: github.com/flipped-aurora/gin-vue-admin/server
+    path-prefix: server
     s3-force-path-style: false
     disable-ssl: false
 captcha:
@@ -88,8 +88,8 @@ jwt:
     buffer-time: 1d
     issuer: qmPlus
 local:
-    path: uploads/file
-    store-path: uploads/file
+    path: uploads/dept
+    store-path: uploads/dept
 mongo:
     coll: ""
     options: ""
@@ -170,14 +170,9 @@ qiniu:
     use-https: false
     use-cdn-domains: false
 redis:
+    db: 1
     addr: 127.0.0.1:6379
-    password: ""
-    db: 0
-    useCluster: false
-    clusterAddrs:
-        - 172.21.0.3:7000
-        - 172.21.0.4:7001
-        - 172.21.0.2:7002
+    password:
 sqlite:
     prefix: ""
     port: ""
@@ -200,7 +195,7 @@ system:
     iplimit-count: 15000
     iplimit-time: 3600
     use-multipoint: false
-    use-redis: false
+    use-redis: true
     use-mongo: false
 tencent-cos:
     bucket: xxxxx-10005608
@@ -208,10 +203,10 @@ tencent-cos:
     secret-id: your-secret-id
     secret-key: your-secret-key
     base-url: https://gin.vue.admin
-    path-prefix: github.com/flipped-aurora/gin-vue-admin/server
+    path-prefix: server
 zap:
     level: info
-    prefix: '[github.com/flipped-aurora/gin-vue-admin/server]'
+    prefix: '[server]'
     format: console
     director: log
     encode-level: LowercaseColorLevelEncoder

+ 10 - 10
server/core/internal/cutter.go

@@ -13,7 +13,7 @@ type Cutter struct {
 	level    string        // 日志级别(debug, info, warn, error, dpanic, panic, fatal)
 	format   string        // 时间格式(2006-01-02)
 	Director string        // 日志文件夹
-	file     *os.File      // 文件句柄
+	dept     *os.File      // 文件句柄
 	mutex    *sync.RWMutex // 读写锁
 }
 
@@ -39,15 +39,15 @@ func NewCutter(director string, level string, options ...CutterOption) *Cutter {
 }
 
 // Write satisfies the io.Writer interface. It writes to the
-// appropriate file handle that is currently being used.
-// If we have reached rotation time, the target file gets
+// appropriate dept handle that is currently being used.
+// If we have reached rotation time, the target dept gets
 // automatically rotated, and also purged if necessary.
 func (c *Cutter) Write(bytes []byte) (n int, err error) {
 	c.mutex.Lock()
 	defer func() {
-		if c.file != nil {
-			_ = c.file.Close()
-			c.file = nil
+		if c.dept != nil {
+			_ = c.dept.Close()
+			c.dept = nil
 		}
 		c.mutex.Unlock()
 	}()
@@ -83,15 +83,15 @@ func (c *Cutter) Write(bytes []byte) (n int, err error) {
 		formats = append(formats, business)
 	}
 	formats = append(formats, c.level+".log")
-	filename := filepath.Join(formats...)
-	dirname := filepath.Dir(filename)
+	deptname := filepath.Join(formats...)
+	dirname := filepath.Dir(deptname)
 	err = os.MkdirAll(dirname, 0755)
 	if err != nil {
 		return 0, err
 	}
-	c.file, err = os.OpenFile(filename, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
+	c.dept, err = os.OpenFile(deptname, os.O_CREATE|os.O_APPEND|os.O_WRONLY, 0644)
 	if err != nil {
 		return 0, err
 	}
-	return c.file.Write(bytes)
+	return c.dept.Write(bytes)
 }

+ 7 - 7
server/core/internal/file_rotatelogs.go

@@ -1,21 +1,21 @@
 package internal
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
 	"go.uber.org/zap/zapcore"
 	"os"
+	"server/global"
 )
 
-var FileRotatelogs = new(fileRotatelogs)
+var FileRotatelogs = new(deptRotatelogs)
 
-type fileRotatelogs struct{}
+type deptRotatelogs struct{}
 
 // GetWriteSyncer 获取 zapcore.WriteSyncer
 // Author [SliverHorn](https://github.com/SliverHorn)
-func (r *fileRotatelogs) GetWriteSyncer(level string) zapcore.WriteSyncer {
-	fileWriter := NewCutter(global.GVA_CONFIG.Zap.Director, level, WithCutterFormat("2006-01-02"))
+func (r *deptRotatelogs) GetWriteSyncer(level string) zapcore.WriteSyncer {
+	deptWriter := NewCutter(global.GVA_CONFIG.Zap.Director, level, WithCutterFormat("2006-01-02"))
 	if global.GVA_CONFIG.Zap.LogInConsole {
-		return zapcore.NewMultiWriteSyncer(zapcore.AddSync(os.Stdout), zapcore.AddSync(fileWriter))
+		return zapcore.NewMultiWriteSyncer(zapcore.AddSync(os.Stdout), zapcore.AddSync(deptWriter))
 	}
-	return zapcore.AddSync(fileWriter)
+	return zapcore.AddSync(deptWriter)
 }

+ 1 - 1
server/core/internal/zap.go

@@ -1,9 +1,9 @@
 package internal
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
 	"go.uber.org/zap"
 	"go.uber.org/zap/zapcore"
+	"server/global"
 	"time"
 )
 

+ 3 - 3
server/core/server.go

@@ -2,10 +2,10 @@ package core
 
 import (
 	"fmt"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/initialize"
-	"github.com/flipped-aurora/gin-vue-admin/server/service/system"
 	"go.uber.org/zap"
+	"server/global"
+	"server/initialize"
+	"server/service/system"
 )
 
 type server interface {

+ 6 - 6
server/core/viper.go

@@ -3,16 +3,16 @@ package core
 import (
 	"flag"
 	"fmt"
-	"github.com/flipped-aurora/gin-vue-admin/server/core/internal"
 	"github.com/gin-gonic/gin"
 	"os"
 	"path/filepath"
+	"server/core/internal"
 
 	"github.com/fsnotify/fsnotify"
 	"github.com/spf13/viper"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	_ "github.com/flipped-aurora/gin-vue-admin/server/packfile"
+	"server/global"
+	_ "server/packfile"
 )
 
 // Viper //
@@ -22,7 +22,7 @@ func Viper(path ...string) *viper.Viper {
 	var config string
 
 	if len(path) == 0 {
-		flag.StringVar(&config, "c", "", "choose config file.")
+		flag.StringVar(&config, "c", "", "choose config dept.")
 		flag.Parse()
 		if config == "" { // 判断命令行参数是否为空
 			if configEnv := os.Getenv(internal.ConfigEnv); configEnv == "" { // 判断 internal.ConfigEnv 常量存储的环境变量是否为空
@@ -54,12 +54,12 @@ func Viper(path ...string) *viper.Viper {
 	v.SetConfigType("yaml")
 	err := v.ReadInConfig()
 	if err != nil {
-		panic(fmt.Errorf("Fatal error config file: %s \n", err))
+		panic(fmt.Errorf("Fatal error config dept: %s \n", err))
 	}
 	v.WatchConfig()
 
 	v.OnConfigChange(func(e fsnotify.Event) {
-		fmt.Println("config file changed:", e.Name)
+		fmt.Println("config dept changed:", e.Name)
 		if err = v.Unmarshal(&global.GVA_CONFIG); err != nil {
 			fmt.Println(err)
 		}

+ 3 - 3
server/core/zap.go

@@ -2,12 +2,12 @@ package core
 
 import (
 	"fmt"
-	"github.com/flipped-aurora/gin-vue-admin/server/core/internal"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
 	"go.uber.org/zap"
 	"go.uber.org/zap/zapcore"
 	"os"
+	"server/core/internal"
+	"server/global"
+	"server/utils"
 )
 
 // Zap 获取 zap.Logger

+ 24 - 24
server/docs/docs.go

@@ -1396,8 +1396,8 @@ const docTemplate = `{
                 "summary": "安装插件",
                 "parameters": [
                     {
-                        "type": "file",
-                        "description": "this is a test file",
+                        "type": "dept",
+                        "description": "this is a test dept",
                         "name": "plug",
                         "in": "formData",
                         "required": true
@@ -2130,7 +2130,7 @@ const docTemplate = `{
                 }
             }
         },
-        "/fileUploadAndDownload/breakpointContinue": {
+        "/deptUploadAndDownload/breakpointContinue": {
             "post": {
                 "security": [
                     {
@@ -2149,9 +2149,9 @@ const docTemplate = `{
                 "summary": "断点续传到服务器",
                 "parameters": [
                     {
-                        "type": "file",
+                        "type": "dept",
                         "description": "an example for breakpoint resume, 断点续传示例",
-                        "name": "file",
+                        "name": "dept",
                         "in": "formData",
                         "required": true
                     }
@@ -2178,7 +2178,7 @@ const docTemplate = `{
                 }
             }
         },
-        "/fileUploadAndDownload/deleteFile": {
+        "/deptUploadAndDownload/deleteFile": {
             "post": {
                 "security": [
                     {
@@ -2225,7 +2225,7 @@ const docTemplate = `{
                 }
             }
         },
-        "/fileUploadAndDownload/findFile": {
+        "/deptUploadAndDownload/findFile": {
             "post": {
                 "security": [
                     {
@@ -2244,9 +2244,9 @@ const docTemplate = `{
                 "summary": "创建文件",
                 "parameters": [
                     {
-                        "type": "file",
+                        "type": "dept",
                         "description": "上传文件完成",
-                        "name": "file",
+                        "name": "dept",
                         "in": "formData",
                         "required": true
                     }
@@ -2276,7 +2276,7 @@ const docTemplate = `{
                 }
             }
         },
-        "/fileUploadAndDownload/getFileList": {
+        "/deptUploadAndDownload/getFileList": {
             "post": {
                 "security": [
                     {
@@ -2329,7 +2329,7 @@ const docTemplate = `{
                 }
             }
         },
-        "/fileUploadAndDownload/removeChunk": {
+        "/deptUploadAndDownload/removeChunk": {
             "post": {
                 "security": [
                     {
@@ -2348,9 +2348,9 @@ const docTemplate = `{
                 "summary": "删除切片",
                 "parameters": [
                     {
-                        "type": "file",
+                        "type": "dept",
                         "description": "删除缓存切片",
-                        "name": "file",
+                        "name": "dept",
                         "in": "formData",
                         "required": true
                     }
@@ -2377,7 +2377,7 @@ const docTemplate = `{
                 }
             }
         },
-        "/fileUploadAndDownload/upload": {
+        "/deptUploadAndDownload/upload": {
             "post": {
                 "security": [
                     {
@@ -2396,9 +2396,9 @@ const docTemplate = `{
                 "summary": "上传文件示例",
                 "parameters": [
                     {
-                        "type": "file",
+                        "type": "dept",
                         "description": "上传文件示例",
-                        "name": "file",
+                        "name": "dept",
                         "in": "formData",
                         "required": true
                     }
@@ -5656,13 +5656,13 @@ const docTemplate = `{
                         "$ref": "#/definitions/example.ExaFileChunk"
                     }
                 },
-                "fileMd5": {
+                "deptMd5": {
                     "type": "string"
                 },
-                "fileName": {
+                "deptName": {
                     "type": "string"
                 },
-                "filePath": {
+                "deptPath": {
                     "type": "string"
                 },
                 "isFinish": {
@@ -5688,10 +5688,10 @@ const docTemplate = `{
                 "exaFileID": {
                     "type": "integer"
                 },
-                "fileChunkNumber": {
+                "deptChunkNumber": {
                     "type": "integer"
                 },
-                "fileChunkPath": {
+                "deptChunkPath": {
                     "type": "string"
                 },
                 "updatedAt": {
@@ -6121,7 +6121,7 @@ const docTemplate = `{
         "response.ExaFileResponse": {
             "type": "object",
             "properties": {
-                "file": {
+                "dept": {
                     "$ref": "#/definitions/example.ExaFileUploadAndDownload"
                 }
             }
@@ -6129,7 +6129,7 @@ const docTemplate = `{
         "response.FilePathResponse": {
             "type": "object",
             "properties": {
-                "filePath": {
+                "deptPath": {
                     "type": "string"
                 }
             }
@@ -6137,7 +6137,7 @@ const docTemplate = `{
         "response.FileResponse": {
             "type": "object",
             "properties": {
-                "file": {
+                "dept": {
                     "$ref": "#/definitions/example.ExaFile"
                 }
             }

+ 24 - 24
server/docs/swagger.json

@@ -1388,8 +1388,8 @@
                 "summary": "安装插件",
                 "parameters": [
                     {
-                        "type": "file",
-                        "description": "this is a test file",
+                        "type": "dept",
+                        "description": "this is a test dept",
                         "name": "plug",
                         "in": "formData",
                         "required": true
@@ -2122,7 +2122,7 @@
                 }
             }
         },
-        "/fileUploadAndDownload/breakpointContinue": {
+        "/deptUploadAndDownload/breakpointContinue": {
             "post": {
                 "security": [
                     {
@@ -2141,9 +2141,9 @@
                 "summary": "断点续传到服务器",
                 "parameters": [
                     {
-                        "type": "file",
+                        "type": "dept",
                         "description": "an example for breakpoint resume, 断点续传示例",
-                        "name": "file",
+                        "name": "dept",
                         "in": "formData",
                         "required": true
                     }
@@ -2170,7 +2170,7 @@
                 }
             }
         },
-        "/fileUploadAndDownload/deleteFile": {
+        "/deptUploadAndDownload/deleteFile": {
             "post": {
                 "security": [
                     {
@@ -2217,7 +2217,7 @@
                 }
             }
         },
-        "/fileUploadAndDownload/findFile": {
+        "/deptUploadAndDownload/findFile": {
             "post": {
                 "security": [
                     {
@@ -2236,9 +2236,9 @@
                 "summary": "创建文件",
                 "parameters": [
                     {
-                        "type": "file",
+                        "type": "dept",
                         "description": "上传文件完成",
-                        "name": "file",
+                        "name": "dept",
                         "in": "formData",
                         "required": true
                     }
@@ -2268,7 +2268,7 @@
                 }
             }
         },
-        "/fileUploadAndDownload/getFileList": {
+        "/deptUploadAndDownload/getFileList": {
             "post": {
                 "security": [
                     {
@@ -2321,7 +2321,7 @@
                 }
             }
         },
-        "/fileUploadAndDownload/removeChunk": {
+        "/deptUploadAndDownload/removeChunk": {
             "post": {
                 "security": [
                     {
@@ -2340,9 +2340,9 @@
                 "summary": "删除切片",
                 "parameters": [
                     {
-                        "type": "file",
+                        "type": "dept",
                         "description": "删除缓存切片",
-                        "name": "file",
+                        "name": "dept",
                         "in": "formData",
                         "required": true
                     }
@@ -2369,7 +2369,7 @@
                 }
             }
         },
-        "/fileUploadAndDownload/upload": {
+        "/deptUploadAndDownload/upload": {
             "post": {
                 "security": [
                     {
@@ -2388,9 +2388,9 @@
                 "summary": "上传文件示例",
                 "parameters": [
                     {
-                        "type": "file",
+                        "type": "dept",
                         "description": "上传文件示例",
-                        "name": "file",
+                        "name": "dept",
                         "in": "formData",
                         "required": true
                     }
@@ -5648,13 +5648,13 @@
                         "$ref": "#/definitions/example.ExaFileChunk"
                     }
                 },
-                "fileMd5": {
+                "deptMd5": {
                     "type": "string"
                 },
-                "fileName": {
+                "deptName": {
                     "type": "string"
                 },
-                "filePath": {
+                "deptPath": {
                     "type": "string"
                 },
                 "isFinish": {
@@ -5680,10 +5680,10 @@
                 "exaFileID": {
                     "type": "integer"
                 },
-                "fileChunkNumber": {
+                "deptChunkNumber": {
                     "type": "integer"
                 },
-                "fileChunkPath": {
+                "deptChunkPath": {
                     "type": "string"
                 },
                 "updatedAt": {
@@ -6113,7 +6113,7 @@
         "response.ExaFileResponse": {
             "type": "object",
             "properties": {
-                "file": {
+                "dept": {
                     "$ref": "#/definitions/example.ExaFileUploadAndDownload"
                 }
             }
@@ -6121,7 +6121,7 @@
         "response.FilePathResponse": {
             "type": "object",
             "properties": {
-                "filePath": {
+                "deptPath": {
                     "type": "string"
                 }
             }
@@ -6129,7 +6129,7 @@
         "response.FileResponse": {
             "type": "object",
             "properties": {
-                "file": {
+                "dept": {
                     "$ref": "#/definitions/example.ExaFile"
                 }
             }

+ 24 - 24
server/docs/swagger.yaml

@@ -651,11 +651,11 @@ definitions:
         items:
           $ref: '#/definitions/example.ExaFileChunk'
         type: array
-      fileMd5:
+      deptMd5:
         type: string
-      fileName:
+      deptName:
         type: string
-      filePath:
+      deptPath:
         type: string
       isFinish:
         type: boolean
@@ -673,9 +673,9 @@ definitions:
         type: string
       exaFileID:
         type: integer
-      fileChunkNumber:
+      deptChunkNumber:
         type: integer
-      fileChunkPath:
+      deptChunkPath:
         type: string
       updatedAt:
         description: 更新时间
@@ -977,17 +977,17 @@ definitions:
     type: object
   response.ExaFileResponse:
     properties:
-      file:
+      dept:
         $ref: '#/definitions/example.ExaFileUploadAndDownload'
     type: object
   response.FilePathResponse:
     properties:
-      filePath:
+      deptPath:
         type: string
     type: object
   response.FileResponse:
     properties:
-      file:
+      dept:
         $ref: '#/definitions/example.ExaFile'
     type: object
   response.LoginResponse:
@@ -2360,11 +2360,11 @@ paths:
       consumes:
       - multipart/form-data
       parameters:
-      - description: this is a test file
+      - description: this is a test dept
         in: formData
         name: plug
         required: true
-        type: file
+        type: dept
       produces:
       - application/json
       responses:
@@ -2787,16 +2787,16 @@ paths:
       summary: 发送邮件
       tags:
       - System
-  /fileUploadAndDownload/breakpointContinue:
+  /deptUploadAndDownload/breakpointContinue:
     post:
       consumes:
       - multipart/form-data
       parameters:
       - description: an example for breakpoint resume, 断点续传示例
         in: formData
-        name: file
+        name: dept
         required: true
-        type: file
+        type: dept
       produces:
       - application/json
       responses:
@@ -2814,7 +2814,7 @@ paths:
       summary: 断点续传到服务器
       tags:
       - ExaFileUploadAndDownload
-  /fileUploadAndDownload/deleteFile:
+  /deptUploadAndDownload/deleteFile:
     post:
       parameters:
       - description: 传入文件里面id即可
@@ -2840,16 +2840,16 @@ paths:
       summary: 删除文件
       tags:
       - ExaFileUploadAndDownload
-  /fileUploadAndDownload/findFile:
+  /deptUploadAndDownload/findFile:
     post:
       consumes:
       - multipart/form-data
       parameters:
       - description: 上传文件完成
         in: formData
-        name: file
+        name: dept
         required: true
-        type: file
+        type: dept
       produces:
       - application/json
       responses:
@@ -2869,7 +2869,7 @@ paths:
       summary: 创建文件
       tags:
       - ExaFileUploadAndDownload
-  /fileUploadAndDownload/getFileList:
+  /deptUploadAndDownload/getFileList:
     post:
       consumes:
       - application/json
@@ -2899,16 +2899,16 @@ paths:
       summary: 分页文件列表
       tags:
       - ExaFileUploadAndDownload
-  /fileUploadAndDownload/removeChunk:
+  /deptUploadAndDownload/removeChunk:
     post:
       consumes:
       - multipart/form-data
       parameters:
       - description: 删除缓存切片
         in: formData
-        name: file
+        name: dept
         required: true
-        type: file
+        type: dept
       produces:
       - application/json
       responses:
@@ -2926,16 +2926,16 @@ paths:
       summary: 删除切片
       tags:
       - ExaFileUploadAndDownload
-  /fileUploadAndDownload/upload:
+  /deptUploadAndDownload/upload:
     post:
       consumes:
       - multipart/form-data
       parameters:
       - description: 上传文件示例
         in: formData
-        name: file
+        name: dept
         required: true
-        type: file
+        type: dept
       produces:
       - application/json
       responses:

+ 3 - 3
server/global/global.go

@@ -4,14 +4,14 @@ import (
 	"github.com/qiniu/qmgo"
 	"sync"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/utils/timer"
 	"github.com/songzhibin97/gkit/cache/local_cache"
+	"server/utils/timer"
 
 	"golang.org/x/sync/singleflight"
 
 	"go.uber.org/zap"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/config"
+	"server/config"
 
 	"github.com/redis/go-redis/v9"
 	"github.com/spf13/viper"
@@ -21,7 +21,7 @@ import (
 var (
 	GVA_DB     *gorm.DB
 	GVA_DBList map[string]*gorm.DB
-	GVA_REDIS  redis.UniversalClient
+	GVA_REDIS  *redis.Client
 	GVA_MONGO  *qmgo.QmgoClient
 	GVA_CONFIG config.Server
 	GVA_VP     *viper.Viper

+ 18 - 15
server/go.mod

@@ -1,6 +1,6 @@
-module github.com/flipped-aurora/gin-vue-admin/server
+module server
 
-go 1.22
+go 1.20
 
 require (
 	github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible
@@ -16,6 +16,7 @@ require (
 	github.com/gofrs/uuid/v5 v5.0.0
 	github.com/golang-jwt/jwt/v4 v4.5.0
 	github.com/gookit/color v1.5.4
+	github.com/gorilla/websocket v1.4.1
 	github.com/huaweicloud/huaweicloud-sdk-go-obs v3.21.8+incompatible
 	github.com/jordan-wright/email v0.0.0-20200824153738-3f5bafa1cd84
 	github.com/mojocn/base64Captcha v1.3.6
@@ -37,15 +38,17 @@ require (
 	github.com/xuri/excelize/v2 v2.8.0
 	go.mongodb.org/mongo-driver v1.12.1
 	go.uber.org/automaxprocs v1.5.3
-	go.uber.org/zap v1.24.0
-	golang.org/x/crypto v0.22.0
-	golang.org/x/sync v0.5.0
-	golang.org/x/text v0.14.0
+	go.uber.org/zap v1.27.0
+	golang.org/x/crypto v0.23.0
+	golang.org/x/sync v0.6.0
+	golang.org/x/text v0.15.0
+	google.golang.org/grpc v1.64.0
+	google.golang.org/protobuf v1.33.0
 	gorm.io/driver/mysql v1.5.6
 	gorm.io/driver/postgres v1.5.7
 	gorm.io/driver/sqlserver v1.5.1
-	gorm.io/gorm v1.25.9
-	nhooyr.io/websocket v1.8.7
+	gorm.io/gorm v1.25.10
+	nhooyr.io/websocket v1.8.11
 )
 
 require (
@@ -73,9 +76,10 @@ require (
 	github.com/golang-sql/civil v0.0.0-20220223132316-b832511892a9 // indirect
 	github.com/golang-sql/sqlexp v0.1.0 // indirect
 	github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
+	github.com/golang/protobuf v1.5.4 // indirect
 	github.com/golang/snappy v0.0.1 // indirect
 	github.com/google/go-querystring v1.0.0 // indirect
-	github.com/google/uuid v1.3.0 // indirect
+	github.com/google/uuid v1.6.0 // indirect
 	github.com/hashicorp/hcl v1.0.0 // indirect
 	github.com/jackc/pgpassfile v1.0.0 // indirect
 	github.com/jackc/pgservicefile v0.0.0-20231201235250-de7065d80cb9 // indirect
@@ -124,15 +128,14 @@ require (
 	github.com/xuri/nfp v0.0.0-20230819163627-dc951e3ffe1a // indirect
 	github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect
 	github.com/yusufpapurcu/wmi v1.2.3 // indirect
-	go.uber.org/atomic v1.9.0 // indirect
-	go.uber.org/multierr v1.8.0 // indirect
+	go.uber.org/multierr v1.10.0 // indirect
 	golang.org/x/arch v0.3.0 // indirect
 	golang.org/x/image v0.15.0 // indirect
-	golang.org/x/net v0.21.0 // indirect
-	golang.org/x/sys v0.19.0 // indirect
-	golang.org/x/time v0.1.0 // indirect
+	golang.org/x/net v0.25.0 // indirect
+	golang.org/x/sys v0.20.0 // indirect
+	golang.org/x/time v0.5.0 // indirect
 	golang.org/x/tools v0.16.1 // indirect
-	google.golang.org/protobuf v1.33.0 // indirect
+	google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
 	gopkg.in/ini.v1 v1.67.0 // indirect
 	gopkg.in/yaml.v3 v3.0.1 // indirect
 	gorm.io/plugin/dbresolver v1.4.1 // indirect

+ 33 - 42
server/go.sum

@@ -49,12 +49,8 @@ github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible h1:KpbJFXwhVeuxNtBJ74MCG
 github.com/aliyun/aliyun-oss-go-sdk v2.2.7+incompatible/go.mod h1:T/Aws4fEfogEE9v+HPhhw+CntffsBHJ8nXQCwKr0/g8=
 github.com/aws/aws-sdk-go v1.44.307 h1:2R0/EPgpZcFSUwZhYImq/srjaOrOfLv5MNRzrFyAM38=
 github.com/aws/aws-sdk-go v1.44.307/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
-github.com/benbjohnson/clock v1.1.0 h1:Q92kusRqC1XV2MjkWETPvjJVqKetz1OzxZB7mHJLju8=
-github.com/benbjohnson/clock v1.1.0/go.mod h1:J11/hYXuz8f4ySSvYwY0FKfm+ezbsZBKZxNJlLklBHA=
 github.com/bsm/ginkgo/v2 v2.7.0 h1:ItPMPH90RbmZJt5GtkcNvIRuGEdwlBItdNVoyzaNQao=
-github.com/bsm/ginkgo/v2 v2.7.0/go.mod h1:AiKlXPm7ItEHNc/2+OkrNG4E0ITzojb9/xWzvQ9XZ9w=
 github.com/bsm/gomega v1.26.0 h1:LhQm+AFcgV2M0WyKroMASzAzCAJVpAxQXv4SaI9a69Y=
-github.com/bsm/gomega v1.26.0/go.mod h1:JyEr/xRbxbtgWNi8tIEVPUYZ5Dzef52k01W3YH0H+O0=
 github.com/bytedance/sonic v1.5.0/go.mod h1:ED5hyg4y6t3/9Ku1R6dU/4KyJ48DZ4jPhfY1O2AihPM=
 github.com/bytedance/sonic v1.9.1 h1:6iJ6NqdoxCDr6mbY8h18oSO+cShGSMRGCEo7F2h0x8s=
 github.com/bytedance/sonic v1.9.1/go.mod h1:i736AoUSYt75HyZLoJW9ERYxcy6eaN6h4BZXU064P/U=
@@ -98,7 +94,6 @@ github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7
 github.com/flipped-aurora/ws v1.0.2 h1:oEUz7sgrbPENvgli7Q4QpC0NIEbJucgR4yjcDMg/AjY=
 github.com/flipped-aurora/ws v1.0.2/go.mod h1:RdyM2Fnvxx7f7A6WSmU1aAhDrQIAVW7LS/0LsAUE5mE=
 github.com/frankban/quicktest v1.14.4 h1:g2rn0vABPOOXmZUj+vbmUp0lPoXEMuhTpIluN0XL9UY=
-github.com/frankban/quicktest v1.14.4/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
 github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY=
 github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw=
 github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6 h1:6VSn3hB5U5GeA6kQw4TwWIWbOhtvR2hmbBJnTOtqTWc=
@@ -106,7 +101,6 @@ github.com/fvbock/endless v0.0.0-20170109170031-447134032cb6/go.mod h1:YxOVT5+yH
 github.com/gabriel-vasile/mimetype v1.4.2 h1:w5qFW6JKBz9Y393Y4q372O9A7cUSequkh1Q7OhCmWKU=
 github.com/gabriel-vasile/mimetype v1.4.2/go.mod h1:zApsH/mKG4w07erKIaJPFiX0Tsq9BFQgN3qGY5GnNgA=
 github.com/gin-contrib/gzip v0.0.6 h1:NjcunTcGAj5CO1gn4N8jHOSIeRFHIbn51z6K+xaN4d4=
-github.com/gin-contrib/gzip v0.0.6/go.mod h1:QOJlmV2xmayAjkNS2Y8NQsMneuRShOU/kjovCXNuzzk=
 github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
 github.com/gin-contrib/sse v0.1.0/go.mod h1:RHrZQHXnP2xjPF+u1gW/2HnVO7nvIa9PG3Gm+fLHvGI=
 github.com/gin-gonic/gin v1.6.3/go.mod h1:75u5sXoLsGZoRN5Sgbi1eraJ4GU3++wFwWzhwvtwp4M=
@@ -131,7 +125,6 @@ github.com/go-openapi/swag v0.22.5 h1:fVS63IE3M0lsuWRzuom3RLwUMVI2peDH01s6M70ugy
 github.com/go-openapi/swag v0.22.5/go.mod h1:Gl91UqO+btAM0plGGxHqJcQZ1ZTy6jbmridBTsDy8A0=
 github.com/go-playground/assert/v2 v2.0.1/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
 github.com/go-playground/assert/v2 v2.2.0 h1:JvknZsQTYeFEAhQwI4qEt9cyV5ONwRHC+lYKSsYSR8s=
-github.com/go-playground/assert/v2 v2.2.0/go.mod h1:VDjEfimB/XKnb+ZQfWdccd7VUvScMdVu0Titje2rxJ4=
 github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8=
 github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/oXslEjJA=
 github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY=
@@ -146,11 +139,8 @@ github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LB
 github.com/go-sql-driver/mysql v1.7.0/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
 github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
 github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
-github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee h1:s+21KNqlpePfkah2I+gwHF8xmJWRjooY+5248k6m4A0=
 github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
-github.com/gobwas/pool v0.2.0 h1:QEmUOlnSjWtnpRGHF3SauEiOsy82Cup83Vf2LcMlnc8=
 github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
-github.com/gobwas/ws v1.0.2 h1:CoAavW/wd/kulfZmSIBt6p24n4j7tHgNVCjsfHVNUbo=
 github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
 github.com/goccy/go-json v0.10.2 h1:CrxCmQqYDkv1z7lO7Wbh2HN93uovUHgrECaO5ZrCXAU=
 github.com/goccy/go-json v0.10.2/go.mod h1:6MelG93GURQebXPDq3khkgXZkazVtN9CRI+MGFi0w8I=
@@ -191,8 +181,10 @@ github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvq
 github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
 github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
 github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
+github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
 github.com/golang/protobuf v1.5.3 h1:KhyjKVUg7Usr/dYsdSqoFveMYd5ko72D+zANwlG1mmg=
 github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
+github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
 github.com/golang/snappy v0.0.1 h1:Qgr9rKW7uDUkrbSmQeiDsGa8SjGyCOGtuasMWwvp2P4=
 github.com/golang/snappy v0.0.1/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
 github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
@@ -206,6 +198,7 @@ github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
 github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
 github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
 github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
@@ -226,12 +219,12 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe
 github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
 github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
 github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26 h1:Xim43kblpZXfIBQsbuBVKCudVG457BR2GZFIz3uw3hQ=
-github.com/google/pprof v0.0.0-20221118152302-e6195bd50e26/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
 github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
 github.com/google/uuid v1.1.1/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
 github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
 github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
 github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
 github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
@@ -293,17 +286,14 @@ github.com/klauspost/cpuid/v2 v2.2.4/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8t
 github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
 github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
 github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
-github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
 github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
 github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
 github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
-github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
 github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
 github.com/leodido/go-urn v1.2.0/go.mod h1:+8+nEpDfqqsY+g338gtMEUOtuK+4dEMhiQEgxpxOKII=
 github.com/leodido/go-urn v1.2.4 h1:XlAE/cm/ms7TE/VMVoduSpNBoyc2dOxHs5MZSwAN63Q=
 github.com/leodido/go-urn v1.2.4/go.mod h1:7ZrI8mTSeBSHl/UaRyKQW1qZeMgak41ANeCNaVckg+4=
 github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=
-github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
 github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0 h1:6E+4a0GO5zZEnZ81pIr0yLvtUWk2if982qA3F3QD6H4=
 github.com/lufia/plan9stats v0.0.0-20211012122336-39d0f177ccd0/go.mod h1:zJYVVT2jmtg6P3p1VtQj7WsuWi/y4VnjVBn7F8KPB3I=
 github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY=
@@ -353,7 +343,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
 github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c h1:ncq/mPwQF4JjgDlrVEn3C11VoGHZN7m8qihwgMEtzYw=
 github.com/power-devops/perfstat v0.0.0-20210106213030-5aafc221ea8c/go.mod h1:OmDBASR4679mdNQnz2pUhc2G8CO2JrUAVFDRBDP/hJE=
 github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
-github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
 github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
 github.com/qiniu/api.v7/v7 v7.4.1 h1:BnNUBimLk6nrA/mIwsww9yJRupmViSsb1ndLMC7a9OY=
 github.com/qiniu/api.v7/v7 v7.4.1/go.mod h1:VE5oC5rkE1xul0u1S2N0b2Uxq9/6hZzhyqjgK25XDcM=
@@ -373,7 +362,6 @@ github.com/robfig/cron/v3 v3.0.1 h1:WdRxkvbJztn8LMz/QEvLN5sBU+xKpSqwwUO1Pjr4qDs=
 github.com/robfig/cron/v3 v3.0.1/go.mod h1:eQICP3HwyT7UooqI/z+Ov+PtYAWygg1TEWWzGIFLtro=
 github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
 github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDNXVBh4M=
-github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUzkipdSkR5nkCZA=
 github.com/shirou/gopsutil/v3 v3.23.6 h1:5y46WPI9QBKBbK7EEccUPNXpJpNrvPuTD0O2zHEHT08=
 github.com/shirou/gopsutil/v3 v3.23.6/go.mod h1:j7QX50DrXYggrpN30W0Mo+I4/8U2UUIQrnrhqUeWrAU=
 github.com/shoenig/go-m1cpu v0.1.6 h1:nxdKQNcEB6vzgA2E2bvzKIYRuNj7XNJ4S/aRSwKzFtM=
@@ -469,20 +457,16 @@ go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
 go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
 go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
-go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
-go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
-go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
 go.uber.org/automaxprocs v1.5.3 h1:kWazyxZUrS3Gs4qUpbwo5kEIMGe/DAvi5Z4tl2NW4j8=
 go.uber.org/automaxprocs v1.5.3/go.mod h1:eRbA25aqJrxAbsLO0xy5jVwPt7FQnRgjW+efnwa1WM0=
-go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
-go.uber.org/goleak v1.1.11/go.mod h1:cwTWslyiVhfpKIDGSZEM2HlOvcqm+tG4zioyIeLoqMQ=
+go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
 go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
-go.uber.org/multierr v1.8.0 h1:dg6GjLku4EH+249NNmoIciG9N/jURbDG+pFlTkhzIC8=
-go.uber.org/multierr v1.8.0/go.mod h1:7EAYxJLBy9rStEaz58O2t4Uvip6FSURkq8/ppBp95ak=
+go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ=
+go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
 go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
 go.uber.org/zap v1.16.0/go.mod h1:MA8QOfq0BHJwdXa996Y4dYkAqRKB8/1K1QMMZVaNZjQ=
-go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
-go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
+go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
+go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
 golang.org/x/arch v0.0.0-20210923205945-b76863e36670/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
 golang.org/x/arch v0.3.0 h1:02VY4/ZcO/gBOH6PUaoiptASxtXU10jazRCP865E97k=
 golang.org/x/arch v0.3.0/go.mod h1:5om86z9Hs0C8fWVUuoMHwpExlXzs5Tkyp9hOrfG7pp8=
@@ -499,8 +483,8 @@ golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58
 golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU=
 golang.org/x/crypto v0.9.0/go.mod h1:yrmDGqONDYtNj3tH8X9dzUun2m2lzPa9ngI6/RUPGR0=
 golang.org/x/crypto v0.12.0/go.mod h1:NF0Gs7EO5K4qLn+Ylc+fih8BSTeIjAP05siRnAh98yw=
-golang.org/x/crypto v0.22.0 h1:g1v0xeRhjcugydODzvb3mEM9SQ0HGp9s/nh3COQ/C30=
-golang.org/x/crypto v0.22.0/go.mod h1:vr6Su+7cTlO45qkww3VDJlzDn0ctJvRgYbC2NvXHt+M=
+golang.org/x/crypto v0.23.0 h1:dIJU/v2J8Mdglj/8rJ6UUOM3Zc9zLZxVZwwxMooUSAI=
+golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8=
 golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
 golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8=
@@ -541,7 +525,6 @@ golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
 golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
 golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
 golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
-golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
 golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
 golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -581,8 +564,8 @@ golang.org/x/net v0.7.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
 golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
 golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
 golang.org/x/net v0.14.0/go.mod h1:PpSgVXXLK0OxS0F31C1/tv6XNguvCrnXIDrFMspZIUI=
-golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4=
-golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44=
+golang.org/x/net v0.25.0 h1:d/OCCoBEUq33pjydKrGQhw7IlUPI2Oylr+8qLx49kac=
+golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM=
 golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
 golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
 golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -607,6 +590,8 @@ golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJ
 golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
 golang.org/x/sync v0.5.0 h1:60k92dhOjHxJkrqnwsfl8KuaHbn/5dl0lUPUklKo3qE=
 golang.org/x/sync v0.5.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
+golang.org/x/sync v0.6.0 h1:5BMeUDZ7vkXGfEr1x9B4bRcTH4lpkTkpdh0T/J+qjbQ=
+golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
 golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
 golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@@ -657,8 +642,8 @@ golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.9.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
 golang.org/x/sys v0.11.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.19.0 h1:q5f1RH2jigJ1MoAWp2KTp3gm5zAGFUTarQZ5U386+4o=
-golang.org/x/sys v0.19.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
+golang.org/x/sys v0.20.0 h1:Od9JTbYCk261bKm4M/mw7AklTlFYIa0bIp9BgSm1S8Y=
+golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
 golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
 golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
 golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
@@ -681,13 +666,13 @@ golang.org/x/text v0.8.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
 golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
 golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
 golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
-golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
-golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
+golang.org/x/text v0.15.0 h1:h1V/4gjBv8v9cjcR6+AR5+/cIYK5N/WAgiv4xlsEtAk=
+golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
 golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
 golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/time v0.1.0 h1:xYY+Bajn2a7VBmTM5GikTmnK8ZuX8YgnQCqZpbBNtmA=
-golang.org/x/time v0.1.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk=
+golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
 golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
 golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -807,6 +792,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D
 google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
 google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
 google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 h1:KpwkzHKEF7B9Zxg18WzOa7djJ+Ha5DzthMyZYQfEn2A=
+google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1/go.mod h1:nKE/iIaLqn2bQwXBg8f1g2Ylh6r5MN5CmZvuzZCgsCU=
 google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
 google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
 google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -823,6 +810,10 @@ google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM
 google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
 google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
 google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.55.0 h1:3Oj82/tFSCeUrRTg/5E/7d/W5A1tj6Ky1ABAuZuv5ag=
+google.golang.org/grpc v1.55.0/go.mod h1:iYEXKGkEBhg1PjZQvoYEVPTDkHo1/bjTnfwTeGONTY8=
+google.golang.org/grpc v1.64.0 h1:KH3VH9y/MgNQg1dE7b3XfVK0GsPSIzJwdF617gUSbvY=
+google.golang.org/grpc v1.64.0/go.mod h1:oxjF8E3FBnjp+/gVFYdWacaLDx9na1aqy9oovLpxQYg=
 google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
 google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
 google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -833,12 +824,13 @@ google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2
 google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
 google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4=
 google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
+google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
+google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
 google.golang.org/protobuf v1.33.0 h1:uNO2rsAINq/JlFpSdYEKIZ0uKD/R9cpdv0T+yoGwGmI=
 google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos=
 gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
 gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
-gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
 gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
 gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
 gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
@@ -850,7 +842,6 @@ gopkg.in/yaml.v2 v2.2.8/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
 gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
 gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
 gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
 gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
 gorm.io/driver/mysql v1.4.3/go.mod h1:sSIebwZAVPiT+27jK9HIwvsqOGKx3YMPmrA3mBJR10c=
@@ -864,8 +855,8 @@ gorm.io/gorm v1.23.8/go.mod h1:l2lP/RyAtc1ynaTjFksBde/O8v9oOGIApu2/xRitmZk=
 gorm.io/gorm v1.24.3/go.mod h1:DVrVomtaYTbqs7gB/x2uVvqnXzv0nqjB396B8cG4dBA=
 gorm.io/gorm v1.25.1/go.mod h1:L4uxeKpfBml98NYqVqwAdmV1a2nBtAec/cf3fpucW/k=
 gorm.io/gorm v1.25.7/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
-gorm.io/gorm v1.25.9 h1:wct0gxZIELDk8+ZqF/MVnHLkA1rvYlBWUMv2EdsK1g8=
-gorm.io/gorm v1.25.9/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
+gorm.io/gorm v1.25.10 h1:dQpO+33KalOA+aFYGlK+EfxcI5MbO7EP2yYygwh9h+s=
+gorm.io/gorm v1.25.10/go.mod h1:hbnx/Oo0ChWMn1BIhpy1oYozzpM15i4YPuHDmfYtwg8=
 gorm.io/plugin/dbresolver v1.4.1 h1:Ug4LcoPhrvqq71UhxtF346f+skTYoCa/nEsdjvHwEzk=
 gorm.io/plugin/dbresolver v1.4.1/go.mod h1:CTbCtMWhsjXSiJqiW2R8POvJ2cq18RVOl4WGyT5nhNc=
 honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
@@ -884,8 +875,8 @@ modernc.org/memory v1.6.0/go.mod h1:PkUhL0Mugw21sHPeskwZW4D6VscE/GQJOnIpCnW6pSU=
 modernc.org/sqlite v1.23.0 h1:MWTFBI5H1WLnXpNBh/BTruBVqzzoh28DA0iOnlkkRaM=
 modernc.org/sqlite v1.23.0/go.mod h1:OrDj17Mggn6MhE+iPbBNf7RGKODDE9NFT0f3EwDzJqk=
 nhooyr.io/websocket v1.8.6/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
-nhooyr.io/websocket v1.8.7 h1:usjR2uOr/zjjkVMy0lW+PPohFok7PCow5sDjLgX4P4g=
-nhooyr.io/websocket v1.8.7/go.mod h1:B70DZP8IakI65RVQ51MsWP/8jndNma26DVA/nFSCgW0=
+nhooyr.io/websocket v1.8.11 h1:f/qXNc2/3DpoSZkHt1DQu6rj4zGC8JmkkLkWss0MgN0=
+nhooyr.io/websocket v1.8.11/go.mod h1:rN9OFWIUwuxg4fR5tELlYC04bXYowCP9GX47ivo2l+c=
 rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
 rsc.io/pdf v0.1.1/go.mod h1:n8OzWcQ6Sp37PL01nO98y4iUCRdTGarVfzxY20ICaU4=
 rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=

+ 2 - 2
server/initialize/db_list.go

@@ -1,9 +1,9 @@
 package initialize
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/config"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
 	"gorm.io/gorm"
+	"server/config"
+	"server/global"
 )
 
 const sys = "system"

+ 3 - 3
server/initialize/ensure_tables.go

@@ -3,10 +3,10 @@ package initialize
 import (
 	"context"
 	adapter "github.com/casbin/gorm-adapter/v3"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/example"
-	sysModel "github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	"github.com/flipped-aurora/gin-vue-admin/server/service/system"
 	"gorm.io/gorm"
+	"server/model/example"
+	sysModel "server/model/system"
+	"server/service/system"
 )
 
 const initOrderEnsureTables = system.InitOrderExternal - 1

+ 5 - 3
server/initialize/gorm.go

@@ -3,9 +3,9 @@ package initialize
 import (
 	"os"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/example"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
+	"server/global"
+	"server/model/example"
+	"server/model/system"
 
 	"go.uber.org/zap"
 	"gorm.io/gorm"
@@ -48,6 +48,8 @@ func RegisterTables() {
 		system.SysExportTemplate{},
 		system.Condition{},
 		system.JoinTemplate{},
+		system.Dept{},
+		system.File{},
 
 		example.ExaFile{},
 		example.ExaCustomer{},

+ 5 - 5
server/initialize/gorm_mssql.go

@@ -9,11 +9,11 @@
 package initialize
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/config"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/initialize/internal"
 	"gorm.io/driver/sqlserver"
 	"gorm.io/gorm"
+	"server/config"
+	"server/global"
+	"server/initialize/internal"
 )
 
 // GormMssql 初始化Mssql数据库
@@ -44,8 +44,8 @@ func GormMssqlByConfig(m config.Mssql) *gorm.DB {
 		return nil
 	}
 	mssqlConfig := sqlserver.Config{
-		DSN:                       m.Dsn(), // DSN data source name
-		DefaultStringSize:         191,     // string 类型字段的默认长度
+		DSN:               m.Dsn(), // DSN data source name
+		DefaultStringSize: 191,     // string 类型字段的默认长度
 	}
 	if db, err := gorm.Open(sqlserver.New(mssqlConfig), internal.Gorm.Config(m.Prefix, m.Singular)); err != nil {
 		panic(err)

+ 3 - 3
server/initialize/gorm_mysql.go

@@ -1,12 +1,12 @@
 package initialize
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/config"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/initialize/internal"
 	_ "github.com/go-sql-driver/mysql"
 	"gorm.io/driver/mysql"
 	"gorm.io/gorm"
+	"server/config"
+	"server/global"
+	"server/initialize/internal"
 )
 
 // GormMysql 初始化Mysql数据库

+ 3 - 3
server/initialize/gorm_oracle.go

@@ -2,9 +2,9 @@ package initialize
 
 import (
 	//"github.com/dzwvip/oracle"
-	"github.com/flipped-aurora/gin-vue-admin/server/config"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/initialize/internal"
+	"server/config"
+	"server/global"
+	"server/initialize/internal"
 
 	//_ "github.com/godror/godror"
 	"gorm.io/driver/mysql"

+ 3 - 3
server/initialize/gorm_pgsql.go

@@ -1,11 +1,11 @@
 package initialize
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/config"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/initialize/internal"
 	"gorm.io/driver/postgres"
 	"gorm.io/gorm"
+	"server/config"
+	"server/global"
+	"server/initialize/internal"
 )
 
 // GormPgSql 初始化 Postgresql 数据库

+ 3 - 3
server/initialize/gorm_sqlite.go

@@ -1,11 +1,11 @@
 package initialize
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/config"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/initialize/internal"
 	"github.com/glebarez/sqlite"
 	"gorm.io/gorm"
+	"server/config"
+	"server/global"
+	"server/initialize/internal"
 )
 
 // GormSqlite 初始化Sqlite数据库

+ 1 - 1
server/initialize/internal/gorm.go

@@ -6,9 +6,9 @@ import (
 	"os"
 	"time"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
 	"gorm.io/gorm"
 	"gorm.io/gorm/logger"
+	"server/global"
 )
 
 type DBBASE interface {

+ 1 - 1
server/initialize/internal/logger.go

@@ -3,8 +3,8 @@ package internal
 import (
 	"fmt"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
 	"gorm.io/gorm/logger"
+	"server/global"
 )
 
 type writer struct {

+ 3 - 3
server/initialize/mongo.go

@@ -3,14 +3,14 @@ package initialize
 import (
 	"context"
 	"fmt"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/initialize/internal"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
 	"github.com/pkg/errors"
 	"github.com/qiniu/qmgo"
 	"github.com/qiniu/qmgo/options"
 	"go.mongodb.org/mongo-driver/bson"
 	option "go.mongodb.org/mongo-driver/mongo/options"
+	"server/global"
+	"server/initialize/internal"
+	"server/utils"
 	"sort"
 	"strings"
 )

+ 2 - 2
server/initialize/other.go

@@ -3,8 +3,8 @@ package initialize
 import (
 	"github.com/songzhibin97/gkit/cache/local_cache"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
+	"server/global"
+	"server/utils"
 )
 
 func OtherInit() {

+ 4 - 4
server/initialize/plugin.go

@@ -3,11 +3,11 @@ package initialize
 import (
 	"fmt"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
-	"github.com/flipped-aurora/gin-vue-admin/server/plugin/email"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils/plugin"
 	"github.com/gin-gonic/gin"
+	"server/global"
+	"server/middleware"
+	"server/plugin/email"
+	"server/utils/plugin"
 )
 
 func PluginInit(group *gin.RouterGroup, Plugin ...plugin.Plugin) {

+ 6 - 19
server/initialize/redis.go

@@ -2,34 +2,21 @@ package initialize
 
 import (
 	"context"
-
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-
 	"github.com/redis/go-redis/v9"
 	"go.uber.org/zap"
+	"server/global"
 )
 
 func Redis() {
 	redisCfg := global.GVA_CONFIG.Redis
-	var client redis.UniversalClient
-	// 使用集群模式
-	if redisCfg.UseCluster {
-		client = redis.NewClusterClient(&redis.ClusterOptions{
-			Addrs:    redisCfg.ClusterAddrs,
-			Password: redisCfg.Password,
-		})
-	} else {
-		// 使用单例模式
-		client = redis.NewClient(&redis.Options{
-			Addr:     redisCfg.Addr,
-			Password: redisCfg.Password,
-			DB:       redisCfg.DB,
-		})
-	}
+	client := redis.NewClient(&redis.Options{
+		Addr:     redisCfg.Addr,
+		Password: redisCfg.Password,
+		DB:       redisCfg.DB,
+	})
 	pong, err := client.Ping(context.Background()).Result()
 	if err != nil {
 		global.GVA_LOG.Error("redis connect ping failed, err:", zap.Error(err))
-		panic(err)
 	} else {
 		global.GVA_LOG.Info("redis connect ping response:", zap.String("pong", pong))
 		global.GVA_REDIS = client

+ 2 - 2
server/initialize/register_init.go

@@ -1,8 +1,8 @@
 package initialize
 
 import (
-	_ "github.com/flipped-aurora/gin-vue-admin/server/source/example"
-	_ "github.com/flipped-aurora/gin-vue-admin/server/source/system"
+	_ "server/source/example"
+	_ "server/source/system"
 )
 
 func init() {

+ 9 - 4
server/initialize/router.go

@@ -1,15 +1,15 @@
 package initialize
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/docs"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
-	"github.com/flipped-aurora/gin-vue-admin/server/router"
 	"github.com/gin-gonic/gin"
 	swaggerFiles "github.com/swaggo/files"
 	ginSwagger "github.com/swaggo/gin-swagger"
 	"net/http"
 	"os"
+	"server/docs"
+	"server/global"
+	"server/middleware"
+	"server/router"
 )
 
 type justFilesFilesystem struct {
@@ -41,6 +41,7 @@ func Routers() *gin.Engine {
 
 	InstallPlugin(Router) // 安装插件
 	systemRouter := router.RouterGroupApp.System
+	exampleRouter := router.RouterGroupApp.Example
 	// 如果想要不使用nginx代理前端网页,可以修改 web/.env.production 下的
 	// VUE_APP_BASE_API = /
 	// VUE_APP_BASE_PATH = http://localhost
@@ -87,7 +88,11 @@ func Routers() *gin.Engine {
 		systemRouter.InitSysDictionaryDetailRouter(PrivateGroup) // 字典详情管理
 		systemRouter.InitAuthorityBtnRouterRouter(PrivateGroup)  // 字典详情管理
 		systemRouter.InitSysExportTemplateRouter(PrivateGroup)   // 导出模板
+		systemRouter.InitDeptRouter(PrivateGroup)                //注册部门路由
+		systemRouter.InitFileRouter(PrivateGroup)                //注册文件路由
 
+		exampleRouter.InitCustomerRouter(PrivateGroup)
+		exampleRouter.InitFileUploadAndDownloadRouter(PrivateGroup)
 	}
 
 	global.GVA_LOG.Info("router register success")

+ 2 - 2
server/initialize/timer.go

@@ -2,11 +2,11 @@ package initialize
 
 import (
 	"fmt"
-	"github.com/flipped-aurora/gin-vue-admin/server/task"
+	"server/task"
 
 	"github.com/robfig/cron/v3"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
+	"server/global"
 )
 
 func Timer() {

+ 1 - 1
server/initialize/validator.go

@@ -1,6 +1,6 @@
 package initialize
 
-import "github.com/flipped-aurora/gin-vue-admin/server/utils"
+import "server/utils"
 
 func init() {
 	_ = utils.RegisterRule("PageVerify",

+ 3 - 3
server/main.go

@@ -4,9 +4,9 @@ import (
 	_ "go.uber.org/automaxprocs"
 	"go.uber.org/zap"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/core"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/initialize"
+	"server/core"
+	"server/global"
+	"server/initialize"
 )
 
 //go:generate go env -w GO111MODULE=on

+ 4 - 4
server/middleware/casbin_rbac.go

@@ -4,11 +4,11 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
-	"github.com/flipped-aurora/gin-vue-admin/server/service"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
 	"github.com/gin-gonic/gin"
+	"server/global"
+	"server/model/common/response"
+	"server/service"
+	"server/utils"
 )
 
 var casbinService = service.ServiceGroupApp.SystemServiceGroup.CasbinService

+ 2 - 2
server/middleware/cors.go

@@ -1,10 +1,10 @@
 package middleware
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/config"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
 	"github.com/gin-gonic/gin"
 	"net/http"
+	"server/config"
+	"server/global"
 )
 
 // Cors 直接放行所有跨域请求并放行所有 OPTIONS 方法

+ 5 - 5
server/middleware/email.go

@@ -6,14 +6,14 @@ import (
 	"strconv"
 	"time"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/plugin/email/utils"
-	utils2 "github.com/flipped-aurora/gin-vue-admin/server/utils"
+	"server/plugin/email/utils"
+	utils2 "server/utils"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	"github.com/flipped-aurora/gin-vue-admin/server/service"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/system"
+	"server/service"
 )
 
 var userService = service.ServiceGroupApp.SystemServiceGroup.UserService

+ 1 - 1
server/middleware/error.go

@@ -8,9 +8,9 @@ import (
 	"runtime/debug"
 	"strings"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
+	"server/global"
 )
 
 // GinRecovery recover掉项目可能出现的panic,并使用zap记录相关日志

+ 5 - 5
server/middleware/jwt.go

@@ -2,16 +2,16 @@ package middleware
 
 import (
 	"errors"
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
 	"github.com/golang-jwt/jwt/v4"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/system"
+	"server/utils"
 	"strconv"
 	"time"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
-	"github.com/flipped-aurora/gin-vue-admin/server/service"
+	"server/model/common/response"
+	"server/service"
 
 	"github.com/gin-gonic/gin"
 )

+ 2 - 2
server/middleware/limit_ip.go

@@ -8,9 +8,9 @@ import (
 
 	"go.uber.org/zap"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/response"
 	"github.com/gin-gonic/gin"
+	"server/global"
+	"server/model/common/response"
 )
 
 type LimitConfig struct {

+ 4 - 4
server/middleware/operation.go

@@ -11,13 +11,13 @@ import (
 	"sync"
 	"time"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/utils"
+	"server/utils"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
-	"github.com/flipped-aurora/gin-vue-admin/server/service"
 	"github.com/gin-gonic/gin"
 	"go.uber.org/zap"
+	"server/global"
+	"server/model/system"
+	"server/service"
 )
 
 var operationRecordService = service.ServiceGroupApp.SystemServiceGroup.OperationRecordService

+ 1 - 1
server/model/example/exa_breakpoint_continue.go

@@ -1,7 +1,7 @@
 package example
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
+	"server/global"
 )
 
 // file struct, 文件结构体

+ 2 - 2
server/model/example/exa_customer.go

@@ -1,8 +1,8 @@
 package example
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
+	"server/global"
+	"server/model/system"
 )
 
 type ExaCustomer struct {

+ 1 - 1
server/model/example/exa_file_upload_download.go

@@ -1,7 +1,7 @@
 package example
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
+	"server/global"
 )
 
 type ExaFileUploadAndDownload struct {

+ 1 - 1
server/model/example/response/exa_breakpoint_continue.go

@@ -1,6 +1,6 @@
 package response
 
-import "github.com/flipped-aurora/gin-vue-admin/server/model/example"
+import "server/model/example"
 
 type FilePathResponse struct {
 	FilePath string `json:"filePath"`

+ 1 - 1
server/model/example/response/exa_customer.go

@@ -1,6 +1,6 @@
 package response
 
-import "github.com/flipped-aurora/gin-vue-admin/server/model/example"
+import "server/model/example"
 
 type ExaCustomerResponse struct {
 	Customer example.ExaCustomer `json:"customer"`

+ 1 - 1
server/model/example/response/exa_file_upload_download.go

@@ -1,6 +1,6 @@
 package response
 
-import "github.com/flipped-aurora/gin-vue-admin/server/model/example"
+import "server/model/example"
 
 type ExaFileResponse struct {
 	File example.ExaFileUploadAndDownload `json:"file"`

+ 18 - 0
server/model/system/app_dept.go

@@ -0,0 +1,18 @@
+package system
+
+// 部门
+type Dept struct {
+	ID          int       `gorm:"primary_key;type:int" json:"id"`      //部门id
+	DeptName    string    `gorm:"type:varchar(12)" json:"dept_name"`   //部门名称
+	Responsible string    `gorm:"type:varchar(25)" json:"responsible"` //负责人"
+	ParentId    int       `gorm:"type:int" json:"parent_id"`           //父部门id
+	IsDeleted   int       `gorm:"type:int;default:0" json:"isDeleted"` //是否删除
+	Phone       string    `gorm:"type:varchar(25)" json:"phone"`       //负责人联系电话
+	Remark      string    `gorm:"type:varchar(45)" json:"remark"`      //备注
+	Children    []Dept    `gorm:"-" json:"children"`                   //子部门
+	Users       []SysUser `gorm:"-" json:"users"`                      //用户们
+}
+
+func (*Dept) TableName() string {
+	return "dept"
+}

+ 24 - 0
server/model/system/app_file.go

@@ -0,0 +1,24 @@
+package system
+
+import "time"
+
+// File 文件表
+type File struct {
+	ID            int        `gorm:"primary_key;type:int" json:"id"`                     //编号
+	OriginalName  string     `gorm:"type:varchar(45)" json:"originalName"`               //文件原始名
+	EncryptedName string     `gorm:"type:varchar(45)" json:"encryptedName"`              //文件加密名
+	SavePath      string     `gorm:"type:varchar(45)" json:"savePath"`                   //保存路径
+	CategoryName  string     `gorm:"type:varchar(12)" json:"categoryName"`               //文件类别名
+	AuthId        string     `gorm:"type:varchar(12);default:'100'" json:"authId"`       //权限id
+	SuffixName    string     `gorm:"type:varchar(12)" json:"suffixName"`                 //文件后缀名
+	UploadTime    *time.Time `gorm:"column:upload_time;type:datetime" json:"uploadTime"` //上传时间
+	Uploader      int        `gorm:"type:int" json:"uploader"`                           //上传者id
+	IsShowed      int        `gorm:"type:int;default:0" json:"isShowed"`                 //是否展示 0=展示,1=不展示
+	Icon          string     `gorm:"type:varchar(191)" json:"icon"`                      //文件图标
+	IsDeleted     int        `gorm:"type:int;default:0" json:"isDeleted"`                //是否删除 0=未删除,1=删除
+	SysUser       SysUser    `json:"sysUser" gorm:"foreignKey:Uploader;references:ID;comment:文件上传者"`
+}
+
+func (*File) TableName() string {
+	return "file"
+}

+ 21 - 0
server/model/system/request/app_dept.go

@@ -0,0 +1,21 @@
+package request
+
+type ReqDept struct {
+	ID          int    `gorm:"primary_key;type:int" json:"id"`      //部门id
+	DeptName    string `gorm:"type:varchar(12)" json:"dept_name"`   //部门名称
+	Responsible string `gorm:"type:varchar(25)" json:"responsible"` //负责人"
+	ParentId    int    `gorm:"type:int" json:"parent_id"`           //父部门id
+	IsDeleted   int    `gorm:"type:int" json:"isDeleted"`           //是否删除
+	Phone       string `gorm:"type:varchar(25)" json:"phone"`       //负责人联系电话
+	Remark      string `gorm:"type:varchar(45)" json:"remark"`      //备注
+}
+
+type ChangeDeptInfo struct {
+	ID          int    `gorm:"primary_key;type:int" json:"id"`      //部门id
+	DeptName    string `gorm:"type:varchar(12)" json:"dept_name"`   //部门名称
+	Responsible string `gorm:"type:varchar(25)" json:"responsible"` //负责人"
+	ParentId    int    `gorm:"type:int" json:"parent_id"`           //父部门id
+	IsDeleted   int    `gorm:"type:int" json:"isDeleted"`           //是否删除
+	Phone       string `gorm:"type:varchar(25)" json:"phone"`       //负责人联系电话
+	Remark      string `gorm:"type:varchar(45)" json:"remark"`      //备注
+}

+ 38 - 0
server/model/system/request/app_file.go

@@ -0,0 +1,38 @@
+package request
+
+import (
+	"server/model/common/request"
+	"server/model/system"
+	"time"
+)
+
+type SearchAppFileParams struct {
+	system.File
+	request.PageInfo
+}
+
+type ChangeFileInfo struct {
+	ID           int    `gorm:"primarykey"`                        // 主键ID
+	CategoryName string `gorm:"comment:文件类别名" json:"categoryName"` //文件类别名
+	AuthId       []int  `json:"authId" gorm:"comment:文件权限" `       //文件的操作权限
+}
+
+type Distribute struct {
+	ID           int        `gorm:"primarykey"` // 主键ID
+	Depts        []int      `json:"depts" gorm:"comment:下发的部门"`
+	EfectiveDate *time.Time `json:"effectiveDate" gorm:"comment:截止时间"`
+}
+
+type UserFile struct {
+	ID              int        `gorm:"primarykey"` // 主键ID
+	Operator        int        `json:"operator" gorm:"comment:操作人id"`
+	Receiver        int        `json:"receiver" gorm:"comment:接收人id"`
+	FileId          int        `json:"fileId" gorm:"comment:文件id"`
+	EffectiveDate   *time.Time `json:"effectiveDate" gorm:"comment:截止时间"`
+	OperationStatus string     `json:"OperationStatus" gorm:"comment:操作状态"`
+	IsDeleted       int        `json:"isDeleted" gorm:"comment:是否删除"`
+}
+
+func (UserFile) TableName() string {
+	return "user_file" // 指定表名为 "user_file"
+}

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

@@ -1,8 +1,8 @@
 package request
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
+	"server/model/common/request"
+	"server/model/system"
 )
 
 // api分页条件查询及排序结构体

+ 1 - 1
server/model/system/request/sys_auto_history.go

@@ -1,6 +1,6 @@
 package request
 
-import "github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
+import "server/model/common/request"
 
 type SysAutoHistory struct {
 	request.PageInfo

+ 2 - 2
server/model/system/request/sys_dictionary_detail.go

@@ -1,8 +1,8 @@
 package request
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
+	"server/model/common/request"
+	"server/model/system"
 )
 
 type SysDictionaryDetailSearch struct {

+ 2 - 2
server/model/system/request/sys_export_template.go

@@ -1,8 +1,8 @@
 package request
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
+	"server/model/common/request"
+	"server/model/system"
 	"time"
 )
 

+ 1 - 1
server/model/system/request/sys_init.go

@@ -2,8 +2,8 @@ package request
 
 import (
 	"fmt"
-	"github.com/flipped-aurora/gin-vue-admin/server/config"
 	"os"
+	"server/config"
 )
 
 type InitDB struct {

+ 2 - 2
server/model/system/request/sys_menu.go

@@ -1,8 +1,8 @@
 package request
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
+	"server/global"
+	"server/model/system"
 )
 
 // Add menu authority info structure

+ 2 - 2
server/model/system/request/sys_operation_record.go

@@ -1,8 +1,8 @@
 package request
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
+	"server/model/common/request"
+	"server/model/system"
 )
 
 type SysOperationRecordSearch struct {

+ 11 - 1
server/model/system/request/sys_user.go

@@ -1,7 +1,8 @@
 package request
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
+	"server/model/common/request"
+	"server/model/system"
 )
 
 // Register User register structure
@@ -15,6 +16,8 @@ type Register struct {
 	AuthorityIds []uint `json:"authorityIds" swaggertype:"string" example:"[]uint 角色id"`
 	Phone        string `json:"phone" example:"电话号码"`
 	Email        string `json:"email" example:"电子邮箱"`
+	DeptId       int    `json:"deptId" example:"部门编号"`
+	AuthId       []int  `json:"authId" example:"用户对文件权限"`
 }
 
 // User login structure
@@ -53,4 +56,11 @@ type ChangeUserInfo struct {
 	SideMode     string                `json:"sideMode"  gorm:"comment:用户侧边主题"`                                                      // 用户侧边主题
 	Enable       int                   `json:"enable" gorm:"comment:冻结用户"`                                                           //冻结用户
 	Authorities  []system.SysAuthority `json:"-" gorm:"many2many:sys_user_authority;"`
+	AuthId       []int                 `json:"authId" gorm:"comment:用户对文件权限" `      //用户对文件的操作权限
+	DeptId       int                   `json:"deptId" gorm:"type:int;comment:部门编号"` //部门编号
+}
+
+type SearchAppUserParams struct {
+	system.SysUser
+	request.PageInfo
 }

+ 1 - 1
server/model/system/response/sys_api.go

@@ -1,6 +1,6 @@
 package response
 
-import "github.com/flipped-aurora/gin-vue-admin/server/model/system"
+import "server/model/system"
 
 type SysAPIResponse struct {
 	Api system.SysApi `json:"api"`

+ 1 - 1
server/model/system/response/sys_authority.go

@@ -1,6 +1,6 @@
 package response
 
-import "github.com/flipped-aurora/gin-vue-admin/server/model/system"
+import "server/model/system"
 
 type SysAuthorityResponse struct {
 	Authority system.SysAuthority `json:"authority"`

+ 1 - 1
server/model/system/response/sys_casbin.go

@@ -1,7 +1,7 @@
 package response
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system/request"
+	"server/model/system/request"
 )
 
 type PolicyPathResponse struct {

+ 1 - 1
server/model/system/response/sys_menu.go

@@ -1,6 +1,6 @@
 package response
 
-import "github.com/flipped-aurora/gin-vue-admin/server/model/system"
+import "server/model/system"
 
 type SysMenusResponse struct {
 	Menus []system.SysMenu `json:"menus"`

+ 1 - 1
server/model/system/response/sys_system.go

@@ -1,6 +1,6 @@
 package response
 
-import "github.com/flipped-aurora/gin-vue-admin/server/config"
+import "server/config"
 
 type SysConfigResponse struct {
 	Config config.Server `json:"config"`

+ 1 - 1
server/model/system/response/sys_user.go

@@ -1,7 +1,7 @@
 package response
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/model/system"
+	"server/model/system"
 )
 
 type SysUserResponse struct {

+ 1 - 1
server/model/system/sys_api.go

@@ -1,7 +1,7 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
+	"server/global"
 )
 
 type SysApi struct {

+ 1 - 1
server/model/system/sys_auto_code.go

@@ -5,7 +5,7 @@ import (
 	"go/token"
 	"strings"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
+	"server/global"
 )
 
 // AutoCodeStruct 初始版本自动化代码工具

+ 2 - 2
server/model/system/sys_autocode_history.go

@@ -4,8 +4,8 @@ import (
 	"strconv"
 	"strings"
 
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
-	"github.com/flipped-aurora/gin-vue-admin/server/model/common/request"
+	"server/global"
+	"server/model/common/request"
 )
 
 // SysAutoCodeHistory 自动迁移代码记录,用于回滚,重放使用

+ 1 - 1
server/model/system/sys_base_menu.go

@@ -1,7 +1,7 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
+	"server/global"
 )
 
 type SysBaseMenu struct {

+ 1 - 1
server/model/system/sys_dictionary.go

@@ -2,7 +2,7 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
+	"server/global"
 )
 
 // 如果含有time.Time 请自行import time包

+ 1 - 1
server/model/system/sys_dictionary_detail.go

@@ -2,7 +2,7 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
+	"server/global"
 )
 
 // 如果含有time.Time 请自行import time包

+ 1 - 1
server/model/system/sys_export_template.go

@@ -2,7 +2,7 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
+	"server/global"
 )
 
 // 导出模板 结构体  SysExportTemplate

+ 1 - 1
server/model/system/sys_jwt_blacklist.go

@@ -1,7 +1,7 @@
 package system
 
 import (
-	"github.com/flipped-aurora/gin-vue-admin/server/global"
+	"server/global"
 )
 
 type JwtBlacklist struct {

+ 1 - 1
server/model/system/sys_menu_btn.go

@@ -1,6 +1,6 @@
 package system
 
-import "github.com/flipped-aurora/gin-vue-admin/server/global"
+import "server/global"
 
 type SysBaseMenuBtn struct {
 	global.GVA_MODEL

+ 0 - 0
server/model/system/sys_operation_record.go


Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov