package com.project.interaction.controller; import com.project.base.domain.result.Result; import com.project.interaction.application.AlgorithmApplicationService; import com.project.interaction.domain.dto.ClusterCallbackDTO; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; @RestController @RequestMapping("/api/interaction") public class InteractionController { @Autowired private AlgorithmApplicationService algorithmApplicationService; /** * 手动触发同步接口 * 强刷:/sync/all?force=true */ @PostMapping("/saveCluster") public Result saveCluster(ClusterCallbackDTO dto) throws Exception{ algorithmApplicationService.saveCluster(dto.getTaskId(), dto.getClusters()); return Result.success("保存成功"); } }