修bug
This commit is contained in:
		| @@ -166,7 +166,7 @@ func (c *Controller) ListPlans(ctx *gin.Context) { | ||||
| 	} | ||||
|  | ||||
| 	// 1. 调用仓库层获取所有计划 | ||||
| 	opts := repository.ListPlansOptions{PlanType: repository.PlanTypeFilter(query.PlanType)} | ||||
| 	opts := repository.ListPlansOptions{PlanType: query.PlanType} | ||||
| 	plans, total, err := c.planRepo.ListPlans(opts, query.Page, query.PageSize) | ||||
| 	if err != nil { | ||||
| 		c.logger.Errorf("%s: 数据库查询失败: %v", actionType, err) | ||||
|   | ||||
| @@ -98,10 +98,14 @@ func (s *monitorService) ListPlanExecutionLogs(opts repository.PlanExecutionLogL | ||||
| 	} | ||||
| 	planIds := []uint{} | ||||
| 	for _, datum := range planLogs { | ||||
| 		has := false | ||||
| 		for _, id := range planIds { | ||||
| 			if id == datum.PlanID { | ||||
| 				has = true | ||||
| 				break | ||||
| 			} | ||||
| 		} | ||||
| 		if !has { | ||||
| 			planIds = append(planIds, datum.PlanID) | ||||
| 		} | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user