修复: 全局参数保存接口 @RequestBody 类型改为 Map 接收 JSON

This commit is contained in:
2026-04-10 09:47:57 +08:00
parent c295d9264a
commit c28ef38311

View File

@@ -9,6 +9,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
import java.util.Map;
@Slf4j
@RestController
@@ -39,7 +40,8 @@ public class AiAlgorithmController {
@Operation(summary = "保存算法全局参数")
@PostMapping("/global-params/{algoCode}")
public void saveGlobalParams(@PathVariable String algoCode, @RequestBody String globalParams) {
public void saveGlobalParams(@PathVariable String algoCode, @RequestBody Map<String, String> body) {
String globalParams = body.get("globalParams");
algorithmService.saveGlobalParams(algoCode, globalParams);
}
}