mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-06 09:26:48 +08:00
作业导出,案例类型处理代码回退版本
This commit is contained in:
@@ -132,7 +132,25 @@ public class CasesApi extends ApiBaseController {
|
||||
views = casesService.queryPageCasesV2(req);
|
||||
}
|
||||
|
||||
if (views == null) {
|
||||
if (views != null) {
|
||||
List<Cases> cases = views.getList();
|
||||
if (CollUtil.isNotEmpty(cases)) {
|
||||
for (Cases c : cases) {
|
||||
StringBuffer stringBuffer = new StringBuffer();
|
||||
List<CasesMajorType> caseId = casesMajorTypeDao.findList(FieldFilters.eq("caseId", c.getId()));
|
||||
if (caseId != null && !caseId.isEmpty()) {
|
||||
for (CasesMajorType cm : caseId) {
|
||||
stringBuffer.append(cm.getMajorId());
|
||||
stringBuffer.append(",");
|
||||
}
|
||||
}
|
||||
if (stringBuffer.length() > 0) {
|
||||
stringBuffer.deleteCharAt(stringBuffer.length() - 1);
|
||||
c.setMajorType(stringBuffer.toString());
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
views = new PageList();
|
||||
views.setList(Collections.emptyList());
|
||||
views.setPageSize(req.getPageSize());
|
||||
|
||||
@@ -422,7 +422,7 @@ public class CasesServiceImpl implements ICasesService {
|
||||
//2.标签处理,添加作者标签和新的案例标签
|
||||
addAuthorTagAndCaseNewTag(casesList);
|
||||
//3.案例类型处理
|
||||
majorTypeHandle(casesList);
|
||||
// majorTypeHandle(casesList);
|
||||
|
||||
return casesList;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user