Browse Source

感谢zou2699 指出拼写错误 CreateAuthorityPatams --> CreateAuthorityParams

pixel 5 years ago
parent
commit
ca396b1f34

+ 2 - 2
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) {

+ 2 - 2
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) {

+ 41 - 6
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": {

+ 40 - 5
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": {

+ 28 - 5
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

+ 1 - 1
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(