diff --git a/QMPlusServer/controller/api/sys_authority.go b/QMPlusServer/controller/api/sys_authority.go index 8224b9d6b9dcc744bd0fe6a2ccfcb29d50622bfd..9f12f07ee4876e64cb79d76960ee4fb6559bb576 100644 --- a/QMPlusServer/controller/api/sys_authority.go +++ b/QMPlusServer/controller/api/sys_authority.go @@ -8,7 +8,7 @@ import ( "github.com/gin-gonic/gin" ) -type CreateAuthorityPatams struct { +type CreateAuthorityParams struct { AuthorityId string `json:"authorityId"` AuthorityName string `json:"authorityName"` } @@ -18,7 +18,7 @@ type CreateAuthorityPatams struct { // @Security ApiKeyAuth // @accept application/json // @Produce application/json -// @Param data body api.CreateAuthorityPatams true "创建角色" +// @Param data body api.CreateAuthorityParams true "创建角色" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /authority/createAuthority [post] func CreateAuthority(c *gin.Context) { diff --git a/QMPlusServer/controller/api/sys_casbin.go b/QMPlusServer/controller/api/sys_casbin.go index 364350cee241221a385d573ebc7d63c59bd2fe1e..509e44bf01639ab9287f98cb8aeb5edf3e4f1f55 100644 --- a/QMPlusServer/controller/api/sys_casbin.go +++ b/QMPlusServer/controller/api/sys_casbin.go @@ -17,7 +17,7 @@ type CasbinInReceive struct { // @Security ApiKeyAuth // @accept application/json // @Produce application/json -// @Param data body api.CreateAuthorityPatams true "更改角色api权限" +// @Param data body api.CreateAuthorityParams true "更改角色api权限" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /casbin/casbinPUpdata [post] func CasbinPUpdata(c *gin.Context) { @@ -36,7 +36,7 @@ func CasbinPUpdata(c *gin.Context) { // @Security ApiKeyAuth // @accept application/json // @Produce application/json -// @Param data body api.CreateAuthorityPatams true "获取权限列表" +// @Param data body api.CreateAuthorityParams true "获取权限列表" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Router /casbin/getPolicyPathByAuthorityId [post] func GetPolicyPathByAuthorityId(c *gin.Context) { diff --git a/QMPlusServer/docs/docs.go b/QMPlusServer/docs/docs.go index 7d243bac56fb12ac843c88629792f561d4b37acf..73526d87aa03f5af368f629ac2588387bed2fc4e 100644 --- a/QMPlusServer/docs/docs.go +++ b/QMPlusServer/docs/docs.go @@ -1,6 +1,6 @@ // GENERATED BY THE COMMAND ABOVE; DO NOT EDIT // This file was generated by swaggo/swag at -// 2019-12-13 14:31:12.9298434 +0800 CST m=+0.056881601 +// 2019-12-20 11:36:51.4275267 +0800 CST m=+0.082812601 package docs @@ -273,7 +273,7 @@ var doc = `{ "required": true, "schema": { "type": "object", - "$ref": "#/definitions/api.CreateAuthorityPatams" + "$ref": "#/definitions/api.CreateAuthorityParams" } } ], @@ -413,7 +413,7 @@ var doc = `{ "required": true, "schema": { "type": "object", - "$ref": "#/definitions/api.RegistAndLoginStuct" + "$ref": "#/definitions/sysModel.SysUser" } } ], @@ -452,7 +452,7 @@ var doc = `{ "required": true, "schema": { "type": "object", - "$ref": "#/definitions/api.CreateAuthorityPatams" + "$ref": "#/definitions/api.CreateAuthorityParams" } } ], @@ -491,7 +491,7 @@ var doc = `{ "required": true, "schema": { "type": "object", - "$ref": "#/definitions/api.CreateAuthorityPatams" + "$ref": "#/definitions/api.CreateAuthorityParams" } } ], @@ -1159,7 +1159,7 @@ var doc = `{ } } }, - "api.CreateAuthorityPatams": { + "api.CreateAuthorityParams": { "type": "object", "properties": { "authorityId": { @@ -1258,6 +1258,17 @@ var doc = `{ } } }, + "sysModel.SysAuthority": { + "type": "object", + "properties": { + "authorityId": { + "type": "string" + }, + "authorityName": { + "type": "string" + } + } + }, "sysModel.SysBaseMenu": { "type": "object", "properties": { @@ -1296,6 +1307,30 @@ var doc = `{ } } }, + "sysModel.SysUser": { + "type": "object", + "properties": { + "authority": { + "type": "object", + "$ref": "#/definitions/sysModel.SysAuthority" + }, + "authorityId": { + "type": "string" + }, + "headerImg": { + "type": "string" + }, + "nickName": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "uuid": { + "type": "string" + } + } + }, "sysModel.SysWorkflow": { "type": "object", "properties": { diff --git a/QMPlusServer/docs/swagger.json b/QMPlusServer/docs/swagger.json index b85cd625e8221564600c15abf3fb83c122028438..84a99898bd877b1871fe76c3b2b08cb1cdb35bc7 100644 --- a/QMPlusServer/docs/swagger.json +++ b/QMPlusServer/docs/swagger.json @@ -256,7 +256,7 @@ "required": true, "schema": { "type": "object", - "$ref": "#/definitions/api.CreateAuthorityPatams" + "$ref": "#/definitions/api.CreateAuthorityParams" } } ], @@ -396,7 +396,7 @@ "required": true, "schema": { "type": "object", - "$ref": "#/definitions/api.RegistAndLoginStuct" + "$ref": "#/definitions/sysModel.SysUser" } } ], @@ -435,7 +435,7 @@ "required": true, "schema": { "type": "object", - "$ref": "#/definitions/api.CreateAuthorityPatams" + "$ref": "#/definitions/api.CreateAuthorityParams" } } ], @@ -474,7 +474,7 @@ "required": true, "schema": { "type": "object", - "$ref": "#/definitions/api.CreateAuthorityPatams" + "$ref": "#/definitions/api.CreateAuthorityParams" } } ], @@ -1142,7 +1142,7 @@ } } }, - "api.CreateAuthorityPatams": { + "api.CreateAuthorityParams": { "type": "object", "properties": { "authorityId": { @@ -1241,6 +1241,17 @@ } } }, + "sysModel.SysAuthority": { + "type": "object", + "properties": { + "authorityId": { + "type": "string" + }, + "authorityName": { + "type": "string" + } + } + }, "sysModel.SysBaseMenu": { "type": "object", "properties": { @@ -1279,6 +1290,30 @@ } } }, + "sysModel.SysUser": { + "type": "object", + "properties": { + "authority": { + "type": "object", + "$ref": "#/definitions/sysModel.SysAuthority" + }, + "authorityId": { + "type": "string" + }, + "headerImg": { + "type": "string" + }, + "nickName": { + "type": "string" + }, + "userName": { + "type": "string" + }, + "uuid": { + "type": "string" + } + } + }, "sysModel.SysWorkflow": { "type": "object", "properties": { diff --git a/QMPlusServer/docs/swagger.yaml b/QMPlusServer/docs/swagger.yaml index 8d045de0022ed06539ddf189593a9a94a6a27b2d..66d84e1b1d8d60bdbcee1b7b7553e00a06729e97 100644 --- a/QMPlusServer/docs/swagger.yaml +++ b/QMPlusServer/docs/swagger.yaml @@ -30,7 +30,7 @@ definitions: path: type: string type: object - api.CreateAuthorityPatams: + api.CreateAuthorityParams: properties: authorityId: type: string @@ -93,6 +93,13 @@ definitions: path: type: string type: object + sysModel.SysAuthority: + properties: + authorityId: + type: string + authorityName: + type: string + type: object sysModel.SysBaseMenu: properties: children: @@ -118,6 +125,22 @@ definitions: title: type: string type: object + sysModel.SysUser: + properties: + authority: + $ref: '#/definitions/sysModel.SysAuthority' + type: object + authorityId: + type: string + headerImg: + type: string + nickName: + type: string + userName: + type: string + uuid: + type: string + type: object sysModel.SysWorkflow: properties: workflowDescription: @@ -309,7 +332,7 @@ paths: name: data required: true schema: - $ref: '#/definitions/api.CreateAuthorityPatams' + $ref: '#/definitions/api.CreateAuthorityParams' type: object produces: - application/json @@ -399,7 +422,7 @@ paths: name: data required: true schema: - $ref: '#/definitions/api.RegistAndLoginStuct' + $ref: '#/definitions/sysModel.SysUser' type: object produces: - application/json @@ -421,7 +444,7 @@ paths: name: data required: true schema: - $ref: '#/definitions/api.CreateAuthorityPatams' + $ref: '#/definitions/api.CreateAuthorityParams' type: object produces: - application/json @@ -445,7 +468,7 @@ paths: name: data required: true schema: - $ref: '#/definitions/api.CreateAuthorityPatams' + $ref: '#/definitions/api.CreateAuthorityParams' type: object produces: - application/json diff --git a/QMPlusServer/init/qmlog/qmlog.go b/QMPlusServer/init/qmlog/qmlog.go index b76a4aef11e9e8e55047bef653d935a3735a04a6..f66f4a8dec0ddeb056d57687aaec6153fc84c9d0 100644 --- a/QMPlusServer/init/qmlog/qmlog.go +++ b/QMPlusServer/init/qmlog/qmlog.go @@ -24,7 +24,7 @@ func InitLog() *logrus.Logger { if ok, _ := tools.PathExists("./log"); !ok { // Directory not exist fmt.Println("Create log.") - os.Mkdir("log", os.ModePerm) + _ = os.Mkdir("log", os.ModePerm) } apiLogPath := "./log/api.log" logWriter, err := rotatelogs.New(