From 2300d26537a69c5233a7a58c0614f4f595305783 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期四, 24 八月 2023 17:30:13 +0800 Subject: [PATCH] 新增销售明细返回id --- api/v1/salesDetails.go | 4 ++-- docs/swagger.yaml | 7 ++++++- docs/docs.go | 14 +++++++++++++- docs/swagger.json | 14 +++++++++++++- 4 files changed, 34 insertions(+), 5 deletions(-) diff --git a/api/v1/salesDetails.go b/api/v1/salesDetails.go index a08a5d4..24a27a1 100644 --- a/api/v1/salesDetails.go +++ b/api/v1/salesDetails.go @@ -18,7 +18,7 @@ // @Summary 娣诲姞閿�鍞槑缁� // @Produce application/json // @Param object body request.AddSalesDetails true "鏌ヨ鍙傛暟" -// @Success 200 {object} contextx.Response{} +// @Success 200 {object} contextx.Response{data=request.AddSalesDetails} // @Router /api/salesDetails/add [post] func (s *SalesDetailsApi) Add(c *gin.Context) { var params request.AddSalesDetails @@ -39,7 +39,7 @@ return } - ctx.Ok() + ctx.OkWithDetailed(salesDetails) } // Delete diff --git a/docs/docs.go b/docs/docs.go index 2be434c..5098c36 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -6779,7 +6779,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/contextx.Response" + "allOf": [ + { + "$ref": "#/definitions/contextx.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/request.AddSalesDetails" + } + } + } + ] } } } diff --git a/docs/swagger.json b/docs/swagger.json index 484cf0a..1e3e04a 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -6767,7 +6767,19 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/contextx.Response" + "allOf": [ + { + "$ref": "#/definitions/contextx.Response" + }, + { + "type": "object", + "properties": { + "data": { + "$ref": "#/definitions/request.AddSalesDetails" + } + } + } + ] } } } diff --git a/docs/swagger.yaml b/docs/swagger.yaml index a2e23cf..d1737ca 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -10212,7 +10212,12 @@ "200": description: OK schema: - $ref: '#/definitions/contextx.Response' + allOf: + - $ref: '#/definitions/contextx.Response' + - properties: + data: + $ref: '#/definitions/request.AddSalesDetails' + type: object summary: 娣诲姞閿�鍞槑缁� tags: - SalesDetails -- Gitblit v1.8.0