|
|
@ -134,14 +134,15 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
if (result.hasErrors()) {
|
|
|
|
if (result.hasErrors()) {
|
|
|
|
return JsonResult.failMessage(result);
|
|
|
|
return JsonResult.failMessage(result);
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
|
|
|
|
|
|
|
|
teacherOpenCourseChatLogQuery.setUserId(coreUser.getId());
|
|
|
|
teacherOpenCourseChatLogQuery.setUserId(coreUser.getId());
|
|
|
|
teacherOpenCourseChatLogQuery.setOrgId(coreUser.getOrgId());
|
|
|
|
teacherOpenCourseChatLogQuery.setOrgId(coreUser.getOrgId());
|
|
|
|
if (ObjectUtil.isNotEmpty(teacher)) {
|
|
|
|
if (ObjectUtil.isNotEmpty(teacher)) {
|
|
|
|
teacherOpenCourseChatLogQuery.setTeacherId(teacher.getTeacherId());
|
|
|
|
teacherOpenCourseChatLogQuery.setTeacherId(teacher.getTeacherId());
|
|
|
|
|
|
|
|
teacherOpenCourseChatLogQuery.setStudentReadStatus(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (ObjectUtil.isNotEmpty(student)) {
|
|
|
|
if (ObjectUtil.isNotEmpty(student)) {
|
|
|
|
teacherOpenCourseChatLogQuery.setStudentId(student.getStudentId());
|
|
|
|
teacherOpenCourseChatLogQuery.setStudentId(student.getStudentId());
|
|
|
|
|
|
|
|
teacherOpenCourseChatLogQuery.setTeacherReadStatus(0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return teacherOpenCourseChatLogService.add(teacherOpenCourseChatLogQuery);
|
|
|
|
return teacherOpenCourseChatLogService.add(teacherOpenCourseChatLogQuery);
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -551,12 +552,11 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
* 根据登录身份,互动获取未读数
|
|
|
|
* 根据登录身份,互动获取未读数
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param teacherOpenCourseId 开课ID
|
|
|
|
* @param teacherOpenCourseId 开课ID
|
|
|
|
* @param coreUser
|
|
|
|
|
|
|
|
* @return
|
|
|
|
* @return
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
@SneakyThrows
|
|
|
|
@SneakyThrows
|
|
|
|
@GetMapping(API + "/getUnReadNum.do")
|
|
|
|
@GetMapping(API + "/getUnReadNum.do")
|
|
|
|
public JsonResult getUnReadNum(@NotNull(message = "开课ID不能为空!") Long teacherOpenCourseId, @SCoreUser CoreUser coreUser) {
|
|
|
|
public JsonResult getUnReadNum(@NotNull(message = "开课ID不能为空!") Long teacherOpenCourseId) {
|
|
|
|
ChatLogUnReadNumDTO dto = new ChatLogUnReadNumDTO();
|
|
|
|
ChatLogUnReadNumDTO dto = new ChatLogUnReadNumDTO();
|
|
|
|
dto.setTeacherOpenCourseId(teacherOpenCourseId);
|
|
|
|
dto.setTeacherOpenCourseId(teacherOpenCourseId);
|
|
|
|
return JsonResult.success(teacherOpenCourseChatLogService.getUnReadNum(dto));
|
|
|
|
return JsonResult.success(teacherOpenCourseChatLogService.getUnReadNum(dto));
|
|
|
@ -574,4 +574,34 @@ public class TeacherOpenCourseChatLogController extends BaseController {
|
|
|
|
public JsonResult chatLogAnalysis(TeacherOpenCourseChatLogAnalysisDTO dto, @SCoreUser CoreUser coreUser) {
|
|
|
|
public JsonResult chatLogAnalysis(TeacherOpenCourseChatLogAnalysisDTO dto, @SCoreUser CoreUser coreUser) {
|
|
|
|
return JsonResult.success(teacherOpenCourseChatLogService.chatLogAnalysis(dto));
|
|
|
|
return JsonResult.success(teacherOpenCourseChatLogService.chatLogAnalysis(dto));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 得到老师提问模块的未读数
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param teacherOpenCourseId 老师公开课id
|
|
|
|
|
|
|
|
* @author zhouzhao
|
|
|
|
|
|
|
|
* @date 2023/05/06 02:05:07
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@GetMapping(API+"/getTeacherAskUnReadCount.do")
|
|
|
|
|
|
|
|
public JsonResult getTeacherAskUnReadCount(@NotNull(message = "开课ID不能为空!") Long teacherOpenCourseId){
|
|
|
|
|
|
|
|
ChatLogUnReadNumDTO dto = new ChatLogUnReadNumDTO();
|
|
|
|
|
|
|
|
dto.setTeacherOpenCourseId(teacherOpenCourseId);
|
|
|
|
|
|
|
|
return JsonResult.success(teacherOpenCourseChatLogService.getTeacherAskUnReadCount(dto));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
|
|
|
* 得到学生提问模块的未读数
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
* @param teacherOpenCourseId 老师公开课id
|
|
|
|
|
|
|
|
* @author zhouzhao
|
|
|
|
|
|
|
|
* @date 2023/05/06 02:05:07
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
@GetMapping(API+"/getStudentAskUnReadCount.do")
|
|
|
|
|
|
|
|
public JsonResult getStudentAskUnReadCount(@NotNull(message = "开课ID不能为空!") Long teacherOpenCourseId){
|
|
|
|
|
|
|
|
ChatLogUnReadNumDTO dto = new ChatLogUnReadNumDTO();
|
|
|
|
|
|
|
|
dto.setTeacherOpenCourseId(teacherOpenCourseId);
|
|
|
|
|
|
|
|
return JsonResult.success(teacherOpenCourseChatLogService.getStudentAskUnReadCount(dto));
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|