diff --git a/controller/park.go b/controller/park.go index 68f27c2..2733f41 100644 --- a/controller/park.go +++ b/controller/park.go @@ -68,9 +68,9 @@ func listParksBelongsToCurrentUser(c *fiber.Ctx) error { // 列出隶属于指定用户的全部园区 func listParksBelongsTo(c *fiber.Ctx) error { result := response.NewResult(c) - userId := c.Params("userId") + userId := c.Params("uid") parkLog.Info("列出指定用户下的全部园区", zap.String("user id", userId)) - parks, err := repository.ParkRepository.RetrieveParkBelongs(userId) + parks, err := repository.ParkRepository.ListAllParks(userId) if err != nil { parkLog.Error("无法获取园区列表。", zap.String("user id", userId)) return result.Error(http.StatusInternalServerError, err.Error())