zhangqian
2024-02-29 0873199876ca5289125d8356d6a5bbc05f37dc5e
删除无用代码
3个文件已删除
4个文件已修改
1079 ■■■■■ 已修改文件
controllers/department.go 206 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/request/department.go 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/docs.go 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.json 217 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
docs/swagger.yaml 142 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
models/department.go 270 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
router/router.go 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
controllers/department.go
File was deleted
controllers/request/department.go
File was deleted
docs/docs.go
@@ -171,140 +171,6 @@
                    }
                }
            }
        },
        "/api-s/v1/organize/department": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "部门信息"
                ],
                "summary": "查询部门信息列表",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "页码",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "每页大小",
                        "name": "pageSize",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/util.ResponseList"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/models.Department"
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "部门信息"
                ],
                "summary": "添加部门信息",
                "parameters": [
                    {
                        "description": "部门信息信息",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.AddDepartment"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-s/v1/organize/department/{id}": {
            "put": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "部门信息"
                ],
                "summary": "编辑部门信息",
                "parameters": [
                    {
                        "description": "部门信息信息",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.UpdateDepartment"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "部门信息"
                ],
                "summary": "编辑部门信息",
                "parameters": [
                    {
                        "description": "部门信息信息",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.UpdateDepartment"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
@@ -338,44 +204,6 @@
                "valid": {
                    "description": "Valid is true if Time is not NULL",
                    "type": "boolean"
                }
            }
        },
        "models.Department": {
            "type": "object",
            "properties": {
                "children": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Department"
                    }
                },
                "head": {
                    "description": "部门负责人",
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "description": "部门名称",
                    "type": "string"
                },
                "number": {
                    "description": "部门编号",
                    "type": "string"
                },
                "parentId": {
                    "description": "上级部门ID",
                    "type": "integer"
                },
                "remark": {
                    "description": "备注",
                    "type": "string"
                },
                "sort": {
                    "description": "排序",
                    "type": "integer"
                }
            }
        },
@@ -416,27 +244,6 @@
                }
            }
        },
        "request.AddDepartment": {
            "type": "object",
            "properties": {
                "name": {
                    "description": "部门名称",
                    "type": "string"
                },
                "number": {
                    "description": "部门编号",
                    "type": "string"
                },
                "parentId": {
                    "description": "上级部门ID 一级部门传0",
                    "type": "integer"
                },
                "remark": {
                    "description": "备注",
                    "type": "string"
                }
            }
        },
        "request.AddDict": {
            "type": "object",
            "properties": {
@@ -455,30 +262,6 @@
                "number": {
                    "description": "编码",
                    "type": "string"
                },
                "remark": {
                    "description": "备注",
                    "type": "string"
                }
            }
        },
        "request.UpdateDepartment": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "description": "部门名称",
                    "type": "string"
                },
                "number": {
                    "description": "部门编号",
                    "type": "string"
                },
                "parentId": {
                    "description": "上级部门ID 一级部门传0",
                    "type": "integer"
                },
                "remark": {
                    "description": "备注",
docs/swagger.json
@@ -159,140 +159,6 @@
                    }
                }
            }
        },
        "/api-s/v1/organize/department": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "部门信息"
                ],
                "summary": "查询部门信息列表",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "页码",
                        "name": "page",
                        "in": "query"
                    },
                    {
                        "type": "integer",
                        "description": "每页大小",
                        "name": "pageSize",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/util.ResponseList"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "type": "array",
                                            "items": {
                                                "$ref": "#/definitions/models.Department"
                                            }
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            },
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "部门信息"
                ],
                "summary": "添加部门信息",
                "parameters": [
                    {
                        "description": "部门信息信息",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.AddDepartment"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        },
        "/api-s/v1/organize/department/{id}": {
            "put": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "部门信息"
                ],
                "summary": "编辑部门信息",
                "parameters": [
                    {
                        "description": "部门信息信息",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.UpdateDepartment"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            },
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "部门信息"
                ],
                "summary": "编辑部门信息",
                "parameters": [
                    {
                        "description": "部门信息信息",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.UpdateDepartment"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
                        "schema": {
                            "$ref": "#/definitions/util.Response"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
@@ -326,44 +192,6 @@
                "valid": {
                    "description": "Valid is true if Time is not NULL",
                    "type": "boolean"
                }
            }
        },
        "models.Department": {
            "type": "object",
            "properties": {
                "children": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/models.Department"
                    }
                },
                "head": {
                    "description": "部门负责人",
                    "type": "string"
                },
                "id": {
                    "type": "integer"
                },
                "name": {
                    "description": "部门名称",
                    "type": "string"
                },
                "number": {
                    "description": "部门编号",
                    "type": "string"
                },
                "parentId": {
                    "description": "上级部门ID",
                    "type": "integer"
                },
                "remark": {
                    "description": "备注",
                    "type": "string"
                },
                "sort": {
                    "description": "排序",
                    "type": "integer"
                }
            }
        },
@@ -404,27 +232,6 @@
                }
            }
        },
        "request.AddDepartment": {
            "type": "object",
            "properties": {
                "name": {
                    "description": "部门名称",
                    "type": "string"
                },
                "number": {
                    "description": "部门编号",
                    "type": "string"
                },
                "parentId": {
                    "description": "上级部门ID 一级部门传0",
                    "type": "integer"
                },
                "remark": {
                    "description": "备注",
                    "type": "string"
                }
            }
        },
        "request.AddDict": {
            "type": "object",
            "properties": {
@@ -443,30 +250,6 @@
                "number": {
                    "description": "编码",
                    "type": "string"
                },
                "remark": {
                    "description": "备注",
                    "type": "string"
                }
            }
        },
        "request.UpdateDepartment": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "description": "部门名称",
                    "type": "string"
                },
                "number": {
                    "description": "部门编号",
                    "type": "string"
                },
                "parentId": {
                    "description": "上级部门ID 一级部门传0",
                    "type": "integer"
                },
                "remark": {
                    "description": "备注",
docs/swagger.yaml
@@ -24,33 +24,6 @@
        description: Valid is true if Time is not NULL
        type: boolean
    type: object
  models.Department:
    properties:
      children:
        items:
          $ref: '#/definitions/models.Department'
        type: array
      head:
        description: 部门负责人
        type: string
      id:
        type: integer
      name:
        description: 部门名称
        type: string
      number:
        description: 部门编号
        type: string
      parentId:
        description: 上级部门ID
        type: integer
      remark:
        description: 备注
        type: string
      sort:
        description: 排序
        type: integer
    type: object
  models.Dict:
    properties:
      createdAt:
@@ -75,21 +48,6 @@
      updatedAt:
        type: string
    type: object
  request.AddDepartment:
    properties:
      name:
        description: 部门名称
        type: string
      number:
        description: 部门编号
        type: string
      parentId:
        description: 上级部门ID 一级部门传0
        type: integer
      remark:
        description: 备注
        type: string
    type: object
  request.AddDict:
    properties:
      dictType:
@@ -102,23 +60,6 @@
      number:
        description: 编码
        type: string
      remark:
        description: 备注
        type: string
    type: object
  request.UpdateDepartment:
    properties:
      id:
        type: integer
      name:
        description: 部门名称
        type: string
      number:
        description: 部门编号
        type: string
      parentId:
        description: 上级部门ID 一级部门传0
        type: integer
      remark:
        description: 备注
        type: string
@@ -267,87 +208,4 @@
      summary: 删除字典
      tags:
      - 系统设置/字典
  /api-s/v1/organize/department:
    get:
      parameters:
      - description: 页码
        in: query
        name: page
        type: integer
      - description: 每页大小
        in: query
        name: pageSize
        type: integer
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            allOf:
            - $ref: '#/definitions/util.ResponseList'
            - properties:
                data:
                  items:
                    $ref: '#/definitions/models.Department'
                  type: array
              type: object
      summary: 查询部门信息列表
      tags:
      - 部门信息
    post:
      parameters:
      - description: 部门信息信息
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/request.AddDepartment'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 添加部门信息
      tags:
      - 部门信息
  /api-s/v1/organize/department/{id}:
    delete:
      parameters:
      - description: 部门信息信息
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/request.UpdateDepartment'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 编辑部门信息
      tags:
      - 部门信息
    put:
      parameters:
      - description: 部门信息信息
        in: body
        name: object
        required: true
        schema:
          $ref: '#/definitions/request.UpdateDepartment'
      produces:
      - application/json
      responses:
        "200":
          description: 成功
          schema:
            $ref: '#/definitions/util.Response'
      summary: 编辑部门信息
      tags:
      - 部门信息
swagger: "2.0"
models/department.go
File was deleted
router/router.go
@@ -21,16 +21,6 @@
    urlPrefix := "/api-jl/v1"
    // 组织管理
    departmentController := new(controllers.DepartmentController)
    organizeAPI := r.Group(urlPrefix + "/organize")
    {
        organizeAPI.GET("department", departmentController.List)          // 获取部门列表
        organizeAPI.POST("department", departmentController.Add)          // 新增部门
        organizeAPI.PUT("department/:id", departmentController.Update)    // 修改部门
        organizeAPI.DELETE("department/:id", departmentController.Delete) // 删除部门
    }
    // 词典管理
    DictController := new(controllers.DictController)
    systemApi := r.Group(urlPrefix + "/system")