package com.thhy.secure.modules.biz.exam.service.impl; import com.thhy.secure.modules.biz.exam.entity.ExamReAnswer; import com.thhy.secure.modules.biz.exam.mapper.ExamReAnswerMapper; import com.thhy.secure.modules.biz.exam.service.ExamReAnswerService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.io.Serializable; import java.util.List; /** * 服务实现类 * @author zhang_xiao_bo * @since 2023-05-26 15:53:19 */ @Service public class ExamReAnswerServiceImpl implements ExamReAnswerService { @Autowired private ExamReAnswerMapper examReAnswerMapper; public ExamReAnswer get(Serializable id){ return examReAnswerMapper.queryById(id); } public List findList(ExamReAnswer examReAnswer){ return examReAnswerMapper.findList(examReAnswer); } /** * 增加和修改 * @param examReAnswer */ @Transactional public void addExamReAnswer(ExamReAnswer examReAnswer){ if(examReAnswer.getId() == null){ //增加操作 examReAnswerMapper.insert(examReAnswer); }else{ //修改操作 examReAnswerMapper.update(examReAnswer); } } /** * 修改 * @param examReAnswer */ public void update(ExamReAnswer examReAnswer){ examReAnswerMapper.update(examReAnswer); } /** * 删除 * @param id */ public void delete(Serializable id){ examReAnswerMapper.deletelogic(id); } }