|
@@ -164,9 +164,9 @@ public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, C
|
|
*/
|
|
*/
|
|
private void validEntityBeforeSave(CourseSection entity){
|
|
private void validEntityBeforeSave(CourseSection entity){
|
|
//TODO 做一些数据校验,如唯一约束
|
|
//TODO 做一些数据校验,如唯一约束
|
|
- if(checkNameUnique(entity)){
|
|
|
|
|
|
+ /* if(checkNameUnique(entity)){
|
|
throw new CustomException("节标题重复");
|
|
throw new CustomException("节标题重复");
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
if(entity.getSectionId()!=null&&entity.getPublishStatus()!=null&&entity.getPublishStatus()==0){
|
|
if(entity.getSectionId()!=null&&entity.getPublishStatus()!=null&&entity.getPublishStatus()==0){
|
|
CourseMenu one = iCourseMenuService.getOne(new LambdaQueryWrapper<CourseMenu>().eq(CourseMenu::getMenuId, entity.getSectionId()).eq(CourseMenu::getType,3).last("limit 1"));
|
|
CourseMenu one = iCourseMenuService.getOne(new LambdaQueryWrapper<CourseMenu>().eq(CourseMenu::getMenuId, entity.getSectionId()).eq(CourseMenu::getType,3).last("limit 1"));
|
|
if(one!=null){
|
|
if(one!=null){
|
|
@@ -202,14 +202,6 @@ public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, C
|
|
errorLog+="第"+Index+"条:"+"节标题空白。\r\n";
|
|
errorLog+="第"+Index+"条:"+"节标题空白。\r\n";
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
- if(!Validator.isNotEmpty(sectionImport.getPrefixName())){
|
|
|
|
- errorLog+="第"+Index+"条:"+"标题前缀空白。\r\n";
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
- if(!Validator.isNotEmpty(sectionImport.getPrefixName())){
|
|
|
|
- errorLog+="第"+Index+"条:"+"标题前缀空白。\r\n";
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
System.out.println(sectionImport);
|
|
System.out.println(sectionImport);
|
|
if(!Validator.isNotEmpty(sectionImport.getPublishStatus())){
|
|
if(!Validator.isNotEmpty(sectionImport.getPublishStatus())){
|
|
errorLog+="第"+Index+"条:"+"发布状态空白。\r\n";
|
|
errorLog+="第"+Index+"条:"+"发布状态空白。\r\n";
|
|
@@ -280,9 +272,9 @@ public class CourseSectionServiceImpl extends ServiceImpl<CourseSectionMapper, C
|
|
public String insertByAddBoImport(CourseSectionAddBo bo, String errorLog, Integer no) {
|
|
public String insertByAddBoImport(CourseSectionAddBo bo, String errorLog, Integer no) {
|
|
CourseSection add = BeanUtil.toBean(bo, CourseSection.class);
|
|
CourseSection add = BeanUtil.toBean(bo, CourseSection.class);
|
|
add.setCode(ServletUtils.getEncoded("J"));
|
|
add.setCode(ServletUtils.getEncoded("J"));
|
|
- if(checkNameUnique(add)){
|
|
|
|
|
|
+ /* if(checkNameUnique(add)){
|
|
return errorLog+"第"+no+"条:"+"节标题重复";
|
|
return errorLog+"第"+no+"条:"+"节标题重复";
|
|
- }
|
|
|
|
|
|
+ }*/
|
|
add.setCreateTime(DateUtils.getNowTime());
|
|
add.setCreateTime(DateUtils.getNowTime());
|
|
add.setUpdateTime(DateUtils.getNowTime());
|
|
add.setUpdateTime(DateUtils.getNowTime());
|
|
boolean result = this.save(add);
|
|
boolean result = this.save(add);
|