This commit is contained in:
parent
20a71a467f
commit
a3f8c7e4fb
|
|
@ -37,6 +37,15 @@ public class ApiExaminationController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private IExamExaminationUserService examExaminationUserService;
|
private IExamExaminationUserService examExaminationUserService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IExamUserExaminationQuestionService examUserExaminationQuestionService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IExamQuestionService examQuestionService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IExamPaperQuestionService examPaperQuestionService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取考试列表
|
* 获取考试列表
|
||||||
|
|
@ -76,7 +85,10 @@ public class ApiExaminationController extends BaseController {
|
||||||
Integer examNumber = examExamination.getExamNumber();
|
Integer examNumber = examExamination.getExamNumber();
|
||||||
//考试时长
|
//考试时长
|
||||||
Integer timeLength = examExamination.getTimeLength();
|
Integer timeLength = examExamination.getTimeLength();
|
||||||
|
//考试记录ID
|
||||||
|
Integer examUserExaminationId = -1;
|
||||||
|
|
||||||
|
//正式考试
|
||||||
if(type.equals("2")){
|
if(type.equals("2")){
|
||||||
ExamUserExamination examUserExamination = new ExamUserExamination();
|
ExamUserExamination examUserExamination = new ExamUserExamination();
|
||||||
examUserExamination.setVipUserId(userId);
|
examUserExamination.setVipUserId(userId);
|
||||||
|
|
@ -114,8 +126,10 @@ public class ApiExaminationController extends BaseController {
|
||||||
insert.setExamPaperId(examPaperId);
|
insert.setExamPaperId(examPaperId);
|
||||||
insert.setDelFlag("0");
|
insert.setDelFlag("0");
|
||||||
insert.setScore(0);
|
insert.setScore(0);
|
||||||
examUserExaminationService.insert(insert);
|
examUserExaminationService.insertOne(insert);
|
||||||
|
examUserExaminationId = insert.getId();
|
||||||
|
}else{
|
||||||
|
examUserExaminationId = userExamination.get(0).getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -127,6 +141,7 @@ public class ApiExaminationController extends BaseController {
|
||||||
}
|
}
|
||||||
AjaxResult success = success("查询成功");
|
AjaxResult success = success("查询成功");
|
||||||
success.put("data", list);
|
success.put("data", list);
|
||||||
|
success.put("examUserExaminationId",examUserExaminationId);
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -170,13 +185,84 @@ public class ApiExaminationController extends BaseController {
|
||||||
examExaminationUser.setCreateDate(new Date());
|
examExaminationUser.setCreateDate(new Date());
|
||||||
examExaminationUser.setCreateBy(user.getLoginName());
|
examExaminationUser.setCreateBy(user.getLoginName());
|
||||||
examExaminationUser.setExamExaminationId(Integer.parseInt(inationId));
|
examExaminationUser.setExamExaminationId(Integer.parseInt(inationId));
|
||||||
examExaminationUserService.insert(examExaminationUser);
|
examExaminationUserService.insertOne(examExaminationUser);
|
||||||
|
|
||||||
AjaxResult success = success("报名成功");
|
AjaxResult success = success("报名成功");
|
||||||
return success;
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@PostMapping("/v1/examination/finish/{examUserExaminationId}/{examinationId}/{paperId}")
|
||||||
|
public AjaxResult finish(@RequestBody List<ExamUserExaminationQuestion> examUserExaminationQuestion,
|
||||||
|
@PathVariable Integer examUserExaminationId ,@PathVariable Integer examinationId,@PathVariable Integer paperId) {
|
||||||
|
|
||||||
|
|
||||||
|
SysUser user = sysUserService.selectUserByLoginName( JwtUtil.getLoginName() );
|
||||||
|
Long userId = user.getUserId();
|
||||||
|
//交卷后返回的数据
|
||||||
|
ArrayList<Map<String,String>> data = new ArrayList<>();
|
||||||
|
|
||||||
|
|
||||||
|
//如果是模拟考试,考试记录新增数据
|
||||||
|
if(examUserExaminationId == -1){
|
||||||
|
ExamUserExamination insert = new ExamUserExamination();
|
||||||
|
insert.setExamExaminationId(examinationId);
|
||||||
|
insert.setVipUserId(Integer.parseInt(userId.toString()));
|
||||||
|
insert.setCreateDate(new Date());
|
||||||
|
insert.setExamPaperId(paperId);
|
||||||
|
insert.setDelFlag("0");
|
||||||
|
insert.setScore(0);
|
||||||
|
examUserExaminationService.insertOne(insert);
|
||||||
|
examUserExaminationId = insert.getId();
|
||||||
|
}
|
||||||
|
|
||||||
|
Integer score = 0;
|
||||||
|
for (ExamUserExaminationQuestion item : examUserExaminationQuestion) {
|
||||||
|
HashMap<String, String> returnItem = new HashMap<>();
|
||||||
|
String userAnswer = item.getUserAnswer();
|
||||||
|
//存入用户回答
|
||||||
|
returnItem.put("userAnswer",userAnswer);
|
||||||
|
Integer examQuestionId = item.getExamQuestionId();
|
||||||
|
ExamQuestion examQuestion = examQuestionService.selectById(examQuestionId);
|
||||||
|
//存入正确答案
|
||||||
|
returnItem.put("answer",examQuestion.getAnswer());
|
||||||
|
returnItem.put("title",examQuestion.getTitle());
|
||||||
|
returnItem.put("rightWrong","错误");
|
||||||
|
if(examQuestion.getAnswer().equals(userAnswer)){
|
||||||
|
ExamPaperQuestion examPaperQuestion = new ExamPaperQuestion();
|
||||||
|
examPaperQuestion.setExamPaperId(paperId);
|
||||||
|
examPaperQuestion.setExamQuestionId(examQuestionId);
|
||||||
|
score+=examPaperQuestionService.selectExamPaperQuestionList(examPaperQuestion).get(0).getScore();
|
||||||
|
returnItem.put("rightWrong","正确");
|
||||||
|
}
|
||||||
|
item.setExamUserExaminationId(examUserExaminationId);
|
||||||
|
item.setCreateDate(new Date());
|
||||||
|
item.setCreateBy(user.getLoginName());
|
||||||
|
item.setDelFlag("0");
|
||||||
|
examUserExaminationQuestionService.insertOne(item);
|
||||||
|
data.add(returnItem);
|
||||||
|
}
|
||||||
|
ExamUserExamination examUserExamination = examUserExaminationService.selectById(examUserExaminationId);
|
||||||
|
examUserExamination.setScore(score);
|
||||||
|
examUserExamination.setUpdateDate(new Date());
|
||||||
|
examUserExamination.setCreateBy(user.getLoginName());
|
||||||
|
examUserExaminationService.updateOneSelectiveById(examUserExamination);
|
||||||
|
|
||||||
|
ExamExamination examExamination = examExaminationService.selectById(examinationId);
|
||||||
|
String finishedPaper = examExamination.getFinishedPaper();
|
||||||
|
|
||||||
|
|
||||||
|
AjaxResult success = success("考试完成");
|
||||||
|
//考试完成后参数
|
||||||
|
success.put("finishedPaper",finishedPaper);
|
||||||
|
success.put("score",score);
|
||||||
|
if(!finishedPaper.equals("0")){
|
||||||
|
success.put("data", data);
|
||||||
|
}
|
||||||
|
return success;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,163 @@
|
||||||
|
package com.ruoyi.exam.domain;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
|
import com.ruoyi.common.base.BaseEntity;
|
||||||
|
import javax.persistence.Id;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我参与过的考试试题表 exam_user_examination_question
|
||||||
|
*
|
||||||
|
* @author zhujj
|
||||||
|
* @date 2019-01-13
|
||||||
|
*/
|
||||||
|
public class ExamUserExaminationQuestion
|
||||||
|
{
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/** 练习对象 */
|
||||||
|
@Id
|
||||||
|
private Integer id;
|
||||||
|
/** 考试记录编码 */
|
||||||
|
private Integer examUserExaminationId;
|
||||||
|
/** 试题编码 */
|
||||||
|
private Integer examQuestionId;
|
||||||
|
/** 回答答案 */
|
||||||
|
private String userAnswer;
|
||||||
|
/** 创建者 */
|
||||||
|
private String createBy;
|
||||||
|
/** 创建时间 */
|
||||||
|
private Date createDate;
|
||||||
|
/** 更新者 */
|
||||||
|
private String updateBy;
|
||||||
|
/** 更新时间 */
|
||||||
|
private Date updateDate;
|
||||||
|
/** 备注信息 */
|
||||||
|
private String remarks;
|
||||||
|
/** 删除标记 */
|
||||||
|
private String delFlag;
|
||||||
|
|
||||||
|
|
||||||
|
public String getUserAnswer() {
|
||||||
|
return userAnswer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserAnswer(String userAnswer) {
|
||||||
|
this.userAnswer = userAnswer;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 设置练习对象 */
|
||||||
|
public void setId(Integer id)
|
||||||
|
{
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取练习对象 */
|
||||||
|
public Integer getId()
|
||||||
|
{
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
/** 设置考试记录编码 */
|
||||||
|
public void setExamUserExaminationId(Integer examUserExaminationId)
|
||||||
|
{
|
||||||
|
this.examUserExaminationId = examUserExaminationId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取考试记录编码 */
|
||||||
|
public Integer getExamUserExaminationId()
|
||||||
|
{
|
||||||
|
return examUserExaminationId;
|
||||||
|
}
|
||||||
|
/** 设置试题编码 */
|
||||||
|
public void setExamQuestionId(Integer examQuestionId)
|
||||||
|
{
|
||||||
|
this.examQuestionId = examQuestionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取试题编码 */
|
||||||
|
public Integer getExamQuestionId()
|
||||||
|
{
|
||||||
|
return examQuestionId;
|
||||||
|
}
|
||||||
|
/** 设置创建者 */
|
||||||
|
public void setCreateBy(String createBy)
|
||||||
|
{
|
||||||
|
this.createBy = createBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取创建者 */
|
||||||
|
public String getCreateBy()
|
||||||
|
{
|
||||||
|
return createBy;
|
||||||
|
}
|
||||||
|
/** 设置创建时间 */
|
||||||
|
public void setCreateDate(Date createDate)
|
||||||
|
{
|
||||||
|
this.createDate = createDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取创建时间 */
|
||||||
|
public Date getCreateDate()
|
||||||
|
{
|
||||||
|
return createDate;
|
||||||
|
}
|
||||||
|
/** 设置更新者 */
|
||||||
|
public void setUpdateBy(String updateBy)
|
||||||
|
{
|
||||||
|
this.updateBy = updateBy;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取更新者 */
|
||||||
|
public String getUpdateBy()
|
||||||
|
{
|
||||||
|
return updateBy;
|
||||||
|
}
|
||||||
|
/** 设置更新时间 */
|
||||||
|
public void setUpdateDate(Date updateDate)
|
||||||
|
{
|
||||||
|
this.updateDate = updateDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取更新时间 */
|
||||||
|
public Date getUpdateDate()
|
||||||
|
{
|
||||||
|
return updateDate;
|
||||||
|
}
|
||||||
|
/** 设置备注信息 */
|
||||||
|
public void setRemarks(String remarks)
|
||||||
|
{
|
||||||
|
this.remarks = remarks;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取备注信息 */
|
||||||
|
public String getRemarks()
|
||||||
|
{
|
||||||
|
return remarks;
|
||||||
|
}
|
||||||
|
/** 设置删除标记 */
|
||||||
|
public void setDelFlag(String delFlag)
|
||||||
|
{
|
||||||
|
this.delFlag = delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** 获取删除标记 */
|
||||||
|
public String getDelFlag()
|
||||||
|
{
|
||||||
|
return delFlag;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||||
|
.append("id", getId())
|
||||||
|
.append("examUserExaminationId", getExamUserExaminationId())
|
||||||
|
.append("examQuestionId", getExamQuestionId())
|
||||||
|
.append("createBy", getCreateBy())
|
||||||
|
.append("createDate", getCreateDate())
|
||||||
|
.append("updateBy", getUpdateBy())
|
||||||
|
.append("updateDate", getUpdateDate())
|
||||||
|
.append("remarks", getRemarks())
|
||||||
|
.append("delFlag", getDelFlag())
|
||||||
|
.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.ruoyi.exam.mapper;
|
||||||
|
|
||||||
|
import com.ruoyi.exam.domain.ExamUserExaminationQuestion;
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.framework.web.base.MyMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 我参与过的考试试题 数据层
|
||||||
|
*
|
||||||
|
* @author zhujj
|
||||||
|
* @date 2019-01-13
|
||||||
|
*/
|
||||||
|
public interface ExamUserExaminationQuestionMapper extends MyMapper<ExamUserExaminationQuestion>
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询我参与过的考试试题列表
|
||||||
|
*
|
||||||
|
* @param examUserExaminationQuestion 我参与过的考试试题信息
|
||||||
|
* @return 我参与过的考试试题集合
|
||||||
|
*/
|
||||||
|
public List<ExamUserExaminationQuestion> selectExamUserExaminationQuestionList(ExamUserExaminationQuestion examUserExaminationQuestion);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -26,5 +26,6 @@ public interface IExamExaminationUserService extends AbstractBaseService<ExamExa
|
||||||
*/
|
*/
|
||||||
public List<ExamExaminationUser> selectExamExaminationUserList(ExamExaminationUser examExaminationUser);
|
public List<ExamExaminationUser> selectExamExaminationUserList(ExamExaminationUser examExaminationUser);
|
||||||
|
|
||||||
|
|
||||||
|
int insertOne(ExamExaminationUser examExaminationUser);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
package com.ruoyi.exam.service;
|
||||||
|
|
||||||
|
import com.ruoyi.exam.domain.ExamUserExaminationQuestion;
|
||||||
|
import java.util.List;
|
||||||
|
import com.ruoyi.framework.web.base.AbstractBaseService;
|
||||||
|
/**
|
||||||
|
* 我参与过的考试试题 服务层
|
||||||
|
*
|
||||||
|
* @author zhujj
|
||||||
|
* @date 2019-01-13
|
||||||
|
*/
|
||||||
|
public interface IExamUserExaminationQuestionService extends AbstractBaseService<ExamUserExaminationQuestion>
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 查询我参与过的考试试题分页列表
|
||||||
|
*
|
||||||
|
* @param examUserExaminationQuestion 我参与过的考试试题信息
|
||||||
|
* @return 我参与过的考试试题集合
|
||||||
|
*/
|
||||||
|
public List<ExamUserExaminationQuestion> selectExamUserExaminationQuestionPage(ExamUserExaminationQuestion examUserExaminationQuestion);
|
||||||
|
/**
|
||||||
|
* 查询我参与过的考试试题列表
|
||||||
|
*
|
||||||
|
* @param examUserExaminationQuestion 我参与过的考试试题信息
|
||||||
|
* @return 我参与过的考试试题集合
|
||||||
|
*/
|
||||||
|
public List<ExamUserExaminationQuestion> selectExamUserExaminationQuestionList(ExamUserExaminationQuestion examUserExaminationQuestion);
|
||||||
|
|
||||||
|
|
||||||
|
int insertOne(ExamUserExaminationQuestion item);
|
||||||
|
}
|
||||||
|
|
@ -32,4 +32,8 @@ public interface IExamUserExaminationService extends AbstractBaseService<ExamUse
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ExamUserExamination> selectLastOne(ExamUserExamination examUserExamination);
|
List<ExamUserExamination> selectLastOne(ExamUserExamination examUserExamination);
|
||||||
|
|
||||||
|
void insertOne(ExamUserExamination insert);
|
||||||
|
|
||||||
|
int updateOneSelectiveById(ExamUserExamination examUserExamination);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,12 @@ public class ExamExaminationUserServiceImpl extends AbstractBaseServiceImpl<Exam
|
||||||
{
|
{
|
||||||
return examExaminationUserMapper.selectExamExaminationUserList(examExaminationUser);
|
return examExaminationUserMapper.selectExamExaminationUserList(examExaminationUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertOne(ExamExaminationUser examExaminationUser) {
|
||||||
|
return examExaminationUserMapper.insert(examExaminationUser);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询考试对象分页列表
|
* 查询考试对象分页列表
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
package com.ruoyi.exam.service.impl;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import com.ruoyi.exam.mapper.ExamUserExaminationQuestionMapper;
|
||||||
|
import com.ruoyi.exam.domain.ExamUserExaminationQuestion;
|
||||||
|
import com.ruoyi.exam.service.IExamUserExaminationQuestionService;
|
||||||
|
import com.ruoyi.common.support.Convert;
|
||||||
|
import com.ruoyi.framework.web.base.AbstractBaseServiceImpl;
|
||||||
|
/**
|
||||||
|
* 我参与过的考试试题 服务层实现
|
||||||
|
*
|
||||||
|
* @author zhujj
|
||||||
|
* @date 2019-01-13
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ExamUserExaminationQuestionServiceImpl extends AbstractBaseServiceImpl<ExamUserExaminationQuestionMapper,ExamUserExaminationQuestion> implements IExamUserExaminationQuestionService
|
||||||
|
{
|
||||||
|
@Autowired
|
||||||
|
private ExamUserExaminationQuestionMapper examUserExaminationQuestionMapper;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询我参与过的考试试题列表
|
||||||
|
*
|
||||||
|
* @param examUserExaminationQuestion 我参与过的考试试题信息
|
||||||
|
* @return 我参与过的考试试题集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ExamUserExaminationQuestion> selectExamUserExaminationQuestionList(ExamUserExaminationQuestion examUserExaminationQuestion)
|
||||||
|
{
|
||||||
|
return examUserExaminationQuestionMapper.selectExamUserExaminationQuestionList(examUserExaminationQuestion);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertOne(ExamUserExaminationQuestion item) {
|
||||||
|
return examUserExaminationQuestionMapper.insert(item);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询我参与过的考试试题分页列表
|
||||||
|
*
|
||||||
|
* @param examUserExaminationQuestion 我参与过的考试试题信息
|
||||||
|
* @return 我参与过的考试试题集合
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public List<ExamUserExaminationQuestion> selectExamUserExaminationQuestionPage(ExamUserExaminationQuestion examUserExaminationQuestion)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
return examUserExaminationQuestionMapper.selectExamUserExaminationQuestionList(examUserExaminationQuestion);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -38,6 +38,16 @@ public class ExamUserExaminationServiceImpl extends AbstractBaseServiceImpl<Exam
|
||||||
return examUserExaminationMapper.selectLastOne(examUserExamination);
|
return examUserExaminationMapper.selectLastOne(examUserExamination);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void insertOne(ExamUserExamination insert) {
|
||||||
|
examUserExaminationMapper.insert(insert);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateOneSelectiveById(ExamUserExamination examUserExamination) {
|
||||||
|
return examUserExaminationMapper.updateByPrimaryKeySelective(examUserExamination);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询我的考试记录分页列表
|
* 查询我的考试记录分页列表
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.exam.mapper.ExamUserExaminationQuestionMapper">
|
||||||
|
|
||||||
|
<resultMap type="ExamUserExaminationQuestion" id="ExamUserExaminationQuestionResult">
|
||||||
|
<result property="id" column="id" />
|
||||||
|
<result property="examUserExaminationId" column="exam_user_examination_id" />
|
||||||
|
<result property="userAnswer" column="user_answer" />
|
||||||
|
<result property="examQuestionId" column="exam_question_id" />
|
||||||
|
<result property="createBy" column="create_by" />
|
||||||
|
<result property="createDate" column="create_date" />
|
||||||
|
<result property="updateBy" column="update_by" />
|
||||||
|
<result property="updateDate" column="update_date" />
|
||||||
|
<result property="remarks" column="remarks" />
|
||||||
|
<result property="delFlag" column="del_flag" />
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectExamUserExaminationQuestionVo">
|
||||||
|
id, exam_user_examination_id, exam_question_id,user_answer, create_by, create_date, update_by, update_date, remarks, del_flag </sql>
|
||||||
|
|
||||||
|
<select id="selectExamUserExaminationQuestionList" parameterType="ExamUserExaminationQuestion" resultMap="ExamUserExaminationQuestionResult">
|
||||||
|
select
|
||||||
|
<include refid="selectExamUserExaminationQuestionVo"/>
|
||||||
|
from exam_user_examination_question
|
||||||
|
<where>
|
||||||
|
<if test="id != null "> and id = #{id}</if>
|
||||||
|
<if test="examUserExaminationId != null "> and exam_user_examination_id = #{examUserExaminationId}</if>
|
||||||
|
<if test="examQuestionId != null "> and exam_question_id = #{examQuestionId}</if>
|
||||||
|
<if test="createBy != null and createBy != '' "> and create_by = #{createBy}</if>
|
||||||
|
<if test="createDate != null "> and create_date = #{createDate}</if>
|
||||||
|
<if test="updateBy != null and updateBy != '' "> and update_by = #{updateBy}</if>
|
||||||
|
<if test="updateDate != null "> and update_date = #{updateDate}</if>
|
||||||
|
<if test="remarks != null and remarks != '' "> and remarks = #{remarks}</if>
|
||||||
|
<if test="delFlag != null and delFlag != '' "> and del_flag = #{delFlag}</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue