animeic 1 рік тому
батько
коміт
1b6d0b2552
1 змінених файлів з 3 додано та 2 видалено
  1. 3 2
      boxcost/api/report.go

+ 3 - 2
boxcost/api/report.go

@@ -93,7 +93,7 @@ func ReportListDownload(c *gin.Context, apictx *ApiSession) (interface{}, error)
 			}
 		}
 		// 设置过期时间
-		redisCli.Expire(apictx.CreateRepoCtx().Ctx, reportBillKey, 20*time.Second)
+		redisCli.Expire(apictx.CreateRepoCtx().Ctx, reportBillKey, 1*time.Second)
 
 	}
 
@@ -238,7 +238,7 @@ func ReportList(c *gin.Context, apictx *ApiSession) (interface{}, error) {
 			}
 		}
 		// 设置过期时间
-		redisCli.Expire(apictx.CreateRepoCtx().Ctx, reportBillKey, 20*time.Second)
+		redisCli.Expire(apictx.CreateRepoCtx().Ctx, reportBillKey, 1*time.Second)
 
 	}
 
@@ -255,6 +255,7 @@ func ReportList(c *gin.Context, apictx *ApiSession) (interface{}, error) {
 
 	if len(reports) < 1 {
 		return repo.PageResult{
+			List:  []map[string]interface{}{},
 			Page:  page,
 			Size:  size,
 			Total: 0,