linzhijie
2021-03-11 93af1c6ffb9ae0e894689ad3a37b548e57d54cff
src/main/java/com/ots/project/exam/service/impl/TaskExamCustomerAnswerImpl.java
@@ -1,4 +1,5 @@
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;
@@ -7,21 +8,27 @@
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();
@@ -45,6 +52,7 @@
            textContentService.updateTTextContent(textContent);
        }
    }
    @Override
    public void insertOrUpdate(TExamPaper examPaper, ExamPaperAnswer examPaperAnswer, Date now) {
        Integer taskId = examPaper.getTaskExamId().intValue();
@@ -68,10 +76,12 @@
            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);