From 4b63908ad085bc570623f7b0c0fd397b2ae7a80d Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期一, 07 八月 2023 15:41:32 +0800 Subject: [PATCH] 增加文件列表接口,文件上传时间,文件删除时间 --- api/v1/serviceContract.go | 17 ++++++++--------- 1 files changed, 8 insertions(+), 9 deletions(-) diff --git a/api/v1/serviceContract.go b/api/v1/serviceContract.go index 47a2e06..cd5e4f6 100644 --- a/api/v1/serviceContract.go +++ b/api/v1/serviceContract.go @@ -26,7 +26,6 @@ if !ok { return } - errCode, serviceContract := checkServiceContractParams(params.ServiceContract) if errCode != ecode.OK { ctx.Fail(errCode) @@ -151,12 +150,12 @@ // List // -// @Tags ServiceContract -// @Summary 鐢熸垚璁″垝鍒楄〃 -// @Produce application/json -// @Param object body request.GetServiceContractList true "鍙傛暟" -// @Success 200 {object} contextx.Response{data=response.ServiceContractsResponse} -// @Router /api/serviceContract/list [post] +// @Tags ServiceContract +// @Summary 鐢熸垚璁″垝鍒楄〃 +// @Produce application/json +// @Param object body request.GetServiceContractList true "鍙傛暟" +// @Success 200 {object} contextx.Response{data=response.ServiceContractsResponse} +// @Router /api/serviceContract/list [post] func (con *ServiceContractApi) List(c *gin.Context) { var params request.GetServiceContractList ctx, ok := contextx.NewContext(c, ¶ms) @@ -164,7 +163,7 @@ return } - serviceContracts, errCode := serviceContractService.GetServiceContractList(params.Page, params.PageSize, params.Keyword) + serviceContracts, total, errCode := serviceContractService.GetServiceContractList(params.Page, params.PageSize, params.QueryClass, params.KeywordType, params.Keyword) if errCode != ecode.OK { ctx.Fail(errCode) return @@ -172,6 +171,6 @@ ctx.OkWithDetailed(response.ServiceContractsResponse{ List: serviceContracts, - Count: len(serviceContracts), + Count: int(total), }) } -- Gitblit v1.8.0