添加js模板,页面模板,去掉数据库数据初始化,去掉sql文件中没用语句
This commit is contained in:
1 parent
ba1c7f6193
commit
8faff5384f
29 files changed
+1364
-771
No files matched your search
@@ -76,7 +76,6 @@ settings:
|
|||||||
mode: dev # dev开发环境 test测试环境 prod线上环境;当 mode:demo 时,GET以外的请求操作提示
|
mode: dev # dev开发环境 test测试环境 prod线上环境;当 mode:demo 时,GET以外的请求操作提示
|
||||||
demomsg: "谢谢您的参与,但为了大家更好的体验,所以本次提交就算了吧!"
|
demomsg: "谢谢您的参与,但为了大家更好的体验,所以本次提交就算了吧!"
|
||||||
host: 0.0.0.0 # 主机ip 或者域名,默认0.0.0.0
|
host: 0.0.0.0 # 主机ip 或者域名,默认0.0.0.0
|
||||||
isinit: false # 是否需要初始化数据库结构以及基本数据;true:需要;false:不需要
|
|
||||||
# 服务名称
|
# 服务名称
|
||||||
name: go-admin
|
name: go-admin
|
||||||
# 服务端口
|
# 服务端口
|
||||||
@@ -111,7 +110,7 @@ settings:
|
|||||||
|
|
||||||
## 📦 本地开发
|
## 📦 本地开发
|
||||||
|
|
||||||
首次启动说明
|
### 首次启动说明
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# 获取代码
|
# 获取代码
|
||||||
@@ -128,9 +127,14 @@ vi ./config/setting.yml (更改isinit和数据库连接)
|
|||||||
|
|
||||||
# 1. 配置文件中修改数据库信息
|
# 1. 配置文件中修改数据库信息
|
||||||
# 注意: settings.database 下对应的配置数据)
|
# 注意: settings.database 下对应的配置数据)
|
||||||
# 2. 确认数据库初始化参数
|
# 2. 确认log路径
|
||||||
# 注意: settings.application.isinit 如果是首次启动,请把当前值设置成true,系统会自动初始化数据库结构以及基本的数据信息;
|
|
||||||
# 3. 确认log路径
|
```
|
||||||
|
|
||||||
|
### 初始化数据库,以及服务启动
|
||||||
|
```
|
||||||
|
# 首次配置需要初始化数据库资源信息
|
||||||
|
./go-admin migrate -c config/settings.yml -m dev
|
||||||
|
|
||||||
|
|
||||||
# 启动项目,也可以用IDE进行调试
|
# 启动项目,也可以用IDE进行调试
|
||||||
@@ -140,17 +144,15 @@ vi ./config/setting.yml (更改isinit和数据库连接)
|
|||||||
[在线文档](https://wenjianzhang.github.io/go-admin-site)
|
[在线文档](https://wenjianzhang.github.io/go-admin-site)
|
||||||
|
|
||||||
|
|
||||||
文档生成
|
### 文档生成
|
||||||
```bash
|
```bash
|
||||||
swag init
|
swag init
|
||||||
```
|
|
||||||
|
|
||||||
如果没有swag命令 go get安装一下即可
|
# 如果没有swag命令 go get安装一下即可
|
||||||
```bash
|
|
||||||
go get -u github.com/swaggo/swag/cmd/swag
|
go get -u github.com/swaggo/swag/cmd/swag
|
||||||
```
|
```
|
||||||
|
|
||||||
交叉编译
|
### 交叉编译
|
||||||
```bash
|
```bash
|
||||||
env GOOS=windows GOARCH=amd64 go build main.go
|
env GOOS=windows GOARCH=amd64 go build main.go
|
||||||
|
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import (
|
|||||||
// @Param dictType query string false "dictType"
|
// @Param dictType query string false "dictType"
|
||||||
// @Param pageSize query int false "页条数"
|
// @Param pageSize query int false "页条数"
|
||||||
// @Param pageIndex query int false "页码"
|
// @Param pageIndex query int false "页码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/loginloglist [get]
|
// @Router /api/v1/loginloglist [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetLoginLogList(c *gin.Context) {
|
func GetLoginLogList(c *gin.Context) {
|
||||||
@@ -57,7 +57,7 @@ func GetLoginLogList(c *gin.Context) {
|
|||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 登录日志
|
// @Tags 登录日志
|
||||||
// @Param infoId path int true "infoId"
|
// @Param infoId path int true "infoId"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/loginlog/{infoId} [get]
|
// @Router /api/v1/loginlog/{infoId} [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetLoginLog(c *gin.Context) {
|
func GetLoginLog(c *gin.Context) {
|
||||||
|
|||||||
+2
-2
@@ -17,7 +17,7 @@ import (
|
|||||||
// @Param dictType query string false "dictType"
|
// @Param dictType query string false "dictType"
|
||||||
// @Param pageSize query int false "页条数"
|
// @Param pageSize query int false "页条数"
|
||||||
// @Param pageIndex query int false "页码"
|
// @Param pageIndex query int false "页码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/operloglist [get]
|
// @Router /api/v1/operloglist [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetOperLogList(c *gin.Context) {
|
func GetOperLogList(c *gin.Context) {
|
||||||
@@ -58,7 +58,7 @@ func GetOperLogList(c *gin.Context) {
|
|||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 登录日志
|
// @Tags 登录日志
|
||||||
// @Param infoId path int true "infoId"
|
// @Param infoId path int true "infoId"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/operlog/{infoId} [get]
|
// @Router /api/v1/operlog/{infoId} [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetOperLog(c *gin.Context) {
|
func GetOperLog(c *gin.Context) {
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import (
|
|||||||
// @Param configType query string false "configType"
|
// @Param configType query string false "configType"
|
||||||
// @Param pageSize query int false "页条数"
|
// @Param pageSize query int false "页条数"
|
||||||
// @Param pageIndex query int false "页码"
|
// @Param pageIndex query int false "页码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/configList [get]
|
// @Router /api/v1/configList [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetConfigList(c *gin.Context) {
|
func GetConfigList(c *gin.Context) {
|
||||||
@@ -58,7 +58,7 @@ func GetConfigList(c *gin.Context) {
|
|||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 配置
|
// @Tags 配置
|
||||||
// @Param configId path int true "配置编码"
|
// @Param configId path int true "配置编码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/config/{configId} [get]
|
// @Router /api/v1/config/{configId} [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetConfig(c *gin.Context) {
|
func GetConfig(c *gin.Context) {
|
||||||
@@ -77,7 +77,7 @@ func GetConfig(c *gin.Context) {
|
|||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 配置
|
// @Tags 配置
|
||||||
// @Param configKey path int true "configKey"
|
// @Param configKey path int true "configKey"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/configKey/{configKey} [get]
|
// @Router /api/v1/configKey/{configKey} [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetConfigByConfigKey(c *gin.Context) {
|
func GetConfigByConfigKey(c *gin.Context) {
|
||||||
@@ -115,7 +115,7 @@ func InsertConfig(c *gin.Context) {
|
|||||||
// @Tags 配置
|
// @Tags 配置
|
||||||
// @Accept application/json
|
// @Accept application/json
|
||||||
// @Product application/json
|
// @Product application/json
|
||||||
// @Param data body models.Config true "body"
|
// @Param data body models.SysConfig true "body"
|
||||||
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
||||||
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
||||||
// @Router /api/v1/config [put]
|
// @Router /api/v1/config [put]
|
||||||
|
|||||||
+2
-2
@@ -15,7 +15,7 @@ import (
|
|||||||
// @Param name query string false "name"
|
// @Param name query string false "name"
|
||||||
// @Param id query string false "id"
|
// @Param id query string false "id"
|
||||||
// @Param position query string false "position"
|
// @Param position query string false "position"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/deptList [get]
|
// @Router /api/v1/deptList [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetDeptList(c *gin.Context) {
|
func GetDeptList(c *gin.Context) {
|
||||||
@@ -44,7 +44,7 @@ func GetDeptTree(c *gin.Context) {
|
|||||||
// @Tags 部门
|
// @Tags 部门
|
||||||
// @Param deptId path string false "deptId"
|
// @Param deptId path string false "deptId"
|
||||||
// @Param position query string false "position"
|
// @Param position query string false "position"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/dept/{deptId} [get]
|
// @Router /api/v1/dept/{deptId} [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetDept(c *gin.Context) {
|
func GetDept(c *gin.Context) {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import (
|
|||||||
// @Param dictType query string false "dictType"
|
// @Param dictType query string false "dictType"
|
||||||
// @Param pageSize query int false "页条数"
|
// @Param pageSize query int false "页条数"
|
||||||
// @Param pageIndex query int false "页码"
|
// @Param pageIndex query int false "页码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/dict/data/list [get]
|
// @Router /api/v1/dict/data/list [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetDictDataList(c *gin.Context) {
|
func GetDictDataList(c *gin.Context) {
|
||||||
@@ -59,7 +59,7 @@ func GetDictDataList(c *gin.Context) {
|
|||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 字典数据
|
// @Tags 字典数据
|
||||||
// @Param dictCode path int true "字典编码"
|
// @Param dictCode path int true "字典编码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/dict/data/{dictCode} [get]
|
// @Router /api/v1/dict/data/{dictCode} [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetDictData(c *gin.Context) {
|
func GetDictData(c *gin.Context) {
|
||||||
@@ -77,7 +77,7 @@ func GetDictData(c *gin.Context) {
|
|||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 字典数据
|
// @Tags 字典数据
|
||||||
// @Param dictType path int true "dictType"
|
// @Param dictType path int true "dictType"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/dict/databyType/{dictType} [get]
|
// @Router /api/v1/dict/databyType/{dictType} [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetDictDataByDictType(c *gin.Context) {
|
func GetDictDataByDictType(c *gin.Context) {
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ import (
|
|||||||
// @Param dictType query string false "dictType"
|
// @Param dictType query string false "dictType"
|
||||||
// @Param pageSize query int false "页条数"
|
// @Param pageSize query int false "页条数"
|
||||||
// @Param pageIndex query int false "页码"
|
// @Param pageIndex query int false "页码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/dict/type/list [get]
|
// @Router /api/v1/dict/type/list [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetDictTypeList(c *gin.Context) {
|
func GetDictTypeList(c *gin.Context) {
|
||||||
@@ -57,7 +57,7 @@ func GetDictTypeList(c *gin.Context) {
|
|||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 字典类型
|
// @Tags 字典类型
|
||||||
// @Param dictId path int true "字典类型编码"
|
// @Param dictId path int true "字典类型编码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/dict/type/{dictId} [get]
|
// @Router /api/v1/dict/type/{dictId} [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetDictType(c *gin.Context) {
|
func GetDictType(c *gin.Context) {
|
||||||
|
|||||||
+2
-2
@@ -13,7 +13,7 @@ import (
|
|||||||
// @Param name query string false "name"
|
// @Param name query string false "name"
|
||||||
// @Param id query string false "id"
|
// @Param id query string false "id"
|
||||||
// @Param position query string false "position"
|
// @Param position query string false "position"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/post [get]
|
// @Router /api/v1/post [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetPostList(c *gin.Context) {
|
func GetPostList(c *gin.Context) {
|
||||||
@@ -45,7 +45,7 @@ func GetPostList(c *gin.Context) {
|
|||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 字典数据
|
// @Tags 字典数据
|
||||||
// @Param postId path int true "postId"
|
// @Param postId path int true "postId"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/post/{postId} [get]
|
// @Router /api/v1/post/{postId} [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetPost(c *gin.Context) {
|
func GetPost(c *gin.Context) {
|
||||||
|
|||||||
+2
-2
@@ -16,7 +16,7 @@ import (
|
|||||||
// @Param roleKey query string false "roleKey"
|
// @Param roleKey query string false "roleKey"
|
||||||
// @Param pageSize query int false "页条数"
|
// @Param pageSize query int false "页条数"
|
||||||
// @Param pageIndex query int false "页码"
|
// @Param pageIndex query int false "页码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/rolelist [get]
|
// @Router /api/v1/rolelist [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetRoleList(c *gin.Context) {
|
func GetRoleList(c *gin.Context) {
|
||||||
@@ -68,7 +68,7 @@ func GetRole(c *gin.Context) {
|
|||||||
// @Tags 角色/Role
|
// @Tags 角色/Role
|
||||||
// @Accept application/json
|
// @Accept application/json
|
||||||
// @Product application/json
|
// @Product application/json
|
||||||
// @Param data body models.Config true "data"
|
// @Param data body models.SysRole true "data"
|
||||||
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
||||||
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
||||||
// @Router /api/v1/role [post]
|
// @Router /api/v1/role [post]
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ func GetSysUserList(c *gin.Context) {
|
|||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 用户
|
// @Tags 用户
|
||||||
// @Param userId path int true "用户编码"
|
// @Param userId path int true "用户编码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/sysUser/{userId} [get]
|
// @Router /api/v1/sysUser/{userId} [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetSysUser(c *gin.Context) {
|
func GetSysUser(c *gin.Context) {
|
||||||
@@ -86,7 +86,7 @@ func GetSysUser(c *gin.Context) {
|
|||||||
// @Summary 获取当前登录用户
|
// @Summary 获取当前登录用户
|
||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 个人中心
|
// @Tags 个人中心
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/user/profile [get]
|
// @Router /api/v1/user/profile [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetSysUserProfile(c *gin.Context) {
|
func GetSysUserProfile(c *gin.Context) {
|
||||||
@@ -126,7 +126,7 @@ func GetSysUserProfile(c *gin.Context) {
|
|||||||
// @Summary 获取用户角色和职位
|
// @Summary 获取用户角色和职位
|
||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 用户
|
// @Tags 用户
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/sysUser [get]
|
// @Router /api/v1/sysUser [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetSysUserInit(c *gin.Context) {
|
func GetSysUserInit(c *gin.Context) {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ import (
|
|||||||
// @Param tableName query string false "tableName / 数据表名称"
|
// @Param tableName query string false "tableName / 数据表名称"
|
||||||
// @Param pageSize query int false "pageSize / 页条数"
|
// @Param pageSize query int false "pageSize / 页条数"
|
||||||
// @Param pageIndex query int false "pageIndex / 页码"
|
// @Param pageIndex query int false "pageIndex / 页码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/db/columns/page [get]
|
// @Router /api/v1/db/columns/page [get]
|
||||||
func GetDBColumnList(c *gin.Context) {
|
func GetDBColumnList(c *gin.Context) {
|
||||||
var data tools.DBColumns
|
var data tools.DBColumns
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import (
|
|||||||
// @Param tableName query string false "tableName / 数据表名称"
|
// @Param tableName query string false "tableName / 数据表名称"
|
||||||
// @Param pageSize query int false "pageSize / 页条数"
|
// @Param pageSize query int false "pageSize / 页条数"
|
||||||
// @Param pageIndex query int false "pageIndex / 页码"
|
// @Param pageIndex query int false "pageIndex / 页码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/db/tables/page [get]
|
// @Router /api/v1/db/tables/page [get]
|
||||||
func GetDBTableList(c *gin.Context) {
|
func GetDBTableList(c *gin.Context) {
|
||||||
var res app.Response
|
var res app.Response
|
||||||
|
|||||||
@@ -19,15 +19,25 @@ func Preview(c *gin.Context) {
|
|||||||
tools2.HasError(err, "", -1)
|
tools2.HasError(err, "", -1)
|
||||||
t2, err := template.ParseFiles("template/api.go.template")
|
t2, err := template.ParseFiles("template/api.go.template")
|
||||||
tools2.HasError(err, "", -1)
|
tools2.HasError(err, "", -1)
|
||||||
|
t3, err := template.ParseFiles("template/js.go.template")
|
||||||
|
tools2.HasError(err, "", -1)
|
||||||
|
t4, err := template.ParseFiles("template/vue.go.template")
|
||||||
|
tools2.HasError(err, "", -1)
|
||||||
tab, _ := table.Get()
|
tab, _ := table.Get()
|
||||||
var b1 bytes.Buffer
|
var b1 bytes.Buffer
|
||||||
err = t1.Execute(&b1, tab)
|
err = t1.Execute(&b1, tab)
|
||||||
var b2 bytes.Buffer
|
var b2 bytes.Buffer
|
||||||
err = t2.Execute(&b2, tab)
|
err = t2.Execute(&b2, tab)
|
||||||
|
var b3 bytes.Buffer
|
||||||
|
err = t3.Execute(&b3, tab)
|
||||||
|
var b4 bytes.Buffer
|
||||||
|
err = t4.Execute(&b4, tab)
|
||||||
|
|
||||||
mp := make(map[string]interface{})
|
mp := make(map[string]interface{})
|
||||||
mp["template/model.go.template"] = b1.String()
|
mp["template/model.go.template"] = b1.String()
|
||||||
mp["template/api.go.template"] = b2.String()
|
mp["template/api.go.template"] = b2.String()
|
||||||
|
mp["template/js.go.template"] = b3.String()
|
||||||
|
mp["template/vue.go.template"] = b4.String()
|
||||||
var res app.Response
|
var res app.Response
|
||||||
res.Data = mp
|
res.Data = mp
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ import (
|
|||||||
// @Param tableName query string false "tableName / 数据表名称"
|
// @Param tableName query string false "tableName / 数据表名称"
|
||||||
// @Param pageSize query int false "pageSize / 页条数"
|
// @Param pageSize query int false "pageSize / 页条数"
|
||||||
// @Param pageIndex query int false "pageIndex / 页码"
|
// @Param pageIndex query int false "pageIndex / 页码"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/sys/tables/page [get]
|
// @Router /api/v1/sys/tables/page [get]
|
||||||
func GetSysTableList(c *gin.Context) {
|
func GetSysTableList(c *gin.Context) {
|
||||||
var data tools.SysTables
|
var data tools.SysTables
|
||||||
@@ -52,7 +52,7 @@ func GetSysTableList(c *gin.Context) {
|
|||||||
// @Description 获取JSON
|
// @Description 获取JSON
|
||||||
// @Tags 工具 - 生成表
|
// @Tags 工具 - 生成表
|
||||||
// @Param configKey path int true "configKey"
|
// @Param configKey path int true "configKey"
|
||||||
// @Success 200 {object} models.Response "{"code": 200, "data": [...]}"
|
// @Success 200 {object} app.Response "{"code": 200, "data": [...]}"
|
||||||
// @Router /api/v1/sys/tables/info/{tableId} [get]
|
// @Router /api/v1/sys/tables/info/{tableId} [get]
|
||||||
// @Security
|
// @Security
|
||||||
func GetSysTables(c *gin.Context) {
|
func GetSysTables(c *gin.Context) {
|
||||||
|
|||||||
@@ -21,8 +21,6 @@ var (
|
|||||||
config string
|
config string
|
||||||
port string
|
port string
|
||||||
mode string
|
mode string
|
||||||
//auto tls
|
|
||||||
//StartCmd : set up restful api server
|
|
||||||
StartCmd = &cobra.Command{
|
StartCmd = &cobra.Command{
|
||||||
Use: "server",
|
Use: "server",
|
||||||
Short: "Start API server",
|
Short: "Start API server",
|
||||||
|
|||||||
@@ -41,19 +41,14 @@ func run() {
|
|||||||
//3. 初始化数据库链接
|
//3. 初始化数据库链接
|
||||||
database.Setup()
|
database.Setup()
|
||||||
//4. 数据库迁移
|
//4. 数据库迁移
|
||||||
gorm.AutoMigrate(orm.Eloquent)
|
_ = gorm.AutoMigrate(orm.Eloquent)
|
||||||
log.Println("数据库结构初始化成功!")
|
log.Println("数据库结构初始化成功!")
|
||||||
//5. 数据初始化完成
|
//5. 数据初始化完成
|
||||||
if config2.ApplicationConfig.IsInit {
|
if err := models.InitDb(); err != nil {
|
||||||
if err := models.InitDb(); err != nil {
|
log.Fatal("数据库基础数据初始化失败!")
|
||||||
log.Fatal("数据库基础数据初始化失败!")
|
|
||||||
} else {
|
|
||||||
config2.SetApplicationIsInit()
|
|
||||||
}
|
|
||||||
log.Println("数据库基础数据初始化成功!")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
usage = `finish`
|
usage = `数据库基础数据初始化成功`
|
||||||
fmt.Println(usage)
|
fmt.Println(usage)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -337,9 +337,6 @@ INSERT INTO `sys_menu` VALUES (46, NULL, '删除用户', NULL, '/api/v1/sysuser/
|
|||||||
INSERT INTO `sys_menu` VALUES (50, 'Mangent', '基础信息', 'network', '/mangent', '/0/50', 'M', '无', '', 0, '1', '', 'Layout', 2, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
INSERT INTO `sys_menu` VALUES (50, 'Mangent', '基础信息', 'network', '/mangent', '/0/50', 'M', '无', '', 0, '1', '', 'Layout', 2, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (51, 'Menu', '菜单管理', 'tree-table', 'menu', '/0/2/51', 'C', '无', 'system:sysmenu:list', 2, '1', '', '/menu/index', 3, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 11:16:30', NULL);
|
INSERT INTO `sys_menu` VALUES (51, 'Menu', '菜单管理', 'tree-table', 'menu', '/0/2/51', 'C', '无', 'system:sysmenu:list', 2, '1', '', '/menu/index', 3, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 11:16:30', NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (52, 'Role', '角色管理', 'peoples', 'role', '/0/2/52', 'C', '无', 'system:sysrole:list', 2, '1', '', '/role/index', 2, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 11:16:19', NULL);
|
INSERT INTO `sys_menu` VALUES (52, 'Role', '角色管理', 'peoples', 'role', '/0/2/52', 'C', '无', 'system:sysrole:list', 2, '1', '', '/role/index', 2, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 11:16:19', NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (53, 'Doctor', '医生管理', 'pass', 'doctor', '/0/50/53', 'C', '无', '', 50, '1', '', '/doctor/index', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
|
||||||
INSERT INTO `sys_menu` VALUES (54, 'Calendar', '排班管理', 'calendar', 'calendar', '/0/50/54', 'C', '无', '', 50, '1', '', '/calendar/index', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
|
||||||
INSERT INTO `sys_menu` VALUES (55, 'Menber', '会员管理', 'vip', 'member', '/0/50/55', 'C', '无', '', 50, '1', '', '/member/index', 0, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
|
||||||
INSERT INTO `sys_menu` VALUES (56, 'Dept', '部门管理', 'tree', 'dept', '/0/2/56', 'C', '无', 'system:sysdept:list', 2, '0', '', '/dept/index', 4, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 11:16:47', NULL);
|
INSERT INTO `sys_menu` VALUES (56, 'Dept', '部门管理', 'tree', 'dept', '/0/2/56', 'C', '无', 'system:sysdept:list', 2, '0', '', '/dept/index', 4, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 11:16:47', NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (57, 'post', '岗位管理', 'pass', 'post', '/0/2/57', 'C', '无', 'system:syspost:list', 2, '0', '', '/post/index', 5, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 11:16:53', NULL);
|
INSERT INTO `sys_menu` VALUES (57, 'post', '岗位管理', 'pass', 'post', '/0/2/57', 'C', '无', 'system:syspost:list', 2, '0', '', '/post/index', 5, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 11:16:53', NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (58, 'Dict', '字典管理', 'education', 'dict', '/0/2/58', 'C', '无', 'system:sysdicttype:list', 2, '0', '', '/dict/index', 6, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 11:17:04', NULL);
|
INSERT INTO `sys_menu` VALUES (58, 'Dict', '字典管理', 'education', 'dict', '/0/2/58', 'C', '无', 'system:sysdicttype:list', 2, '0', '', '/dict/index', 6, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 11:17:04', NULL);
|
||||||
@@ -382,11 +379,6 @@ INSERT INTO `sys_menu` VALUES (94, NULL, '获取菜单树', 'bug', '/api/v1/menu
|
|||||||
INSERT INTO `sys_menu` VALUES (95, NULL, '获取角色菜单', 'bug', '/api/v1/rolemenu', '/0/63/205/95', 'A', 'GET', NULL, 205, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
INSERT INTO `sys_menu` VALUES (95, NULL, '获取角色菜单', 'bug', '/api/v1/rolemenu', '/0/63/205/95', 'A', 'GET', NULL, 205, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (96, NULL, '创建角色菜单', 'bug', '/api/v1/rolemenu', '/0/63/205/96', 'A', 'POST', NULL, 205, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
INSERT INTO `sys_menu` VALUES (96, NULL, '创建角色菜单', 'bug', '/api/v1/rolemenu', '/0/63/205/96', 'A', 'POST', NULL, 205, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (97, NULL, '删除用户菜单数据', 'bug', '/api/v1/rolemenu/:id', '/0/63/205/97', 'A', 'DELETE', NULL, 205, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
INSERT INTO `sys_menu` VALUES (97, NULL, '删除用户菜单数据', 'bug', '/api/v1/rolemenu/:id', '/0/63/205/97', 'A', 'DELETE', NULL, 205, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (98, NULL, '医生获取', 'bug', '/api/v1/doctor', '/0/63/208/98', 'A', 'GET', NULL, 208, NULL, NULL, NULL, 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
|
||||||
INSERT INTO `sys_menu` VALUES (99, NULL, '创建医生', 'bug', '/api/v1/doctor', '/0/63/208/99', 'A', 'POST', NULL, 208, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
|
||||||
INSERT INTO `sys_menu` VALUES (100, NULL, '修改医生', 'bug', '/api/v1/doctor/:id', '/0/63/208/100', 'A', 'PUT', NULL, 208, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
|
||||||
INSERT INTO `sys_menu` VALUES (101, NULL, '删除医生', 'bug', '/api/v1/doctor/:id', '/0/63/208/101', 'A', 'DELETE', NULL, 208, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
|
||||||
INSERT INTO `sys_menu` VALUES (102, NULL, '添加医生头像', 'bug', '/api/v1/doctor/pic/', '/0/63/208/102', 'A', 'POST', NULL, 208, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
|
||||||
INSERT INTO `sys_menu` VALUES (103, NULL, '部门菜单列表', 'bug', '/api/v1/deptList', '/0/63/203/103', 'A', 'GET', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
INSERT INTO `sys_menu` VALUES (103, NULL, '部门菜单列表', 'bug', '/api/v1/deptList', '/0/63/203/103', 'A', 'GET', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (104, NULL, '根据id获取部门信息', 'bug', '/api/v1/dept/:id', '/0/63/203/104', 'A', 'GET', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
INSERT INTO `sys_menu` VALUES (104, NULL, '根据id获取部门信息', 'bug', '/api/v1/dept/:id', '/0/63/203/104', 'A', 'GET', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (105, NULL, '创建部门', 'bug', '/api/v1/dept', '/0/63/203/105', 'A', 'POST', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
INSERT INTO `sys_menu` VALUES (105, NULL, '创建部门', 'bug', '/api/v1/dept', '/0/63/203/105', 'A', 'POST', NULL, 203, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
||||||
@@ -433,10 +425,6 @@ INSERT INTO `sys_menu` VALUES (203, '', '部门管理', 'tree', '', '/0/63/203',
|
|||||||
INSERT INTO `sys_menu` VALUES (204, '', '岗位管理', 'pass', '', '/0/63/204', 'C', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
INSERT INTO `sys_menu` VALUES (204, '', '岗位管理', 'pass', '', '/0/63/204', 'C', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (205, '', '角色菜单管理', 'nested', '', '/0/63/205', 'C', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
INSERT INTO `sys_menu` VALUES (205, '', '角色菜单管理', 'nested', '', '/0/63/205', 'C', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (206, '', '数据', '', '', '/0/63/69/206', 'C', 'PUT', '', 69, '0', '', '', 2, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
INSERT INTO `sys_menu` VALUES (206, '', '数据', '', '', '/0/63/69/206', 'C', 'PUT', '', 69, '0', '', '', 2, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (207, '', '会员管理', 'vip', '', '/0/63/207', 'C', 'DELETE', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
|
||||||
INSERT INTO `sys_menu` VALUES (208, '', '医生管理', 'theme', '', '/0/63/208', 'C', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
|
||||||
INSERT INTO `sys_menu` VALUES (209, '', '订单管理', 'tab', '', '/0/63/209', 'M', '', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
|
||||||
INSERT INTO `sys_menu` VALUES (210, '', '排班管理', 'calendar', '', '/0/63/210', 'C', 'DELETE', '', 63, '0', '', '', 1, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
|
||||||
INSERT INTO `sys_menu` VALUES (211, 'Log', '日志管理', 'log', '/log', '/0/2/211', 'M', '', '', 2, '0', '', '/log/index', 8, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 11:15:32', NULL);
|
INSERT INTO `sys_menu` VALUES (211, 'Log', '日志管理', 'log', '/log', '/0/2/211', 'M', '', '', 2, '0', '', '/log/index', 8, '0', '1', '1', 0, '2020-04-11 15:52:48', '2020-04-12 11:15:32', NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (212, 'LoginLog', '登录日志', 'logininfor', '/loginlog', '/0/2/211/212', 'C', '', 'system:sysloginlog:list', 211, '0', '', '/loginlog/index', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
INSERT INTO `sys_menu` VALUES (212, 'LoginLog', '登录日志', 'logininfor', '/loginlog', '/0/2/211/212', 'C', '', 'system:sysloginlog:list', 211, '0', '', '/loginlog/index', 1, '0', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
||||||
INSERT INTO `sys_menu` VALUES (213, NULL, '获取登录日志', 'bug', '/api/v1/loginloglist', '/0/63/214/213', 'A', 'GET', NULL, 214, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
INSERT INTO `sys_menu` VALUES (213, NULL, '获取登录日志', 'bug', '/api/v1/loginloglist', '/0/63/214/213', 'A', 'GET', NULL, 214, NULL, NULL, NULL, 0, '1', '1', '1', 0, '2020-04-11 15:52:48', NULL, NULL);
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ settings:
|
|||||||
mode: dev # dev开发环境 test测试环境 prod线上环境
|
mode: dev # dev开发环境 test测试环境 prod线上环境
|
||||||
demomsg: "谢谢您的参与,但为了大家更好的体验,所以本次提交就算了吧!\U0001F600\U0001F600\U0001F600"
|
demomsg: "谢谢您的参与,但为了大家更好的体验,所以本次提交就算了吧!\U0001F600\U0001F600\U0001F600"
|
||||||
host: 0.0.0.0
|
host: 0.0.0.0
|
||||||
isinit: false
|
|
||||||
name: testApp
|
name: testApp
|
||||||
port: 8000
|
port: 8000
|
||||||
readtimeout: 1
|
readtimeout: 1
|
||||||
|
|||||||
+4
-4
@@ -52,14 +52,14 @@ func Setup() {
|
|||||||
panic("db type unknow")
|
panic("db type unknow")
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatalln("%s connect error %v", DbType, err)
|
log.Fatalf("%s connect error %v", DbType, err)
|
||||||
} else {
|
} else {
|
||||||
log.Println("%s connect success!", DbType)
|
log.Printf("%s connect success!", DbType)
|
||||||
}
|
}
|
||||||
log.Println("%s connect success!", DbType)
|
|
||||||
|
|
||||||
if Eloquent.Error != nil {
|
if Eloquent.Error != nil {
|
||||||
log.Fatalln("database error %v", Eloquent.Error)
|
log.Fatalf("database error %v", Eloquent.Error)
|
||||||
}
|
}
|
||||||
|
|
||||||
Eloquent.LogMode(true)
|
Eloquent.LogMode(true)
|
||||||
|
|||||||
+366
-255
File diff suppressed because it is too large.
Load diff
+365
-254
File diff suppressed because it is too large.
Load diff
+256
-195
@@ -1,37 +1,15 @@
|
|||||||
definitions:
|
definitions:
|
||||||
models.Config:
|
app.Response:
|
||||||
properties:
|
properties:
|
||||||
configId:
|
code:
|
||||||
description: 编码
|
description: 代码
|
||||||
|
example: 200
|
||||||
type: integer
|
type: integer
|
||||||
configKey:
|
data:
|
||||||
description: 参数键名
|
description: 数据集
|
||||||
type: string
|
type: object
|
||||||
configName:
|
msg:
|
||||||
description: 参数名称
|
description: 消息
|
||||||
type: string
|
|
||||||
configType:
|
|
||||||
description: 是否系统内置
|
|
||||||
type: string
|
|
||||||
configValue:
|
|
||||||
description: 参数键值
|
|
||||||
type: string
|
|
||||||
createBy:
|
|
||||||
type: string
|
|
||||||
createTime:
|
|
||||||
type: string
|
|
||||||
dataScope:
|
|
||||||
type: string
|
|
||||||
isDel:
|
|
||||||
type: string
|
|
||||||
params:
|
|
||||||
type: string
|
|
||||||
remark:
|
|
||||||
description: 备注
|
|
||||||
type: string
|
|
||||||
updateBy:
|
|
||||||
type: string
|
|
||||||
updateTime:
|
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
models.Dept:
|
models.Dept:
|
||||||
@@ -42,31 +20,29 @@ definitions:
|
|||||||
type: array
|
type: array
|
||||||
createBy:
|
createBy:
|
||||||
type: string
|
type: string
|
||||||
createTime:
|
createdAt:
|
||||||
type: string
|
type: string
|
||||||
dataScope:
|
dataScope:
|
||||||
type: string
|
type: string
|
||||||
|
deletedAt:
|
||||||
|
type: string
|
||||||
deptId:
|
deptId:
|
||||||
description: 部门编码
|
description: 部门编码
|
||||||
example: 1
|
|
||||||
type: integer
|
type: integer
|
||||||
x-description: 标示
|
deptName:
|
||||||
deptath:
|
|
||||||
type: string
|
|
||||||
deptname:
|
|
||||||
description: 部门名称
|
description: 部门名称
|
||||||
type: string
|
type: string
|
||||||
|
deptPath:
|
||||||
|
type: string
|
||||||
email:
|
email:
|
||||||
description: 邮箱
|
description: 邮箱
|
||||||
type: string
|
type: string
|
||||||
isDel:
|
|
||||||
type: string
|
|
||||||
leader:
|
leader:
|
||||||
description: 负责人
|
description: 负责人
|
||||||
type: string
|
type: string
|
||||||
params:
|
params:
|
||||||
type: string
|
type: string
|
||||||
parent_id:
|
parentId:
|
||||||
description: 上级部门
|
description: 上级部门
|
||||||
type: integer
|
type: integer
|
||||||
phone:
|
phone:
|
||||||
@@ -80,7 +56,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
updateBy:
|
updateBy:
|
||||||
type: string
|
type: string
|
||||||
updateTime:
|
updatedAt:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
models.DictType:
|
models.DictType:
|
||||||
@@ -88,13 +64,13 @@ definitions:
|
|||||||
createBy:
|
createBy:
|
||||||
description: 创建者
|
description: 创建者
|
||||||
type: string
|
type: string
|
||||||
createTime:
|
createdAt:
|
||||||
description: 创建时间
|
|
||||||
type: string
|
type: string
|
||||||
dataScope:
|
dataScope:
|
||||||
type: string
|
type: string
|
||||||
|
deletedAt:
|
||||||
|
type: string
|
||||||
dictId:
|
dictId:
|
||||||
example: 1
|
|
||||||
type: integer
|
type: integer
|
||||||
dictName:
|
dictName:
|
||||||
description: 字典名称
|
description: 字典名称
|
||||||
@@ -102,8 +78,6 @@ definitions:
|
|||||||
dictType:
|
dictType:
|
||||||
description: 字典类型
|
description: 字典类型
|
||||||
type: string
|
type: string
|
||||||
isDel:
|
|
||||||
type: string
|
|
||||||
params:
|
params:
|
||||||
type: string
|
type: string
|
||||||
remark:
|
remark:
|
||||||
@@ -115,8 +89,7 @@ definitions:
|
|||||||
updateBy:
|
updateBy:
|
||||||
description: 更新者
|
description: 更新者
|
||||||
type: string
|
type: string
|
||||||
updateTime:
|
updatedAt:
|
||||||
description: 更新时间
|
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
models.Login:
|
models.Login:
|
||||||
@@ -143,21 +116,19 @@ definitions:
|
|||||||
createBy:
|
createBy:
|
||||||
description: 创建人
|
description: 创建人
|
||||||
type: string
|
type: string
|
||||||
createTime:
|
createdAt:
|
||||||
description: 创建时间
|
|
||||||
type: string
|
type: string
|
||||||
dataScope:
|
dataScope:
|
||||||
description: 数据
|
description: 数据
|
||||||
type: string
|
type: string
|
||||||
|
deletedAt:
|
||||||
|
type: string
|
||||||
infoId:
|
infoId:
|
||||||
description: 主键
|
description: 主键
|
||||||
type: integer
|
type: integer
|
||||||
ipaddr:
|
ipaddr:
|
||||||
description: ip地址
|
description: ip地址
|
||||||
type: string
|
type: string
|
||||||
isDel:
|
|
||||||
description: 是否删除
|
|
||||||
type: string
|
|
||||||
loginLocation:
|
loginLocation:
|
||||||
description: 归属地
|
description: 归属地
|
||||||
type: string
|
type: string
|
||||||
@@ -170,7 +141,6 @@ definitions:
|
|||||||
description: 系统
|
description: 系统
|
||||||
type: string
|
type: string
|
||||||
params:
|
params:
|
||||||
description: 参数
|
|
||||||
type: string
|
type: string
|
||||||
platform:
|
platform:
|
||||||
description: 固件
|
description: 固件
|
||||||
@@ -184,10 +154,9 @@ definitions:
|
|||||||
updateBy:
|
updateBy:
|
||||||
description: 更新者
|
description: 更新者
|
||||||
type: string
|
type: string
|
||||||
updateTime:
|
updatedAt:
|
||||||
description: 更新时间
|
|
||||||
type: string
|
type: string
|
||||||
userName:
|
username:
|
||||||
description: 用户名
|
description: 用户名
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
@@ -205,15 +174,17 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
createBy:
|
createBy:
|
||||||
type: string
|
type: string
|
||||||
createTime:
|
createdAt:
|
||||||
type: string
|
type: string
|
||||||
dataScope:
|
dataScope:
|
||||||
type: string
|
type: string
|
||||||
|
deletedAt:
|
||||||
|
type: string
|
||||||
icon:
|
icon:
|
||||||
type: string
|
type: string
|
||||||
is_select:
|
is_select:
|
||||||
type: boolean
|
type: boolean
|
||||||
isDel:
|
isFrame:
|
||||||
type: string
|
type: string
|
||||||
menuId:
|
menuId:
|
||||||
type: integer
|
type: integer
|
||||||
@@ -241,7 +212,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
updateBy:
|
updateBy:
|
||||||
type: string
|
type: string
|
||||||
updateTime:
|
updatedAt:
|
||||||
type: string
|
type: string
|
||||||
visible:
|
visible:
|
||||||
type: string
|
type: string
|
||||||
@@ -250,14 +221,12 @@ definitions:
|
|||||||
properties:
|
properties:
|
||||||
createBy:
|
createBy:
|
||||||
type: string
|
type: string
|
||||||
createTime:
|
createdAt:
|
||||||
description: 创建时间
|
|
||||||
type: string
|
type: string
|
||||||
dataScope:
|
dataScope:
|
||||||
type: string
|
type: string
|
||||||
isDel:
|
deletedAt:
|
||||||
description: 是否删除
|
type: string
|
||||||
type: integer
|
|
||||||
params:
|
params:
|
||||||
type: string
|
type: string
|
||||||
postCode:
|
postCode:
|
||||||
@@ -265,9 +234,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
postId:
|
postId:
|
||||||
description: 岗位编号
|
description: 岗位编号
|
||||||
example: 1
|
|
||||||
type: integer
|
type: integer
|
||||||
x-description: 标示
|
|
||||||
postName:
|
postName:
|
||||||
description: 岗位名称
|
description: 岗位名称
|
||||||
type: string
|
type: string
|
||||||
@@ -282,21 +249,42 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
updateBy:
|
updateBy:
|
||||||
type: string
|
type: string
|
||||||
updateTime:
|
updatedAt:
|
||||||
description: 最后修改时间
|
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
models.Response:
|
models.SysConfig:
|
||||||
properties:
|
properties:
|
||||||
code:
|
configId:
|
||||||
description: 代码
|
description: 编码
|
||||||
example: 200
|
|
||||||
type: integer
|
type: integer
|
||||||
data:
|
configKey:
|
||||||
description: 数据集
|
description: 参数键名
|
||||||
type: object
|
type: string
|
||||||
msg:
|
configName:
|
||||||
description: 错误消息
|
description: 参数名称
|
||||||
|
type: string
|
||||||
|
configType:
|
||||||
|
description: 是否系统内置
|
||||||
|
type: string
|
||||||
|
configValue:
|
||||||
|
description: 参数键值
|
||||||
|
type: string
|
||||||
|
createBy:
|
||||||
|
type: string
|
||||||
|
createdAt:
|
||||||
|
type: string
|
||||||
|
dataScope:
|
||||||
|
type: string
|
||||||
|
deletedAt:
|
||||||
|
type: string
|
||||||
|
params:
|
||||||
|
type: string
|
||||||
|
remark:
|
||||||
|
description: 备注
|
||||||
|
type: string
|
||||||
|
updateBy:
|
||||||
|
type: string
|
||||||
|
updatedAt:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
models.SysOperLog:
|
models.SysOperLog:
|
||||||
@@ -309,18 +297,16 @@ definitions:
|
|||||||
createBy:
|
createBy:
|
||||||
description: 创建人
|
description: 创建人
|
||||||
type: string
|
type: string
|
||||||
createTime:
|
createdAt:
|
||||||
description: 创建时间
|
|
||||||
type: string
|
type: string
|
||||||
dataScope:
|
dataScope:
|
||||||
description: 数据
|
description: 数据
|
||||||
type: string
|
type: string
|
||||||
|
deletedAt:
|
||||||
|
type: string
|
||||||
deptName:
|
deptName:
|
||||||
description: 部门名称
|
description: 部门名称
|
||||||
type: string
|
type: string
|
||||||
isDel:
|
|
||||||
description: 是否删除
|
|
||||||
type: string
|
|
||||||
jsonResult:
|
jsonResult:
|
||||||
description: 返回数据
|
description: 返回数据
|
||||||
type: string
|
type: string
|
||||||
@@ -372,11 +358,10 @@ definitions:
|
|||||||
updateBy:
|
updateBy:
|
||||||
description: 更新者
|
description: 更新者
|
||||||
type: string
|
type: string
|
||||||
updateTime:
|
updatedAt:
|
||||||
description: 更新时间
|
|
||||||
type: string
|
type: string
|
||||||
userAgent:
|
userAgent:
|
||||||
description: us
|
description: ua
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
models.SysRole:
|
models.SysRole:
|
||||||
@@ -385,18 +370,18 @@ definitions:
|
|||||||
type: boolean
|
type: boolean
|
||||||
createBy:
|
createBy:
|
||||||
type: string
|
type: string
|
||||||
createTime:
|
createdAt:
|
||||||
type: string
|
type: string
|
||||||
dataScope:
|
dataScope:
|
||||||
type: string
|
type: string
|
||||||
|
deletedAt:
|
||||||
|
type: string
|
||||||
deptIds:
|
deptIds:
|
||||||
items:
|
items:
|
||||||
type: integer
|
type: integer
|
||||||
type: array
|
type: array
|
||||||
flag:
|
flag:
|
||||||
type: string
|
type: string
|
||||||
isDel:
|
|
||||||
type: string
|
|
||||||
menuIds:
|
menuIds:
|
||||||
items:
|
items:
|
||||||
type: integer
|
type: integer
|
||||||
@@ -422,7 +407,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
updateBy:
|
updateBy:
|
||||||
type: string
|
type: string
|
||||||
updateTime:
|
updatedAt:
|
||||||
type: string
|
type: string
|
||||||
type: object
|
type: object
|
||||||
models.SysUser:
|
models.SysUser:
|
||||||
@@ -432,19 +417,18 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
createBy:
|
createBy:
|
||||||
type: string
|
type: string
|
||||||
createTime:
|
createdAt:
|
||||||
description: 创建时间
|
|
||||||
type: string
|
type: string
|
||||||
dataScope:
|
dataScope:
|
||||||
type: string
|
type: string
|
||||||
|
deletedAt:
|
||||||
|
type: string
|
||||||
deptId:
|
deptId:
|
||||||
description: 部门编码
|
description: 部门编码
|
||||||
type: integer
|
type: integer
|
||||||
email:
|
email:
|
||||||
description: 邮箱
|
description: 邮箱
|
||||||
type: string
|
type: string
|
||||||
isDel:
|
|
||||||
type: string
|
|
||||||
nickName:
|
nickName:
|
||||||
description: 昵称
|
description: 昵称
|
||||||
type: string
|
type: string
|
||||||
@@ -475,8 +459,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
updateBy:
|
updateBy:
|
||||||
type: string
|
type: string
|
||||||
updateTime:
|
updatedAt:
|
||||||
description: 修改时间
|
|
||||||
type: string
|
type: string
|
||||||
userId:
|
userId:
|
||||||
description: 编码
|
description: 编码
|
||||||
@@ -506,7 +489,7 @@ paths:
|
|||||||
name: data
|
name: data
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Config'
|
$ref: '#/definitions/models.SysConfig'
|
||||||
type: object
|
type: object
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
@@ -547,7 +530,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 获取配置
|
summary: 获取配置
|
||||||
@@ -566,7 +549,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 获取配置
|
summary: 获取配置
|
||||||
@@ -600,12 +583,60 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 配置列表数据
|
summary: 配置列表数据
|
||||||
tags:
|
tags:
|
||||||
- 配置
|
- 配置
|
||||||
|
/api/v1/db/columns/page:
|
||||||
|
get:
|
||||||
|
description: 数据库表列分页列表 / database table column page list
|
||||||
|
parameters:
|
||||||
|
- description: tableName / 数据表名称
|
||||||
|
in: query
|
||||||
|
name: tableName
|
||||||
|
type: string
|
||||||
|
- description: pageSize / 页条数
|
||||||
|
in: query
|
||||||
|
name: pageSize
|
||||||
|
type: integer
|
||||||
|
- description: pageIndex / 页码
|
||||||
|
in: query
|
||||||
|
name: pageIndex
|
||||||
|
type: integer
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{"code": 200, "data": [...]}'
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/app.Response'
|
||||||
|
summary: 分页列表数据 / page list data
|
||||||
|
tags:
|
||||||
|
- 工具 / Tools
|
||||||
|
/api/v1/db/tables/page:
|
||||||
|
get:
|
||||||
|
description: 数据库表分页列表 / database table page list
|
||||||
|
parameters:
|
||||||
|
- description: tableName / 数据表名称
|
||||||
|
in: query
|
||||||
|
name: tableName
|
||||||
|
type: string
|
||||||
|
- description: pageSize / 页条数
|
||||||
|
in: query
|
||||||
|
name: pageSize
|
||||||
|
type: integer
|
||||||
|
- description: pageIndex / 页码
|
||||||
|
in: query
|
||||||
|
name: pageIndex
|
||||||
|
type: integer
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{"code": 200, "data": [...]}'
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/app.Response'
|
||||||
|
summary: 分页列表数据 / page list data
|
||||||
|
tags:
|
||||||
|
- 工具 / Tools
|
||||||
/api/v1/dept:
|
/api/v1/dept:
|
||||||
post:
|
post:
|
||||||
consumes:
|
consumes:
|
||||||
@@ -672,7 +703,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 部门列表数据
|
summary: 部门列表数据
|
||||||
@@ -715,7 +746,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 分页部门列表数据
|
summary: 分页部门列表数据
|
||||||
@@ -732,7 +763,7 @@ paths:
|
|||||||
name: data
|
name: data
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Config'
|
$ref: '#/definitions/models.DictType'
|
||||||
type: object
|
type: object
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
@@ -741,9 +772,9 @@ paths:
|
|||||||
type: string
|
type: string
|
||||||
security:
|
security:
|
||||||
- Bearer: []
|
- Bearer: []
|
||||||
summary: 添加配置
|
summary: 添加字典数据
|
||||||
tags:
|
tags:
|
||||||
- 配置
|
- 字典数据
|
||||||
put:
|
put:
|
||||||
consumes:
|
consumes:
|
||||||
- application/json
|
- application/json
|
||||||
@@ -795,7 +826,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 通过编码获取字典数据
|
summary: 通过编码获取字典数据
|
||||||
@@ -829,7 +860,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 字典数据列表
|
summary: 字典数据列表
|
||||||
@@ -848,7 +879,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 通过字典类型获取字典数据
|
summary: 通过字典类型获取字典数据
|
||||||
@@ -928,7 +959,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 通过字典id获取字典类型
|
summary: 通过字典id获取字典类型
|
||||||
@@ -962,7 +993,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 字典类型列表数据
|
summary: 字典类型列表数据
|
||||||
@@ -1042,7 +1073,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 通过编码获取登录日志
|
summary: 通过编码获取登录日志
|
||||||
@@ -1076,7 +1107,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 登录日志列表
|
summary: 登录日志列表
|
||||||
@@ -1295,7 +1326,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 通过编码获取登录日志
|
summary: 通过编码获取登录日志
|
||||||
@@ -1346,7 +1377,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 登录日志列表
|
summary: 登录日志列表
|
||||||
@@ -1372,7 +1403,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 职位列表数据
|
summary: 职位列表数据
|
||||||
@@ -1452,7 +1483,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 获取字典数据
|
summary: 获取字典数据
|
||||||
@@ -1486,7 +1517,7 @@ paths:
|
|||||||
name: data
|
name: data
|
||||||
required: true
|
required: true
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Config'
|
$ref: '#/definitions/models.SysRole'
|
||||||
type: object
|
type: object
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
@@ -1561,7 +1592,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 角色列表数据
|
summary: 角色列表数据
|
||||||
@@ -1585,29 +1616,6 @@ paths:
|
|||||||
summary: RoleMenu列表数据
|
summary: RoleMenu列表数据
|
||||||
tags:
|
tags:
|
||||||
- 角色菜单
|
- 角色菜单
|
||||||
post:
|
|
||||||
consumes:
|
|
||||||
- application/x-www-form-urlencoded
|
|
||||||
description: 获取JSON
|
|
||||||
parameters:
|
|
||||||
- description: role_id
|
|
||||||
in: formData
|
|
||||||
name: role_id
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
- description: menu_id
|
|
||||||
in: formData
|
|
||||||
name: menu_id
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": -1, "message": "添加失败"}'
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
summary: 创建角色菜单
|
|
||||||
tags:
|
|
||||||
- 角色菜单
|
|
||||||
/api/v1/rolemenu/{id}:
|
/api/v1/rolemenu/{id}:
|
||||||
delete:
|
delete:
|
||||||
description: 删除数据
|
description: 删除数据
|
||||||
@@ -1629,6 +1637,107 @@ paths:
|
|||||||
summary: 删除用户菜单数据
|
summary: 删除用户菜单数据
|
||||||
tags:
|
tags:
|
||||||
- 角色菜单
|
- 角色菜单
|
||||||
|
/api/v1/sys/tables/info:
|
||||||
|
post:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 添加表结构
|
||||||
|
parameters:
|
||||||
|
- description: tableName / 数据表名称
|
||||||
|
in: query
|
||||||
|
name: tables
|
||||||
|
type: string
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
security:
|
||||||
|
- Bearer: []
|
||||||
|
summary: 添加表结构
|
||||||
|
tags:
|
||||||
|
- 工具 - 生成表
|
||||||
|
put:
|
||||||
|
consumes:
|
||||||
|
- application/json
|
||||||
|
description: 修改表结构
|
||||||
|
parameters:
|
||||||
|
- description: body
|
||||||
|
in: body
|
||||||
|
name: data
|
||||||
|
required: true
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/models.Dept'
|
||||||
|
type: object
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{"code": -1, "message": "添加失败"}'
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
security:
|
||||||
|
- Bearer: []
|
||||||
|
summary: 修改表结构
|
||||||
|
tags:
|
||||||
|
- 工具 - 生成表
|
||||||
|
/api/v1/sys/tables/info/{tableId}:
|
||||||
|
delete:
|
||||||
|
description: 删除表结构
|
||||||
|
parameters:
|
||||||
|
- description: tableId
|
||||||
|
in: path
|
||||||
|
name: tableId
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{"code": -1, "message": "删除失败"}'
|
||||||
|
schema:
|
||||||
|
type: string
|
||||||
|
summary: 删除表结构
|
||||||
|
tags:
|
||||||
|
- 工具 - 生成表
|
||||||
|
get:
|
||||||
|
description: 获取JSON
|
||||||
|
parameters:
|
||||||
|
- description: configKey
|
||||||
|
in: path
|
||||||
|
name: configKey
|
||||||
|
required: true
|
||||||
|
type: integer
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{"code": 200, "data": [...]}'
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/app.Response'
|
||||||
|
security:
|
||||||
|
- "": []
|
||||||
|
summary: 获取配置
|
||||||
|
tags:
|
||||||
|
- 工具 - 生成表
|
||||||
|
/api/v1/sys/tables/page:
|
||||||
|
get:
|
||||||
|
description: 生成表分页列表
|
||||||
|
parameters:
|
||||||
|
- description: tableName / 数据表名称
|
||||||
|
in: query
|
||||||
|
name: tableName
|
||||||
|
type: string
|
||||||
|
- description: pageSize / 页条数
|
||||||
|
in: query
|
||||||
|
name: pageSize
|
||||||
|
type: integer
|
||||||
|
- description: pageIndex / 页码
|
||||||
|
in: query
|
||||||
|
name: pageIndex
|
||||||
|
type: integer
|
||||||
|
responses:
|
||||||
|
"200":
|
||||||
|
description: '{"code": 200, "data": [...]}'
|
||||||
|
schema:
|
||||||
|
$ref: '#/definitions/app.Response'
|
||||||
|
summary: 分页列表数据
|
||||||
|
tags:
|
||||||
|
- 工具 - 生成表
|
||||||
/api/v1/sysUser:
|
/api/v1/sysUser:
|
||||||
get:
|
get:
|
||||||
description: 获取JSON
|
description: 获取JSON
|
||||||
@@ -1636,7 +1745,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 获取用户角色和职位
|
summary: 获取用户角色和职位
|
||||||
@@ -1675,7 +1784,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 获取用户
|
summary: 获取用户
|
||||||
@@ -1736,30 +1845,6 @@ paths:
|
|||||||
summary: 修改用户数据
|
summary: 修改用户数据
|
||||||
tags:
|
tags:
|
||||||
- 用户
|
- 用户
|
||||||
/api/v1/tables/page:
|
|
||||||
get:
|
|
||||||
description: 数据库表分页列表 / database table page list
|
|
||||||
parameters:
|
|
||||||
- description: tableName / 数据表名称
|
|
||||||
in: query
|
|
||||||
name: tableName
|
|
||||||
type: string
|
|
||||||
- description: pageSize / 页条数
|
|
||||||
in: query
|
|
||||||
name: pageSize
|
|
||||||
type: integer
|
|
||||||
- description: pageIndex / 页码
|
|
||||||
in: query
|
|
||||||
name: pageIndex
|
|
||||||
type: integer
|
|
||||||
responses:
|
|
||||||
"200":
|
|
||||||
description: '{"code": 200, "data": [...]}'
|
|
||||||
schema:
|
|
||||||
$ref: '#/definitions/models.Response'
|
|
||||||
summary: 分页列表数据 / page list data
|
|
||||||
tags:
|
|
||||||
- 工具 / Tools
|
|
||||||
/api/v1/user/profile:
|
/api/v1/user/profile:
|
||||||
get:
|
get:
|
||||||
description: 获取JSON
|
description: 获取JSON
|
||||||
@@ -1767,7 +1852,7 @@ paths:
|
|||||||
"200":
|
"200":
|
||||||
description: '{"code": 200, "data": [...]}'
|
description: '{"code": 200, "data": [...]}'
|
||||||
schema:
|
schema:
|
||||||
$ref: '#/definitions/models.Response'
|
$ref: '#/definitions/app.Response'
|
||||||
security:
|
security:
|
||||||
- "": []
|
- "": []
|
||||||
summary: 获取当前登录用户
|
summary: 获取当前登录用户
|
||||||
@@ -1835,15 +1920,7 @@ paths:
|
|||||||
- text/html
|
- text/html
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: 'OK - Load average: 2.39, 2.13, 1.97 | Cores: 2'
|
description: OK
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
"429":
|
|
||||||
description: WARNING
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
"500":
|
|
||||||
description: CRITICAL
|
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
summary: CPU 使用量
|
summary: CPU 使用量
|
||||||
@@ -1890,15 +1967,7 @@ paths:
|
|||||||
- text/html
|
- text/html
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: 'OK - Free space: 455MB (0GB) / 8192MB (8GB) | Used: 5%'
|
description: OK
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
"429":
|
|
||||||
description: WARNING
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
"500":
|
|
||||||
description: CRITICAL
|
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
summary: OS
|
summary: OS
|
||||||
@@ -1911,15 +1980,7 @@ paths:
|
|||||||
- text/html
|
- text/html
|
||||||
responses:
|
responses:
|
||||||
"200":
|
"200":
|
||||||
description: 'OK - Free space: 455MB (0GB) / 8192MB (8GB) | Used: 5%'
|
description: OK
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
"429":
|
|
||||||
description: WARNING
|
|
||||||
schema:
|
|
||||||
type: string
|
|
||||||
"500":
|
|
||||||
description: CRITICAL
|
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
summary: 内存使用量
|
summary: 内存使用量
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package models
|
|||||||
import (
|
import (
|
||||||
orm "go-admin/database"
|
orm "go-admin/database"
|
||||||
"go-admin/tools"
|
"go-admin/tools"
|
||||||
|
_ "time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type SysConfig struct {
|
type SysConfig struct {
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package models
|
|||||||
import (
|
import (
|
||||||
orm "go-admin/database"
|
orm "go-admin/database"
|
||||||
"go-admin/tools"
|
"go-admin/tools"
|
||||||
|
_ "time"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Dept struct {
|
type Dept struct {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import (
|
|||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/gin-gonic/gin/binding"
|
"github.com/gin-gonic/gin/binding"
|
||||||
"go-admin/models"
|
"go-admin/models"
|
||||||
|
"go-admin/tools/app"
|
||||||
"go-admin/pkg"
|
"go-admin/pkg"
|
||||||
"go-admin/utils"
|
"go-admin/utils"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|||||||
@@ -0,0 +1,46 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询参数列表
|
||||||
|
export function list{{.ClassName}}(query) {
|
||||||
|
return request({
|
||||||
|
url: '/api/v1/{{.ModuleName}}List',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询参数详细
|
||||||
|
export function get{{.ClassName}} ({{.PkJsonField}}) {
|
||||||
|
return request({
|
||||||
|
url: '/api/v1/{{.ModuleName}}/' + {{.PkJsonField}},
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 新增参数配置
|
||||||
|
export function add{{.ClassName}}(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/v1/{{.ModuleName}}',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改参数配置
|
||||||
|
export function update{{.ClassName}}(data) {
|
||||||
|
return request({
|
||||||
|
url: '/api/v1/{{.ModuleName}}',
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除参数配置
|
||||||
|
export function del{{.ClassName}}({{.PkJsonField}}) {
|
||||||
|
return request({
|
||||||
|
url: '/api/v1/{{.ModuleName}}/' + {{.PkJsonField}},
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,271 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
|
||||||
|
{{range .Columns}}
|
||||||
|
{{- $x := .IsQuery -}}
|
||||||
|
{{- if ($x) -}}
|
||||||
|
<el-form-item label="参数名称" prop="{{.JsonField}}">
|
||||||
|
<el-input v-model="queryParams.{{.JsonField}}" placeholder="请输入{{.ColumnComment}}" clearable size="small" @keyup.enter.native="handleQuery" />
|
||||||
|
</el-form-item>
|
||||||
|
{{end}}
|
||||||
|
{{- end }}
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||||
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
|
||||||
|
<el-row :gutter="10" class="mb8">
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
v-permisaction="['{{.PackageName}}:{{.ModuleName}}:add']"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-plus"
|
||||||
|
size="mini"
|
||||||
|
@click="handleAdd"
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
v-permisaction="['{{.PackageName}}:{{.ModuleName}}:edit']"
|
||||||
|
type="success"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
size="mini"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
v-permisaction="['{{.PackageName}}:{{.ModuleName}}:remove']"
|
||||||
|
type="danger"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
size="mini"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="configList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
{{- range .Columns -}}
|
||||||
|
{{- $x := .IsList -}}
|
||||||
|
{{- if ($x) -}}
|
||||||
|
<el-table-column label="{{.ColumnComment}}" align="center" prop="{{.JsonField}}" :show-overflow-tooltip="true" />
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button
|
||||||
|
v-permisaction="['{{.PackageName}}:{{.ModuleName}}:edit']"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-edit"
|
||||||
|
@click="handleUpdate(scope.row)"
|
||||||
|
>修改</el-button>
|
||||||
|
<el-button
|
||||||
|
v-permisaction="['{{.PackageName}}:{{.ModuleName}}:remove']"
|
||||||
|
size="mini"
|
||||||
|
type="text"
|
||||||
|
icon="el-icon-delete"
|
||||||
|
@click="handleDelete(scope.row)"
|
||||||
|
>删除</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<pagination
|
||||||
|
v-show="total>0"
|
||||||
|
:total="total"
|
||||||
|
:page.sync="queryParams.pageIndex"
|
||||||
|
:limit.sync="queryParams.pageSize"
|
||||||
|
@pagination="getList"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<!-- 添加或修改参数配置对话框 -->
|
||||||
|
<el-dialog :title="title" :visible.sync="open" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-form-item label="参数名称" prop="configName">
|
||||||
|
<el-input v-model="form.configName" placeholder="请输入参数名称" />
|
||||||
|
</el-form-item>
|
||||||
|
{{ range .Columns }}
|
||||||
|
{{- $x := .IsInsert -}}
|
||||||
|
{{- if ($x) -}}
|
||||||
|
<el-form-item label="{{.ColumnComment}}" prop="{{.JsonField}}">
|
||||||
|
<el-input v-model="form.{{.JsonField}}" placeholder="{{.ColumnComment}}" />
|
||||||
|
</el-form-item>
|
||||||
|
{{ end }}
|
||||||
|
{{- end }}
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
<el-button @click="cancel">取 消</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { list{{.ClassName}}, get{{.ClassName}}, del{{.ClassName}}, add{{.ClassName}}, update{{.ClassName}} } from '@/api/system/config'
|
||||||
|
import { formatJson } from '@/utils'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Config',
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
// 遮罩层
|
||||||
|
loading: true,
|
||||||
|
// 选中数组
|
||||||
|
ids: [],
|
||||||
|
// 非单个禁用
|
||||||
|
single: true,
|
||||||
|
// 非多个禁用
|
||||||
|
multiple: true,
|
||||||
|
// 总条数
|
||||||
|
total: 0,
|
||||||
|
// 参数表格数据
|
||||||
|
configList: [],
|
||||||
|
// 弹出层标题
|
||||||
|
title: '',
|
||||||
|
// 是否显示弹出层
|
||||||
|
open: false,
|
||||||
|
// 类型数据字典
|
||||||
|
typeOptions: [],
|
||||||
|
// 日期范围
|
||||||
|
dateRange: [],
|
||||||
|
// 查询参数
|
||||||
|
queryParams: {
|
||||||
|
pageIndex: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
{{- range .Columns -}}
|
||||||
|
{{- $x := .IsQuery -}}
|
||||||
|
{{- if ($x) -}}
|
||||||
|
{{.JsonField}}: undefined,
|
||||||
|
{{- end -}}
|
||||||
|
{{- end }}
|
||||||
|
},
|
||||||
|
// 表单参数
|
||||||
|
form: {},
|
||||||
|
// 表单校验
|
||||||
|
rules: {
|
||||||
|
{{- range .Columns -}}
|
||||||
|
{{- $x := .IsQuery -}}
|
||||||
|
{{- if ($x) -}}
|
||||||
|
{{.JsonField}}: [
|
||||||
|
{ required: true, message: '{{.ColumnComment}}不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
/** 查询参数列表 */
|
||||||
|
getList() {
|
||||||
|
this.loading = true
|
||||||
|
list{{.ClassName}}(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
|
||||||
|
this.{{.ModuleName}}List = response.data.list
|
||||||
|
this.total = response.data.count
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
)
|
||||||
|
}
|
||||||
|
// 取消按钮
|
||||||
|
cancel() {
|
||||||
|
this.open = false
|
||||||
|
this.reset()
|
||||||
|
},
|
||||||
|
// 表单重置
|
||||||
|
reset() {
|
||||||
|
this.form = {
|
||||||
|
{{ range .Columns}}
|
||||||
|
{{- $x := .IsInsert -}}
|
||||||
|
{{ if ($x) -}}
|
||||||
|
{{.JsonField}}: undefined,
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
}
|
||||||
|
this.resetForm('form')
|
||||||
|
},
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
handleQuery() {
|
||||||
|
this.queryParams.pageIndex = 1
|
||||||
|
this.getList()
|
||||||
|
},
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
resetQuery() {
|
||||||
|
this.dateRange = []
|
||||||
|
this.resetForm('queryForm')
|
||||||
|
this.handleQuery()
|
||||||
|
},
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
handleAdd() {
|
||||||
|
this.reset()
|
||||||
|
this.open = true
|
||||||
|
this.title = '添加{{.TableComment}}'
|
||||||
|
},
|
||||||
|
// 多选框选中数据
|
||||||
|
handleSelectionChange(selection) {
|
||||||
|
this.ids = selection.map(item => item.{{.PkJsonField}})
|
||||||
|
this.single = selection.length !== 1
|
||||||
|
this.multiple = !selection.length
|
||||||
|
},
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
handleUpdate(row) {
|
||||||
|
this.reset()
|
||||||
|
const {{.PkJsonField}} = row.{{.PkJsonField}} || this.ids
|
||||||
|
get{{.ClassName}}({{.PkJsonField}}).then(response => {
|
||||||
|
this.form = response.data
|
||||||
|
this.open = true
|
||||||
|
this.title = '修改{{.TableComment}}'
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 提交按钮 */
|
||||||
|
submitForm: function() {
|
||||||
|
this.$refs['form'].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (this.form.{{.PkJsonField}} !== undefined) {
|
||||||
|
update{{.ClassName}}(this.form).then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.msgSuccess('修改成功')
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.msgError(response.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
add{{.ClassName}}(this.form).then(response => {
|
||||||
|
if (response.code === 200) {
|
||||||
|
this.msgSuccess('新增成功')
|
||||||
|
this.open = false
|
||||||
|
this.getList()
|
||||||
|
} else {
|
||||||
|
this.msgError(response.msg)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
handleDelete(row) {
|
||||||
|
const Ids = row.{{.PkJsonField}} || this.ids
|
||||||
|
this.$confirm('是否确认删除编号为"' + Ids + '"的数据项?', '警告', {
|
||||||
|
confirmButtonText: '确定',
|
||||||
|
cancelButtonText: '取消',
|
||||||
|
type: 'warning'
|
||||||
|
}).then(function() {
|
||||||
|
return del{{.ClassName}}(Ids)
|
||||||
|
}).then(() => {
|
||||||
|
this.getList()
|
||||||
|
this.msgSuccess('删除成功')
|
||||||
|
}).catch(function() {})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -81,7 +81,7 @@ func Get{{.ClassName}}(c *gin.Context) {
|
|||||||
// @Tags 配置
|
// @Tags 配置
|
||||||
// @Accept application/json
|
// @Accept application/json
|
||||||
// @Product application/json
|
// @Product application/json
|
||||||
// @Param data body models.Config true "data"
|
// @Param data body models.{{.ClassName}} true "data"
|
||||||
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
// @Success 200 {string} string "{"code": 200, "message": "添加成功"}"
|
||||||
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
// @Success 200 {string} string "{"code": -1, "message": "添加失败"}"
|
||||||
// @Router /api/v1/dict/data [post]
|
// @Router /api/v1/dict/data [post]
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ package config
|
|||||||
import "github.com/spf13/viper"
|
import "github.com/spf13/viper"
|
||||||
|
|
||||||
type Application struct {
|
type Application struct {
|
||||||
IsInit bool
|
|
||||||
ReadTimeout int
|
ReadTimeout int
|
||||||
WriterTimeout int
|
WriterTimeout int
|
||||||
Host string
|
Host string
|
||||||
@@ -16,7 +15,6 @@ type Application struct {
|
|||||||
|
|
||||||
func InitApplication(cfg *viper.Viper) *Application {
|
func InitApplication(cfg *viper.Viper) *Application {
|
||||||
return &Application{
|
return &Application{
|
||||||
IsInit: cfg.GetBool("isInit"),
|
|
||||||
ReadTimeout: cfg.GetInt("readTimeout"),
|
ReadTimeout: cfg.GetInt("readTimeout"),
|
||||||
WriterTimeout: cfg.GetInt("writerTimeout"),
|
WriterTimeout: cfg.GetInt("writerTimeout"),
|
||||||
Host: cfg.GetString("host"),
|
Host: cfg.GetString("host"),
|
||||||
|
|||||||
Reference in new issue
Block a user