|
|
|
@ -5,6 +5,7 @@ import cn.hutool.core.util.RandomUtil;
|
|
|
|
|
import cn.jlw.util.ToolUtils;
|
|
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
import com.ibeetl.admin.core.entity.CoreUser;
|
|
|
|
|
import com.ibeetl.admin.core.service.CoreBaseService;
|
|
|
|
|
import com.ibeetl.admin.core.util.PlatformException;
|
|
|
|
|
import com.ibeetl.admin.core.web.JsonResult;
|
|
|
|
@ -28,6 +29,8 @@ import java.util.ArrayList;
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUser;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* TeacherOpenCourse Service
|
|
|
|
@ -41,8 +44,15 @@ public class TeacherOpenCourseService extends CoreBaseService<TeacherOpenCourse>
|
|
|
|
|
@Autowired private TeacherOpenCourseDao teacherOpenCourseDao;
|
|
|
|
|
@Autowired
|
|
|
|
|
private TeacherOpenCourseMergeTeacherDao teacherOpenCourseMergeTeacherDao;
|
|
|
|
|
@Autowired
|
|
|
|
|
private TeacherService teacherService;
|
|
|
|
|
|
|
|
|
|
public PageQuery<TeacherOpenCourse>queryByCondition(PageQuery query){
|
|
|
|
|
CoreUser user = getUser();
|
|
|
|
|
if(user.isTeacher()) {
|
|
|
|
|
Long teacherId = teacherService.getByUserId(user.getId()).getTeacherId();
|
|
|
|
|
query.setPara("teacherId", teacherId);
|
|
|
|
|
}
|
|
|
|
|
PageQuery ret = teacherOpenCourseDao.queryByCondition(query);
|
|
|
|
|
queryListAfter(ret.getList());
|
|
|
|
|
return ret;
|
|
|
|
|