You've already forked FrameTour-BE
fix(task): 修复获取工作者信息逻辑
- 在获取工作者信息时增加状态检查 - 确保只返回状态为 1 的
This commit is contained in:
@@ -130,7 +130,14 @@ public class TaskTaskServiceImpl implements TaskService {
|
|||||||
if (accessKey == null) {
|
if (accessKey == null) {
|
||||||
return 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) {
|
private boolean isWorkerSelfHostedScenic(Long scenicId) {
|
||||||
|
Reference in New Issue
Block a user