| | |
| | | package com.ots.project.exam.service.impl; |
| | | |
| | | import com.ots.project.exam.domain.*; |
| | | import com.ots.project.exam.dto.TaskItemAnswerObject; |
| | | import com.ots.project.exam.mapper.TaskExamCustomerAnswerMapper; |
| | |
| | | import com.ots.project.tool.exam.JsonUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class TaskExamCustomerAnswerImpl extends BaseServiceImpl<TaskExamCustomerAnswer> implements TaskExamCustomerAnswerService { |
| | | |
| | | @Autowired |
| | | private TaskExamCustomerAnswerMapper taskExamCustomerAnswerMapper; |
| | | |
| | | @Autowired |
| | | private ITTextContentService textContentService; |
| | | |
| | | @Autowired |
| | | public TaskExamCustomerAnswerImpl(TaskExamCustomerAnswerMapper taskExamCustomerAnswerMapper, ITTextContentService textContentService) { |
| | | super(taskExamCustomerAnswerMapper); |
| | | this.taskExamCustomerAnswerMapper = taskExamCustomerAnswerMapper; |
| | | this.textContentService = textContentService; |
| | | } |
| | | |
| | | @Override |
| | | public void insertOrUpdate(ExamPaper examPaper, ExamPaperAnswer examPaperAnswer, Date now) { |
| | | Integer taskId = examPaper.getTaskExamId(); |
| | |
| | | textContentService.updateTTextContent(textContent); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public void insertOrUpdate(TExamPaper examPaper, ExamPaperAnswer examPaperAnswer, Date now) { |
| | | Integer taskId = examPaper.getTaskExamId().intValue(); |
| | |
| | | textContentService.updateTTextContent(textContent); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public TaskExamCustomerAnswer selectByTUid(Integer tid, Integer uid) { |
| | | return taskExamCustomerAnswerMapper.getByTUid(tid, uid); |
| | | } |
| | | |
| | | @Override |
| | | public List<TaskExamCustomerAnswer> selectByTUid(List<Integer> taskIds, Integer uid) { |
| | | return taskExamCustomerAnswerMapper.selectByTUid(taskIds, uid); |