fix(task): 修复获取工作者信息逻辑

- 在获取工作者信息时增加状态检查
- 确保只返回状态为 1 的
This commit is contained in:
2025-09-09 10:03:16 +08:00
parent c3101ceb6b
commit 5426f61328

View File

@@ -130,7 +130,14 @@ public class TaskTaskServiceImpl implements TaskService {
if (accessKey == null) {
return null;
}
return repository.getWorkerByAccessKey(accessKey);
RenderWorkerEntity worker = repository.getWorkerByAccessKey(accessKey);
if (worker == null) {
return null;
}
if (worker.getStatus() != 1) {
return null;
}
return worker;
}
private boolean isWorkerSelfHostedScenic(Long scenicId) {