fix(tenement):修正列举商户时的迁入迁出条件筛选。

This commit is contained in:
徐涛
2023-06-27 15:11:46 +08:00
parent 0c389e440a
commit 4df3efacd8
3 changed files with 13 additions and 6 deletions

View File

@@ -52,7 +52,7 @@ func listTenement(c *fiber.Ctx) error {
tenementLog.Error("列出园区中的商户失败,未能解析查询结束日期", zap.Error(err))
return result.BadRequest(err.Error())
}
state := tools.EmptyToNil(c.Query("state"))
state := c.QueryInt("state", 0)
tenements, total, err := repository.TenementRepository.ListTenements(parkId, uint(page), keyword, building, startDate, endDate, state)
if err != nil {
tenementLog.Error("列出园区中的商户失败,未能获取商户列表", zap.Error(err))