From 5fac03fb857cf9a160e1736a25de2c5f95f5e44f Mon Sep 17 00:00:00 2001 From: wangpengfei <274878379@qq.com> Date: 星期二, 18 七月 2023 17:18:18 +0800 Subject: [PATCH] add --- docs/docs.go | 593 ++++++++++++++++++++++++++++++++++++++++++++++++++++------- 1 files changed, 522 insertions(+), 71 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 63dbcf3..85c7809 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -54,6 +54,44 @@ } } }, + "/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": [ @@ -194,6 +232,14 @@ "City" ], "summary": "鑾峰彇鍩庡競鍒楄〃", + "parameters": [ + { + "type": "integer", + "description": "鐪佷唤ID", + "name": "province_id", + "in": "query" + } + ], "responses": { "200": { "description": "鎴愬姛", @@ -366,7 +412,7 @@ } }, "/api/client/update": { - "post": { + "put": { "produces": [ "application/json" ], @@ -1337,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": [ @@ -1965,6 +2161,11 @@ }, "/api/menu/getMenu": { "get": { + "security": [ + { + "ApiKeyAuth": [] + } + ], "produces": [ "application/json" ], @@ -1972,6 +2173,15 @@ "Menu" ], "summary": "鑾峰彇鑿滃崟鏍�", + "parameters": [ + { + "type": "string", + "description": "Authorization", + "name": "Authorization", + "in": "header", + "required": true + } + ], "responses": { "200": { "description": "OK", @@ -2406,6 +2616,15 @@ "Province" ], "summary": "鑾峰彇鐪佷唤鍒楄〃", + "parameters": [ + { + "type": "integer", + "description": "鍥藉ID", + "name": "country_id", + "in": "query", + "required": true + } + ], "responses": { "200": { "description": "OK", @@ -2674,6 +2893,15 @@ "Region" ], "summary": "鍦板尯鍒楄〃", + "parameters": [ + { + "type": "integer", + "description": "鍩庡競ID", + "name": "city_id", + "in": "query", + "required": true + } + ], "responses": { "200": { "description": "OK", @@ -4757,37 +4985,6 @@ } } } - }, - "/authority/setDataAuthority": { - "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": {} - } } }, "definitions": { @@ -4868,6 +5065,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": { @@ -4897,14 +5117,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" @@ -5253,6 +5485,17 @@ } } }, + "model.Department": { + "type": "object", + "properties": { + "id": { + "type": "integer" + }, + "name": { + "type": "string" + } + } + }, "model.EnterpriseNature": { "type": "object", "properties": { @@ -5278,11 +5521,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" @@ -6036,26 +6285,23 @@ "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" }, "menuIds": { @@ -6068,26 +6314,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": { @@ -6103,6 +6336,12 @@ "properties": { "authorityName": { "type": "string" + }, + "casbinInfos": { + "type": "array", + "items": { + "$ref": "#/definitions/request.CasbinInfo" + } } } }, @@ -6362,6 +6601,17 @@ }, "serviceMode": { "type": "integer" + } + } + }, + "request.AddDepartment": { + "type": "object", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" } } }, @@ -6898,6 +7148,19 @@ } } }, + "request.CasbinInfo": { + "type": "object", + "properties": { + "method": { + "description": "鏂规硶", + "type": "string" + }, + "path": { + "description": "璺緞", + "type": "string" + } + } + }, "request.ChangePasswordReq": { "type": "object", "properties": { @@ -7240,29 +7503,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" } } }, @@ -7380,6 +7660,20 @@ }, "status": { "type": "integer" + } + } + }, + "request.SetAuthorityMenu": { + "type": "object", + "properties": { + "authorityId": { + "type": "integer" + }, + "menus": { + "type": "array", + "items": { + "type": "integer" + } } } }, @@ -7819,6 +8113,35 @@ }, "serviceMode": { "type": "integer" + } + } + }, + "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" + } } } }, @@ -8741,6 +9064,134 @@ } } }, + "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" + } + }, + "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" + } + }, + "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": { -- Gitblit v1.8.0