|
|
|
@ -5,7 +5,6 @@ import cn.hutool.core.util.BooleanUtil;
|
|
|
|
|
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;
|
|
|
|
@ -31,7 +30,6 @@ import javax.validation.constraints.NotEmpty;
|
|
|
|
|
import java.util.*;
|
|
|
|
|
|
|
|
|
|
import static cn.hutool.core.util.ArrayUtil.join;
|
|
|
|
|
import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUser;
|
|
|
|
|
import static com.ibeetl.admin.core.util.user.CacheUserUtil.getUserId;
|
|
|
|
|
import static com.ibeetl.jlw.entity.ResourcesQuestionOptionEntity.shuffleOrderOptions;
|
|
|
|
|
import static java.util.stream.Collectors.groupingBy;
|
|
|
|
@ -174,8 +172,7 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
|
|
|
|
|
public void addQuestionLog(Map<Long, TreeSet<String>> questionLogMap, final ResourcesQuestionSnapshotFromTypeEnum fromType) {
|
|
|
|
|
|
|
|
|
|
// 查询学生身份
|
|
|
|
|
final CoreUser user = getUser();
|
|
|
|
|
final Student student = studentDao.getByUserId(user.getId());
|
|
|
|
|
final Student student = studentDao.getByUserId(getUserId());
|
|
|
|
|
|
|
|
|
|
ResourcesQuestionSnapshot entity = new ResourcesQuestionSnapshot();
|
|
|
|
|
entity.setResourcesQuestionSnapshotId(CollectionUtils.firstElement(questionLogMap.keySet()));
|
|
|
|
@ -192,8 +189,8 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
|
|
|
|
|
questionLog.setTeacherOpenCourseQuestionLogFromType(fromType);
|
|
|
|
|
questionLog.setTeacherOpenCourseQuestionLogFromId(resourcesQuestionSnapshot.getResourcesQuestionSnapshotFromId());
|
|
|
|
|
questionLog.setTeacherOpenCourseQuestionLogStatus(1);
|
|
|
|
|
questionLog.setOrgId(user.getOrgId());
|
|
|
|
|
questionLog.setUserId(user.getId());
|
|
|
|
|
questionLog.setOrgId(student.getOrgId());
|
|
|
|
|
questionLog.setUserId(student.getUserId());
|
|
|
|
|
// 包含/字符,代表是路径地址,是附件类型
|
|
|
|
|
if(answersText.contains("/")) {
|
|
|
|
|
questionLog.setTeacherOpenCourseQuestionLogUploadFile(answersText);
|
|
|
|
@ -205,6 +202,9 @@ public class TeacherOpenCourseQuestionLogService extends CoreBaseService<Teacher
|
|
|
|
|
questionLog.setTeacherOpenCourseQuestionLogAddTime(new Date());
|
|
|
|
|
questionLog.setResourcesQuestionSnapshotId(resourcesQuestionSnapshotId);
|
|
|
|
|
questionLog.setStudentId(student.getStudentId());
|
|
|
|
|
// 用于数据权限
|
|
|
|
|
questionLog.setOrgId(student.getOrgId());
|
|
|
|
|
questionLog.setUserId(student.getUserId());
|
|
|
|
|
list.add(questionLog);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|