小么熊🐻 3 år sedan
förälder
incheckning
a730f45864

+ 1 - 1
twzd-admin/src/main/java/com/miaxis/app/controller/h5/QuestionInfoController.java

@@ -187,7 +187,7 @@ public class QuestionInfoController extends BaseController{
 
 
     /**
-     * 查询模拟考试题库
+     * 查询免费题库
      */
     @GetMapping("/selectFreeQuestionInfo")
     @ApiOperation("查询免费题库")

+ 22 - 24
twzd-admin/src/main/resources/application-dev.yml

@@ -56,30 +56,28 @@ spring:
                 wall:
                     config:
                         multi-statement-allow: true
-    cache:
-        type: redis
-        # redis 配置
-        redis:
-            # 地址
-            host: 1.15.29.64
-            # 端口,默认为6379
-            port: 6379
-            # 密码
-            password: miaxis110
-            # 连接超时时间
-            timeout: 10000
-            lettuce:
-                pool:
-                    # 连接池中的最小空闲连接
-                    min-idle: 0
-                    # 连接池中的最大空闲连接
-                    max-idle: 8
-                    # 连接池的最大数据库连接数
-                    max-active: 8
-                    # #连接池最大阻塞等待时间(使用负值表示没有限制)
-                    max-wait: -1ms
-            # 指定库
-            database: 14
+    # redis 配置
+    redis:
+        # 地址
+        host: sh-crs-lfzs3n8w.sql.tencentcdb.com
+        # 端口,默认为6379
+        port: 29466
+        # 密码
+        password: miaxis110
+        # 连接超时时间
+        timeout: 10000
+        lettuce:
+            pool:
+                # 连接池中的最小空闲连接
+                min-idle: 0
+                # 连接池中的最大空闲连接
+                max-idle: 8
+                # 连接池的最大数据库连接数
+                max-active: 8
+                # #连接池最大阻塞等待时间(使用负值表示没有限制)
+                max-wait: -1ms
+        # 指定库
+        database: 14
 
 
 

+ 1 - 1
twzd-admin/src/main/resources/application-prodtest.yml

@@ -76,7 +76,7 @@ spring:
                 # #连接池最大阻塞等待时间(使用负值表示没有限制)
                 max-wait: -1ms
         # 指定库
-        database: 13
+        database: 14
 
 # 微信公众号
 app:

+ 4 - 0
twzd-service/src/main/java/com/miaxis/question/dto/QuestionInfoTestDTO.java

@@ -32,6 +32,10 @@ public class QuestionInfoTestDTO extends BaseBusinessEntity{
     @ApiModelProperty(value = "是否摩托车 1:是 否:空")
     private String liceMoto;
 
+    @ApiModelProperty(hidden = true)
+    private String excellIssueName;
+
+
     @ApiModelProperty(hidden = true)
     private Integer questionType;
 

+ 20 - 3
twzd-service/src/main/java/com/miaxis/question/service/impl/QuestionInfoServiceImpl.java

@@ -147,13 +147,30 @@ public class QuestionInfoServiceImpl extends ServiceImpl<QuestionInfoMapper, Que
             }
         } else {
             if(questionInfoTestDTO.getSubject()==1){
+                //旧判断20题
                 questionInfoTestDTO.setQuestionType(1);
-                questionInfoTestDTO.setNum(40);
+                questionInfoTestDTO.setNum(20);
+                questionInfoTestDTO.setExcellIssueName("必学");
                 List<QuestionInfo> list1 = questionInfoMapper.selectTestQuestionInfoList(questionInfoTestDTO);
-                questionInfoTestDTO.setQuestionType(2);
-                questionInfoTestDTO.setNum(60);
+                //新判断20题
+                questionInfoTestDTO.setQuestionType(1);
+                questionInfoTestDTO.setNum(20);
+                questionInfoTestDTO.setExcellIssueName("新");
                 List<QuestionInfo> list2 = questionInfoMapper.selectTestQuestionInfoList(questionInfoTestDTO);
+                //旧选择30题
+                questionInfoTestDTO.setQuestionType(2);
+                questionInfoTestDTO.setNum(30);
+                questionInfoTestDTO.setExcellIssueName("必学");
+                List<QuestionInfo> list3 = questionInfoMapper.selectTestQuestionInfoList(questionInfoTestDTO);
+                //新选择30题
+                questionInfoTestDTO.setQuestionType(2);
+                questionInfoTestDTO.setNum(30);
+                questionInfoTestDTO.setExcellIssueName("新");
+                List<QuestionInfo> list4 = questionInfoMapper.selectTestQuestionInfoList(questionInfoTestDTO);
+
                 list1.addAll(list2);
+                list1.addAll(list3);
+                list1.addAll(list4);
                 return list1;
             } else if (questionInfoTestDTO.getSubject()==4) {
                 questionInfoTestDTO.setQuestionType(1);

+ 1 - 1
twzd-service/src/main/resources/mapper/qustion/QuestionInfoMapper.xml

@@ -347,7 +347,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectTestQuestionInfoList"   resultMap="QuestionInfoResult">
         select * from question_info
         <where>
-            <if test="liceMoto == null or liceMoto == ''"> and excell_issue_name like '%必学%'</if>
+            <if test="liceMoto == null or liceMoto == ''"> and excell_issue_name like concat('%',#{excellIssueName},'%')  </if>
             <if test="subject != null"> and subject = #{subject}</if>
             <if test="questionType != null"> and question_type = #{questionType}</if>
             <if test="liceCar != null  and liceCar != ''"> and lice_car = #{liceCar} </if>