zhangbin 1 жил өмнө
parent
commit
8726d6fd90

+ 1 - 11
jpcj-service/src/main/java/com/miaxis/question/service/impl/QuestionInfoKtNewServiceImpl.java

@@ -50,7 +50,6 @@ public class QuestionInfoKtNewServiceImpl extends ServiceImpl<QuestionInfoKtNewM
     @Override
     public List<QuestionInfoKtNew> selectTestK14QuestionInfoList(QuestionInfoNewTestDTO qt) {
         String cx = null;
-        Integer kemu = null;
 
         if ("mtc".equals(qt.getModel())) {
             cx = "mtc";
@@ -62,21 +61,12 @@ public class QuestionInfoKtNewServiceImpl extends ServiceImpl<QuestionInfoKtNewM
             cx = "bus";
         }
 
-        if ("k1".equals(qt.getSubject())) {
-            kemu = 1;
-        } else if ("k2".equals(qt.getSubject())) {
-            kemu = 2;
-        } else if ("k3".equals(qt.getSubject())) {
-            kemu =3;
-        } else if ("k4".equals(qt.getSubject())) {
-            kemu = 4;
-        }
 
 
         //全题库
         List<QuestionInfoKtNew> allList = new ArrayList<QuestionInfoKtNew>();
         TAppExamRule tAppExamRule = new TAppExamRule();
-        tAppExamRule.setKemu(kemu);
+        tAppExamRule.setKemu(qt.getSubject());
         tAppExamRule.setGs(cx);
         tAppExamRule.setAreacode(0);
 

+ 2 - 2
jpcj-service/src/main/resources/mapper/question/QuestionInfoKtNewMapper.xml

@@ -127,8 +127,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="issue != null  and issue != ''"> and issue = #{issue}</if>
             <if test="opts != null  and opts != ''"> and opts = #{opts}</if>
             <if test="questionType != null "> and question_type = #{questionType}</if>
-            <if test="model != null and model != ''"> AND model like concat('%', #{model}, '%') </if>
-            <if test="columnAll != null  and columnAll != ''"> and column_all like concat('%', #{columnAll}, '%')</if>
+            <if test="model != null and model != ''"> AND FIND_IN_SET(#{model}, model) </if>
+            <if test="columnAll != null  and columnAll != ''"> AND FIND_IN_SET(#{columnAll}, column_all) </if>
             <if test="subject != null  and subject != ''"> and subject = #{subject}</if>
             <if test="chapterId != null "> and chapter_id = #{chapterId}</if>
             <if test="diffDegree != null "> and diff_degree = #{diffDegree}</if>