You've already forked FrameTour-BE
兜底1个
This commit is contained in:
@@ -32,8 +32,6 @@ public class TemplateBiz {
|
||||
private FaceRepository faceRepository;
|
||||
@Autowired
|
||||
private SourceMapper sourceMapper;
|
||||
@Autowired
|
||||
private SourceRepository sourceRepository;
|
||||
|
||||
public boolean determineTemplateCanGenerate(Long templateId, Long faceId) {
|
||||
return determineTemplateCanGenerate(templateId, faceId, true);
|
||||
@@ -175,4 +173,17 @@ public class TemplateBiz {
|
||||
return filteredParams;
|
||||
}
|
||||
|
||||
}
|
||||
public Long findFirstAvailableTemplate(List<Long> templateIds, Long faceId) {
|
||||
if (templateIds == null || templateIds.isEmpty() || faceId == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
for (Long templateId : templateIds) {
|
||||
if (determineTemplateCanGenerate(templateId, faceId)) {
|
||||
return templateId;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user