Search in sources :

Example 1 with JudgeTemplateService

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);
}
Also used : ArrayList(java.util.ArrayList) JudgeTemplateService(cn.edu.sdu.qd.oj.judgetemplate.service.JudgeTemplateService)

Aggregations

JudgeTemplateService (cn.edu.sdu.qd.oj.judgetemplate.service.JudgeTemplateService)1 ArrayList (java.util.ArrayList)1