修改算法类型参数

This commit is contained in:
wanxiaoli 2026-05-25 10:23:24 +08:00
parent 85d5d67b63
commit eae52a8a70

View File

@ -101,7 +101,8 @@ public class ModelTrainController {
@GetMapping("/list")
public ResponseResult list(@RequestParam(defaultValue = "1") Integer current,
@RequestParam(defaultValue = "10") Integer size,
@RequestParam(required = false) String algoType,
@RequestParam(value = "algorithmType", required = false) String algorithmType,
@RequestParam(value = "algoType", required = false) String algoType,
@RequestParam(required = false) String deviceType,
@RequestParam(required = false) String status,
@RequestParam(required = false) String name) {
@ -109,8 +110,9 @@ public class ModelTrainController {
Page<ModelTrainTask> page = new Page<>(current, size);
QueryWrapper<ModelTrainTask> query = new QueryWrapper<>();
if (algoType != null && !algoType.isBlank()) {
query.eq("algorithm_type", algoType);
String finalAlgorithmType = (algorithmType != null && !algorithmType.isBlank()) ? algorithmType : algoType;
if (finalAlgorithmType != null && !finalAlgorithmType.isBlank()) {
query.eq("algorithm_type", finalAlgorithmType);
}
if (deviceType != null && !deviceType.isBlank()) {
query.eq("device_type", deviceType);