1、修复bug

beetlsql3-dev
wgf 2 years ago
parent 973a04c835
commit eb7fd9040f

@ -146,6 +146,8 @@ public class TeacherOpenCourseScheduleSession extends BaseEntity{
@Dict(type="course_info.course_info_name.1=1") @Dict(type="course_info.course_info_name.1=1")
private Long courseInfoId; private Long courseInfoId;
private String courseInfoIdText ;
// @FetchSql("select t.* from teacher_open_course_schedule_session_snap t where t.teacher_open_course_schedule_session_snap_status = 1 " + // @FetchSql("select t.* from teacher_open_course_schedule_session_snap t where t.teacher_open_course_schedule_session_snap_status = 1 " +
// " and t.teacher_open_course_schedule_session_id = #teacherOpenCourseScheduleSessionId# " + // " and t.teacher_open_course_schedule_session_id = #teacherOpenCourseScheduleSessionId# " +
// "and t.teacher_open_course_schedule_session_snap_status = 1 " + // "and t.teacher_open_course_schedule_session_snap_status = 1 " +

@ -346,12 +346,11 @@ public class CourseInfoController {
condition.setCourseInfoType(1);//类型(1课程 2章 3节) condition.setCourseInfoType(1);//类型(1课程 2章 3节)
PageQuery page = condition.getPageQuery(); PageQuery page = condition.getPageQuery();
page.setOrderBy("add_time desc"); page.setOrderBy("add_time desc");
// if (coreUser.isAdmin()){ if (coreUser.isAdmin()){
// courseInfoService.getCourseDispositionSystemOAndUniversities(page); courseInfoService.getCourseDispositionSystemOAndUniversities(page);
// }else { }else {
// courseInfoService.queryByCondition(page);
// }
courseInfoService.queryByCondition(page); courseInfoService.queryByCondition(page);
}
return JsonResult.success(page); return JsonResult.success(page);
} }

@ -202,12 +202,11 @@ public class ResourcesQuestionController {
// 如果为空字符串,那么代表这个学校,还没有授权的课程,所以是不会显示任何东西的。 // 如果为空字符串,那么代表这个学校,还没有授权的课程,所以是不会显示任何东西的。
condition.setCourseInfoIds(StrUtil.blankToDefault(ids, "未授权应用")); condition.setCourseInfoIds(StrUtil.blankToDefault(ids, "未授权应用"));
} }
// if (coreUser.isAdmin()) { if (coreUser.isAdmin()) {
// resourcesQuestionService.getTestItemManageSystemOAndUniversities(page); resourcesQuestionService.getTestItemManageSystemOAndUniversities(page);
// } else { } else {
// resourcesQuestionService.queryByCondition(page);
// }
resourcesQuestionService.queryByCondition(page); resourcesQuestionService.queryByCondition(page);
}
return JsonResult.success(page); return JsonResult.success(page);
} }

@ -1,5 +1,6 @@
package com.ibeetl.jlw.web; package com.ibeetl.jlw.web;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.jlw.Interceptor.SCoreUser; import cn.jlw.Interceptor.SCoreUser;
import cn.jlw.Interceptor.TTeacher; import cn.jlw.Interceptor.TTeacher;
@ -8,10 +9,9 @@ import com.ibeetl.admin.core.annotation.Function;
import com.ibeetl.admin.core.entity.CoreUser; import com.ibeetl.admin.core.entity.CoreUser;
import com.ibeetl.admin.core.file.FileService; import com.ibeetl.admin.core.file.FileService;
import com.ibeetl.admin.core.web.JsonResult; import com.ibeetl.admin.core.web.JsonResult;
import com.ibeetl.jlw.entity.Teacher; import com.ibeetl.jlw.dao.TeacherOpenCourseDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseScheduleSession; import com.ibeetl.jlw.dao.TeacherOpenCourseScheduleSessionDao;
import com.ibeetl.jlw.entity.TeacherOpenCourseScheduleSessionClass; import com.ibeetl.jlw.entity.*;
import com.ibeetl.jlw.entity.TeacherOpenCourseScheduleSessionOptions;
import com.ibeetl.jlw.service.*; import com.ibeetl.jlw.service.*;
import com.ibeetl.jlw.web.query.TeacherOpenCourseQuery; import com.ibeetl.jlw.web.query.TeacherOpenCourseQuery;
import com.ibeetl.jlw.web.query.TeacherOpenCourseScheduleSessionClassQuery; import com.ibeetl.jlw.web.query.TeacherOpenCourseScheduleSessionClassQuery;
@ -48,6 +48,8 @@ public class TeacherOpenCourseScheduleSessionController{
@Autowired private TeacherOpenCourseScheduleSessionService teacherOpenCourseScheduleSessionService; @Autowired private TeacherOpenCourseScheduleSessionService teacherOpenCourseScheduleSessionService;
@Autowired private TeacherOpenCourseDao teacherOpenCourseDao;
@Autowired private TeacherOpenCourseScheduleSessionTagService teacherOpenCourseScheduleSessionTagService; @Autowired private TeacherOpenCourseScheduleSessionTagService teacherOpenCourseScheduleSessionTagService;
@Autowired private TeacherOpenCourseScheduleSessionClassService teacherOpenCourseScheduleSessionClassService; @Autowired private TeacherOpenCourseScheduleSessionClassService teacherOpenCourseScheduleSessionClassService;
@Autowired private TeacherOpenCourseScheduleSessionSnapService teacherOpenCourseScheduleSessionSnapService; @Autowired private TeacherOpenCourseScheduleSessionSnapService teacherOpenCourseScheduleSessionSnapService;
@ -392,6 +394,20 @@ public class TeacherOpenCourseScheduleSessionController{
} }
teacherOpenCourseScheduleSessionService.queryByConditionGroup(page); teacherOpenCourseScheduleSessionService.queryByConditionGroup(page);
teacherOpenCourseScheduleSessionSnapService.fullSessionTagList(page.getList()); teacherOpenCourseScheduleSessionSnapService.fullSessionTagList(page.getList());
if (coreUser.isUniAdmin()){
page.getList().forEach(item ->{
TeacherOpenCourseScheduleSession list = (TeacherOpenCourseScheduleSession) item;
if (ObjectUtil.isEmpty(list.getTeacherOpenCourseId())){
List<TeacherOpenCourse> select = teacherOpenCourseDao.getSQLManager()
.lambdaQuery(TeacherOpenCourse.class)
.andEq(TeacherOpenCourse::getTeacherOpenCourseId, list.getCourseInfoId())
.select();
if (!CollectionUtil.isEmpty(select)){
list.setCourseInfoIdText(select.get(0).getTeacherOpenCourseTitle());
}
}
});
}
return JsonResult.success(page); return JsonResult.success(page);
} }
} }

Loading…
Cancel
Save