From e5502226185448c5ef7f4a9dfa11b09ed2bba433 Mon Sep 17 00:00:00 2001 From: flower Date: Thu, 10 Jan 2019 02:42:08 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=83=E4=B9=A0=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../exam/domain/ExamUserErrorQuestion.java | 152 ++++++++++++++++++ .../exam/domain/ExamUserErrorQuestionVO.java | 16 ++ .../ruoyi/exam/mapper/ExamQuestionMapper.java | 2 + .../mapper/ExamUserErrorQuestionMapper.java | 27 ++++ .../exam/service/IExamQuestionService.java | 2 + .../IExamUserErrorQuestionService.java | 33 ++++ .../service/impl/ExamQuestionServiceImpl.java | 5 + .../ExamUserErrorQuestionServiceImpl.java | 56 +++++++ .../mapper/exam/ExamQuestionMapper.xml | 14 ++ .../exam/ExamUserErrorQuestionMapper.xml | 95 +++++++++++ 10 files changed, 402 insertions(+) create mode 100644 ruoyi-exam/src/main/java/com/ruoyi/exam/domain/ExamUserErrorQuestion.java create mode 100644 ruoyi-exam/src/main/java/com/ruoyi/exam/domain/ExamUserErrorQuestionVO.java create mode 100644 ruoyi-exam/src/main/java/com/ruoyi/exam/mapper/ExamUserErrorQuestionMapper.java create mode 100644 ruoyi-exam/src/main/java/com/ruoyi/exam/service/IExamUserErrorQuestionService.java create mode 100644 ruoyi-exam/src/main/java/com/ruoyi/exam/service/impl/ExamUserErrorQuestionServiceImpl.java create mode 100644 ruoyi-exam/src/main/resources/mapper/exam/ExamUserErrorQuestionMapper.xml diff --git a/ruoyi-exam/src/main/java/com/ruoyi/exam/domain/ExamUserErrorQuestion.java b/ruoyi-exam/src/main/java/com/ruoyi/exam/domain/ExamUserErrorQuestion.java new file mode 100644 index 000000000..9cac2754c --- /dev/null +++ b/ruoyi-exam/src/main/java/com/ruoyi/exam/domain/ExamUserErrorQuestion.java @@ -0,0 +1,152 @@ +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_error_question + * + * @author zhujj + * @date 2019-01-10 + */ +public class ExamUserErrorQuestion +{ +private static final long serialVersionUID = 1L; + + /** 练习对象 */ + @Id + private Integer id; + /** 会员代码 */ + private Integer vipUserId; + /** 练习题代码 */ + private Integer examQuestionId; + /** 创建者 */ + private String createBy; + /** 创建时间 */ + private Date createDate; + /** 更新者 */ + private String updateBy; + /** 更新时间 */ + private Date updateDate; + /** 备注信息 */ + private String remarks; + /** 删除标记 */ + private String delFlag; + + /** 设置练习对象 */ + public void setId(Integer id) + { + this.id = id; + } + + /** 获取练习对象 */ + public Integer getId() + { + return id; + } + /** 设置会员代码 */ + public void setVipUserId(Integer vipUserId) + { + this.vipUserId = vipUserId; + } + + /** 获取会员代码 */ + public Integer getVipUserId() + { + return vipUserId; + } + /** 设置练习题代码 */ + 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("vipUserId", getVipUserId()) + .append("examQuestionId", getExamQuestionId()) + .append("createBy", getCreateBy()) + .append("createDate", getCreateDate()) + .append("updateBy", getUpdateBy()) + .append("updateDate", getUpdateDate()) + .append("remarks", getRemarks()) + .append("delFlag", getDelFlag()) + .toString(); + } + } diff --git a/ruoyi-exam/src/main/java/com/ruoyi/exam/domain/ExamUserErrorQuestionVO.java b/ruoyi-exam/src/main/java/com/ruoyi/exam/domain/ExamUserErrorQuestionVO.java new file mode 100644 index 000000000..7e4f65785 --- /dev/null +++ b/ruoyi-exam/src/main/java/com/ruoyi/exam/domain/ExamUserErrorQuestionVO.java @@ -0,0 +1,16 @@ +package com.ruoyi.exam.domain; + +/** + * Created by flower on 2019/1/10. + */ +public class ExamUserErrorQuestionVO extends ExamUserErrorQuestion { + private ExamQuestion question; + + public ExamQuestion getQuestion() { + return question; + } + + public void setQuestion(ExamQuestion question) { + this.question = question; + } +} diff --git a/ruoyi-exam/src/main/java/com/ruoyi/exam/mapper/ExamQuestionMapper.java b/ruoyi-exam/src/main/java/com/ruoyi/exam/mapper/ExamQuestionMapper.java index 839dfe84b..d9eb9e7e2 100644 --- a/ruoyi-exam/src/main/java/com/ruoyi/exam/mapper/ExamQuestionMapper.java +++ b/ruoyi-exam/src/main/java/com/ruoyi/exam/mapper/ExamQuestionMapper.java @@ -66,4 +66,6 @@ public interface ExamQuestionMapper extends MyMapper List selectListBycategory(ExamQuestion examQuestion); List selectQuestionListByPracticeId(Map map); + + ExamQuestionVO selectQuestionDetail(String questionId); } \ No newline at end of file diff --git a/ruoyi-exam/src/main/java/com/ruoyi/exam/mapper/ExamUserErrorQuestionMapper.java b/ruoyi-exam/src/main/java/com/ruoyi/exam/mapper/ExamUserErrorQuestionMapper.java new file mode 100644 index 000000000..000645b74 --- /dev/null +++ b/ruoyi-exam/src/main/java/com/ruoyi/exam/mapper/ExamUserErrorQuestionMapper.java @@ -0,0 +1,27 @@ +package com.ruoyi.exam.mapper; + +import com.ruoyi.exam.domain.ExamUserErrorQuestion; +import java.util.List; + +import com.ruoyi.exam.domain.ExamUserErrorQuestionVO; +import com.ruoyi.framework.web.base.MyMapper; + +/** + * 我的错题 数据层 + * + * @author zhujj + * @date 2019-01-10 + */ +public interface ExamUserErrorQuestionMapper extends MyMapper +{ + + /** + * 查询我的错题列表 + * + * @param examUserErrorQuestion 我的错题信息 + * @return 我的错题集合 + */ + public List selectExamUserErrorQuestionList(ExamUserErrorQuestion examUserErrorQuestion); + + List selectExamUserErrorQuestionDetailPage(ExamUserErrorQuestion examUserErrorQuestion); +} \ No newline at end of file diff --git a/ruoyi-exam/src/main/java/com/ruoyi/exam/service/IExamQuestionService.java b/ruoyi-exam/src/main/java/com/ruoyi/exam/service/IExamQuestionService.java index 9111735d8..ef46d5eb8 100644 --- a/ruoyi-exam/src/main/java/com/ruoyi/exam/service/IExamQuestionService.java +++ b/ruoyi-exam/src/main/java/com/ruoyi/exam/service/IExamQuestionService.java @@ -66,4 +66,6 @@ public interface IExamQuestionService extends AbstractBaseService List selectListBycategory(ExamQuestion examQuestion); List selectQuestionListByPracticeId(Map map); + + ExamQuestionVO selectQuestionDetail(String questionId); } diff --git a/ruoyi-exam/src/main/java/com/ruoyi/exam/service/IExamUserErrorQuestionService.java b/ruoyi-exam/src/main/java/com/ruoyi/exam/service/IExamUserErrorQuestionService.java new file mode 100644 index 000000000..6d4da1bbf --- /dev/null +++ b/ruoyi-exam/src/main/java/com/ruoyi/exam/service/IExamUserErrorQuestionService.java @@ -0,0 +1,33 @@ +package com.ruoyi.exam.service; + +import com.ruoyi.exam.domain.ExamUserErrorQuestion; +import java.util.List; + +import com.ruoyi.exam.domain.ExamUserErrorQuestionVO; +import com.ruoyi.framework.web.base.AbstractBaseService; +/** + * 我的错题 服务层 + * + * @author zhujj + * @date 2019-01-10 + */ +public interface IExamUserErrorQuestionService extends AbstractBaseService +{ + /** + * 查询我的错题分页列表 + * + * @param examUserErrorQuestion 我的错题信息 + * @return 我的错题集合 + */ + public List selectExamUserErrorQuestionPage(ExamUserErrorQuestion examUserErrorQuestion); + /** + * 查询我的错题列表 + * + * @param examUserErrorQuestion 我的错题信息 + * @return 我的错题集合 + */ + public List selectExamUserErrorQuestionList(ExamUserErrorQuestion examUserErrorQuestion); + + + List selectExamUserErrorQuestionDetailPage(ExamUserErrorQuestion examUserErrorQuestion); +} diff --git a/ruoyi-exam/src/main/java/com/ruoyi/exam/service/impl/ExamQuestionServiceImpl.java b/ruoyi-exam/src/main/java/com/ruoyi/exam/service/impl/ExamQuestionServiceImpl.java index 35645da5e..f8125bc5f 100644 --- a/ruoyi-exam/src/main/java/com/ruoyi/exam/service/impl/ExamQuestionServiceImpl.java +++ b/ruoyi-exam/src/main/java/com/ruoyi/exam/service/impl/ExamQuestionServiceImpl.java @@ -170,4 +170,9 @@ public class ExamQuestionServiceImpl extends AbstractBaseServiceImpl implements IExamUserErrorQuestionService +{ + @Autowired + private ExamUserErrorQuestionMapper examUserErrorQuestionMapper; + + + /** + * 查询我的错题列表 + * + * @param examUserErrorQuestion 我的错题信息 + * @return 我的错题集合 + */ + @Override + public List selectExamUserErrorQuestionList(ExamUserErrorQuestion examUserErrorQuestion) + { + return examUserErrorQuestionMapper.selectExamUserErrorQuestionList(examUserErrorQuestion); + } + + @Override + public List selectExamUserErrorQuestionDetailPage(ExamUserErrorQuestion examUserErrorQuestion) { + startPage(); + return examUserErrorQuestionMapper.selectExamUserErrorQuestionDetailPage(examUserErrorQuestion); + } + + /** + * 查询我的错题分页列表 + * + * @param examUserErrorQuestion 我的错题信息 + * @return 我的错题集合 + */ + @Override + public List selectExamUserErrorQuestionPage(ExamUserErrorQuestion examUserErrorQuestion) + { + startPage(); + return examUserErrorQuestionMapper.selectExamUserErrorQuestionList(examUserErrorQuestion); + } + +} diff --git a/ruoyi-exam/src/main/resources/mapper/exam/ExamQuestionMapper.xml b/ruoyi-exam/src/main/resources/mapper/exam/ExamQuestionMapper.xml index 76e209b39..63fedfe78 100644 --- a/ruoyi-exam/src/main/resources/mapper/exam/ExamQuestionMapper.xml +++ b/ruoyi-exam/src/main/resources/mapper/exam/ExamQuestionMapper.xml @@ -109,6 +109,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by epq.order_num + + insert into exam_question diff --git a/ruoyi-exam/src/main/resources/mapper/exam/ExamUserErrorQuestionMapper.xml b/ruoyi-exam/src/main/resources/mapper/exam/ExamUserErrorQuestionMapper.xml new file mode 100644 index 000000000..8d45bdda4 --- /dev/null +++ b/ruoyi-exam/src/main/resources/mapper/exam/ExamUserErrorQuestionMapper.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + euq.id, euq.vip_user_id, euq.exam_question_id, euq.create_by, euq.create_date, euq.update_by, euq.update_date, euq.remarks, euq.del_flag + + + + + + \ No newline at end of file