From a69047e1891ef7a3ac9b1dea1c2889c81b29fa22 Mon Sep 17 00:00:00 2001 From: jiangshuai <291802688@qq.com> Date: 星期三, 08 十一月 2023 17:21:51 +0800 Subject: [PATCH] 修改缩略图尺寸 --- controllers/attachment.go | 2 +- docs/swagger.yaml | 10 ++++++++++ docs/docs.go | 18 ++++++++++++++++-- docs/swagger.json | 16 ++++++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/controllers/attachment.go b/controllers/attachment.go index f4b1b11..b0de492 100644 --- a/controllers/attachment.go +++ b/controllers/attachment.go @@ -73,7 +73,7 @@ attachmentList = append(attachmentList, attachment) if fileType == constvar.FileType_Picture { - thumbnailBytes, err := image.CreateThumbnail(fileBytes, 0, 600, 800) + thumbnailBytes, err := image.CreateThumbnail(fileBytes, 60, 0, 0) if err != nil { logx.Errorf("file upload err: %v", err) util.ResponseFormat(c, code.RequestParamError, "鐢熸垚缂╃暐鍥惧け璐ワ細"+err.Error()) diff --git a/docs/docs.go b/docs/docs.go index 8a80911..1a45405 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -150,6 +150,22 @@ } } }, + "/api-wms/v1/attachment/uploadFiles": { + "post": { + "tags": [ + "闄勪欢绠$悊" + ], + "summary": "涓婁紶闄勪欢", + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } + }, "/api-wms/v1/company/company": { "get": { "produces": [ @@ -4138,8 +4154,6 @@ Description: "", InfoInstanceName: "swagger", SwaggerTemplate: docTemplate, - LeftDelim: "{{", - RightDelim: "}}", } func init() { diff --git a/docs/swagger.json b/docs/swagger.json index 69d5f86..12bd7d8 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -138,6 +138,22 @@ } } }, + "/api-wms/v1/attachment/uploadFiles": { + "post": { + "tags": [ + "闄勪欢绠$悊" + ], + "summary": "涓婁紶闄勪欢", + "responses": { + "200": { + "description": "鎴愬姛", + "schema": { + "$ref": "#/definitions/util.Response" + } + } + } + } + }, "/api-wms/v1/company/company": { "get": { "produces": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index b2a6ba4..c2d1ffe 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1474,6 +1474,16 @@ summary: 缂栬緫閮ㄩ棬淇℃伅 tags: - 閮ㄩ棬淇℃伅 + /api-wms/v1/attachment/uploadFiles: + post: + responses: + "200": + description: 鎴愬姛 + schema: + $ref: '#/definitions/util.Response' + summary: 涓婁紶闄勪欢 + tags: + - 闄勪欢绠$悊 /api-wms/v1/company/company: get: parameters: -- Gitblit v1.8.0