enhance(god):清除报表中不同部分的时候同时重置报表的进度状态。

This commit is contained in:
徐涛
2022-09-07 14:04:52 +08:00
parent 466d21e8b4
commit 62a9fec43f
3 changed files with 48 additions and 6 deletions

View File

@@ -436,7 +436,12 @@ func searchReports(c *gin.Context) {
result.NotAccept("查询参数[page]格式不正确。")
return
}
records, totalItems, err := service.ReportService.SearchReport(requestUser, requestPark, requestKeyword, requestPeriod, requestPage)
requestAllReports, err := strconv.ParseBool(c.DefaultQuery("all", "false"))
if err != nil {
result.NotAccept("查询参数[all]格式不正确。")
return
}
records, totalItems, err := service.ReportService.SearchReport(requestUser, requestPark, requestKeyword, requestPeriod, requestPage, !requestAllReports)
if err != nil {
result.NotFound(err.Error())
return