From c92534229c83436ffe9e6752209200dd70b77808 Mon Sep 17 00:00:00 2001
From: wangpengfei <274878379@qq.com>
Date: 星期四, 17 八月 2023 19:19:44 +0800
Subject: [PATCH] add
---
api/v1/contract.go | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/api/v1/contract.go b/api/v1/contract.go
index e93ece3..4b94771 100644
--- a/api/v1/contract.go
+++ b/api/v1/contract.go
@@ -98,7 +98,6 @@
ctx.Ok()
}
-
func checkContractParams(contract request.Contract) (errCode int, contractModel model.Contract) {
//if contract.Number == "" {
// return ecode.InvalidParams, contractModel
@@ -135,14 +134,14 @@
return
}
- contracts, errCode := contractService.GetContractList(params.Page, params.PageSize, params.Keyword)
+ contracts, total, errCode := contractService.GetContractList(params.Page, params.PageSize, params.SearchMap)
if errCode != ecode.OK {
ctx.Fail(errCode)
return
}
ctx.OkWithDetailed(response.ContractResponse{
- List: contracts,
- Count: len(contracts),
+ List: contracts,
+ Count: int(total),
})
}
--
Gitblit v1.8.0