fix
wangpengfei
2023-07-19 4eb798070f2926d976d0f28b64c36da805890ee6
docs/docs.go
@@ -16,6 +16,82 @@
    "host": "{{.Host}}",
    "basePath": "{{.BasePath}}",
    "paths": {
        "/api/authority/add": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Authority"
                ],
                "summary": "创建角色",
                "parameters": [
                    {
                        "description": "查询参数",
                        "name": "data",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.AddAuthority"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/contextx.Response"
                        }
                    }
                }
            }
        },
        "/api/authority/setMenuAuthority": {
            "post": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "consumes": [
                    "application/json"
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Authority"
                ],
                "summary": "设置角色菜单",
                "parameters": [
                    {
                        "description": "设置角色资源权限",
                        "name": "data",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.SetAuthorityMenu"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/contextx.Response"
                        }
                    }
                }
            }
        },
        "/api/base/captcha": {
            "post": {
                "produces": [
@@ -156,6 +232,14 @@
                    "City"
                ],
                "summary": "获取城市列表",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "省份ID",
                        "name": "province_id",
                        "in": "query"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "成功",
@@ -328,7 +412,7 @@
            }
        },
        "/api/client/update": {
            "post": {
            "put": {
                "produces": [
                    "application/json"
                ],
@@ -1299,6 +1383,156 @@
                }
            }
        },
        "/api/data/getAllData": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Data"
                ],
                "summary": "获取所有数据",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/contextx.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/response.DataResponse"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/department/add": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Department"
                ],
                "summary": "添加部门",
                "parameters": [
                    {
                        "description": "查询参数",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.AddDepartment"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/contextx.Response"
                        }
                    }
                }
            }
        },
        "/api/department/delete/{id}": {
            "delete": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Department"
                ],
                "summary": "删除部门",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "部门ID",
                        "name": "id",
                        "in": "path",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/contextx.Response"
                        }
                    }
                }
            }
        },
        "/api/department/list": {
            "get": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Department"
                ],
                "summary": "部门列表",
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/contextx.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/response.DepartmentResponse"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/department/update/{id}": {
            "put": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Department"
                ],
                "summary": "更新部门",
                "parameters": [
                    {
                        "description": "查询参数",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.UpdateDepartmentList"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/contextx.Response"
                        }
                    }
                }
            }
        },
        "/api/enterpriseNature/add": {
            "post": {
                "produces": [
@@ -1925,6 +2159,51 @@
                }
            }
        },
        "/api/menu/getMenu": {
            "get": {
                "security": [
                    {
                        "ApiKeyAuth": []
                    }
                ],
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Menu"
                ],
                "summary": "获取菜单树",
                "parameters": [
                    {
                        "type": "string",
                        "description": "Authorization",
                        "name": "Authorization",
                        "in": "header",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "allOf": [
                                {
                                    "$ref": "#/definitions/contextx.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/response.MenuTreeResponse"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
            }
        },
        "/api/orderManage/add": {
            "post": {
                "produces": [
@@ -2337,6 +2616,15 @@
                    "Province"
                ],
                "summary": "获取省份列表",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "国家ID",
                        "name": "country_id",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
@@ -2605,6 +2893,15 @@
                    "Region"
                ],
                "summary": "地区列表",
                "parameters": [
                    {
                        "type": "integer",
                        "description": "城市ID",
                        "name": "city_id",
                        "in": "query",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
@@ -3698,7 +3995,19 @@
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/contextx.Response"
                            "allOf": [
                                {
                                    "$ref": "#/definitions/contextx.Response"
                                },
                                {
                                    "type": "object",
                                    "properties": {
                                        "data": {
                                            "$ref": "#/definitions/response.SalesReturnResponse"
                                        }
                                    }
                                }
                            ]
                        }
                    }
                }
@@ -4688,6 +4997,36 @@
                    }
                }
            }
        },
        "/api/vetting/add": {
            "post": {
                "produces": [
                    "application/json"
                ],
                "tags": [
                    "Vetting"
                ],
                "summary": "添加审批",
                "parameters": [
                    {
                        "description": "查询参数",
                        "name": "object",
                        "in": "body",
                        "required": true,
                        "schema": {
                            "$ref": "#/definitions/request.AddVetting"
                        }
                    }
                ],
                "responses": {
                    "200": {
                        "description": "OK",
                        "schema": {
                            "$ref": "#/definitions/contextx.Response"
                        }
                    }
                }
            }
        }
    },
    "definitions": {
@@ -4768,6 +5107,29 @@
                }
            }
        },
        "model.Authority": {
            "type": "object",
            "properties": {
                "authorityName": {
                    "description": "角色名",
                    "type": "string"
                },
                "defaultRouter": {
                    "description": "默认菜单(默认dashboard)",
                    "type": "string"
                },
                "id": {
                    "description": "角色ID",
                    "type": "integer"
                },
                "menus": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Menu"
                    }
                }
            }
        },
        "model.City": {
            "type": "object",
            "properties": {
@@ -4797,14 +5159,26 @@
                "city_id": {
                    "type": "integer"
                },
                "client_level": {
                    "$ref": "#/definitions/model.ClientLevel"
                },
                "client_level_id": {
                    "type": "integer"
                },
                "client_origin": {
                    "$ref": "#/definitions/model.ClientOrigin"
                },
                "client_origin_id": {
                    "type": "integer"
                },
                "client_status": {
                    "$ref": "#/definitions/model.ClientStatus"
                },
                "client_status_id": {
                    "type": "integer"
                },
                "client_type": {
                    "$ref": "#/definitions/model.ClientType"
                },
                "client_type_id": {
                    "type": "integer"
@@ -5153,6 +5527,17 @@
                }
            }
        },
        "model.Department": {
            "type": "object",
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "model.EnterpriseNature": {
            "type": "object",
            "properties": {
@@ -5178,11 +5563,17 @@
        "model.FollowRecord": {
            "type": "object",
            "properties": {
                "client": {
                    "$ref": "#/definitions/model.Client"
                },
                "client_id": {
                    "type": "integer"
                },
                "client_status_id": {
                    "type": "integer"
                },
                "contact": {
                    "$ref": "#/definitions/model.Contact"
                },
                "contact_id": {
                    "type": "integer"
@@ -5258,6 +5649,33 @@
                    "type": "string"
                },
                "start_time": {
                    "type": "string"
                }
            }
        },
        "model.Menu": {
            "type": "object",
            "properties": {
                "children": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Menu"
                    }
                },
                "id": {
                    "description": "主键ID",
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                },
                "parentId": {
                    "type": "integer"
                },
                "path": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                }
            }
@@ -5476,6 +5894,9 @@
                "currency": {
                    "$ref": "#/definitions/constvar.CurrencyType"
                },
                "detail_address": {
                    "type": "string"
                },
                "disadvantages": {
                    "type": "string"
                },
@@ -5529,6 +5950,9 @@
                },
                "regular_customers_id": {
                    "type": "integer"
                },
                "remark": {
                    "type": "string"
                },
                "sale_stage_id": {
                    "type": "integer"
@@ -5734,6 +6158,41 @@
                }
            }
        },
        "model.SalesReturn": {
            "type": "object",
            "properties": {
                "clientId": {
                    "type": "integer"
                },
                "id": {
                    "type": "integer"
                },
                "memberId": {
                    "type": "integer"
                },
                "number": {
                    "type": "string"
                },
                "products": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Product"
                    }
                },
                "reason": {
                    "type": "string"
                },
                "repository": {
                    "type": "string"
                },
                "returnDate": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                }
            }
        },
        "model.SalesSources": {
            "type": "object",
            "properties": {
@@ -5909,27 +6368,24 @@
        "model.User": {
            "type": "object",
            "properties": {
                "companyName": {
                    "type": "string"
                "authority": {
                    "$ref": "#/definitions/model.Authority"
                },
                "createAt": {
                    "description": "创建时间",
                    "type": "string"
                "authorityId": {
                    "description": "用户角色ID",
                    "type": "integer"
                },
                "departmentId": {
                    "type": "integer"
                },
                "email": {
                    "type": "string"
                },
                "enable": {
                    "type": "boolean"
                },
                "headerImg": {
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "ip": {
                    "type": "string"
                    "type": "integer"
                },
                "menuIds": {
                    "description": "菜单ID列表",
@@ -5941,26 +6397,13 @@
                "nickName": {
                    "type": "string"
                },
                "parentId": {
                    "type": "string"
                },
                "parentName": {
                    "type": "string"
                },
                "phone": {
                    "type": "string"
                },
                "port": {
                    "type": "string"
                },
                "pos": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                },
                "updateAt": {
                    "description": "更新时间",
                "realName": {
                    "type": "string"
                },
                "userType": {
@@ -5968,6 +6411,23 @@
                },
                "username": {
                    "type": "string"
                },
                "uuid": {
                    "type": "string"
                }
            }
        },
        "request.AddAuthority": {
            "type": "object",
            "properties": {
                "authorityName": {
                    "type": "string"
                },
                "casbinInfos": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/request.CasbinInfo"
                    }
                }
            }
        },
@@ -6230,6 +6690,17 @@
                }
            }
        },
        "request.AddDepartment": {
            "type": "object",
            "required": [
                "name"
            ],
            "properties": {
                "name": {
                    "type": "string"
                }
            }
        },
        "request.AddEnterpriseNature": {
            "type": "object",
            "required": [
@@ -6450,6 +6921,9 @@
                "currency": {
                    "type": "integer"
                },
                "detail_address": {
                    "type": "string"
                },
                "disadvantages": {
                    "type": "string"
                },
@@ -6494,6 +6968,9 @@
                },
                "regular_customers_id": {
                    "type": "integer"
                },
                "remark": {
                    "type": "string"
                },
                "sale_stage_id": {
                    "type": "integer"
@@ -6758,8 +7235,63 @@
        "request.AddSubOrder": {
            "type": "object",
            "properties": {
                "subOrder": {
                    "$ref": "#/definitions/request.SubOrder"
                "clientId": {
                    "type": "integer"
                },
                "masterOrderId": {
                    "type": "integer"
                },
                "memberId": {
                    "type": "integer"
                },
                "number": {
                    "type": "string"
                },
                "product": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Product"
                    }
                }
            }
        },
        "request.AddVetting": {
            "type": "object",
            "required": [
                "opinion",
                "status",
                "userId",
                "vettingId",
                "vettingType"
            ],
            "properties": {
                "opinion": {
                    "type": "string"
                },
                "status": {
                    "type": "integer"
                },
                "userId": {
                    "type": "integer"
                },
                "vettingId": {
                    "type": "integer"
                },
                "vettingType": {
                    "type": "integer"
                }
            }
        },
        "request.CasbinInfo": {
            "type": "object",
            "properties": {
                "method": {
                    "description": "方法",
                    "type": "string"
                },
                "path": {
                    "description": "路径",
                    "type": "string"
                }
            }
        },
@@ -7105,29 +7637,46 @@
        "request.Register": {
            "type": "object",
            "properties": {
                "authorityId": {
                    "description": "用户角色ID",
                    "type": "integer"
                },
                "departmentId": {
                    "type": "integer"
                },
                "email": {
                    "type": "string",
                    "example": "电子邮箱"
                    "type": "string"
                },
                "headerImg": {
                    "type": "string",
                    "example": "头像链接"
                    "type": "string"
                },
                "id": {
                    "type": "string"
                },
                "nickName": {
                    "type": "string",
                    "example": "昵称"
                    "type": "string"
                },
                "passWord": {
                    "type": "string",
                    "example": "密码"
                "password": {
                    "type": "string"
                },
                "phone": {
                    "type": "string",
                    "example": "电话号码"
                    "type": "string"
                },
                "userName": {
                    "type": "string",
                    "example": "用户名"
                "pos": {
                    "type": "string"
                },
                "rePassword": {
                    "description": "确认密码",
                    "type": "string"
                },
                "realName": {
                    "type": "string"
                },
                "userType": {
                    "$ref": "#/definitions/constvar.UserType"
                },
                "username": {
                    "type": "string"
                }
            }
        },
@@ -7248,6 +7797,20 @@
                }
            }
        },
        "request.SetAuthorityMenu": {
            "type": "object",
            "properties": {
                "authorityId": {
                    "type": "integer"
                },
                "menus": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "request.SetCity": {
            "type": "object",
            "properties": {
@@ -7292,29 +7855,6 @@
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }
            }
        },
        "request.SubOrder": {
            "type": "object",
            "properties": {
                "clientId": {
                    "type": "integer"
                },
                "masterOrderId": {
                    "type": "integer"
                },
                "memberId": {
                    "type": "integer"
                },
                "number": {
                    "type": "string"
                },
                "product": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Product"
                    }
                }
            }
@@ -7687,6 +8227,35 @@
                }
            }
        },
        "request.UpdateDepartment": {
            "type": "object",
            "required": [
                "id",
                "name"
            ],
            "properties": {
                "id": {
                    "type": "integer"
                },
                "name": {
                    "type": "string"
                }
            }
        },
        "request.UpdateDepartmentList": {
            "type": "object",
            "required": [
                "departments"
            ],
            "properties": {
                "departments": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/request.UpdateDepartment"
                    }
                }
            }
        },
        "request.UpdateEnterpriseNature": {
            "type": "object",
            "required": [
@@ -8056,6 +8625,9 @@
                "currency": {
                    "type": "integer"
                },
                "detail_address": {
                    "type": "string"
                },
                "disadvantages": {
                    "type": "string"
                },
@@ -8103,6 +8675,9 @@
                },
                "regular_customers_id": {
                    "type": "integer"
                },
                "remark": {
                    "type": "string"
                },
                "sale_stage_id": {
                    "type": "integer"
@@ -8606,6 +9181,148 @@
                }
            }
        },
        "response.DataResponse": {
            "type": "object",
            "properties": {
                "city": {
                    "description": "城市数据",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.City"
                    }
                },
                "client_level": {
                    "description": "客户等级",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.ClientLevel"
                    }
                },
                "client_origin": {
                    "description": "客户来源",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.ClientOrigin"
                    }
                },
                "client_status": {
                    "description": "客户状态",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.ClientStatus"
                    }
                },
                "client_type": {
                    "description": "客户类型",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.ClientType"
                    }
                },
                "country": {
                    "description": "国家数据",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Country"
                    }
                },
                "department": {
                    "description": "部门",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Department"
                    }
                },
                "enterprise_nature": {
                    "description": "企业性质",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.EnterpriseNature"
                    }
                },
                "enterprise_scale": {
                    "description": "企业规模",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.EnterpriseScale"
                    }
                },
                "industry": {
                    "description": "行业",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Industry"
                    }
                },
                "member": {
                    "description": "Member",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.User"
                    }
                },
                "province": {
                    "description": "省份数据",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Province"
                    }
                },
                "region": {
                    "description": "区域数据",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Region"
                    }
                },
                "registered_capital": {
                    "description": "注册资金",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.RegisteredCapital"
                    }
                },
                "regular_customers": {
                    "description": "老客户营销",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.RegularCustomers"
                    }
                },
                "sale_stage": {
                    "description": "销售阶段",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.SaleStage"
                    }
                },
                "sale_type": {
                    "description": "销售类型",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.SaleType"
                    }
                },
                "sales_source": {
                    "description": "商机来源",
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.SalesSources"
                    }
                }
            }
        },
        "response.DepartmentResponse": {
            "type": "object",
            "properties": {
                "list": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Department"
                    }
                }
            }
        },
        "response.EnterpriseNatureResponse": {
            "type": "object",
            "properties": {
@@ -8671,6 +9388,17 @@
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.MasterOrder"
                    }
                }
            }
        },
        "response.MenuTreeResponse": {
            "type": "object",
            "properties": {
                "list": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.Menu"
                    }
                }
            }
@@ -8822,6 +9550,17 @@
                }
            }
        },
        "response.SalesReturnResponse": {
            "type": "object",
            "properties": {
                "list": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/model.SalesReturn"
                    }
                }
            }
        },
        "response.SalesSourceResponse": {
            "type": "object",
            "properties": {