From fb409de4b6ad6bf4d4d0c5ddf652687fdfe7bacb Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 12 九月 2023 14:55:04 +0800 Subject: [PATCH] 仓库增删改查接口 --- docs/docs.go | 271 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 271 insertions(+), 0 deletions(-) diff --git a/docs/docs.go b/docs/docs.go index 491292f..854c05e 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -149,6 +149,150 @@ } } } + }, + "/api-wms/v1/warehouse/warehouse": { + "get": { + "produces": [ + "application/json" + ], + "tags": [ + "浠撳簱" + ], + "summary": "鏌ヨ浠撳簱鍒楄〃", + "parameters": [ + { + "type": "string", + "name": "keyword", + "in": "query" + }, + { + "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.Warehouse" + } + } + } + } + ] + } + } + } + }, + "post": { + "produces": [ + "application/json" + ], + "tags": [ + "浠撳簱" + ], + "summary": "娣诲姞浠撳簱", + "parameters": [ + { + "description": "浠撳簱淇℃伅", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.AddWarehouse" + } + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } + }, + "/api-wms/v1/warehouse/warehouse/{id}": { + "put": { + "produces": [ + "application/json" + ], + "tags": [ + "浠撳簱" + ], + "summary": "缂栬緫浠撳簱", + "parameters": [ + { + "description": "浠撳簱淇℃伅", + "name": "object", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/request.UpdateWarehouse" + } + }, + { + "type": "string", + "description": "浠撳簱id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + }, + "delete": { + "produces": [ + "application/json" + ], + "tags": [ + "浠撳簱" + ], + "summary": "鍒犻櫎浠撳簱", + "parameters": [ + { + "type": "string", + "description": "浠撳簱id", + "name": "id", + "in": "path", + "required": true + } + ], + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } } }, "definitions": { @@ -190,6 +334,56 @@ } } }, + "models.Warehouse": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "active": { + "description": "鏄惁鍚敤锛屼紶true灏辫", + "type": "boolean" + }, + "buyToResupply": { + "description": "鏄惁璐拱琛ョ粰锛屽凡璐拱浜у搧鑳藉鍙戦�佸埌姝や粨搴�", + "type": "boolean" + }, + "code": { + "description": "浠撳簱缂栫爜", + "type": "string", + "maxLength": 5, + "minLength": 1 + }, + "createTime": { + "type": "string" + }, + "name": { + "description": "浠撳簱鍚嶇О", + "type": "string" + }, + "partnerId": { + "description": "鍚堜綔浼欎即id", + "type": "integer" + }, + "resupplyWh": { + "description": "琛ョ粰鏉ユ簮浠撳簱", + "type": "array", + "items": { + "$ref": "#/definitions/models.Warehouse" + } + }, + "resupplyWhIds": { + "description": "琛ョ粰鏉ユ簮浠撳簱ID", + "type": "array", + "items": { + "type": "string" + } + }, + "updateTime": { + "type": "string" + } + } + }, "request.AddDepartment": { "type": "object", "properties": { @@ -208,6 +402,43 @@ "remark": { "description": "澶囨敞", "type": "string" + } + } + }, + "request.AddWarehouse": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "active": { + "description": "鏄惁鍚敤锛屼紶true灏辫", + "type": "boolean" + }, + "buyToResupply": { + "description": "璐拱琛ョ粰锛屽凡璐拱浜у搧鑳藉鍙戦�佸埌姝や粨搴�", + "type": "boolean" + }, + "code": { + "description": "浠撳簱缂栫爜", + "type": "string", + "maxLength": 5, + "minLength": 1 + }, + "name": { + "description": "浠撳簱鍚嶇О", + "type": "string" + }, + "partnerId": { + "description": "鍚堜綔浼欎即id", + "type": "integer" + }, + "resupplyWhIds": { + "description": "琛ョ粰鏉ユ簮浠撳簱ID", + "type": "array", + "items": { + "type": "string" + } } } }, @@ -235,6 +466,46 @@ } } }, + "request.UpdateWarehouse": { + "type": "object", + "required": [ + "code" + ], + "properties": { + "active": { + "description": "鏄惁鍚敤锛屼紶true灏辫", + "type": "boolean" + }, + "buyToResupply": { + "description": "璐拱琛ョ粰锛屽凡璐拱浜у搧鑳藉鍙戦�佸埌姝や粨搴�", + "type": "boolean" + }, + "code": { + "description": "浠撳簱缂栫爜", + "type": "string", + "maxLength": 5, + "minLength": 1 + }, + "id": { + "type": "integer" + }, + "name": { + "description": "浠撳簱鍚嶇О", + "type": "string" + }, + "partnerId": { + "description": "鍚堜綔浼欎即id", + "type": "integer" + }, + "resupplyWhIds": { + "description": "琛ョ粰鏉ユ簮浠撳簱ID", + "type": "array", + "items": { + "type": "string" + } + } + } + }, "util.Response": { "type": "object", "properties": { -- Gitblit v1.8.0