mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/per-boe/java-servers.git
synced 2025-12-07 01:46:47 +08:00
在线版本
This commit is contained in:
@@ -1012,6 +1012,15 @@ public class CourseServiceImpl implements ICourseService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
|
if (!nowCourse.getSysVersion().equals(c.getSysVersion())) {
|
||||||
|
log.warn("乐观锁冲突 - 课程ID: {}, 期望版本: {}, 实际版本: {}",
|
||||||
|
c.getId(), c.getSysVersion(), nowCourse.getSysVersion());
|
||||||
|
// throw new RuntimeException("数据已被其他用户修改,请刷新页面后重试");
|
||||||
|
// 基本无概率同时修改同一课程 如有 以最后提交为准
|
||||||
|
c.setSysVersion(courseDao.getVersion(c.getId()));
|
||||||
|
}
|
||||||
|
|
||||||
courseDao.update(c);
|
courseDao.update(c);
|
||||||
c.setSysVersion(courseDao.getVersion(c.getId()));
|
c.setSysVersion(courseDao.getVersion(c.getId()));
|
||||||
full.getCourse().setSysVersion(c.getSysVersion());
|
full.getCourse().setSysVersion(c.getSysVersion());
|
||||||
|
|||||||
@@ -414,7 +414,7 @@ public class CourseTagServiceImpl implements ICourseTagService {
|
|||||||
List<String> newTagIds = getTagIdsFromCourse(newCourse);
|
List<String> newTagIds = getTagIdsFromCourse(newCourse);
|
||||||
log.info(" --- 旧标签 oldTagIds = {} " , oldTagIds);
|
log.info(" --- 旧标签 oldTagIds = {} " , oldTagIds);
|
||||||
log.info(" --- 新修改 newTagIds = {} " , newTagIds);
|
log.info(" --- 新修改 newTagIds = {} " , newTagIds);
|
||||||
if (oldCourse == null) {
|
if (oldCourse == null || oldTagIds.isEmpty()) {
|
||||||
// 新增课程 - 处理所有新标签
|
// 新增课程 - 处理所有新标签
|
||||||
handleNewCourseTags(newCourse, newTagIds, userInfo);
|
handleNewCourseTags(newCourse, newTagIds, userInfo);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user