|
|
|
@ -49,6 +49,7 @@ import static cn.jlw.util.ConvertM3U8.booleanMap;
|
|
|
|
|
import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUserId;
|
|
|
|
|
import static java.lang.Math.min;
|
|
|
|
|
import static java.math.BigDecimal.ROUND_HALF_UP;
|
|
|
|
|
import static java.math.BigDecimal.ZERO;
|
|
|
|
|
import static java.util.stream.Collectors.joining;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -500,6 +501,8 @@ public class CourseInfoService extends CoreBaseService<CourseInfo>{
|
|
|
|
|
|
|
|
|
|
buildCourseInfoResources(courseInfoList);
|
|
|
|
|
|
|
|
|
|
courseInfoList.sort((o1, o2) -> defaultIfNull(o1.getOrderIndex(), ZERO).subtract(defaultIfNull(o2.getOrderIndex(), ZERO)).intValue());
|
|
|
|
|
|
|
|
|
|
return courseInfoList;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1227,9 +1230,11 @@ public class CourseInfoService extends CoreBaseService<CourseInfo>{
|
|
|
|
|
if (calcedOrder != null) {
|
|
|
|
|
// 改变排序记录值
|
|
|
|
|
CourseInfo updatePO = new CourseInfo();
|
|
|
|
|
updatePO.setCourseInfoId(mergeCourseInfo.getCourseInfoId());
|
|
|
|
|
updatePO.setCourseInfoId(id);
|
|
|
|
|
updatePO.setOrderIndex(BigDecimal.valueOf(calcedOrder));
|
|
|
|
|
updateTemplate(updatePO);
|
|
|
|
|
|
|
|
|
|
flushCache(id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -1320,9 +1325,11 @@ public class CourseInfoService extends CoreBaseService<CourseInfo>{
|
|
|
|
|
// 最后更新排序值
|
|
|
|
|
if (clacedOrder != null) {
|
|
|
|
|
CourseInfo updatePO = new CourseInfo();
|
|
|
|
|
updatePO.setCourseInfoId(selfElement.getCourseInfoId());
|
|
|
|
|
updatePO.setCourseInfoId(id);
|
|
|
|
|
updatePO.setOrderIndex(clacedOrder);
|
|
|
|
|
updateTemplate(updatePO);
|
|
|
|
|
|
|
|
|
|
flushCache(id);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|