|
@@ -165,7 +165,7 @@ public class CourseServiceImpl implements CourseService {
|
|
List<Map<String, Object>> failRecords = Collections
|
|
List<Map<String, Object>> failRecords = Collections
|
|
.synchronizedList(new ArrayList<Map<String, Object>>());
|
|
.synchronizedList(new ArrayList<Map<String, Object>>());
|
|
|
|
|
|
- List<CourseEntity> courseList = Lists.newArrayList();
|
|
|
|
|
|
+ List<CourseInfo> courseList = Lists.newArrayList();
|
|
|
|
|
|
for (int i = 0; i < lineList.size(); i++) {
|
|
for (int i = 0; i < lineList.size(); i++) {
|
|
String[] line = lineList.get(i);
|
|
String[] line = lineList.get(i);
|
|
@@ -179,7 +179,7 @@ public class CourseServiceImpl implements CourseService {
|
|
boolean hasError = false;
|
|
boolean hasError = false;
|
|
StringBuilder msg = new StringBuilder();
|
|
StringBuilder msg = new StringBuilder();
|
|
|
|
|
|
- CourseEntity couse = new CourseEntity();
|
|
|
|
|
|
+ CourseInfo couse = new CourseInfo();
|
|
couse.setRootOrgId(rootOrgId);
|
|
couse.setRootOrgId(rootOrgId);
|
|
couse.setEnable(true);
|
|
couse.setEnable(true);
|
|
|
|
|
|
@@ -230,17 +230,8 @@ public class CourseServiceImpl implements CourseService {
|
|
return failRecords;
|
|
return failRecords;
|
|
}
|
|
}
|
|
|
|
|
|
- for (CourseEntity cur : courseList) {
|
|
|
|
- CourseEntity query = courseRepo.findByRootOrgIdAndCode(cur.getRootOrgId(),
|
|
|
|
- cur.getCode());
|
|
|
|
-
|
|
|
|
- if (null != query) {
|
|
|
|
- query.setName(cur.getName());
|
|
|
|
- query.setLevel(cur.getLevel());
|
|
|
|
- courseRepo.save(query);
|
|
|
|
- } else {
|
|
|
|
- courseRepo.save(cur);
|
|
|
|
- }
|
|
|
|
|
|
+ for (CourseInfo cur : courseList) {
|
|
|
|
+ saveCourse(cur);
|
|
}
|
|
}
|
|
|
|
|
|
return failRecords;
|
|
return failRecords;
|