手动签到

beetlsql3-dev
Mlxa0324 2 years ago
parent d717bed080
commit 0fbec5dc3f

@ -1,5 +1,6 @@
package com.ibeetl.jlw.entity.dto;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import javax.validation.constraints.NotEmpty;
@ -16,6 +17,7 @@ import java.util.List;
* @modified
*/
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class TeacherOpenCourseStudentSigninLogManualMergeDTO {
/**

@ -161,9 +161,9 @@ public class TeacherOpenCourseMergeCourseInfoService extends CoreBaseService<Tea
for (String id : ids.split(",")) {
List<TeacherOpenCourseMergeCourseInfo> courseResources = getCourseResources(Long.valueOf(id));
// TODO 这里要优化
// List<TeacherOpenCourseMergeCourseInfo> courseResources2 = getCourseResourcesByList(Long.valueOf(id));
List<TeacherOpenCourseMergeCourseInfo> courseResources2 = getCourseResourcesByList(Long.valueOf(id));
// int a = 1/0;
int a = 1/0;
// 只匹配章节
Set<Long> idSet = courseResources.stream().filter(item -> Integer.valueOf(2).equals(item.getCourseInfoType()))

@ -3,12 +3,16 @@ package com.ibeetl.jlw.web;
import cn.hutool.core.lang.Assert;
import cn.hutool.core.util.ObjectUtil;
import cn.jlw.Interceptor.SCoreUser;
import cn.jlw.Interceptor.TStudent;
import cn.jlw.Interceptor.TTeacher;
import cn.jlw.validate.ValidateConfig;
import com.ibeetl.admin.core.annotation.Function;
import com.ibeetl.admin.core.entity.CoreUser;
import com.ibeetl.admin.core.file.FileService;
import com.ibeetl.admin.core.service.CoreUserService;
import com.ibeetl.admin.core.web.JsonResult;
import com.ibeetl.jlw.entity.Student;
import com.ibeetl.jlw.entity.Teacher;
import com.ibeetl.jlw.entity.TeacherOpenCourseChatLog;
import com.ibeetl.jlw.service.TeacherOpenCourseChatLogService;
import com.ibeetl.jlw.web.query.TeacherOpenCourseChatLogQuery;
@ -111,7 +115,7 @@ public class TeacherOpenCourseChatLogController{
public JsonResult addDo(
@Validated(ValidateConfig.ADD.class)
@RequestBody TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery,
BindingResult result,@SCoreUser CoreUser coreUser){
BindingResult result, @SCoreUser CoreUser coreUser, @TTeacher Teacher teacher, @TStudent Student student){
if(result.hasErrors()){
return JsonResult.failMessage(result);
}else{
@ -120,6 +124,12 @@ public class TeacherOpenCourseChatLogController{
if(null == teacherOpenCourseChatLogQuery.getTeacherOpenCourseChatLogStatus()){
teacherOpenCourseChatLogQuery.setTeacherOpenCourseChatLogStatus(1);
}
if (ObjectUtil.isNotEmpty(teacher)) {
teacherOpenCourseChatLogQuery.setTeacherId(teacher.getTeacherId());
}
if (ObjectUtil.isNotEmpty(student)) {
teacherOpenCourseChatLogQuery.setStudentId(student.getStudentId());
}
return teacherOpenCourseChatLogService.add(teacherOpenCourseChatLogQuery);
}
}
@ -264,7 +274,7 @@ public class TeacherOpenCourseChatLogController{
public JsonResult addByType(
@RequestBody TeacherOpenCourseChatLogQuery teacherOpenCourseChatLogQuery,
Integer type,
BindingResult result, @SCoreUser CoreUser coreUser){
BindingResult result, @SCoreUser CoreUser coreUser, @TTeacher Teacher teacher, @TStudent Student student){
if(result.hasErrors()){
return JsonResult.failMessage(result);
@ -274,6 +284,12 @@ public class TeacherOpenCourseChatLogController{
if(null == teacherOpenCourseChatLogQuery.getTeacherOpenCourseChatLogStatus()){
teacherOpenCourseChatLogQuery.setTeacherOpenCourseChatLogStatus(1);
}
if (ObjectUtil.isNotEmpty(teacher)) {
teacherOpenCourseChatLogQuery.setTeacherId(teacher.getTeacherId());
}
if (ObjectUtil.isNotEmpty(student)) {
teacherOpenCourseChatLogQuery.setStudentId(student.getStudentId());
}
return teacherOpenCourseChatLogService.addByType(teacherOpenCourseChatLogQuery, type);
}
}

@ -40,10 +40,10 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
private Long teacherOpenCourseId;
@Query(name = "班级ID集合", display = false)
private String schoolClassIds;
@NotNull(message = "教师ID不能为空", groups ={ ValidateConfig.ADD.class, TEACHER_ADD.class })
// @NotNull(message = "教师ID不能为空", groups ={ ValidateConfig.ADD.class, TEACHER_ADD.class })
@Query(name = "教师ID", display = true,type=Query.TYPE_DICT,dict="teacher.teacher_name.teacher_status=1")
private Long teacherId;
@NotNull(message = "学生ID不能为空", groups ={ ValidateConfig.ADD.class, STUDENT_ADD.class })
// @NotNull(message = "学生ID不能为空", groups ={ ValidateConfig.ADD.class, STUDENT_ADD.class })
@Query(name = "学生ID", display = true,type=Query.TYPE_DICT,dict="student.student_name.student_status=1")
private Long studentId;
@NotNull(message = "讨论内容不能为空", groups ={ ValidateConfig.ADD.class, TEACHER_ADD.class, STUDENT_ADD.class })
@ -172,7 +172,7 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
public TeacherOpenCourseChatLog pojo(){
TeacherOpenCourseChatLog pojo = new TeacherOpenCourseChatLog();
pojo.setTeacherOpenCourseChatLogId(this.getTeacherOpenCourseChatLogId());
pojo.setTeacherOpenCourseChatLogParentId(this.getTeacherOpenCourseChatLogParentId());
pojo.setTeacherOpenCourseChatLogParentId(ObjectUtil.defaultIfNull(this.getTeacherOpenCourseChatLogParentId(), 0L));
pojo.setTeacherOpenCourseId(this.getTeacherOpenCourseId());
pojo.setSchoolClassIds(this.getSchoolClassIds());
pojo.setTeacherId(this.getTeacherId());
@ -181,8 +181,8 @@ public class TeacherOpenCourseChatLogQuery extends PageParam {
pojo.setKeywords(this.getKeywords());
pojo.setStudentScore(this.getStudentScore());
pojo.setChatFiles(this.getChatFiles());
pojo.setTeacherOpenCourseChatLogStatus(this.getTeacherOpenCourseChatLogStatus());
pojo.setTeacherOpenCourseChatLogAddTime(this.getTeacherOpenCourseChatLogAddTime());
pojo.setTeacherOpenCourseChatLogStatus(ObjectUtil.defaultIfNull(this.getTeacherOpenCourseChatLogStatus(), 1));
pojo.setTeacherOpenCourseChatLogAddTime(ObjectUtil.defaultIfNull(this.getTeacherOpenCourseChatLogAddTime(), new Date()));
pojo.setChatLogSendType(ObjectUtil.defaultIfNull(this.getChatLogSendType(), normal));
pojo.setOrgId(this.getOrgId());
pojo.setUserId(this.getUserId());

@ -8,7 +8,7 @@ queryByCondition
@if(!isEmpty(teacherOpenCourseChatLogParentId)){
,(select count(1) from teacher_open_course_chat_log a
where a.teacher_open_course_chat_log_status = 1
and teacher_open_course_chat_log_parent_id = #teacherOpenCourseChatLogParentId#
and teacher_open_course_chat_log_id = #teacherOpenCourseChatLogParentId#
) as comment_count
@}
@}

Loading…
Cancel
Save