use of cn.edu.sdu.qd.oj.judgetemplate.service.JudgeTemplateService in project sduoj-server by SDUOJ.
the class ProblemConverterUtils method judgeTemplatesTo.
public static List<JudgeTemplateListDTO> judgeTemplatesTo(String judgeTemplates) {
List<String> judgeTemplateIdStrList = BaseConvertUtils.stringToList(judgeTemplates);
if (judgeTemplateIdStrList == null) {
return new ArrayList<>();
}
List<Long> judgeTemplateIdList = judgeTemplateIdStrList.stream().map(Long::parseLong).collect(Collectors.toList());
JudgeTemplateService judgeTemplateService = SpringContextUtils.getBean(JudgeTemplateService.class);
return judgeTemplateService.listByIds(judgeTemplateIdList);
}
Aggregations