Jelajahi Sumber

ly 题库练习 重复问题修复

ly 1 tahun lalu
induk
melakukan
c425001823

+ 4 - 1
master/src/main/resources/mybatis/training/elearn/TElUserQuMapper.xml

@@ -49,6 +49,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectTElUserQuLast" parameterType="TElUserQu" resultMap="TElUserQuResult">
+       select * from (
         <include refid="selectTElUserQuVo"/>
         <where>
             <if test="userId != null "> and user_id = #{userId}</if>
@@ -57,9 +58,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="repoId != null "> and repo_id = #{repoId}</if>
             <if test="title != null  and title != ''"> and title = #{title}</if>
             <if test="sort != null "> and sort = #{sort}</if>
-            and d.del_flag = 0 and  rownum = 1
+            and d.del_flag = 0
         </where>
         order by d.id desc
+        )
+        where   rownum = 1
     </select>
 
 

+ 1 - 1
ui/src/views/training/elearn/userQu/train.vue

@@ -149,7 +149,7 @@ export default {
     },
     addUserQu(isRight){
       //
-      addUserQu({quId: this.quId,isRight:isRight}).then(response => {
+      addUserQu({quId: this.quId,repoId: this.repoId, isRight:isRight}).then(response => {
 
       })
     },