Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/master'

Althars123 2 gadi atpakaļ
vecāks
revīzija
03ffc65ffc
49 mainītis faili ar 4554 papildinājumiem un 175 dzēšanām
  1. 99 0
      zzjs-admin/src/main/java/com/miaxis/app/controller/question/QuestionInfoController.java
  2. 122 13
      zzjs-admin/src/test/java/com/miaxis/test/KTDownload.java
  3. 2 3
      zzjs-admin/src/test/java/com/miaxis/test/KTRename.java
  4. 153 0
      zzjs-admin/src/test/java/com/miaxis/test/KTRename2.java
  5. 7 7
      zzjs-admin/src/test/java/com/miaxis/test/KtTest.java
  6. 618 0
      zzjs-admin/src/test/java/com/miaxis/test/KtTest2.java
  7. 3 5
      zzjs-admin/src/test/java/com/miaxis/test/Test03.java
  8. 26 0
      zzjs-admin/src/test/java/com/miaxis/test/Test04.java
  9. 303 0
      zzjs-admin/src/test/java/com/miaxis/test/TestRule.java
  10. 205 8
      zzjs-admin/src/test/java/com/miaxis/test/YdtTest.java
  11. 12 0
      zzjs-service/src/main/java/com/miaxis/feign/dto/Ydt.java
  12. 63 0
      zzjs-service/src/main/java/com/miaxis/feign/service/IKtService.java
  13. 24 0
      zzjs-service/src/main/java/com/miaxis/feign/service/IYdtService.java
  14. 117 0
      zzjs-service/src/main/java/com/miaxis/question/controller/QuestionFreeController.java
  15. 117 0
      zzjs-service/src/main/java/com/miaxis/question/controller/TAppExamRuleController.java
  16. 117 0
      zzjs-service/src/main/java/com/miaxis/question/controller/WebNoteAllController.java
  17. 51 0
      zzjs-service/src/main/java/com/miaxis/question/domain/QuestionFree.java
  18. 265 0
      zzjs-service/src/main/java/com/miaxis/question/domain/QuestionInfo.java
  19. 15 6
      zzjs-service/src/main/java/com/miaxis/question/domain/QuestionInfoKtGet.java
  20. 284 0
      zzjs-service/src/main/java/com/miaxis/question/domain/QuestionYdtJs.java
  21. 93 0
      zzjs-service/src/main/java/com/miaxis/question/domain/TAppExamRule.java
  22. 481 0
      zzjs-service/src/main/java/com/miaxis/question/domain/WebNoteAll.java
  23. 183 0
      zzjs-service/src/main/java/com/miaxis/question/dto/QuestionInfoDTO.java
  24. 0 62
      zzjs-service/src/main/java/com/miaxis/question/dto/QuestionInfoDto.java
  25. 0 48
      zzjs-service/src/main/java/com/miaxis/question/dto/QuestionInfoRandDto.java
  26. 54 0
      zzjs-service/src/main/java/com/miaxis/question/dto/QuestionInfoTestDTO.java
  27. 40 0
      zzjs-service/src/main/java/com/miaxis/question/dto/TAppExamRuleDTO.java
  28. 22 0
      zzjs-service/src/main/java/com/miaxis/question/mapper/QuestionFreeMapper.java
  29. 29 0
      zzjs-service/src/main/java/com/miaxis/question/mapper/QuestionInfoMapper.java
  30. 24 0
      zzjs-service/src/main/java/com/miaxis/question/mapper/QuestionYdtJsMapper.java
  31. 22 0
      zzjs-service/src/main/java/com/miaxis/question/mapper/TAppExamRuleMapper.java
  32. 22 0
      zzjs-service/src/main/java/com/miaxis/question/mapper/WebNoteAllMapper.java
  33. 21 0
      zzjs-service/src/main/java/com/miaxis/question/service/IQuestionFreeService.java
  34. 33 0
      zzjs-service/src/main/java/com/miaxis/question/service/IQuestionInfoService.java
  35. 23 0
      zzjs-service/src/main/java/com/miaxis/question/service/IQuestionYdtJsService.java
  36. 21 0
      zzjs-service/src/main/java/com/miaxis/question/service/ITAppExamRuleService.java
  37. 21 0
      zzjs-service/src/main/java/com/miaxis/question/service/IWebNoteAllService.java
  38. 36 0
      zzjs-service/src/main/java/com/miaxis/question/service/impl/QuestionFreeServiceImpl.java
  39. 251 0
      zzjs-service/src/main/java/com/miaxis/question/service/impl/QuestionInfoServiceImpl.java
  40. 40 0
      zzjs-service/src/main/java/com/miaxis/question/service/impl/QuestionYdtJsServiceImpl.java
  41. 36 0
      zzjs-service/src/main/java/com/miaxis/question/service/impl/TAppExamRuleServiceImpl.java
  42. 35 0
      zzjs-service/src/main/java/com/miaxis/question/service/impl/WebNoteAllServiceImpl.java
  43. 0 0
      zzjs-service/src/main/resources/mapper/dict/carousel/HomePageDataInfoMapper.xml
  44. 29 0
      zzjs-service/src/main/resources/mapper/free/QuestionFreeMapper.xml
  45. 102 23
      zzjs-service/src/main/resources/mapper/question/QuestionInfoKtGetMapper.xml
  46. 148 0
      zzjs-service/src/main/resources/mapper/question/QuestionInfoMapper.xml
  47. 84 0
      zzjs-service/src/main/resources/mapper/question/WebNoteAllMapper.xml
  48. 41 0
      zzjs-service/src/main/resources/mapper/rule/TAppExamRuleMapper.xml
  49. 60 0
      zzjs-service/src/main/resources/mapper/ydt/QuestionYdtJsMapper.xml

+ 99 - 0
zzjs-admin/src/main/java/com/miaxis/app/controller/question/QuestionInfoController.java

@@ -0,0 +1,99 @@
+package com.miaxis.app.controller.question;
+
+import com.miaxis.common.constant.Constants;
+import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.core.domain.Response;
+import com.miaxis.common.core.page.ResponsePageInfo;
+import com.miaxis.question.domain.QuestionInfo;
+import com.miaxis.question.dto.QuestionInfoDTO;
+import com.miaxis.question.dto.QuestionInfoTestDTO;
+import com.miaxis.question.service.IQuestionInfoService;
+import io.swagger.annotations.*;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+/**
+ * 【题库】Controller
+ *
+ * @author miaxis
+ * @date 2021-10-20
+ */
+@RestController
+@RequestMapping(Constants.OPEN_PREFIX+"/question/info")
+@Api(tags={"【H5-题库】"})
+public class QuestionInfoController extends BaseController {
+    @Autowired
+    private IQuestionInfoService questionInfoService;
+
+    /**
+     * 查询题库列表
+     */
+    @GetMapping("/list")
+    @ApiOperation("查询题库列表")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<QuestionInfo> list(@ModelAttribute QuestionInfoDTO questionInfoDTO){
+        startPage();
+        List<QuestionInfo> list = questionInfoService.selectQuestionInfoList(questionInfoDTO);
+        return toResponsePageInfo(list);
+    }
+
+    /**
+     * 获取题库详细信息
+     */
+    @GetMapping(value = "/{id}")
+    @ApiOperation("获取题库详细信息")
+    public Response<QuestionInfo> getInfo(
+            @ApiParam(name = "id", value = "题库参数", required = true)
+            @PathVariable("id") Long id
+    ){
+        return Response.success(questionInfoService.getById(id));
+    }
+
+
+
+    /**
+     * 根据ydtid获取题目
+     */
+    @GetMapping(value = "/getQuestionInfoByYdtIds")
+    @ApiOperation("根据ydtid获取题目")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "ids",value = "题目ids" ,dataType = "List", required = true)
+    })
+    public ResponsePageInfo<QuestionInfo> getQuestionInfoByYdtIds(Long[] ids){
+        List<QuestionInfo> list = questionInfoService.selectQuestionInfoListByYdtIds(ids);
+        return toResponsePageInfo(list);
+    }
+
+
+
+    /**
+     * 根据id获取题目
+     */
+    @GetMapping(value = "/getQuestionInfoByIds")
+    @ApiOperation("根据id获取题目")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "ids",value = "题目ids" ,dataType = "List", required = true)
+    })
+    public ResponsePageInfo<QuestionInfo> getQuestionInfoByIds(Long[] ids){
+        List<QuestionInfo> list = questionInfoService.selectQuestionInfoListByIds(ids);
+        return toResponsePageInfo(list);
+    }
+
+
+    /**
+     * 查询模拟考试科目1与4题库
+     */
+    @GetMapping("/selectTestK14QuestionInfoList")
+    @ApiOperation("取模拟考试题库")
+    public ResponsePageInfo<QuestionInfo> selectTestK14QuestionInfoList(@ModelAttribute QuestionInfoTestDTO questionInfoTestDTO){
+        List<QuestionInfo> list = questionInfoService.selectTestK14QuestionInfoList(questionInfoTestDTO);
+        return toResponsePageInfo(list);
+    }
+
+}
+

+ 122 - 13
zzjs-admin/src/test/java/com/miaxis/test/KTDownload.java

@@ -29,25 +29,134 @@ public class KTDownload {
     @Test
     public void testExcel() throws Exception {
 
-        List<QuestionInfoKtGet> list = questionInfoGetService.selectQuestionInfoKtGetExplainjsmp3List(); //要修改
-        for (int i = 0; i < list.size(); i++) {
-            QuestionInfoKtGet questionInfoKtGet = list.get(i);
-            String mediaUrl = questionInfoKtGet.getExplainjsmp3(); //要修改
-            int index = mediaUrl.lastIndexOf("/");
-            String fileName = mediaUrl.substring(index + 1);
-            System.out.println(mediaUrl + "," + fileName);
-            Thread.sleep(256);
-
-            try {
-                downLoadFromUrl(mediaUrl, fileName, "G:\\中正\\题库图\\kt\\explain_js_mp3"); //要修改
-            } catch (Exception e) {
-                e.printStackTrace();
+        //explain_gif
+        List<QuestionInfoKtGet> explainGifList = questionInfoGetService.selectQuestionInfoKtGetExplainGifList(); //要修改
+        downLoadList(explainGifList, "explainGifList");
+
+        //explain_mp3
+        List<QuestionInfoKtGet> explainMp3List = questionInfoGetService.selectQuestionInfoKtGetExplainMp3List(); //要修改
+        downLoadList(explainMp3List, "explainMp3List");
+
+        //image
+        List<QuestionInfoKtGet> imageList = questionInfoGetService.selectQuestionInfoKtGetImageList(); //要修改
+        downLoadList(imageList, "imageList");
+
+        //issuemp3
+        List<QuestionInfoKtGet> issuemp3List = questionInfoGetService.selectQuestionInfoKtGetIssuemp3List(); //要修改
+        downLoadList(issuemp3List, "issuemp3List");
+
+
+        //answermp3
+        List<QuestionInfoKtGet> answermp3List = questionInfoGetService.selectQuestionInfoKtGetAnswermp3List(); //要修改
+        downLoadList(answermp3List, "answermp3List");
+
+        //explainjsmp3
+        List<QuestionInfoKtGet> explainjsmp3List = questionInfoGetService.selectQuestionInfoKtGetExplainjsmp3List(); //要修改
+        downLoadList(explainjsmp3List, "explainjsmp3List");
+
+    }
+
+    public static void downLoadList(List<QuestionInfoKtGet> list, String listType) {
+
+        if ("explainGifList".equals(listType)) {
+
+            for (int i = 0; i < list.size(); i++) {
+                QuestionInfoKtGet questionInfoKtGet = list.get(i);
+                String mediaUrl = questionInfoKtGet.getExplainGif(); //要修改
+
+                int index = mediaUrl.lastIndexOf("/");
+                String fileName = mediaUrl.substring(index + 1);
+                System.out.println(mediaUrl + "," + fileName);
+                try {
+                    downLoadFromUrl(mediaUrl, fileName, "G:\\中正\\题库图\\kt20221009\\explain_gif"); //要修改
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+
+        } else if ("explainMp3List".equals(listType)) {
+
+            for (int i = 0; i < list.size(); i++) {
+                QuestionInfoKtGet questionInfoKtGet = list.get(i);
+                String mediaUrl = questionInfoKtGet.getExplainMp3(); //要修改
+
+                int index = mediaUrl.lastIndexOf("/");
+                String fileName = mediaUrl.substring(index + 1);
+                System.out.println(mediaUrl + "," + fileName);
+                try {
+                    downLoadFromUrl(mediaUrl, fileName, "G:\\中正\\题库图\\kt20221009\\explain_mp3"); //要修改
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+        } else if ("imageList".equals(listType)) {
+            for (int i = 0; i < list.size(); i++) {
+                QuestionInfoKtGet questionInfoKtGet = list.get(i);
+                String mediaUrl = questionInfoKtGet.getImage(); //要修改
+
+                int index = mediaUrl.lastIndexOf("/");
+                String fileName = mediaUrl.substring(index + 1);
+                System.out.println(mediaUrl + "," + fileName);
+                try {
+                    downLoadFromUrl(mediaUrl, fileName, "G:\\中正\\题库图\\kt20221009\\image"); //要修改
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+
+        } else if ("issuemp3List".equals(listType)) {
+            for (int i = 0; i < list.size(); i++) {
+                QuestionInfoKtGet questionInfoKtGet = list.get(i);
+                String mediaUrl = questionInfoKtGet.getIssuemp3(); //要修改
+
+                int index = mediaUrl.lastIndexOf("/");
+                String fileName = mediaUrl.substring(index + 1);
+                System.out.println(mediaUrl + "," + fileName);
+                try {
+                    downLoadFromUrl(mediaUrl, fileName, "G:\\中正\\题库图\\kt20221009\\issue_mp3"); //要修改
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        } else if ("answermp3List".equals(listType)) {
+
+            for (int i = 0; i < list.size(); i++) {
+                QuestionInfoKtGet questionInfoKtGet = list.get(i);
+                String mediaUrl = questionInfoKtGet.getAnswermp3(); //要修改
+
+                int index = mediaUrl.lastIndexOf("/");
+                String fileName = mediaUrl.substring(index + 1);
+                System.out.println(mediaUrl + "," + fileName);
+                try {
+                    downLoadFromUrl(mediaUrl, fileName, "G:\\中正\\题库图\\kt20221009\\answer_mp3"); //要修改
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+
+        } else if ("explainjsmp3List".equals(listType)) {
+            for (int i = 0; i < list.size(); i++) {
+                QuestionInfoKtGet questionInfoKtGet = list.get(i);
+                String mediaUrl = questionInfoKtGet.getExplainjsmp3(); //要修改
+
+                int index = mediaUrl.lastIndexOf("/");
+                String fileName = mediaUrl.substring(index + 1);
+                System.out.println(mediaUrl + "," + fileName);
+                try {
+                    downLoadFromUrl(mediaUrl, fileName, "G:\\中正\\题库图\\kt20221009\\explain_js_mp3");
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
             }
         }
 
 
     }
 
+
     public static void downLoadFromUrl(String urlStr, String fileName, String savePath) throws IOException {
         URL url = new URL(urlStr);
         HttpURLConnection conn = (HttpURLConnection) url.openConnection();

+ 2 - 3
zzjs-admin/src/test/java/com/miaxis/test/KTRename.java

@@ -27,9 +27,8 @@ public class KTRename {
     @Test
     public void testExcel() throws Exception {
 
-        String saveDir = "G:\\中正\\题库图\\kt\\1743_new";
-
-        File winDir = new File("G:\\中正\\题库图\\kt\\1743");
+        String saveDir = "G:\\中正\\题库图\\不要水印背景2";
+        File winDir = new File("G:\\中正\\题库图\\不要水印背景");
         File[] files = winDir.listFiles();
 
         for (int i = 0; i < files.length; i++) {

+ 153 - 0
zzjs-admin/src/test/java/com/miaxis/test/KTRename2.java

@@ -0,0 +1,153 @@
+package com.miaxis.test;
+
+
+import com.miaxis.ZzjsApplication;
+import com.miaxis.question.service.IQuestionInfoKtGetService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+
+@SpringBootTest(classes = ZzjsApplication.class)
+@RunWith(SpringRunner.class)
+public class KTRename2 {
+
+
+    @Autowired
+    private IQuestionInfoKtGetService questionInfoGetService;
+
+    @Test
+    public void testExcel() throws Exception {
+
+        String saveDir = "G:\\中正\\题库图\\5077-5505-new2";
+        File winDir = new File("G:\\中正\\题库图\\5077-5505");
+        File[] files = winDir.listFiles();
+
+        for (int i = 0; i < files.length; i++) {
+            System.out.println(files[i]);
+            InputStream is = new FileInputStream(files[i]);
+            String fileName = files[i].getName();
+            fileName.indexOf("image");
+            fileName.indexOf(".jpg");
+            String fileName2 = fileName.substring(fileName.lastIndexOf("image")+5,fileName.indexOf(".jpg"));
+            System.out.println("fileName2 = " + fileName2);
+            String fileName3 = fileName2.substring(0,2);
+            System.out.println("fileName3 = " + fileName3);
+            String fileName4 = fileName2.substring(2,4);
+            System.out.println("fileName4 = " + fileName4);
+
+            String fileName5 = null;
+            if("50".equals(fileName3)) {
+                fileName5="image"+"190"+fileName4+".jpg";
+            } else if ("51".equals(fileName3)){
+                fileName5="image"+"191"+fileName4+".jpg";
+            } else if ("52".equals(fileName3)) {
+                fileName5="image"+"192"+fileName4+".jpg";
+            } else if ("53".equals(fileName3)) {
+                fileName5="image"+"193"+fileName4+".jpg";
+            } else if ("54".equals(fileName3)) {
+                fileName5="image"+"194"+fileName4+".jpg";
+            } else if ("55".equals(fileName3)) {
+                fileName5="image"+"195"+fileName4+".jpg";
+            }
+            System.out.println("fileName5 = " + fileName5);
+
+            File file = new File(saveDir + File.separator + fileName5);
+
+            //获取自己数组
+            byte[] getData = readInputStream(is);
+            FileOutputStream fos = new FileOutputStream(file);
+            fos.write(getData);
+            if (fos != null) {
+                fos.close();
+            }
+            if (is != null) {
+                is.close();
+            }
+        }
+
+       // downLoadFromUrl(mediaUrl, fileName, "G:\\中正\\题库图\\kt\\explain_js_mp3"); //要修改
+
+    }
+
+    public static void downLoadFromUrl(String urlStr, String fileName, String savePath) throws IOException {
+        URL url = new URL(urlStr);
+        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+        //设置超时间为3秒
+        conn.setConnectTimeout(3 * 1000);
+        //防止屏蔽程序抓取而返回403错误
+        conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
+        //得到输入流
+        InputStream inputStream = conn.getInputStream();
+
+        //获取自己数组
+        byte[] getData = readInputStream(inputStream);
+
+        //文件保存位置
+        File saveDir = new File(savePath);
+        if (!saveDir.exists()) {
+            saveDir.mkdir();
+        }
+        int index = fileName.lastIndexOf(".");
+        String first = fileName.substring(0, index);
+        String lastName = fileName.substring(index);
+        System.out.println(fileName);
+        System.out.println(first);
+        first += lastName; //要修改
+        System.out.println(first);
+
+        File file = new File(saveDir + File.separator + first);
+
+        FileOutputStream fos = new FileOutputStream(file);
+
+        fos.write(getData);
+
+        if (fos != null) {
+            fos.close();
+        }
+        if (inputStream != null) {
+
+            inputStream.close();
+        }
+        System.out.println("info:" + url + " download success");
+    }
+
+
+    /**
+     * 从输入流中获取字节数组
+     *
+     * @param inputStream
+     * @return
+     * @throws IOException
+     */
+    public static byte[] readInputStream(InputStream inputStream) throws IOException {
+
+        byte[] buffer = new byte[1024];
+
+        int len = 0;
+
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        while ((len = inputStream.read(buffer)) != -1) {
+            bos.write(buffer, 0, len);
+        }
+        bos.close();
+
+        return bos.toByteArray();
+
+    }
+
+    public static void main(String[] args) throws Exception {
+
+        KTRename2 t = new KTRename2();
+        t.testExcel();
+
+    }
+
+
+}

+ 7 - 7
zzjs-admin/src/test/java/com/miaxis/test/KtTest.java

@@ -89,14 +89,14 @@ public class KtTest {
 
                     //查询当前是否数据是否存在
                     QuestionInfoKtGet questionInfoKtQuery = new QuestionInfoKtGet();
-                    questionInfoKtQuery.setIdKt(Long.parseLong(id2));
+   //                 questionInfoKtQuery.setIdKt(Long.parseLong(id2));
                     int count = questionInfoGetService.selectQuestionInfoKtGetCount(questionInfoKtQuery);
                     if(count==0) {
                         QuestionInfoKtGet questionInfoKt = new QuestionInfoKtGet();
-                        questionInfoKt.setIdKt(Long.parseLong(id2));
+       //                 questionInfoKt.setIdKt(Long.parseLong(id2));
                         questionInfoKt.setIdYdt(idYdt==null?null:Long.parseLong(idYdt));
-                        questionInfoKt.setNumber(Long.parseLong(number));
-                        questionInfoKt.setQuestionType(Long.parseLong(type));
+                        questionInfoKt.setNumber(number==null?null:Long.parseLong(number));
+                        questionInfoKt.setQuestionType(type==null?null:Long.parseLong(type));
                         questionInfoKt.setAnswer(answer);
                         questionInfoKt.setAnswerkeyword(answerkeyword);
                         questionInfoKt.setExplainGif(explainGif);
@@ -179,10 +179,10 @@ public class KtTest {
                         List<QuestionInfoKtGet> list=questionInfoGetService.selectQuestionInfoKtGetList(questionInfoKtQuery);
                         QuestionInfoKtGet questionInfoKtGet= list.get(0);
 
-                        questionInfoKtGet.setIdKt(Long.parseLong(id2));
+             //           questionInfoKtGet.setIdKt(Long.parseLong(id2));
                         questionInfoKtGet.setIdYdt(idYdt==null?null:Long.parseLong(idYdt));
-                        questionInfoKtGet.setNumber(Long.parseLong(number));
-                        questionInfoKtGet.setQuestionType(Long.parseLong(type));
+                        questionInfoKtGet.setNumber(number==null?null:Long.parseLong(number));
+                        questionInfoKtGet.setQuestionType(type==null?null:Long.parseLong(type));
                         questionInfoKtGet.setAnswer(answer);
                         questionInfoKtGet.setAnswerkeyword(answerkeyword);
                         questionInfoKtGet.setExplainGif(explainGif);

+ 618 - 0
zzjs-admin/src/test/java/com/miaxis/test/KtTest2.java

@@ -0,0 +1,618 @@
+package com.miaxis.test;
+
+import com.alibaba.fastjson.JSONArray;
+import com.alibaba.fastjson.JSONObject;
+import com.miaxis.ZzjsApplication;
+import com.miaxis.feign.service.IKtService;
+import com.miaxis.question.domain.QuestionFree;
+import com.miaxis.question.domain.QuestionInfoKtGet;
+import com.miaxis.question.service.IQuestionFreeService;
+import com.miaxis.question.service.IQuestionInfoKtGetService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+@SpringBootTest(classes = ZzjsApplication.class)
+@RunWith(SpringRunner.class)
+public class KtTest2 {
+
+
+    @Autowired
+    private IKtService ktService;
+
+    @Autowired
+    private IQuestionInfoKtGetService questionInfoGetService;
+
+    @Autowired
+    private IQuestionFreeService questionFreeService;
+
+    /**
+     * 获取一点通题库
+     */
+    @Test
+    public void test() {
+        QuestionInfoKtGet questionInfoKt = new QuestionInfoKtGet();
+        questionInfoKt.setNumber(150511l);
+        int count = questionInfoGetService.selectQuestionInfoKtGetCount(questionInfoKt);
+        System.out.println(count);
+
+    }
+
+    @Test
+    public void getInfo() {
+
+        List<Map<String, String>> mapList = this.getMap();
+        for (Map<String, String> m : mapList) {
+
+            String time = String.valueOf(System.currentTimeMillis() / 1000);
+            System.out.println(m.get("model") + "," + m.get("subject"));
+            String result = ktService.getInfo(m.get("model"), m.get("subject"), time);
+            JSONObject json = JSONObject.parseObject(result);
+            JSONArray data = json.getJSONArray("data");
+
+            for (int i = 0; i < data.size(); i++) {
+                JSONObject n1 = (JSONObject) data.get(i);
+                String countid = n1.getString("id");
+                String title = n1.getString("title");
+                String model = n1.getString("model");
+                String subject = n1.getString("subject");
+                System.out.println(countid + "," + title + "," + model);
+                String result2 = ktService.getQuestion(model, countid, title, subject, time);
+                JSONObject json2 = JSONObject.parseObject(result2);
+                JSONArray data2 = json2.getJSONArray("data");
+                List<QuestionInfoKtGet> addList = new ArrayList<QuestionInfoKtGet>();
+                List<QuestionInfoKtGet> upList = new ArrayList<QuestionInfoKtGet>();
+                for (int j = 0; j < data2.size(); j++) {
+                    JSONObject n2 = (JSONObject) data2.get(j);
+                    String id2 = n2.getString("id");    //快通ID
+                    String idYdt = n2.getString("idYdt");  //一点通ID
+                    String number = n2.getString("number");  //一点通ID
+                    String type = n2.getString("type"); // 1:判断题 2:选择题 3:多选题
+                    String answer = n2.getString("answer"); //答案
+                    String answerkeyword = n2.getString("answerkeyword");//答案关键词
+                    String explainGif = n2.getString("explainGif"); //技巧讲解图片URL
+                    String explainJq = n2.getString("explainJq");  //技巧讲解说明
+                    String explainJs = n2.getString("explainJs"); //官方解释
+                    String explainMp3 = n2.getString("explainMp3"); //技巧讲解语音URL
+                    String image = n2.getString("image");   //题目图片URL
+                    String imageYdt = n2.getString("imageYdt"); //题目图片URL2
+                    String issue = n2.getString("issue");  //题目
+                    String model2 = n2.getString("model"); //车型
+                    String opts = n2.getString("opts");    //答案选项
+                    String skillkeyword = n2.getString("skillkeyword");  //答题技巧关键词
+                    String subject2 = n2.getString("subject");   // 科目与分类
+                    String titlekeyword = n2.getString("titlekeyword");  // 题目关键词
+                    String issuemp3 = n2.getString("issuemp3");   //读题语音URL
+                    String answermp3 = n2.getString("answermp3");   //答案语音URL
+                    String explainjsmp3 = n2.getString("explainjsmp3"); //读题+答案语音URL
+
+                    //查询当前是否数据是否存在
+                    QuestionInfoKtGet questionInfoKtQuery = new QuestionInfoKtGet();
+                    questionInfoKtQuery.setId(Long.parseLong(id2));
+                    int count = questionInfoGetService.selectQuestionInfoKtGetCount(questionInfoKtQuery);  //快通ID查询是否存在
+                    if (count == 0) {
+                        QuestionInfoKtGet questionInfoKt = new QuestionInfoKtGet();
+                        questionInfoKt.setId(Long.parseLong(id2));
+                        questionInfoKt.setIdYdt(idYdt == null ? null : Long.parseLong(idYdt));
+                        questionInfoKt.setNumber(number == null ? null : Long.parseLong(number));
+                        questionInfoKt.setQuestionType(type == null ? null : Long.parseLong(type));
+                        questionInfoKt.setAnswer(answer);
+                        questionInfoKt.setAnswerkeyword(answerkeyword);
+                        questionInfoKt.setExplainGif(explainGif);
+                        questionInfoKt.setExplainJq(explainJq);
+                        questionInfoKt.setExplainJs(explainJs);
+                        questionInfoKt.setExplainMp3(explainMp3);
+                        questionInfoKt.setImage(image);
+                        questionInfoKt.setImageYdt(imageYdt);
+                        questionInfoKt.setIssue(issue);
+                        questionInfoKt.setOpts(opts);
+                        questionInfoKt.setSkillkeyword(skillkeyword);
+                        questionInfoKt.setTitlekeyword(titlekeyword);
+                        questionInfoKt.setIssuemp3(issuemp3);
+                        questionInfoKt.setAnswermp3(answermp3);
+                        questionInfoKt.setExplainjsmp3(explainjsmp3);
+
+                        if ("cart".equals(m.get("model"))) {  //小车
+                            questionInfoKt.setLiceCar("1");
+                        } else if ("bus".equals(m.get("model"))) { //客车
+                            questionInfoKt.setLiceBus("1");
+                        } else if ("truck".equals(m.get("model"))) { //货车
+                            questionInfoKt.setLiceTruck("1");
+                        } else if ("mtc".equals(m.get("model"))) {  //摩托车
+                            questionInfoKt.setLiceMoto("1");
+                        }
+
+                        if ("k1".equals(m.get("subject"))) {  //科目一   顺序练习
+                            questionInfoKt.setSubject(1l);
+                            questionInfoKt.setSequeIssue(countid);
+                            questionInfoKt.setSequeIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKt.setSequeSort(sort);
+                        } else if ("k1_2".equals(m.get("subject"))) { // 科目一 精选必考题
+                            questionInfoKt.setSubject(1l);
+                            questionInfoKt.setExcellIssue(countid);
+                            questionInfoKt.setExcellIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKt.setExcellSort(sort);
+                        } else if ("k1_3".equals(m.get("subject"))) { // 科目一 分类练习
+                            questionInfoKt.setSubject(1l);
+                            questionInfoKt.setClassIssue(countid);
+                            questionInfoKt.setClassIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKt.setClassSort(sort);
+                        } else if ("k1_4".equals(m.get("subject"))) { //科目一 地方题库
+                            questionInfoKt.setSubject(1l);
+                            questionInfoKt.setPlaceIssue(countid);
+                            questionInfoKt.setPlaceIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKt.setPlaceSort(sort);
+                        } else if ("k4".equals(m.get("subject"))) {  //科目四   顺序练习
+                            questionInfoKt.setSubject(4l);
+                            questionInfoKt.setSequeIssue(countid);
+                            questionInfoKt.setSequeIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKt.setSequeSort(sort);
+                        } else if ("k4_2".equals(m.get("subject"))) { // 科目四 精选必考题
+                            questionInfoKt.setSubject(4l);
+                            questionInfoKt.setExcellIssue(countid);
+                            questionInfoKt.setExcellIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKt.setExcellSort(sort);
+                        } else if ("k4_3".equals(m.get("subject"))) { // 科目四 分类练习
+                            questionInfoKt.setSubject(4l);
+                            questionInfoKt.setClassIssue(countid);
+                            questionInfoKt.setClassIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKt.setClassSort(sort);
+                        } else if ("k4_4".equals(m.get("subject"))) { //科目四 地方题库
+                            questionInfoKt.setSubject(4l);
+                            questionInfoKt.setPlaceIssue(countid);
+                            questionInfoKt.setPlaceIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKt.setPlaceSort(sort);
+                        }
+
+                        addList.add(questionInfoKt);
+                        // questionInfoGetService.save(questionInfoKt);
+                    } else {
+                        List<QuestionInfoKtGet> list = questionInfoGetService.selectQuestionInfoKtGetList(questionInfoKtQuery);
+                        QuestionInfoKtGet questionInfoKtGet = list.get(0);
+
+                        questionInfoKtGet.setId(Long.parseLong(id2));
+                        questionInfoKtGet.setIdYdt(idYdt == null ? null : Long.parseLong(idYdt));
+                        questionInfoKtGet.setNumber(number == null ? null : Long.parseLong(number));
+                        questionInfoKtGet.setQuestionType(type == null ? null : Long.parseLong(type));
+                        questionInfoKtGet.setAnswer(answer);
+                        questionInfoKtGet.setAnswerkeyword(answerkeyword);
+                        questionInfoKtGet.setExplainGif(explainGif);
+                        questionInfoKtGet.setExplainJq(explainJq);
+                        questionInfoKtGet.setExplainJs(explainJs);
+                        questionInfoKtGet.setExplainMp3(explainMp3);
+                        questionInfoKtGet.setImage(image);
+                        questionInfoKtGet.setImageYdt(imageYdt);
+                        questionInfoKtGet.setIssue(issue);
+                        questionInfoKtGet.setOpts(opts);
+                        questionInfoKtGet.setSkillkeyword(skillkeyword);
+                        questionInfoKtGet.setTitlekeyword(titlekeyword);
+                        questionInfoKtGet.setIssuemp3(issuemp3);
+                        questionInfoKtGet.setAnswermp3(answermp3);
+                        questionInfoKtGet.setExplainjsmp3(explainjsmp3);
+
+                        if ("cart".equals(m.get("model"))) {  //小车
+                            questionInfoKtGet.setLiceCar("1");
+                        } else if ("bus".equals(m.get("model"))) { //客车
+                            questionInfoKtGet.setLiceBus("1");
+                        } else if ("truck".equals(m.get("model"))) { //货车
+                            questionInfoKtGet.setLiceTruck("1");
+                        } else if ("mtc".equals(m.get("model"))) {  //摩托车
+                            questionInfoKtGet.setLiceMoto("1");
+                        }
+
+                        if ("k1".equals(m.get("subject"))) {  //科目一   顺序练习
+                            questionInfoKtGet.setSubject(1l);
+                            questionInfoKtGet.setSequeIssue(countid);
+                            questionInfoKtGet.setSequeIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKtGet.setSequeSort(sort);
+                        } else if ("k1_2".equals(m.get("subject"))) { // 科目一 精选必考题
+                            questionInfoKtGet.setSubject(1l);
+                            questionInfoKtGet.setExcellIssue(countid);
+                            questionInfoKtGet.setExcellIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKtGet.setExcellSort(sort);
+                        } else if ("k1_3".equals(m.get("subject"))) { // 科目一 分类练习
+                            questionInfoKtGet.setSubject(1l);
+                            questionInfoKtGet.setClassIssue(countid);
+                            questionInfoKtGet.setClassIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKtGet.setClassSort(sort);
+                        } else if ("k1_4".equals(m.get("subject"))) { //科目一 地方题库
+                            questionInfoKtGet.setSubject(1l);
+                            questionInfoKtGet.setPlaceIssue(countid);
+                            questionInfoKtGet.setPlaceIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKtGet.setPlaceSort(sort);
+                        } else if ("k4".equals(m.get("subject"))) {  //科目四   顺序练习
+                            questionInfoKtGet.setSubject(4l);
+                            questionInfoKtGet.setSequeIssue(countid);
+                            questionInfoKtGet.setSequeIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKtGet.setSequeSort(sort);
+                        } else if ("k4_2".equals(m.get("subject"))) { // 科目四 精选必考题
+                            questionInfoKtGet.setSubject(4l);
+                            questionInfoKtGet.setExcellIssue(countid);
+                            questionInfoKtGet.setExcellIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKtGet.setExcellSort(sort);
+                        } else if ("k4_3".equals(m.get("subject"))) { // 科目四 分类练习
+                            questionInfoKtGet.setSubject(4l);
+                            questionInfoKtGet.setClassIssue(countid);
+                            questionInfoKtGet.setClassIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKtGet.setClassSort(sort);
+                        } else if ("k4_4".equals(m.get("subject"))) { //科目四 地方题库
+                            questionInfoKtGet.setSubject(4l);
+                            questionInfoKtGet.setPlaceIssue(countid);
+                            questionInfoKtGet.setPlaceIssueName(title);
+                            long sort = j + 1;
+                            questionInfoKtGet.setPlaceSort(sort);
+                        }
+
+                        upList.add(questionInfoKtGet);
+                        //questionInfoGetService.updateById(questionInfoKtGet);
+                    }
+                }
+                questionInfoGetService.saveBatch(addList);
+                questionInfoGetService.updateBatchById(upList);
+            }
+
+        }
+
+    }
+
+
+    public List<Map<String, String>> getMap() {
+
+        //小车 科目一
+        Map<String, String> cart_k1 = new LinkedHashMap(); // k1:顺序练习
+        cart_k1.put("model", "cart");
+        cart_k1.put("subject", "k1");
+        Map<String, String> cart_k1_2 = new LinkedHashMap(); //  k1_2:精选必考题
+        cart_k1_2.put("model", "cart");
+        cart_k1_2.put("subject", "k1_2");
+        Map<String, String> cart_k1_3 = new LinkedHashMap(); //  k1_3:分类练习
+        cart_k1_3.put("model", "cart");
+        cart_k1_3.put("subject", "k1_3");
+        Map<String, String> cart_k1_4 = new LinkedHashMap(); //  k1_4:地方题库
+        cart_k1_4.put("model", "cart");
+        cart_k1_4.put("subject", "k1_4");
+
+        //客车 科目一
+        Map<String, String> bus_k1 = new LinkedHashMap(); // k1:顺序练习
+        bus_k1.put("model", "bus");
+        bus_k1.put("subject", "k1");
+        Map<String, String> bus_k1_2 = new LinkedHashMap(); //  k1_2:精选必考题
+        bus_k1_2.put("model", "bus");
+        bus_k1_2.put("subject", "k1_2");
+        Map<String, String> bus_k1_3 = new LinkedHashMap(); //  k1_3:分类练习
+        bus_k1_3.put("model", "bus");
+        bus_k1_3.put("subject", "k1_3");
+        Map<String, String> bus_k1_4 = new LinkedHashMap(); //  k1_4:地方题库
+        bus_k1_4.put("model", "bus");
+        bus_k1_4.put("subject", "k1_4");
+
+
+        //货车 科目一
+        Map<String, String> truck_k1 = new LinkedHashMap(); // k1:顺序练习
+        truck_k1.put("model", "truck");
+        truck_k1.put("subject", "k1");
+        Map<String, String> truck_k1_2 = new LinkedHashMap(); //  k1_2:精选必考题
+        truck_k1_2.put("model", "truck");
+        truck_k1_2.put("subject", "k1_2");
+        Map<String, String> truck_k1_3 = new LinkedHashMap(); //  k1_3:分类练习
+        truck_k1_3.put("model", "truck");
+        truck_k1_3.put("subject", "k1_3");
+        Map<String, String> truck_k1_4 = new LinkedHashMap(); //  k1_4:地方题库
+        truck_k1_4.put("model", "truck");
+        truck_k1_4.put("subject", "k1_4");
+
+        //摩托车 科目一
+        Map<String, String> mtc_k1 = new LinkedHashMap(); // k1:顺序练习
+        mtc_k1.put("model", "mtc");
+        mtc_k1.put("subject", "k1");
+        Map<String, String> mtc_k1_2 = new LinkedHashMap(); //  k1_2:精选必考题
+        mtc_k1_2.put("model", "mtc");
+        mtc_k1_2.put("subject", "k1_2");
+        Map<String, String> mtc_k1_3 = new LinkedHashMap(); //  k1_3:分类练习
+        mtc_k1_3.put("model", "mtc");
+        mtc_k1_3.put("subject", "k1_3");
+        Map<String, String> mtc_k1_4 = new LinkedHashMap(); //  k1_4:地方题库
+        mtc_k1_4.put("model", "mtc");
+        mtc_k1_4.put("subject", "k1_4");
+
+
+        //小车 科目四
+        Map<String, String> cart_k4 = new LinkedHashMap(); // k4:顺序练习
+        cart_k4.put("model", "cart");
+        cart_k4.put("subject", "k4");
+        Map<String, String> cart_k4_2 = new LinkedHashMap(); //  k4_2:精选必考题
+        cart_k4_2.put("model", "cart");
+        cart_k4_2.put("subject", "k4_2");
+        Map<String, String> cart_k4_3 = new LinkedHashMap(); //  k4_3:分类练习
+        cart_k4_3.put("model", "cart");
+        cart_k4_3.put("subject", "k4_3");
+        Map<String, String> cart_k4_4 = new LinkedHashMap(); //  k4_4:地方题库
+        cart_k4_4.put("model", "cart");
+        cart_k4_4.put("subject", "k4_4");
+
+        //客车 科目四
+        Map<String, String> bus_k4 = new LinkedHashMap(); // k4:顺序练习
+        bus_k4.put("model", "bus");
+        bus_k4.put("subject", "k4");
+        Map<String, String> bus_k4_2 = new LinkedHashMap(); //  k4_2:精选必考题
+        bus_k4_2.put("model", "bus");
+        bus_k4_2.put("subject", "k4_2");
+        Map<String, String> bus_k4_3 = new LinkedHashMap(); //  k4_3:分类练习
+        bus_k4_3.put("model", "bus");
+        bus_k4_3.put("subject", "k4_3");
+        Map<String, String> bus_k4_4 = new LinkedHashMap(); //  k4_4:地方题库
+        bus_k4_4.put("model", "bus");
+        bus_k4_4.put("subject", "k4_4");
+
+
+        //货车 科目四
+        Map<String, String> truck_k4 = new LinkedHashMap(); // k4:顺序练习
+        truck_k4.put("model", "truck");
+        truck_k4.put("subject", "k4");
+        Map<String, String> truck_k4_2 = new LinkedHashMap(); //  k4_2:精选必考题
+        truck_k4_2.put("model", "truck");
+        truck_k4_2.put("subject", "k4_2");
+        Map<String, String> truck_k4_3 = new LinkedHashMap(); //  k4_3:分类练习
+        truck_k4_3.put("model", "truck");
+        truck_k4_3.put("subject", "k4_3");
+        Map<String, String> truck_k4_4 = new LinkedHashMap(); //  k4_4:地方题库
+        truck_k4_4.put("model", "truck");
+        truck_k4_4.put("subject", "k4_4");
+
+        //摩托车 科目四
+        Map<String, String> mtc_k4 = new LinkedHashMap(); // k4:顺序练习
+        mtc_k4.put("model", "mtc");
+        mtc_k4.put("subject", "k4");
+        Map<String, String> mtc_k4_2 = new LinkedHashMap(); //  k4_2:精选必考题
+        mtc_k4_2.put("model", "mtc");
+        mtc_k4_2.put("subject", "k4_2");
+        Map<String, String> mtc_k4_3 = new LinkedHashMap(); //  k4_3:分类练习
+        mtc_k4_3.put("model", "mtc");
+        mtc_k4_3.put("subject", "k4_3");
+        Map<String, String> mtc_k4_4 = new LinkedHashMap(); //  k4_4:地方题库
+        mtc_k4_4.put("model", "mtc");
+        mtc_k4_4.put("subject", "k4_4");
+
+
+        List<Map<String, String>> mapList = new ArrayList<Map<String, String>>();
+        //小车 科目一
+        mapList.add(cart_k1);
+        mapList.add(cart_k1_2);
+        mapList.add(cart_k1_3);
+        mapList.add(cart_k1_4);
+        //客车 科目一
+        mapList.add(bus_k1);
+        mapList.add(bus_k1_2);
+        mapList.add(bus_k1_3);
+        mapList.add(bus_k1_4);
+        //货车 科目一
+        mapList.add(truck_k1);
+        mapList.add(truck_k1_2);
+        mapList.add(truck_k1_3);
+        mapList.add(truck_k1_4);
+        //摩托车 科目一
+        mapList.add(mtc_k1);
+        mapList.add(mtc_k1_2);
+        mapList.add(mtc_k1_3);
+        mapList.add(mtc_k1_4);
+
+        //小车 科目四
+        mapList.add(cart_k4);
+        mapList.add(cart_k4_2);
+        mapList.add(cart_k4_3);
+        mapList.add(cart_k4_4);
+        //客车 科目四
+        mapList.add(bus_k4);
+        mapList.add(bus_k4_2);
+        mapList.add(bus_k4_3);
+        mapList.add(bus_k4_4);
+        //货车 科目四
+        mapList.add(truck_k4);
+        mapList.add(truck_k4_2);
+        mapList.add(truck_k4_3);
+        mapList.add(truck_k4_4);
+        //摩托车 科目四
+        mapList.add(mtc_k4);
+        mapList.add(mtc_k4_2);
+        mapList.add(mtc_k4_3);
+        mapList.add(mtc_k4_4);
+
+        return mapList;
+    }
+
+
+    public List<Map<String, String>> get4Map() {
+
+        //小车 科目四
+        Map<String, String> cart_k4 = new LinkedHashMap(); // k4:顺序练习
+        cart_k4.put("model", "cart");
+        cart_k4.put("subject", "k4");
+        Map<String, String> cart_k4_2 = new LinkedHashMap(); //  k4_2:精选必考题
+        cart_k4_2.put("model", "cart");
+        cart_k4_2.put("subject", "k4_2");
+        Map<String, String> cart_k4_3 = new LinkedHashMap(); //  k4_3:分类练习
+        cart_k4_3.put("model", "cart");
+        cart_k4_3.put("subject", "k4_3");
+        Map<String, String> cart_k4_4 = new LinkedHashMap(); //  k4_4:地方题库
+        cart_k4_4.put("model", "cart");
+        cart_k4_4.put("subject", "k4_4");
+
+        //客车 科目四
+        Map<String, String> bus_k4 = new LinkedHashMap(); // k4:顺序练习
+        bus_k4.put("model", "bus");
+        bus_k4.put("subject", "k4");
+        Map<String, String> bus_k4_2 = new LinkedHashMap(); //  k4_2:精选必考题
+        bus_k4_2.put("model", "bus");
+        bus_k4_2.put("subject", "k4_2");
+        Map<String, String> bus_k4_3 = new LinkedHashMap(); //  k4_3:分类练习
+        bus_k4_3.put("model", "bus");
+        bus_k4_3.put("subject", "k4_3");
+        Map<String, String> bus_k4_4 = new LinkedHashMap(); //  k4_4:地方题库
+        bus_k4_4.put("model", "bus");
+        bus_k4_4.put("subject", "k4_4");
+
+
+        //货车 科目四
+        Map<String, String> truck_k4 = new LinkedHashMap(); // k4:顺序练习
+        truck_k4.put("model", "truck");
+        truck_k4.put("subject", "k4");
+        Map<String, String> truck_k4_2 = new LinkedHashMap(); //  k4_2:精选必考题
+        truck_k4_2.put("model", "truck");
+        truck_k4_2.put("subject", "k4_2");
+        Map<String, String> truck_k4_3 = new LinkedHashMap(); //  k4_3:分类练习
+        truck_k4_3.put("model", "truck");
+        truck_k4_3.put("subject", "k4_3");
+        Map<String, String> truck_k4_4 = new LinkedHashMap(); //  k4_4:地方题库
+        truck_k4_4.put("model", "truck");
+        truck_k4_4.put("subject", "k4_4");
+
+        //摩托车 科目四
+        Map<String, String> mtc_k4 = new LinkedHashMap(); // k4:顺序练习
+        mtc_k4.put("model", "mtc");
+        mtc_k4.put("subject", "k4");
+        Map<String, String> mtc_k4_2 = new LinkedHashMap(); //  k4_2:精选必考题
+        mtc_k4_2.put("model", "mtc");
+        mtc_k4_2.put("subject", "k4_2");
+        Map<String, String> mtc_k4_3 = new LinkedHashMap(); //  k4_3:分类练习
+        mtc_k4_3.put("model", "mtc");
+        mtc_k4_3.put("subject", "k4_3");
+        Map<String, String> mtc_k4_4 = new LinkedHashMap(); //  k4_4:地方题库
+        mtc_k4_4.put("model", "mtc");
+        mtc_k4_4.put("subject", "k4_4");
+
+
+        List<Map<String, String>> mapList = new ArrayList<Map<String, String>>();
+        //小车 科目四
+        mapList.add(cart_k4);
+        mapList.add(cart_k4_2);
+        mapList.add(cart_k4_3);
+        mapList.add(cart_k4_4);
+        //客车 科目四
+        mapList.add(bus_k4);
+        mapList.add(bus_k4_2);
+        mapList.add(bus_k4_3);
+        mapList.add(bus_k4_4);
+        //货车 科目四
+        mapList.add(truck_k4);
+        mapList.add(truck_k4_2);
+        mapList.add(truck_k4_3);
+        mapList.add(truck_k4_4);
+        //摩托车 科目四
+        mapList.add(mtc_k4);
+        mapList.add(mtc_k4_2);
+        mapList.add(mtc_k4_3);
+        mapList.add(mtc_k4_4);
+
+        return mapList;
+    }
+
+
+    @Test
+    public void getFree() {
+        String time = String.valueOf(System.currentTimeMillis() / 1000);
+
+
+        String result2 = ktService.getFreeQuestions("", "k4", time);
+        JSONObject json2 = JSONObject.parseObject(result2);
+        JSONArray data2 = json2.getJSONArray("data");
+        List<QuestionInfoKtGet> upList = new ArrayList<QuestionInfoKtGet>();
+        for (int j = 0; j < data2.size(); j++) {
+            JSONObject n2 = (JSONObject) data2.get(j);
+            String id2 = n2.getString("id");    //快通ID
+            String idYdt = n2.getString("idYdt");  //一点通ID
+            String issue = n2.getString("issue");  //题目
+            //查询当前是否数据是否存在
+            QuestionInfoKtGet questionInfoKtQuery = new QuestionInfoKtGet();
+
+            questionInfoKtQuery.setIdYdt(idYdt!=null?Long.parseLong(idYdt):0l);
+            int count = questionInfoGetService.selectQuestionInfoKtGetCount(questionInfoKtQuery);  //快通ID查询是否存在
+            if(idYdt==null){
+                System.out.println(issue);
+                System.out.println(j+1);
+            }
+            if (count == 0) {
+                continue;
+            } else {
+                List<QuestionInfoKtGet> list = questionInfoGetService.selectQuestionInfoKtGetList(questionInfoKtQuery);
+                QuestionInfoKtGet questionInfoKtGet = list.get(0);
+                questionInfoKtGet.setIsFree(1l);
+               long sort = j + 1;
+                questionInfoKtGet.setFreeSort(sort);
+               upList.add(questionInfoKtGet);
+            }
+        }
+       questionInfoGetService.updateBatchById(upList);
+    }
+
+
+    @Test
+    public void getFree2() {
+        String time = String.valueOf(System.currentTimeMillis() / 1000);
+        String km = "k4";
+
+        String result2 = ktService.getFreeQuestions("", km, time);
+        JSONObject json2 = JSONObject.parseObject(result2);
+        JSONArray data2 = json2.getJSONArray("data");
+        List<QuestionFree> addList = new ArrayList<QuestionFree>();
+        for (int j = 0; j < data2.size(); j++) {
+            JSONObject n2 = (JSONObject) data2.get(j);
+            String id2 = n2.getString("id");    //快通ID
+            String idYdt = n2.getString("idYdt");  //一点通ID
+            String issue = n2.getString("issue");  //题目
+            //查询当前是否数据是否存在
+            QuestionInfoKtGet questionInfoKtQuery = new QuestionInfoKtGet();
+
+            questionInfoKtQuery.setIdYdt(idYdt!=null?Long.parseLong(idYdt):0l);
+            int count = questionInfoGetService.selectQuestionInfoKtGetCount(questionInfoKtQuery);  //快通ID查询是否存在
+            if(idYdt==null){
+                System.out.println(issue);
+                System.out.println(j+1);
+            }
+            if (count == 0) {
+                continue;
+            } else {
+                List<QuestionInfoKtGet> list = questionInfoGetService.selectQuestionInfoKtGetList(questionInfoKtQuery);
+                QuestionInfoKtGet questionInfoKtGet = list.get(0);
+                long sort = j + 1;
+                QuestionFree questionFree = new QuestionFree();
+                questionFree.setId(questionInfoKtGet.getId());
+                questionFree.setIdYdt(questionInfoKtGet.getIdYdt());
+                if("k4".equals(km)) {
+                    questionFree.setSubject(4);
+                } else if ("k1".equals(km)){
+                    questionFree.setSubject(1);
+                }
+                questionFree.setFreeSort(sort);
+
+                addList.add(questionFree);
+            }
+        }
+        questionFreeService.saveBatch(addList);
+    }
+
+}
+
+
+

+ 3 - 5
zzjs-admin/src/test/java/com/miaxis/test/Test03.java

@@ -14,7 +14,7 @@ public class Test03 {
 
     public void testExcel() throws Exception {
 
-        File file = new File("G:\\中正\\题库图\\一点通题库图片.xls");
+        File file = new File("G:\\中正\\题库图\\一点通题资格证库图片20220707.xls");
         InputStream inputStream = new FileInputStream(file);
         ExcelUtil<Test> util = new ExcelUtil<Test>(Test.class);
         List<Test> testList = util.importExcel(inputStream);
@@ -26,7 +26,7 @@ public class Test03 {
                 int index = t.mediaUrl.lastIndexOf("/");
                 String fileName = t.mediaUrl.substring(index+1);
              //   System.out.println(t.mediaUrl+","+fileName);
-                downLoadFromUrl(t.mediaUrl,fileName,"G:\\中正\\题库图\\media2");
+                downLoadFromUrl(t.mediaUrl,fileName,"G:\\中正\\题库图\\zgz20220707");
 
             }
 
@@ -55,10 +55,8 @@ public class Test03 {
         int index = fileName.lastIndexOf(".");
         String first = fileName.substring(0,index);
         System.out.println(fileName);
-        System.out.println(first);
-        first+=".jpg";
 
-        File file = new File(saveDir+File.separator+first);
+        File file = new File(saveDir+File.separator+fileName);
 
         FileOutputStream fos = new FileOutputStream(file);
 

+ 26 - 0
zzjs-admin/src/test/java/com/miaxis/test/Test04.java

@@ -0,0 +1,26 @@
+package com.miaxis.test;
+
+import java.util.Random;
+
+public class Test04 {
+
+
+    public static void main(String[] args) {
+        int x = 1;
+
+        while (true) {
+
+
+            for (int i = 0; i < 10; i++) {
+                if(i/2==0) {
+                    System.out.println(i);
+                    continue;
+                } else {
+                    System.out.println(i);
+                }
+            }
+
+        }
+    }
+
+}

+ 303 - 0
zzjs-admin/src/test/java/com/miaxis/test/TestRule.java

@@ -0,0 +1,303 @@
+package com.miaxis.test;
+
+import com.miaxis.ZzjsApplication;
+import com.miaxis.question.domain.QuestionInfo;
+import com.miaxis.question.domain.TAppExamRule;
+import com.miaxis.question.dto.QuestionInfoTestDTO;
+import com.miaxis.question.service.IQuestionInfoService;
+import com.miaxis.question.service.ITAppExamRuleService;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+import java.sql.Array;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+@SpringBootTest(classes = ZzjsApplication.class)
+@RunWith(SpringRunner.class)
+public class TestRule {
+
+
+    @Autowired
+    private ITAppExamRuleService appExamRuleService;
+
+    @Autowired
+    private IQuestionInfoService questionInfoService;
+
+    @Test
+    public void test() throws Exception {
+
+        //全题库
+        List<QuestionInfo> allList = new ArrayList<QuestionInfo>();
+        //选择
+        List<QuestionInfo> judgeList = new ArrayList<QuestionInfo>();
+        //判断题
+        List<QuestionInfo> choiceList = new ArrayList<QuestionInfo>();
+        //简单题
+        List<Integer> easyDegree = new ArrayList<Integer>();
+        easyDegree.add(1);
+        easyDegree.add(2);
+        easyDegree.add(3);
+        //难题
+        List<Integer> diffDegree = new ArrayList<Integer>();
+        diffDegree.add(4);
+        diffDegree.add(5);
+        //科目一通用
+        TAppExamRule tAppExamRule = new TAppExamRule();
+        tAppExamRule.setKemu(1);
+        tAppExamRule.setGs("xc");
+        tAppExamRule.setAreacode(0);
+
+        List<TAppExamRule> list = appExamRuleService.selectTAppExamRuleList(tAppExamRule);
+        int total = 0;
+        for (int i = 0; i < list.size(); i++) {
+            TAppExamRule er = list.get(i);
+            int easyJudge = er.getJudgeCount();
+            int easyChoice = er.getChoiceCount();
+
+            Random random = new Random();
+            int d = 0; //单选题
+            int p = 0; //判断题
+            for (int j = 0; j < er.getDifficultCount(); j++) {
+                if (random.nextInt(10) >= 5) {   //单选题
+                    if (easyJudge - 1 < 0) {
+                        j--;
+                    } else {
+                        d++;
+                        easyJudge--;
+                    }
+                } else {  //判断题
+                    if (easyChoice - 1 < 0) {
+                        j--;
+                    } else {
+                        p++;
+                        easyChoice--;
+                    }
+                }
+            }
+
+            System.out.println("简单判断:" + easyJudge);
+            System.out.println("简单选择:" + easyChoice);
+            System.out.println("难题判断:" + p);
+            System.out.println("难题选择:" + d);
+            total += easyJudge + easyChoice + p + d;
+            System.out.println("---------------------------------------------");
+
+
+            //判断简单
+            QuestionInfoTestDTO qt = new QuestionInfoTestDTO();
+            qt.setChapterId(er.getChapterId()); //章节ID
+            qt.setDiffDegree(easyDegree);       //简单难度
+            qt.setQuestionType(1);              //判断题
+            qt.setLiceCar("1");                 //车型
+            qt.setNum(easyJudge);               //题数
+            List<QuestionInfo> easyJudgeList = questionInfoService.selectTestQuestionInfoList(qt);
+
+            //单选简单
+            qt.setChapterId(er.getChapterId()); //章节ID
+            qt.setDiffDegree(easyDegree);       //简单难度
+            qt.setQuestionType(2);              //判断题
+            qt.setLiceCar("1");                 //车型
+            qt.setNum(easyChoice);              //题数
+            List<QuestionInfo> easyChoiceList = questionInfoService.selectTestQuestionInfoList(qt);
+
+
+            //判断难题
+            qt.setChapterId(er.getChapterId()); //章节ID
+            qt.setDiffDegree(diffDegree);       //高难度
+            qt.setQuestionType(1);              //判断题
+            qt.setLiceCar("1");                 //车型
+            qt.setNum(p);                       //题数
+            List<QuestionInfo> diffJudgeList = questionInfoService.selectTestQuestionInfoList(qt);
+
+
+            //单选难题
+            qt.setChapterId(er.getChapterId()); //章节ID
+            qt.setDiffDegree(diffDegree);       //高难度
+            qt.setQuestionType(1);              //判断题
+            qt.setLiceCar("1");                 //车型
+            qt.setNum(d);                       //题数
+            List<QuestionInfo> diffChoiceList = questionInfoService.selectTestQuestionInfoList(qt);
+
+
+            judgeList.addAll(easyJudgeList);
+            judgeList.addAll(diffJudgeList);
+            choiceList.addAll(easyChoiceList);
+            choiceList.addAll(diffChoiceList);
+        }
+
+        allList.addAll(judgeList);
+        allList.addAll(choiceList);
+        System.out.println("judgeList:" + judgeList.size());
+        System.out.println("choiceList:" + choiceList.size());
+        System.out.println("allList:" + allList.size());
+
+
+    }
+
+
+    @Test
+    public void test2() throws Exception {
+        //全题库
+        List<QuestionInfo> allList = new ArrayList<QuestionInfo>();
+        int error = 0;
+        while (allList.size()!=50 && error<10) {
+            System.out.println("error:"+error);
+            allList = new ArrayList<QuestionInfo>();
+            //判断题
+            List<QuestionInfo> judgeList = new ArrayList<QuestionInfo>();
+            //选择题
+            List<QuestionInfo> choiceList = new ArrayList<QuestionInfo>();
+            //多选题
+            List<QuestionInfo> multipleList = new ArrayList<QuestionInfo>();
+
+            //简单题
+            List<Integer> easyDegree = new ArrayList<Integer>();
+            easyDegree.add(1);
+            easyDegree.add(2);
+            easyDegree.add(3);
+            //难题
+            List<Integer> diffDegree = new ArrayList<Integer>();
+            diffDegree.add(4);
+            diffDegree.add(5);
+            //科目一通用
+            TAppExamRule tAppExamRule = new TAppExamRule();
+            tAppExamRule.setKemu(4);
+            tAppExamRule.setGs("hc");
+            tAppExamRule.setAreacode(0);
+
+            List<TAppExamRule> list = appExamRuleService.selectTAppExamRuleList(tAppExamRule);
+            int total = 0;
+            for (int i = 0; i < list.size(); i++) {
+                TAppExamRule er = list.get(i);
+                int easyJudge = er.getJudgeCount();
+                int easyChoice = er.getChoiceCount();
+                int easyMultiple = er.getMultipleChoiceCount();
+                int x = i + 1;
+                System.out.println("第" + x + "轮easyJudge:" + easyJudge);
+
+                Random random = new Random();
+                int p = 0; //判断题
+                int d = 0; //单选题
+                int m = 0; //多选题
+                for (int j = 0; j < er.getDifficultCount(); j++) {
+                    if (random.nextInt(9) <= 2) {   //判断题
+                        if (easyJudge - 1 < 0) {
+                            j--;
+                        } else {
+                            p++;
+                            easyJudge--;
+                        }
+                    } else if (random.nextInt(9) <= 5) {  //单选题
+                        if (easyChoice - 1 < 0) {
+                            j--;
+                        } else {
+                            d++;
+                            easyChoice--;
+                        }
+                    } else if (random.nextInt(9) <= 8) {    //多选题
+                        if (easyMultiple - 1 < 0) {
+                            j--;
+                        } else {
+                            m++;
+                            easyMultiple--;
+                        }
+                    }
+                }
+
+
+                System.out.println("简单判断:" + easyJudge);
+                System.out.println("简单选择:" + easyChoice);
+                System.out.println("简单多选:" + easyMultiple);
+                System.out.println("难题判断:" + p);
+                System.out.println("难题选择:" + d);
+                System.out.println("难题多择:" + m);
+                total += easyJudge + easyChoice + easyMultiple + p + d + m;
+                System.out.println("---------------------------------------------");
+
+
+                //判断简单
+                QuestionInfoTestDTO qt = new QuestionInfoTestDTO();
+                qt.setChapterId(er.getChapterId()); //章节ID
+                qt.setDiffDegree(easyDegree);       //简单难度
+                qt.setQuestionType(1);              //判断题
+                qt.setLiceTruck("1");                 //车型
+                qt.setNum(easyJudge);               //题数
+                List<QuestionInfo> easyJudgeList = questionInfoService.selectTestQuestionInfoList(qt);
+                //单选简单
+                qt.setChapterId(er.getChapterId()); //章节ID
+                qt.setDiffDegree(easyDegree);       //简单难度
+                qt.setQuestionType(2);              //判断题
+                qt.setNum(easyChoice);              //题数
+                List<QuestionInfo> easyChoiceList = questionInfoService.selectTestQuestionInfoList(qt);
+                //多选简单
+                qt.setChapterId(er.getChapterId()); //章节ID
+                qt.setDiffDegree(easyDegree);       //简单难度
+                qt.setQuestionType(3);              //判断题
+                qt.setNum(easyMultiple);              //题数
+                List<QuestionInfo> easyMultipleList = questionInfoService.selectTestQuestionInfoList(qt);
+
+                //判断难题
+                qt.setChapterId(er.getChapterId()); //章节ID
+                qt.setDiffDegree(diffDegree);       //高难度
+                qt.setQuestionType(1);              //判断题
+                qt.setNum(p);                       //题数
+                List<QuestionInfo> diffJudgeList = questionInfoService.selectTestQuestionInfoList(qt);
+                if(p!=diffJudgeList.size()){
+                    System.out.println("p!=diffJudgeList.size()");
+                    error++;
+                    break;
+                }
+
+                //单选难题
+                qt.setChapterId(er.getChapterId()); //章节ID
+                qt.setDiffDegree(diffDegree);       //高难度
+                qt.setQuestionType(2);              //判断题
+                qt.setNum(d);                       //题数
+                List<QuestionInfo> diffChoiceList = questionInfoService.selectTestQuestionInfoList(qt);
+                if(d!=diffChoiceList.size()){
+                    System.out.println("d!=diffChoiceList.size()");
+                    error++;
+                    break;
+                }
+                //多选简单
+                qt.setChapterId(er.getChapterId()); //章节ID
+                qt.setDiffDegree(diffDegree);       //高难度
+                qt.setQuestionType(3);              //判断题
+                qt.setNum(m);                       //题数
+                List<QuestionInfo> diffMultipleList = questionInfoService.selectTestQuestionInfoList(qt);
+                if(m!=diffMultipleList.size()){
+                    System.out.println("m!=diffMultipleList.size()");
+                    error++;
+                    break;
+                }
+
+                judgeList.addAll(easyJudgeList);
+                judgeList.addAll(diffJudgeList);
+                int judge = easyJudgeList.size() + diffJudgeList.size();
+                System.out.println("第" + x + "轮:" + judge);
+
+                choiceList.addAll(easyChoiceList);
+                choiceList.addAll(diffChoiceList);
+                multipleList.addAll(easyMultipleList);
+                multipleList.addAll(diffMultipleList);
+
+
+            }
+
+            allList.addAll(judgeList);
+            allList.addAll(choiceList);
+            allList.addAll(multipleList);
+            System.out.println("error:"+error);
+            System.out.println("allList:" + allList.size());
+        }
+
+
+    }
+
+
+}

+ 205 - 8
zzjs-admin/src/test/java/com/miaxis/test/YdtTest.java

@@ -3,15 +3,25 @@ package com.miaxis.test;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.miaxis.ZzjsApplication;
+import com.miaxis.feign.dto.Ydt;
 import com.miaxis.feign.service.IYdtService;
 import com.miaxis.question.domain.QuestionInfoGet;
+import com.miaxis.question.domain.QuestionYdtJs;
+import com.miaxis.question.domain.WebNoteAll;
 import com.miaxis.question.service.IQuestionInfoGetService;
+import com.miaxis.question.service.IQuestionYdtJsService;
+import com.miaxis.question.service.IWebNoteAllService;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.test.context.SpringBootTest;
 import org.springframework.test.context.junit4.SpringRunner;
 
+import java.io.*;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.List;
+
 @SpringBootTest(classes = ZzjsApplication.class)
 @RunWith(SpringRunner.class)
 public class YdtTest {
@@ -23,26 +33,34 @@ public class YdtTest {
     @Autowired
     private IQuestionInfoGetService questionInfoGetService;
 
+
+    @Autowired
+    private IQuestionYdtJsService questionYdtJsService;
+
+    @Autowired
+    private IWebNoteAllService webNoteAllService;
+
+
     /**
      * 获取一点通题库
      */
     @Test
-    public void getInfo(){
+    public void getInfo() {
         Long kemu = 1l;
         String cartype = "3"; //0:小车(313) 1:货车(325) 2:客车(328) 3:摩托车(40)
 
-        String result = ydtService.getInfo(kemu,cartype);
+        String result = ydtService.getInfo(kemu, cartype);
         JSONObject json = JSONObject.parseObject(result);
         JSONObject result2 = json.getJSONObject("result");
         JSONArray questionList = result2.getJSONArray("questionList");
 
         for (int i = 0; i < questionList.size(); i++) {
-            JSONObject json1 = (JSONObject)questionList.get(i);
+            JSONObject json1 = (JSONObject) questionList.get(i);
             String id = json1.getString("id");
             String name = json1.getString("name");
             String rightAnswer = json1.getString("rightAnswer");
             String image = json1.getString("image");
-            if("".equals(image)){
+            if ("".equals(image)) {
                 image = null;
             }
             String explain = json1.getString("explain");
@@ -51,11 +69,11 @@ public class YdtTest {
 
             JSONArray option = json1.getJSONArray("option");
             QuestionInfoGet questionInfoGet = new QuestionInfoGet();
-            for (int j = 0; j <option.size() ; j++) {
-                JSONObject json2 = (JSONObject)option.get(j);
+            for (int j = 0; j < option.size(); j++) {
+                JSONObject json2 = (JSONObject) option.get(j);
                 String oid = json2.getString("id");
                 String oname = json2.getString("name");
-                if("A".equals(oid)) {
+                if ("A".equals(oid)) {
                     questionInfoGet.setAn1(oname);
                 } else if ("B".equals(oid)) {
                     questionInfoGet.setAn2(oname);
@@ -87,7 +105,186 @@ public class YdtTest {
     }
 
 
-    
+    @Test
+    public void getSkillInfo() {
+
+        List<WebNoteAll> list = webNoteAllService.selectWebNoteAllList(null);
+        System.out.println(list.size());
+
+        for (int i = 0; i < list.size(); i++) {
+            WebNoteAll webNoteAll = list.get(i);
+            Ydt ydt = new Ydt();
+            ydt.setNonceStr("0E1EE833-16AE-4BBE-A3ED-5697E3FC21FF");
+            ydt.setQuestionId(String.valueOf(webNoteAll.getId()));
+            //String str = "{\"nonceStr\":\"0E1EE833-16AE-4BBE-A3ED-5697E3FC21FF\",\"questionId\":\"13581\"}";
+
+            String jsonObject = JSONObject.toJSONString(ydt);
+            System.out.println(jsonObject);
+            String result = ydtService.getSkillInfo(jsonObject);
+            JSONObject json = JSONObject.parseObject(result);
+
+
+            System.out.println(result);
+
+            JSONObject data = json.getJSONObject("result");
+
+            JSONObject skillEntity = data.getJSONObject("skillEntity");
+            String kemn = skillEntity.getString("kemu");
+            if (!"0".equals(kemn) && !"2".equals(kemn)) {
+                String qbAnalyse = skillEntity.getString("qbAnalyse");
+                JSONArray qbAnswers = skillEntity.getJSONArray("qbAnswers");
+                String qbContent = skillEntity.getString("qbContent");
+                String qbReadAnalyse = skillEntity.getString("qbReadAnalyse");
+                String qbSkillpicture = skillEntity.getString("qbSkillpicture");
+                String questionIds = skillEntity.getString("questionIds");
+                String shortVideoDuration = skillEntity.getString("shortVideoDuration");
+                String shortVideoImage = skillEntity.getString("shortVideoImage");
+                String shortVideoSize = skillEntity.getString("shortVideoSize");
+                String shortVideoUrl = skillEntity.getString("shortVideoUrl");
+
+                String ydtAnalyse = skillEntity.getString("ydtAnalyse");
+                String ydtVideo = skillEntity.getString("ydtVideo");
+                String ydtVideoLen = skillEntity.getString("ydtVideoLen");
+                String ydtVideoPic = skillEntity.getString("ydtVideoPic");
+                String ydtVideoSize = skillEntity.getString("ydtVideoSize");
+
+
+                QuestionYdtJs questionYdtJs = new QuestionYdtJs();
+                questionYdtJs.setId(Long.parseLong(questionIds));
+                questionYdtJs.setKemu(kemn);
+                questionYdtJs.setQbAnalyse(qbAnalyse);
+                questionYdtJs.setQbContent(qbContent);
+                questionYdtJs.setQbReadAnalyse(qbReadAnalyse);
+                questionYdtJs.setQbSkillPicture(qbSkillpicture);
+                questionYdtJs.setQuestionids(questionIds);
+                questionYdtJs.setShortVideoDuration(shortVideoDuration);
+                questionYdtJs.setShortVideoImage(shortVideoImage);
+                questionYdtJs.setShortVideoSize(shortVideoSize);
+                questionYdtJs.setShortVideoUrl(shortVideoUrl);
+
+                questionYdtJs.setYdtAnalyse(ydtAnalyse);
+                questionYdtJs.setYdtVideo(ydtVideo);
+                questionYdtJs.setYdtVideoLen(ydtVideoLen);
+                questionYdtJs.setYdtVideoPic(ydtVideoPic);
+                questionYdtJs.setYdtVideoSize(ydtVideoSize);
+
+
+
+
+
+                String answers = "";
+                if(qbAnswers!=null) {
+                    for (int j = 0; j < qbAnswers.size(); j++) {
+                        String answer = qbAnswers.getString(j);
+                        if (j == 0) {
+                            answers = answer;
+                        } else {
+                            answers = "," + answer;
+                        }
+                    }
+                }
+                questionYdtJs.setQbAnswers(answers);
+                questionYdtJsService.saveOrUpdate(questionYdtJs);
+            }
+        }
+
+
+    }
+
+
+
+    @Test
+    public void getShortVideo() throws IOException {
+
+        String savePath = "G:\\中正\\一点通\\题库短视频";
+        List<QuestionYdtJs> list = questionYdtJsService.selectQuestionYdtJsList2(null);
 
+        for (int i = 0; i < list.size(); i++) {
+            QuestionYdtJs questionYdtJs = list.get(i);
+            Long id = questionYdtJs.getId();
+            String shortUrl= questionYdtJs.getShortVideoUrl();
+            int index2 = shortUrl.lastIndexOf(".");
+            String lastName = shortUrl.substring(index2);
+            String fileName = id+lastName;
+            System.out.println(fileName);
+            downLoadFromUrl(shortUrl,fileName,savePath);
+
+        }
+
+
+    }
+
+    public static void downLoadFromUrl(String urlStr, String fileName, String savePath) throws IOException {
+        URL url = new URL(urlStr);
+        HttpURLConnection conn = (HttpURLConnection) url.openConnection();
+        //设置超时间为3秒
+        conn.setConnectTimeout(3 * 1000);
+        //防止屏蔽程序抓取而返回403错误
+        conn.setRequestProperty("User-Agent", "Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)");
+        //得到输入流
+        InputStream inputStream = conn.getInputStream();
+
+        //获取自己数组
+        byte[] getData = readInputStream(inputStream);
+
+        //文件保存位置
+        File saveDir = new File(savePath);
+        if (!saveDir.exists()) {
+            saveDir.mkdir();
+        }
+
+        File file = new File(saveDir + File.separator + fileName);
+
+        FileOutputStream fos = new FileOutputStream(file);
+
+        fos.write(getData);
+
+        if (fos != null) {
+            fos.close();
+        }
+        if (inputStream != null) {
+
+            inputStream.close();
+        }
+        System.out.println("info:" + url + " download success");
+    }
+
+    /**
+     * 从输入流中获取字节数组
+     *
+     * @param inputStream
+     * @return
+     * @throws IOException
+     */
+    public static byte[] readInputStream(InputStream inputStream) throws IOException {
+
+        byte[] buffer = new byte[1024];
+
+        int len = 0;
+
+        ByteArrayOutputStream bos = new ByteArrayOutputStream();
+        while ((len = inputStream.read(buffer)) != -1) {
+            bos.write(buffer, 0, len);
+        }
+        bos.close();
+
+        return bos.toByteArray();
+
+    }
+
+    public static void main(String[] args) {
+        String mediaUrl = "https://wos.58cdn.com.cn/XyVuTsRqXyf/videos/c3307880da594dffa1603c6820ca802a.mp4";
+        int index = mediaUrl.lastIndexOf("/");
+        String fileName = mediaUrl.substring(index + 1);
+        int index2 = mediaUrl.lastIndexOf(".");
+        String lastName = mediaUrl.substring(index2);
+
+
+        System.out.println(fileName);
+        System.out.println(lastName);
+
+
+
+    }
 
 }

+ 12 - 0
zzjs-service/src/main/java/com/miaxis/feign/dto/Ydt.java

@@ -0,0 +1,12 @@
+package com.miaxis.feign.dto;
+
+import lombok.Data;
+
+@Data
+public class Ydt {
+
+    private String nonceStr;
+
+    private String questionId;
+
+}

+ 63 - 0
zzjs-service/src/main/java/com/miaxis/feign/service/IKtService.java

@@ -0,0 +1,63 @@
+package com.miaxis.feign.service;
+
+import com.miaxis.common.config.FeignConfig;
+import org.springframework.cloud.openfeign.FeignClient;
+import org.springframework.stereotype.Component;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+
+@FeignClient(name="ktService",
+        url = "https://app.kuaitongjiakao.com/",configuration = FeignConfig.class)
+@Component
+public interface IKtService {
+
+
+
+
+    /**
+     *  主目录
+     * @param model 小车:cart | 客车:bus | 货车:truck | 摩托车:mtc
+     * @param subject  k1:顺序练习 | k1_2:精选必考题 | k1_3:分类练习 |k1_4:地方题库
+     * @param time 时间戳
+     * @return
+     */
+    @GetMapping(value = "skill/getColumn")
+    String getInfo(
+            @RequestParam("model") String model,
+            @RequestParam("subject") String subject,
+            @RequestParam("time") String time);
+
+
+    /**
+     *  获取题目
+     * @param model 小车:cart | 客车:bus | 货车:truck | 摩托车:mtc
+     * @param columnid  主目录id
+     * @param columnZh 主目录标题
+     * @param subject k1:顺序练习 | k1_2:精选必考题 | k1_3:分类练习 |k1_4:地方题库
+     * @param time 时间戳
+     * @return
+     */
+    @GetMapping(value = "question/getQuestions")
+    String getQuestion(
+            @RequestParam("model") String model,
+            @RequestParam("columnid") String columnid,
+            @RequestParam("columnZh") String columnZh,
+            @RequestParam("subject") String subject,
+            @RequestParam("time") String time);
+
+
+    /**
+     *  获取题目
+     * @param model 小车:cart | 客车:bus | 货车:truck | 摩托车:mtc
+     * @param subject k1:顺序练习 | k1_2:精选必考题 | k1_3:分类练习 |k1_4:地方题库
+     * @param time 时间戳
+     * @return
+     */
+    @GetMapping(value = "question/getFreeQuestions")
+    String getFreeQuestions(
+            @RequestParam("model") String model,
+            @RequestParam("subject") String subject,
+            @RequestParam("time") String time);
+
+
+}

+ 24 - 0
zzjs-service/src/main/java/com/miaxis/feign/service/IYdtService.java

@@ -1,9 +1,11 @@
 package com.miaxis.feign.service;
 
 import com.miaxis.common.config.FeignConfig;
+import com.miaxis.feign.dto.Ydt;
 import org.springframework.cloud.openfeign.FeignClient;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 
 @FeignClient(name="ydtService",
@@ -25,4 +27,26 @@ public interface IYdtService {
 
 
 
+
+    /**
+     *  获取题目解释
+     * @return
+     */
+    @PostMapping(value = "/sns/exam/getSkillInfo")
+    String getSkillInfo(@RequestParam("data") String data);
+
 }
+
+
+
+
+
+
+
+
+
+
+
+
+
+

+ 117 - 0
zzjs-service/src/main/java/com/miaxis/question/controller/QuestionFreeController.java

@@ -0,0 +1,117 @@
+package com.miaxis.question.controller;
+
+import com.miaxis.common.constant.Constants;
+import java.util.List;
+import java.util.Arrays;
+import io.swagger.annotations.*;
+import com.miaxis.common.core.domain.Response;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import com.miaxis.common.annotation.Log;
+import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.enums.BusinessTypeEnum;
+import com.miaxis.question.domain.QuestionFree;
+import com.miaxis.question.service.IQuestionFreeService;
+import com.miaxis.common.utils.poi.ExcelUtil;
+import com.miaxis.common.core.page.ResponsePageInfo;
+
+/**
+ * 【 免费试用题】Controller
+ *
+ * @author miaxis
+ * @date 2022-06-10
+ */
+@RestController
+@RequestMapping("/free/free")
+@Api(tags={"【小程序- 免费试用题】"})
+public class QuestionFreeController extends BaseController{
+    @Autowired
+    private IQuestionFreeService questionFreeService;
+
+    /**
+     * 查询 免费试用题列表
+     */
+    @PreAuthorize("@ss.hasPermi('free:free:list')")
+    @GetMapping("/list")
+    @ApiOperation("查询 免费试用题列表")
+        @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<QuestionFree> list(@ModelAttribute QuestionFree questionFree){
+        startPage();
+        List<QuestionFree> list = questionFreeService.selectQuestionFreeList(questionFree);
+        return toResponsePageInfo(list);
+    }
+    
+    /**
+     * 导出 免费试用题列表
+     */
+    @PreAuthorize("@ss.hasPermi('free:free:export')")
+    @Log(title = " 免费试用题", businessType = BusinessTypeEnum.EXPORT)
+    @GetMapping("/export")
+    @ApiOperation("导出 免费试用题列表Excel")
+    public Response<String> export(@ModelAttribute QuestionFree questionFree){
+        List<QuestionFree> list = questionFreeService.selectQuestionFreeList(questionFree);
+        ExcelUtil<QuestionFree> util = new ExcelUtil<QuestionFree>(QuestionFree.class);
+        return util.exportExcel(list, "free");
+    }
+
+    /**
+     * 获取 免费试用题详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('free:free:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation("获取 免费试用题详细信息")
+    public Response<QuestionFree> getInfo(
+            @ApiParam(name = "id", value = " 免费试用题参数", required = true)
+            @PathVariable("id") Long id
+    ){
+        return Response.success(questionFreeService.getById(id));
+    }
+
+    /**
+     * 新增 免费试用题
+     */
+    @PreAuthorize("@ss.hasPermi('free:free:add')")
+    @Log(title = " 免费试用题", businessType = BusinessTypeEnum.INSERT)
+    @PostMapping
+    @ApiOperation("新增 免费试用题")
+    public Response<Integer> add(@RequestBody QuestionFree questionFree){
+        return toResponse(questionFreeService.save(questionFree) ? 1 : 0);
+    }
+
+    /**
+     * 修改 免费试用题
+     */
+    @PreAuthorize("@ss.hasPermi('free:free:edit')")
+    @Log(title = " 免费试用题", businessType = BusinessTypeEnum.UPDATE)
+    @PutMapping
+    @ApiOperation("修改 免费试用题")
+    public Response<Integer> edit(@RequestBody QuestionFree questionFree){
+        return toResponse(questionFreeService.updateById(questionFree) ? 1 : 0);
+    }
+
+    /**
+     * 删除 免费试用题
+     */
+    @PreAuthorize("@ss.hasPermi('free:free:remove')")
+    @Log(title = " 免费试用题", businessType = BusinessTypeEnum.DELETE)
+	@DeleteMapping("/{ids}")
+    @ApiOperation("删除 免费试用题")
+    public  Response<Integer> remove(
+            @ApiParam(name = "ids", value = " 免费试用题ids参数", required = true)
+            @PathVariable Long[] ids
+    ){
+        return toResponse(questionFreeService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
+    }
+}

+ 117 - 0
zzjs-service/src/main/java/com/miaxis/question/controller/TAppExamRuleController.java

@@ -0,0 +1,117 @@
+package com.miaxis.question.controller;
+
+import com.miaxis.common.constant.Constants;
+import java.util.List;
+import java.util.Arrays;
+import io.swagger.annotations.*;
+import com.miaxis.common.core.domain.Response;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import com.miaxis.common.annotation.Log;
+import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.enums.BusinessTypeEnum;
+import com.miaxis.question.domain.TAppExamRule;
+import com.miaxis.question.service.ITAppExamRuleService;
+import com.miaxis.common.utils.poi.ExcelUtil;
+import com.miaxis.common.core.page.ResponsePageInfo;
+
+/**
+ * 【考试取题】Controller
+ *
+ * @author miaxis
+ * @date 2022-05-23
+ */
+@RestController
+@RequestMapping("/rule/rule")
+@Api(tags={"【小程序-考试取题】"})
+public class TAppExamRuleController extends BaseController{
+    @Autowired
+    private ITAppExamRuleService tAppExamRuleService;
+
+    /**
+     * 查询考试取题列表
+     */
+    @PreAuthorize("@ss.hasPermi('rule:rule:list')")
+    @GetMapping("/list")
+    @ApiOperation("查询考试取题列表")
+        @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<TAppExamRule> list(@ModelAttribute TAppExamRule tAppExamRule){
+        startPage();
+        List<TAppExamRule> list = tAppExamRuleService.selectTAppExamRuleList(tAppExamRule);
+        return toResponsePageInfo(list);
+    }
+    
+    /**
+     * 导出考试取题列表
+     */
+    @PreAuthorize("@ss.hasPermi('rule:rule:export')")
+    @Log(title = "考试取题", businessType = BusinessTypeEnum.EXPORT)
+    @GetMapping("/export")
+    @ApiOperation("导出考试取题列表Excel")
+    public Response<String> export(@ModelAttribute TAppExamRule tAppExamRule){
+        List<TAppExamRule> list = tAppExamRuleService.selectTAppExamRuleList(tAppExamRule);
+        ExcelUtil<TAppExamRule> util = new ExcelUtil<TAppExamRule>(TAppExamRule.class);
+        return util.exportExcel(list, "rule");
+    }
+
+    /**
+     * 获取考试取题详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('rule:rule:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation("获取考试取题详细信息")
+    public Response<TAppExamRule> getInfo(
+            @ApiParam(name = "id", value = "考试取题参数", required = true)
+            @PathVariable("id") Long id
+    ){
+        return Response.success(tAppExamRuleService.getById(id));
+    }
+
+    /**
+     * 新增考试取题
+     */
+    @PreAuthorize("@ss.hasPermi('rule:rule:add')")
+    @Log(title = "考试取题", businessType = BusinessTypeEnum.INSERT)
+    @PostMapping
+    @ApiOperation("新增考试取题")
+    public Response<Integer> add(@RequestBody TAppExamRule tAppExamRule){
+        return toResponse(tAppExamRuleService.save(tAppExamRule) ? 1 : 0);
+    }
+
+    /**
+     * 修改考试取题
+     */
+    @PreAuthorize("@ss.hasPermi('rule:rule:edit')")
+    @Log(title = "考试取题", businessType = BusinessTypeEnum.UPDATE)
+    @PutMapping
+    @ApiOperation("修改考试取题")
+    public Response<Integer> edit(@RequestBody TAppExamRule tAppExamRule){
+        return toResponse(tAppExamRuleService.updateById(tAppExamRule) ? 1 : 0);
+    }
+
+    /**
+     * 删除考试取题
+     */
+    @PreAuthorize("@ss.hasPermi('rule:rule:remove')")
+    @Log(title = "考试取题", businessType = BusinessTypeEnum.DELETE)
+	@DeleteMapping("/{ids}")
+    @ApiOperation("删除考试取题")
+    public  Response<Integer> remove(
+            @ApiParam(name = "ids", value = "考试取题ids参数", required = true)
+            @PathVariable Long[] ids
+    ){
+        return toResponse(tAppExamRuleService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
+    }
+}

+ 117 - 0
zzjs-service/src/main/java/com/miaxis/question/controller/WebNoteAllController.java

@@ -0,0 +1,117 @@
+package com.miaxis.question.controller;
+
+import com.miaxis.common.constant.Constants;
+import java.util.List;
+import java.util.Arrays;
+import io.swagger.annotations.*;
+import com.miaxis.common.core.domain.Response;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.ModelAttribute;
+import com.miaxis.common.annotation.Log;
+import com.miaxis.common.core.controller.BaseController;
+import com.miaxis.common.enums.BusinessTypeEnum;
+import com.miaxis.question.domain.WebNoteAll;
+import com.miaxis.question.service.IWebNoteAllService;
+import com.miaxis.common.utils.poi.ExcelUtil;
+import com.miaxis.common.core.page.ResponsePageInfo;
+
+/**
+ * 【一点通整合题库】Controller
+ *
+ * @author miaxis
+ * @date 2022-05-06
+ */
+@RestController
+@RequestMapping("/question/all")
+@Api(tags={"【小程序-一点通整合题库】"})
+public class WebNoteAllController extends BaseController{
+    @Autowired
+    private IWebNoteAllService webNoteAllService;
+
+    /**
+     * 查询一点通整合题库列表
+     */
+    @PreAuthorize("@ss.hasPermi('question:all:list')")
+    @GetMapping("/list")
+    @ApiOperation("查询一点通整合题库列表")
+        @ApiImplicitParams({
+            @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
+            @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
+    })
+    public ResponsePageInfo<WebNoteAll> list(@ModelAttribute WebNoteAll webNoteAll){
+        startPage();
+        List<WebNoteAll> list = webNoteAllService.selectWebNoteAllList(webNoteAll);
+        return toResponsePageInfo(list);
+    }
+    
+    /**
+     * 导出一点通整合题库列表
+     */
+    @PreAuthorize("@ss.hasPermi('question:all:export')")
+    @Log(title = "一点通整合题库", businessType = BusinessTypeEnum.EXPORT)
+    @GetMapping("/export")
+    @ApiOperation("导出一点通整合题库列表Excel")
+    public Response<String> export(@ModelAttribute WebNoteAll webNoteAll){
+        List<WebNoteAll> list = webNoteAllService.selectWebNoteAllList(webNoteAll);
+        ExcelUtil<WebNoteAll> util = new ExcelUtil<WebNoteAll>(WebNoteAll.class);
+        return util.exportExcel(list, "all");
+    }
+
+    /**
+     * 获取一点通整合题库详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('question:all:query')")
+    @GetMapping(value = "/{id}")
+    @ApiOperation("获取一点通整合题库详细信息")
+    public Response<WebNoteAll> getInfo(
+            @ApiParam(name = "id", value = "一点通整合题库参数", required = true)
+            @PathVariable("id") Long id
+    ){
+        return Response.success(webNoteAllService.getById(id));
+    }
+
+    /**
+     * 新增一点通整合题库
+     */
+    @PreAuthorize("@ss.hasPermi('question:all:add')")
+    @Log(title = "一点通整合题库", businessType = BusinessTypeEnum.INSERT)
+    @PostMapping
+    @ApiOperation("新增一点通整合题库")
+    public Response<Integer> add(@RequestBody WebNoteAll webNoteAll){
+        return toResponse(webNoteAllService.save(webNoteAll) ? 1 : 0);
+    }
+
+    /**
+     * 修改一点通整合题库
+     */
+    @PreAuthorize("@ss.hasPermi('question:all:edit')")
+    @Log(title = "一点通整合题库", businessType = BusinessTypeEnum.UPDATE)
+    @PutMapping
+    @ApiOperation("修改一点通整合题库")
+    public Response<Integer> edit(@RequestBody WebNoteAll webNoteAll){
+        return toResponse(webNoteAllService.updateById(webNoteAll) ? 1 : 0);
+    }
+
+    /**
+     * 删除一点通整合题库
+     */
+    @PreAuthorize("@ss.hasPermi('question:all:remove')")
+    @Log(title = "一点通整合题库", businessType = BusinessTypeEnum.DELETE)
+	@DeleteMapping("/{ids}")
+    @ApiOperation("删除一点通整合题库")
+    public  Response<Integer> remove(
+            @ApiParam(name = "ids", value = "一点通整合题库ids参数", required = true)
+            @PathVariable Long[] ids
+    ){
+        return toResponse(webNoteAllService.removeByIds(Arrays.asList(ids)) ? 1 : 0);
+    }
+}

+ 51 - 0
zzjs-service/src/main/java/com/miaxis/question/domain/QuestionFree.java

@@ -0,0 +1,51 @@
+package com.miaxis.question.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import lombok.Data;
+/**
+ *  免费试用题对象 question_free
+ *
+ * @author miaxis
+ * @date 2022-06-10
+ */
+@Data
+@TableName("question_free")
+@ApiModel(value = "QuestionFree", description = " 免费试用题对象 question_free")
+public class QuestionFree extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** ID */
+    @TableId(value = "id",type = IdType.INPUT)
+    @ApiModelProperty(value = "ID")
+    private Long id;
+
+    /** ydt ID */
+    @Excel(name = "ydt ID")
+    @TableField("id_ydt")
+    @ApiModelProperty(value = "ydt ID")
+    private Long idYdt;
+
+    /** 科目 */
+    @Excel(name = "科目")
+    @TableField("subject")
+    @ApiModelProperty(value = "科目")
+    private Integer subject;
+
+    /** 免费题排序 */
+    @Excel(name = "免费题排序")
+    @TableField("free_sort")
+    @ApiModelProperty(value = "免费题排序")
+    private Long freeSort;
+
+
+}

+ 265 - 0
zzjs-service/src/main/java/com/miaxis/question/domain/QuestionInfo.java

@@ -0,0 +1,265 @@
+package com.miaxis.question.domain;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 题库对象 question_info
+ *
+ * @author miaxis
+ * @date 2021-10-20
+ */
+@Data
+@TableName("question_info")
+@ApiModel(value = "QuestionInfo", description = "题库对象 question_info")
+public class QuestionInfo extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**  主键 */
+    @TableId(value = "id")
+    @ApiModelProperty(value = " 主键")
+    private Long id;
+
+    /** 快通ID */
+    @Excel(name = "快通ID")
+    @TableField("id_kt")
+    @ApiModelProperty(value = "快通ID")
+    private Long idKt;
+
+    /** 一点通ID */
+    @Excel(name = "一点通ID")
+    @TableField("id_ydt")
+    @ApiModelProperty(value = "一点通ID")
+    private Long idYdt;
+
+
+    /** 在所有题目中的序号 */
+    @Excel(name = "在所有题目中的序号")
+    @TableField("number")
+    @ApiModelProperty(value = "在所有题目中的序号")
+    private Long number;
+
+    /** 正确答案 */
+    @Excel(name = "正确答案")
+    @TableField("answer")
+    @ApiModelProperty(value = "正确答案")
+    private String answer;
+
+    /** 答案关键词 */
+    @Excel(name = "答案关键词")
+    @TableField("answerkeyword")
+    @ApiModelProperty(value = "答案关键词")
+    private String answerkeyword;
+
+    /** 技巧讲解图片URL */
+    @Excel(name = "技巧讲解图片URL")
+    @TableField("explain_gif")
+    @ApiModelProperty(value = "技巧讲解图片URL")
+    private String explainGif;
+
+    /** 技巧讲解说明 */
+    @Excel(name = "技巧讲解说明")
+    @TableField("explain_jq")
+    @ApiModelProperty(value = "技巧讲解说明")
+    private String explainJq;
+
+    /** 官方解释 */
+    @Excel(name = "官方解释")
+    @TableField("explain_js")
+    @ApiModelProperty(value = "官方解释")
+    private String explainJs;
+
+    /** 技巧讲解语音URL */
+    @Excel(name = "技巧讲解语音URL")
+    @TableField("explain_mp3")
+    @ApiModelProperty(value = "技巧讲解语音URL")
+    private String explainMp3;
+
+    /** 题目图片URL */
+    @Excel(name = "题目图片URL")
+    @TableField("image")
+    @ApiModelProperty(value = "题目图片URL")
+    private String image;
+
+    /** 题目图片URL2 */
+    @Excel(name = "题目图片URL2")
+    @TableField("image_ydt")
+    @ApiModelProperty(value = "题目图片URL2")
+    private String imageYdt;
+
+    /** 题目 */
+    @Excel(name = "题目")
+    @TableField("issue")
+    @ApiModelProperty(value = "题目")
+    private String issue;
+
+    /** 答案选项 */
+    @Excel(name = "答案选项")
+    @TableField("opts")
+    @ApiModelProperty(value = "答案选项")
+    private String opts;
+
+    /** 答题技巧关键词 */
+    @Excel(name = "答题技巧关键词")
+    @TableField("skillkeyword")
+    @ApiModelProperty(value = "答题技巧关键词")
+    private String skillkeyword;
+
+    /** 题目关键词 */
+    @Excel(name = "题目关键词")
+    @TableField("titlekeyword")
+    @ApiModelProperty(value = "题目关键词")
+    private String titlekeyword;
+
+    /** 读题语音URL */
+    @Excel(name = "读题语音URL")
+    @TableField("issuemp3")
+    @ApiModelProperty(value = "读题语音URL")
+    private String issuemp3;
+
+    /** 答案语音URL */
+    @Excel(name = "答案语音URL")
+    @TableField("answermp3")
+    @ApiModelProperty(value = "答案语音URL")
+    private String answermp3;
+
+    /** 读题+答案语音URL */
+    @Excel(name = "读题+答案语音URL")
+    @TableField("explainjsmp3")
+    @ApiModelProperty(value = "读题+答案语音URL")
+    private String explainjsmp3;
+
+    /** 是否是C1,C2,C3驾驶证题目 */
+    @Excel(name = "是否是C1,C2,C3驾驶证题目")
+    @TableField("lice_car")
+    @ApiModelProperty(value = "是否是C1,C2,C3驾驶证题目")
+    private String liceCar;
+
+    /** 是否是A1\A3\B1驾驶证题目 */
+    @Excel(name = "是否是A1,A3,B1驾驶证题目")
+    @TableField("lice_bus")
+    @ApiModelProperty(value = "是否是A1,A3,B1驾驶证题目")
+    private String liceBus;
+
+    /** 是否是A2\B2驾驶证题目 */
+    @Excel(name = "是否是A2,B2驾驶证题目")
+    @TableField("lice_truck")
+    @ApiModelProperty(value = "是否是A2,B2驾驶证题目")
+    private String liceTruck;
+
+    /** 是否是D\E\F驾驶证题目 */
+    @Excel(name = "是否是D,E,F驾驶证题目")
+    @TableField("lice_moto")
+    @ApiModelProperty(value = "是否是D,E,F驾驶证题目")
+    private String liceMoto;
+
+    /** 顺序练习分类(包含科一到科四) */
+    @Excel(name = "顺序练习分类(包含科一到科四)", readConverterExp = "包=含科一到科四")
+    @TableField("seque_issue")
+    @ApiModelProperty(value = "顺序练习分类(包含科一到科四)")
+    private String sequeIssue;
+
+    /** 分类练习(包含科一到科四) */
+    @Excel(name = "分类练习(包含科一到科四)", readConverterExp = "包=含科一到科四")
+    @TableField("class_issue")
+    @ApiModelProperty(value = "分类练习(包含科一到科四)")
+    private String classIssue;
+
+    /** 地方专题(包含科一到科四) */
+    @Excel(name = "地方专题(包含科一到科四)", readConverterExp = "包=含科一到科四")
+    @TableField("place_issue")
+    @ApiModelProperty(value = "地方专题(包含科一到科四)")
+    private String placeIssue;
+
+    /** 精选题(包含科一到科四) */
+    @Excel(name = "精选题(包含科一到科四)", readConverterExp = "包=含科一到科四")
+    @TableField("excell_issue")
+    @ApiModelProperty(value = "精选题(包含科一到科四)")
+    private String excellIssue;
+
+
+    /** 题目在顺序练习中所属的模块名称 */
+    @Excel(name = "题目在顺序练习中所属的模块名称")
+    @TableField("seque_issue_name")
+    @ApiModelProperty(value = "题目在顺序练习中所属的模块名称")
+    private String sequeIssueName;
+
+    /** 题目在地方专题中所属的模块名称 */
+    @Excel(name = "题目在地方专题中所属的模块名称")
+    @TableField("place_issue_name")
+    @ApiModelProperty(value = "题目在地方专题中所属的模块名称")
+    private String placeIssueName;
+
+    /** 题目在精选中所属的模块名称 */
+    @Excel(name = "题目在精选中所属的模块名称")
+    @TableField("excell_issue_name")
+    @ApiModelProperty(value = "题目在精选中所属的模块名称")
+    private String excellIssueName;
+
+    /** 题目在分类中所属的模块名称 */
+    @Excel(name = "题目在分类中所属的模块名称")
+    @TableField("class_issue_name")
+    @ApiModelProperty(value = "题目在分类中所属的模块名称")
+    private String classIssueName;
+
+
+    /** 题目类型 */
+    @Excel(name = "题目类型")
+    @TableField("question_type")
+    @ApiModelProperty(value = "题目类型 1判断,2选择,3多选")
+    private Integer questionType;
+
+
+    /** 题目类型 */
+    @Excel(name = "题目类型")
+    @TableField("question_type")
+    @ApiModelProperty(value = "题目类型 1判断,2选择,3多选")
+    private Integer subject;
+
+    /** 分类练习排序字段 */
+    @Excel(name = "分类练习排序字段")
+    @TableField("class_sort")
+    @ApiModelProperty(value = "分类练习排序字段")
+    private Integer classSort;
+
+    /** 精选考题排序字段 */
+    @Excel(name = "精选考题排序字段")
+    @TableField("excell_sort")
+    @ApiModelProperty(value = "精选考题排序字段")
+    private Integer excellSort;
+
+
+    /** 顺序练习排序字段 */
+    @Excel(name = "顺序练习排序字段")
+    @TableField("seque_sort")
+    @ApiModelProperty(value = "顺序练习排序字段")
+    private Integer sequeSort;
+
+
+    /** 地方专题排序字段 */
+    @Excel(name = "地方专题排序字段")
+    @TableField("place_sort")
+    @ApiModelProperty(value = "地方专题排序字段")
+    private Integer placeSort;
+
+
+    /** 章节ID */
+    @Excel(name = "章节ID")
+    @TableField("chapter_id")
+    @ApiModelProperty(value = "地方专题排序字段")
+    private Integer chapterId;
+
+    /** 章节ID */
+    @Excel(name = "章节ID")
+    @TableField("diff_degree")
+    @ApiModelProperty(value = "地方专题排序字段")
+    private Integer DiffDegree;
+
+
+}

+ 15 - 6
zzjs-service/src/main/java/com/miaxis/question/domain/QuestionInfoKtGet.java

@@ -25,15 +25,10 @@ public class QuestionInfoKtGet extends BaseBusinessEntity{
     private static final long serialVersionUID = 1L;
 
     /**  主键 */
-    @TableId(value = "id")
+    @TableId(value = "id",type = IdType.INPUT)
     @ApiModelProperty(value = " 主键")
     private Long id;
 
-    /** 快通ID */
-    @Excel(name = "快通ID")
-    @TableField("id_kt")
-    @ApiModelProperty(value = "快通ID")
-    private Long idKt;
 
     /** 一点通ID */
     @Excel(name = "一点通ID")
@@ -258,4 +253,18 @@ public class QuestionInfoKtGet extends BaseBusinessEntity{
     @ApiModelProperty(value = "科目")
     private Long subject;
 
+
+    /** 是否免费试用  0 不是  1是 */
+    @Excel(name = "是否免费试用")
+    @TableField("is_free")
+    @ApiModelProperty(value = "是否免费试用 0 不是  1是")
+    private Long isFree;
+
+
+    /** 是否免费试用  0 不是  1是 */
+    @Excel(name = "是否免费试用")
+    @TableField("free_sort")
+    @ApiModelProperty(value = "是否免费试用 0 不是  1是")
+    private Long freeSort;
+
 }

+ 284 - 0
zzjs-service/src/main/java/com/miaxis/question/domain/QuestionYdtJs.java

@@ -0,0 +1,284 @@
+package com.miaxis.question.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import lombok.Data;
+/**
+ * 驾校一点通解释对象 question_ydt_js
+ *
+ * @author miaxis
+ * @date 2022-05-06
+ */
+@Data
+@TableName("question_ydt_js")
+@ApiModel(value = "QuestionYdtJs", description = "驾校一点通解释对象 question_ydt_js")
+public class QuestionYdtJs extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** 一点通ID */
+    @TableId(value = "id",type = IdType.INPUT)
+    @ApiModelProperty(value = "一点通ID")
+    private Long id;
+
+    /** 科目 */
+    @Excel(name = "科目")
+    @TableField("kemu")
+    @ApiModelProperty(value = "科目")
+    private String kemu;
+
+    /** 分析 */
+    @Excel(name = "分析")
+    @TableField("qb_analyse")
+    @ApiModelProperty(value = "分析")
+    private String qbAnalyse;
+
+    /** 内容 题目 */
+    @Excel(name = "内容 题目")
+    @TableField("qb_content")
+    @ApiModelProperty(value = "内容 题目")
+    private String qbContent;
+
+    /** 语音分板 */
+    @Excel(name = "语音分板")
+    @TableField("qb_read_analyse")
+    @ApiModelProperty(value = "语音分板")
+    private String qbReadAnalyse;
+
+    /** 技术照片 */
+    @Excel(name = "技术照片")
+    @TableField("qb_skill_picture")
+    @ApiModelProperty(value = "技术照片")
+    private String qbSkillPicture;
+
+    /** 答案 */
+    @Excel(name = "答案")
+    @TableField("qb_answers")
+    @ApiModelProperty(value = "答案")
+    private String qbAnswers;
+
+    /** 题目ID */
+    @Excel(name = "题目ID")
+    @TableField("questionIds")
+    @ApiModelProperty(value = "题目ID")
+    private String questionids;
+
+    /** 短视频VIDEO */
+    @Excel(name = "短视频VIDEO")
+    @TableField("short_video_duration")
+    @ApiModelProperty(value = "短视频VIDEO")
+    private String shortVideoDuration;
+
+    /** 短视频尺寸 */
+    @Excel(name = "短视频尺寸")
+    @TableField("short_video_size")
+    @ApiModelProperty(value = "短视频尺寸")
+    private String shortVideoSize;
+
+    /** 短视频URL */
+    @Excel(name = "短视频URL")
+    @TableField("short_video_url")
+    @ApiModelProperty(value = "短视频URL")
+    private String shortVideoUrl;
+
+    /** 短视频图片 */
+    @Excel(name = "短视频图片")
+    @TableField("short_video_image")
+    @ApiModelProperty(value = "短视频图片")
+    private String shortVideoImage;
+
+    /** 一点通分析 */
+    @Excel(name = "一点通分析")
+    @TableField("ydt_analyse")
+    @ApiModelProperty(value = "一点通分析")
+    private String ydtAnalyse;
+
+    /** 一点通分析图片 */
+    @Excel(name = "一点通分析图片")
+    @TableField("ydt_analyse_pic")
+    @ApiModelProperty(value = "一点通分析图片")
+    private String ydtAnalysePic;
+
+    /** 一点通视频 */
+    @Excel(name = "一点通视频")
+    @TableField("ydt_video")
+    @ApiModelProperty(value = "一点通视频")
+    private String ydtVideo;
+
+    /** 一点通视频长度 */
+    @Excel(name = "一点通视频长度")
+    @TableField("ydt_video_len")
+    @ApiModelProperty(value = "一点通视频长度")
+    private String ydtVideoLen;
+
+    /** 一点通视频图片 */
+    @Excel(name = "一点通视频图片")
+    @TableField("ydt_video_pic")
+    @ApiModelProperty(value = "一点通视频图片")
+    private String ydtVideoPic;
+
+    /** 一点通视频尺寸 */
+    @Excel(name = "一点通视频尺寸")
+    @TableField("ydt_video_size")
+    @ApiModelProperty(value = "一点通视频尺寸")
+    private String ydtVideoSize;
+
+    public void setId(Long id){
+        this.id = id;
+    }
+
+    public Long getId(){
+        return id;
+    }
+    public void setKemu(String kemu){
+        this.kemu = kemu;
+    }
+
+    public String getKemu(){
+        return kemu;
+    }
+    public void setQbAnalyse(String qbAnalyse){
+        this.qbAnalyse = qbAnalyse;
+    }
+
+    public String getQbAnalyse(){
+        return qbAnalyse;
+    }
+    public void setQbContent(String qbContent){
+        this.qbContent = qbContent;
+    }
+
+    public String getQbContent(){
+        return qbContent;
+    }
+    public void setQbReadAnalyse(String qbReadAnalyse){
+        this.qbReadAnalyse = qbReadAnalyse;
+    }
+
+    public String getQbReadAnalyse(){
+        return qbReadAnalyse;
+    }
+    public void setQbSkillPicture(String qbSkillPicture){
+        this.qbSkillPicture = qbSkillPicture;
+    }
+
+    public String getQbSkillPicture(){
+        return qbSkillPicture;
+    }
+    public void setQbAnswers(String qbAnswers){
+        this.qbAnswers = qbAnswers;
+    }
+
+    public String getQbAnswers(){
+        return qbAnswers;
+    }
+    public void setQuestionids(String questionids){
+        this.questionids = questionids;
+    }
+
+    public String getQuestionids(){
+        return questionids;
+    }
+    public void setShortVideoDuration(String shortVideoDuration){
+        this.shortVideoDuration = shortVideoDuration;
+    }
+
+    public String getShortVideoDuration(){
+        return shortVideoDuration;
+    }
+    public void setShortVideoSize(String shortVideoSize){
+        this.shortVideoSize = shortVideoSize;
+    }
+
+    public String getShortVideoSize(){
+        return shortVideoSize;
+    }
+    public void setShortVideoUrl(String shortVideoUrl){
+        this.shortVideoUrl = shortVideoUrl;
+    }
+
+    public String getShortVideoUrl(){
+        return shortVideoUrl;
+    }
+    public void setShortVideoImage(String shortVideoImage){
+        this.shortVideoImage = shortVideoImage;
+    }
+
+    public String getShortVideoImage(){
+        return shortVideoImage;
+    }
+    public void setYdtAnalyse(String ydtAnalyse){
+        this.ydtAnalyse = ydtAnalyse;
+    }
+
+    public String getYdtAnalyse(){
+        return ydtAnalyse;
+    }
+    public void setYdtAnalysePic(String ydtAnalysePic){
+        this.ydtAnalysePic = ydtAnalysePic;
+    }
+
+    public String getYdtAnalysePic(){
+        return ydtAnalysePic;
+    }
+    public void setYdtVideo(String ydtVideo){
+        this.ydtVideo = ydtVideo;
+    }
+
+    public String getYdtVideo(){
+        return ydtVideo;
+    }
+    public void setYdtVideoLen(String ydtVideoLen){
+        this.ydtVideoLen = ydtVideoLen;
+    }
+
+    public String getYdtVideoLen(){
+        return ydtVideoLen;
+    }
+    public void setYdtVideoPic(String ydtVideoPic){
+        this.ydtVideoPic = ydtVideoPic;
+    }
+
+    public String getYdtVideoPic(){
+        return ydtVideoPic;
+    }
+    public void setYdtVideoSize(String ydtVideoSize){
+        this.ydtVideoSize = ydtVideoSize;
+    }
+
+    public String getYdtVideoSize(){
+        return ydtVideoSize;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("kemu", getKemu())
+            .append("qbAnalyse", getQbAnalyse())
+            .append("qbContent", getQbContent())
+            .append("qbReadAnalyse", getQbReadAnalyse())
+            .append("qbSkillPicture", getQbSkillPicture())
+            .append("qbAnswers", getQbAnswers())
+            .append("questionids", getQuestionids())
+            .append("shortVideoDuration", getShortVideoDuration())
+            .append("shortVideoSize", getShortVideoSize())
+            .append("shortVideoUrl", getShortVideoUrl())
+            .append("shortVideoImage", getShortVideoImage())
+            .append("ydtAnalyse", getYdtAnalyse())
+            .append("ydtAnalysePic", getYdtAnalysePic())
+            .append("ydtVideo", getYdtVideo())
+            .append("ydtVideoLen", getYdtVideoLen())
+            .append("ydtVideoPic", getYdtVideoPic())
+            .append("ydtVideoSize", getYdtVideoSize())
+            .toString();
+    }
+}

+ 93 - 0
zzjs-service/src/main/java/com/miaxis/question/domain/TAppExamRule.java

@@ -0,0 +1,93 @@
+package com.miaxis.question.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import lombok.Data;
+/**
+ * 考试取题对象 t_app_exam_rule
+ *
+ * @author miaxis
+ * @date 2022-05-23
+ */
+@Data
+@TableName("t_app_exam_rule")
+@ApiModel(value = "TAppExamRule", description = "考试取题对象 t_app_exam_rule")
+public class TAppExamRule extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** $column.columnComment */
+    @TableField("id")
+    @ApiModelProperty(value = "$column.columnComment")
+    private Long id;
+
+    /** 车型 */
+    @Excel(name = "车型")
+    @TableField("gs")
+    @ApiModelProperty(value = "车型")
+    private String gs;
+
+    /** 科目 */
+    @Excel(name = "科目")
+    @TableField("kemu")
+    @ApiModelProperty(value = "科目")
+    private Integer kemu;
+
+    /** 章节ID */
+    @Excel(name = "章节ID")
+    @TableField("chapter_id")
+    @ApiModelProperty(value = "章节ID")
+    private Integer chapterId;
+
+    /** 总题库 */
+    @Excel(name = "总题库")
+    @TableField("total_count")
+    @ApiModelProperty(value = "总题库")
+    private Integer totalCount;
+
+    /** 判断题数 */
+    @Excel(name = "判断题数")
+    @TableField("judge_count")
+    @ApiModelProperty(value = "判断题数")
+    private Integer judgeCount;
+
+    /** 选择题数 */
+    @Excel(name = "选择题数")
+    @TableField("choice_count")
+    @ApiModelProperty(value = "选择题数")
+    private Integer choiceCount;
+
+    /** 多择题数 */
+    @Excel(name = "多择题数")
+    @TableField("multiple_choice_count")
+    @ApiModelProperty(value = "多择题数")
+    private Integer multipleChoiceCount;
+
+    /** 困难题数 */
+    @Excel(name = "困难题数")
+    @TableField("difficult_count")
+    @ApiModelProperty(value = "困难题数")
+    private Integer difficultCount;
+
+    /** 地区编号 */
+    @Excel(name = "地区编号")
+    @TableField("areacode")
+    @ApiModelProperty(value = "地区编号")
+    private Integer areacode;
+
+    /** 城市ID */
+    @Excel(name = "城市ID")
+    @TableField("city_id")
+    @ApiModelProperty(value = "城市ID")
+    private Integer cityId;
+
+
+}

+ 481 - 0
zzjs-service/src/main/java/com/miaxis/question/domain/WebNoteAll.java

@@ -0,0 +1,481 @@
+package com.miaxis.question.domain;
+
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import lombok.Data;
+/**
+ * 一点通整合题库对象 web_note_all
+ *
+ * @author miaxis
+ * @date 2022-05-06
+ */
+@Data
+@TableName("web_note_all")
+@ApiModel(value = "WebNoteAll", description = "一点通整合题库对象 web_note_all")
+public class WebNoteAll extends BaseBusinessEntity{
+    private static final long serialVersionUID = 1L;
+
+    /** ID */
+    @Excel(name = "ID")
+    @TableField("ID")
+    @ApiModelProperty(value = "ID")
+    private Long id;
+
+    /** Type */
+    @Excel(name = "Type")
+    @TableField("Type")
+    @ApiModelProperty(value = "Type")
+    private Long type;
+
+    /** intNumber */
+    @Excel(name = "intNumber")
+    @TableField("intNumber")
+    @ApiModelProperty(value = "intNumber")
+    private String intnumber;
+
+    /** strTppe */
+    @Excel(name = "strTppe")
+    @TableField("strTppe")
+    @ApiModelProperty(value = "strTppe")
+    private String strtppe;
+
+    /** strType_l */
+    @Excel(name = "strType_l")
+    @TableField("strType_l")
+    @ApiModelProperty(value = "strType_l")
+    private String strtypeL;
+
+    /** LicenseType */
+    @Excel(name = "LicenseType")
+    @TableField("LicenseType")
+    @ApiModelProperty(value = "LicenseType")
+    private String licensetype;
+
+    /** Question */
+    @Excel(name = "Question")
+    @TableField("Question")
+    @ApiModelProperty(value = "Question")
+    private String question;
+
+    /** An1 */
+    @Excel(name = "An1")
+    @TableField("An1")
+    @ApiModelProperty(value = "An1")
+    private String an1;
+
+    /** An2 */
+    @Excel(name = "An2")
+    @TableField("An2")
+    @ApiModelProperty(value = "An2")
+    private String an2;
+
+    /** An3 */
+    @Excel(name = "An3")
+    @TableField("An3")
+    @ApiModelProperty(value = "An3")
+    private String an3;
+
+    /** An4 */
+    @Excel(name = "An4")
+    @TableField("An4")
+    @ApiModelProperty(value = "An4")
+    private String an4;
+
+    /** An5 */
+    @Excel(name = "An5")
+    @TableField("An5")
+    @ApiModelProperty(value = "An5")
+    private String an5;
+
+    /** An6 */
+    @Excel(name = "An6")
+    @TableField("An6")
+    @ApiModelProperty(value = "An6")
+    private String an6;
+
+    /** An7 */
+    @Excel(name = "An7")
+    @TableField("An7")
+    @ApiModelProperty(value = "An7")
+    private String an7;
+
+    /** AnswerTrue */
+    @Excel(name = "AnswerTrue")
+    @TableField("AnswerTrue")
+    @ApiModelProperty(value = "AnswerTrue")
+    private String answertrue;
+
+    /** explain */
+    @Excel(name = "explain")
+    @TableField("explain")
+    @ApiModelProperty(value = "explain")
+    private String explain;
+
+    /** BestAnswerId */
+    @Excel(name = "BestAnswerId")
+    @TableField("BestAnswerId")
+    @ApiModelProperty(value = "BestAnswerId")
+    private String bestanswerid;
+
+    /** kemu */
+    @Excel(name = "kemu")
+    @TableField("kemu")
+    @ApiModelProperty(value = "kemu")
+    private Long kemu;
+
+    /** jieshi_from */
+    @Excel(name = "jieshi_from")
+    @TableField("jieshi_from")
+    @ApiModelProperty(value = "jieshi_from")
+    private String jieshiFrom;
+
+    /** moretypes */
+    @Excel(name = "moretypes")
+    @TableField("moretypes")
+    @ApiModelProperty(value = "moretypes")
+    private String moretypes;
+
+    /** chapterid */
+    @Excel(name = "chapterid")
+    @TableField("chapterid")
+    @ApiModelProperty(value = "chapterid")
+    private Long chapterid;
+
+    /** sinaimg */
+    @Excel(name = "sinaimg")
+    @TableField("sinaimg")
+    @ApiModelProperty(value = "sinaimg")
+    private String sinaimg;
+
+    /** video_url */
+    @Excel(name = "video_url")
+    @TableField("video_url")
+    @ApiModelProperty(value = "video_url")
+    private String videoUrl;
+
+    /** diff_degree */
+    @Excel(name = "diff_degree")
+    @TableField("diff_degree")
+    @ApiModelProperty(value = "diff_degree")
+    private Long diffDegree;
+
+    /** cityid */
+    @Excel(name = "cityid")
+    @TableField("cityid")
+    @ApiModelProperty(value = "cityid")
+    private Long cityid;
+
+    /** gs */
+    @Excel(name = "gs")
+    @TableField("gs")
+    @ApiModelProperty(value = "gs")
+    private String gs;
+
+    /** keyword */
+    @Excel(name = "keyword")
+    @TableField("keyword")
+    @ApiModelProperty(value = "keyword")
+    private String keyword;
+
+    /** error_rate */
+    @Excel(name = "error_rate")
+    @TableField("error_rate")
+    @ApiModelProperty(value = "error_rate")
+    private Long errorRate;
+
+    /** media_url */
+    @Excel(name = "media_url")
+    @TableField("media_url")
+    @ApiModelProperty(value = "media_url")
+    private String mediaUrl;
+
+    /** show_option_type */
+    @Excel(name = "show_option_type")
+    @TableField("show_option_type")
+    @ApiModelProperty(value = "show_option_type")
+    private Long showOptionType;
+
+    /** question_source */
+    @Excel(name = "question_source")
+    @TableField("question_source")
+    @ApiModelProperty(value = "question_source")
+    private Long questionSource;
+
+    /** best_explain_new */
+    @Excel(name = "best_explain_new")
+    @TableField("best_explain_new")
+    @ApiModelProperty(value = "best_explain_new")
+    private String bestExplainNew;
+
+    public void setId(Long id){
+        this.id = id;
+    }
+
+    public Long getId(){
+        return id;
+    }
+    public void setType(Long type){
+        this.type = type;
+    }
+
+    public Long getType(){
+        return type;
+    }
+    public void setIntnumber(String intnumber){
+        this.intnumber = intnumber;
+    }
+
+    public String getIntnumber(){
+        return intnumber;
+    }
+    public void setStrtppe(String strtppe){
+        this.strtppe = strtppe;
+    }
+
+    public String getStrtppe(){
+        return strtppe;
+    }
+    public void setStrtypeL(String strtypeL){
+        this.strtypeL = strtypeL;
+    }
+
+    public String getStrtypeL(){
+        return strtypeL;
+    }
+    public void setLicensetype(String licensetype){
+        this.licensetype = licensetype;
+    }
+
+    public String getLicensetype(){
+        return licensetype;
+    }
+    public void setQuestion(String question){
+        this.question = question;
+    }
+
+    public String getQuestion(){
+        return question;
+    }
+    public void setAn1(String an1){
+        this.an1 = an1;
+    }
+
+    public String getAn1(){
+        return an1;
+    }
+    public void setAn2(String an2){
+        this.an2 = an2;
+    }
+
+    public String getAn2(){
+        return an2;
+    }
+    public void setAn3(String an3){
+        this.an3 = an3;
+    }
+
+    public String getAn3(){
+        return an3;
+    }
+    public void setAn4(String an4){
+        this.an4 = an4;
+    }
+
+    public String getAn4(){
+        return an4;
+    }
+    public void setAn5(String an5){
+        this.an5 = an5;
+    }
+
+    public String getAn5(){
+        return an5;
+    }
+    public void setAn6(String an6){
+        this.an6 = an6;
+    }
+
+    public String getAn6(){
+        return an6;
+    }
+    public void setAn7(String an7){
+        this.an7 = an7;
+    }
+
+    public String getAn7(){
+        return an7;
+    }
+    public void setAnswertrue(String answertrue){
+        this.answertrue = answertrue;
+    }
+
+    public String getAnswertrue(){
+        return answertrue;
+    }
+    public void setExplain(String explain){
+        this.explain = explain;
+    }
+
+    public String getExplain(){
+        return explain;
+    }
+    public void setBestanswerid(String bestanswerid){
+        this.bestanswerid = bestanswerid;
+    }
+
+    public String getBestanswerid(){
+        return bestanswerid;
+    }
+    public void setKemu(Long kemu){
+        this.kemu = kemu;
+    }
+
+    public Long getKemu(){
+        return kemu;
+    }
+    public void setJieshiFrom(String jieshiFrom){
+        this.jieshiFrom = jieshiFrom;
+    }
+
+    public String getJieshiFrom(){
+        return jieshiFrom;
+    }
+    public void setMoretypes(String moretypes){
+        this.moretypes = moretypes;
+    }
+
+    public String getMoretypes(){
+        return moretypes;
+    }
+    public void setChapterid(Long chapterid){
+        this.chapterid = chapterid;
+    }
+
+    public Long getChapterid(){
+        return chapterid;
+    }
+    public void setSinaimg(String sinaimg){
+        this.sinaimg = sinaimg;
+    }
+
+    public String getSinaimg(){
+        return sinaimg;
+    }
+    public void setVideoUrl(String videoUrl){
+        this.videoUrl = videoUrl;
+    }
+
+    public String getVideoUrl(){
+        return videoUrl;
+    }
+    public void setDiffDegree(Long diffDegree){
+        this.diffDegree = diffDegree;
+    }
+
+    public Long getDiffDegree(){
+        return diffDegree;
+    }
+    public void setCityid(Long cityid){
+        this.cityid = cityid;
+    }
+
+    public Long getCityid(){
+        return cityid;
+    }
+    public void setGs(String gs){
+        this.gs = gs;
+    }
+
+    public String getGs(){
+        return gs;
+    }
+    public void setKeyword(String keyword){
+        this.keyword = keyword;
+    }
+
+    public String getKeyword(){
+        return keyword;
+    }
+    public void setErrorRate(Long errorRate){
+        this.errorRate = errorRate;
+    }
+
+    public Long getErrorRate(){
+        return errorRate;
+    }
+    public void setMediaUrl(String mediaUrl){
+        this.mediaUrl = mediaUrl;
+    }
+
+    public String getMediaUrl(){
+        return mediaUrl;
+    }
+    public void setShowOptionType(Long showOptionType){
+        this.showOptionType = showOptionType;
+    }
+
+    public Long getShowOptionType(){
+        return showOptionType;
+    }
+    public void setQuestionSource(Long questionSource){
+        this.questionSource = questionSource;
+    }
+
+    public Long getQuestionSource(){
+        return questionSource;
+    }
+    public void setBestExplainNew(String bestExplainNew){
+        this.bestExplainNew = bestExplainNew;
+    }
+
+    public String getBestExplainNew(){
+        return bestExplainNew;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
+            .append("id", getId())
+            .append("type", getType())
+            .append("intnumber", getIntnumber())
+            .append("strtppe", getStrtppe())
+            .append("strtypeL", getStrtypeL())
+            .append("licensetype", getLicensetype())
+            .append("question", getQuestion())
+            .append("an1", getAn1())
+            .append("an2", getAn2())
+            .append("an3", getAn3())
+            .append("an4", getAn4())
+            .append("an5", getAn5())
+            .append("an6", getAn6())
+            .append("an7", getAn7())
+            .append("answertrue", getAnswertrue())
+            .append("explain", getExplain())
+            .append("bestanswerid", getBestanswerid())
+            .append("kemu", getKemu())
+            .append("jieshiFrom", getJieshiFrom())
+            .append("moretypes", getMoretypes())
+            .append("chapterid", getChapterid())
+            .append("sinaimg", getSinaimg())
+            .append("videoUrl", getVideoUrl())
+            .append("diffDegree", getDiffDegree())
+            .append("cityid", getCityid())
+            .append("gs", getGs())
+            .append("keyword", getKeyword())
+            .append("errorRate", getErrorRate())
+            .append("mediaUrl", getMediaUrl())
+            .append("showOptionType", getShowOptionType())
+            .append("questionSource", getQuestionSource())
+            .append("bestExplainNew", getBestExplainNew())
+            .toString();
+    }
+}

+ 183 - 0
zzjs-service/src/main/java/com/miaxis/question/dto/QuestionInfoDTO.java

@@ -0,0 +1,183 @@
+package com.miaxis.question.dto;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 题库对象 question_info
+ *
+ * @author miaxis
+ * @date 2021-10-20
+ */
+@Data
+@TableName("question_info")
+@ApiModel(value = "QuestionInfo", description = "题库对象 question_info")
+public class QuestionInfoDTO extends BaseBusinessEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**  主键 */
+    @ApiModelProperty(value = " 主键")
+    private Long id;
+
+    /** 在所有题目中的序号 */
+    @ApiModelProperty(value = "在所有题目中的序号")
+    private Long number;
+
+    /** 正确答案 */
+    @ApiModelProperty(value = "正确答案")
+    private String answer;
+
+    /** 答案关键词 */
+    @ApiModelProperty(value = "答案关键词")
+    private String answerkeyword;
+
+    /** 技巧讲解图片URL */
+    @ApiModelProperty(value = "技巧讲解图片URL")
+    private String explainGif;
+
+    /** 技巧讲解说明 */
+    @ApiModelProperty(value = "技巧讲解说明")
+    private String explainJq;
+
+    /** 官方解释 */
+    @ApiModelProperty(value = "官方解释")
+    private String explainJs;
+
+    /** 技巧讲解语音URL */
+    @ApiModelProperty(value = "技巧讲解语音URL")
+    private String explainMp3;
+
+    /** 题目图片URL */
+    @ApiModelProperty(value = "题目图片URL")
+    private String image;
+
+    /** 题目图片URL2 */
+    @ApiModelProperty(value = "题目图片URL2")
+    private String imageYdt;
+
+    /** 题目 */
+    @ApiModelProperty(value = "题目")
+    private String issue;
+
+    /** 答案选项 */
+    @ApiModelProperty(value = "答案选项")
+    private String opts;
+
+    /** 答题技巧关键词 */
+    @ApiModelProperty(value = "答题技巧关键词")
+    private String skillkeyword;
+
+    /** 题目关键词 */
+    @ApiModelProperty(value = "题目关键词")
+    private String titlekeyword;
+
+    /** 读题语音URL */
+    @ApiModelProperty(value = "读题语音URL")
+    private String issuemp3;
+
+    /** 答案语音URL */
+    @ApiModelProperty(value = "答案语音URL")
+    private String answermp3;
+
+    /** 读题+答案语音URL */
+    @ApiModelProperty(value = "读题+答案语音URL")
+    private String explainjsmp3;
+
+
+    /** 是否是C1,C2,C3驾驶证题目 */
+    @ApiModelProperty(value = "是否是C1,C2,C3驾驶证题目")
+    private String liceCar;
+
+    /** 是否是A1\A3\B1驾驶证题目 */
+    @ApiModelProperty(value = "是否是A1,A3,B1驾驶证题目")
+    private String liceBus;
+
+    /** 是否是A2\B2驾驶证题目 */
+    @ApiModelProperty(value = "是否是A2,B2驾驶证题目")
+    private String liceTruck;
+
+    /** 是否是D\E\F驾驶证题目 */
+    @ApiModelProperty(value = "是否是D,E,F驾驶证题目")
+    private String liceMoto;
+
+    /** 顺序练习分类(包含科一到科四) */
+    @ApiModelProperty(value = "顺序练习分类 0否 1是")
+    private String sequeIssue;
+
+    /** 分类练习(包含科一到科四) */
+    @ApiModelProperty(value = "分类练习 0否 1是")
+    private String classIssue;
+
+    /** 地方专题(包含科一到科四) */
+    @ApiModelProperty(value = "地方专题 0否 1是")
+    private String placeIssue;
+
+    /** 精选题(包含科一到科四) */
+    @ApiModelProperty(value = "精选题 0否 1是")
+    private String excellIssue;
+
+
+    /** 题目在顺序练习中所属的模块名称 */
+    @ApiModelProperty(value = "题目在顺序练习中所属的模块名称")
+    private String sequeIssueName;
+
+    /** 题目在地方专题中所属的模块名称 */
+    @ApiModelProperty(value = "题目在地方专题中所属的模块名称")
+    private String placeIssueName;
+
+    /** 题目在精选中所属的模块名称 */
+    @ApiModelProperty(value = "题目在精选中所属的模块名称")
+    private String excellIssueName;
+
+    /** 题目在分类中所属的模块名称 */
+    @ApiModelProperty(value = "题目在分类中所属的模块名称")
+    private String classIssueName;
+
+    /** 是否随机 */
+    @ApiModelProperty(value = "是否随机")
+    private String isRand;
+
+
+    /** 题目类型 */
+    @ApiModelProperty(value = "题目类型 1判断,2选择,3多选")
+    private Integer questionType;
+
+
+    /** 科目 */
+    @ApiModelProperty(value = "科目")
+    private Integer subject;
+
+//    /** 分类练习排序字段 */
+//    @ApiModelProperty(value = "分类练习排序字段")
+//    private Integer classSort;
+//
+//    /** 精选考题排序字段 */
+//    @ApiModelProperty(value = "精选考题排序字段")
+//    private Integer excellSort;
+//
+//
+//    /** 顺序练习排序字段 */
+//    @ApiModelProperty(value = "顺序练习排序字段")
+//    private Integer sequeSort;
+//
+//
+//    /** 地方专题排序字段 */
+//    @ApiModelProperty(value = "地方专题排序字段")
+//    private Integer placeSort;
+
+    /** 排序字段  1:分类练习:class_sort;2:精选考题:excell_sort;3:顺序练习:seque_sort;4:地方专题:place_sort;*/
+    @ApiModelProperty(value = "1:分类练习;2:精选考题;3:顺序练习;4:地方专题;")
+    private Integer sort;
+
+    /**
+     * 1:分类练习:class_sort;2:精选考题:excell_sort;3:顺序练习:seque_sort;4:地方专题:place_sort;
+     */
+    @ApiModelProperty(value = "分类字段名",hidden = true)
+    private String sortName;
+
+
+
+}

+ 0 - 62
zzjs-service/src/main/java/com/miaxis/question/dto/QuestionInfoDto.java

@@ -1,62 +0,0 @@
-package com.miaxis.question.dto;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.baomidou.mybatisplus.annotation.TableName;
-import com.miaxis.common.annotation.Excel;
-import com.miaxis.common.core.domain.BaseBusinessEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-import org.apache.commons.lang3.builder.ToStringBuilder;
-import org.apache.commons.lang3.builder.ToStringStyle;
-
-/**
- * 题库对象 question_info
- *
- * @author miaxis
- * @date 2021-03-12
- */
-@Data
-@ApiModel(value = "QuestionInfoDto", description = "题库传参")
-public class QuestionInfoDto extends BaseBusinessEntity{
-    private static final long serialVersionUID = 1L;
-
-    /** id */
-    @TableId("id")
-    @ApiModelProperty(value = "主键")
-    private Long id;
-
-    /** 类型 */
-    @TableField("type")
-    @ApiModelProperty(value = "类型 1:选择题 2:单选题 3:多选题")
-    private Long type;
-
-
-    /** 许可车型 */
-    @TableField("license_type")
-    @ApiModelProperty(value = "许可车型")
-    private String licenseType;
-
-
-    /** 科目 */
-    @TableField("kemu")
-    @ApiModelProperty(value = "科目")
-    private Long kemu;
-
-
-    /**
-     * 是否显示
-     */
-    @TableField("show_option_type")
-    @ApiModelProperty(value = "是否显示")
-    private Long showOptionType;
-
-
-    /**
-     * 排序
-     */
-    @ApiModelProperty(value = "排序")
-    private String orderByClause;
-
-}

+ 0 - 48
zzjs-service/src/main/java/com/miaxis/question/dto/QuestionInfoRandDto.java

@@ -1,48 +0,0 @@
-package com.miaxis.question.dto;
-
-import com.baomidou.mybatisplus.annotation.TableField;
-import com.baomidou.mybatisplus.annotation.TableId;
-import com.miaxis.common.core.domain.BaseBusinessEntity;
-import io.swagger.annotations.ApiModel;
-import io.swagger.annotations.ApiModelProperty;
-import lombok.Data;
-
-/**
- * 题库对象 question_info
- *
- * @author miaxis
- * @date 2021-03-12
- */
-@Data
-@ApiModel(value = "QuestionInfoDto", description = "题库传参")
-public class QuestionInfoRandDto extends BaseBusinessEntity{
-    private static final long serialVersionUID = 1L;
-
-
-    /** 类型 */
-    @TableField("type")
-    @ApiModelProperty(value = "类型 1:选择题 2:单选题 3:多选题")
-    private Long type;
-
-
-    /** 许可车型 */
-    @TableField("license_type")
-    @ApiModelProperty(value = "许可车型")
-    private String licenseType;
-
-
-    /** 科目 */
-    @TableField("kemu")
-    @ApiModelProperty(value = "科目")
-    private Long kemu;
-
-
-
-
-    /**
-     * 承机条数
-     */
-    @ApiModelProperty(value = "随机条数",required = true)
-    private Integer num;
-
-}

+ 54 - 0
zzjs-service/src/main/java/com/miaxis/question/dto/QuestionInfoTestDTO.java

@@ -0,0 +1,54 @@
+package com.miaxis.question.dto;
+
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.List;
+
+/**
+ * 地方题选分类返回对象
+ * @author miaxis
+ * @date 2021-10-20
+ */
+@Data
+@ApiModel(value = "QuestionInfoTestDTO", description = "模拟考试输入对象")
+public class QuestionInfoTestDTO {
+    private static final long serialVersionUID = 1L;
+
+
+    @ApiModelProperty(value = "科目")
+    private Integer subject;
+
+    @ApiModelProperty(hidden = true)
+    private String liceCar;
+
+    @ApiModelProperty(hidden = true)
+    private String liceBus;
+
+    @ApiModelProperty(hidden = true)
+    private String liceTruck;
+
+    @ApiModelProperty(hidden = true)
+    private String liceMoto;
+
+    @ApiModelProperty(value = "取题车型 小车:xc;客车:kc;货车:hc;摩托车:mtc")
+    private String gs;
+
+    @ApiModelProperty(hidden = true)
+    private String excellIssueName;
+
+    @ApiModelProperty(hidden = true)
+    private Integer questionType;
+
+    @ApiModelProperty(hidden = true)
+    private Integer chapterId;
+
+    @ApiModelProperty(hidden = true)
+    private List<Integer> diffDegree;
+
+    @ApiModelProperty(hidden = true)
+    private Integer num;
+
+}

+ 40 - 0
zzjs-service/src/main/java/com/miaxis/question/dto/TAppExamRuleDTO.java

@@ -0,0 +1,40 @@
+package com.miaxis.question.dto;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import com.miaxis.common.annotation.Excel;
+import com.miaxis.common.core.domain.BaseBusinessEntity;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+/**
+ * 考试取题对象 t_app_exam_rule
+ *
+ * @author miaxis
+ * @date 2022-05-23
+ */
+@Data
+@ApiModel(value = "TAppExamRuleDTO", description = "t_app_exam_rule")
+public class TAppExamRuleDTO {
+    private static final long serialVersionUID = 1L;
+
+
+    /** 车型 */
+    @ApiModelProperty(value = "车型")
+    private String gs;
+
+    /** 科目 */
+    @ApiModelProperty(value = "科目")
+    private Long kemu;
+
+    /** 章节ID */
+    @ApiModelProperty(value = "章节ID")
+    private Long chapterId;
+
+
+
+
+}

+ 22 - 0
zzjs-service/src/main/java/com/miaxis/question/mapper/QuestionFreeMapper.java

@@ -0,0 +1,22 @@
+package com.miaxis.question.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.question.domain.QuestionFree;
+
+/**
+ *  免费试用题Mapper接口
+ *
+ * @author miaxis
+ * @date 2022-06-10
+ */
+public interface QuestionFreeMapper extends BaseMapper<QuestionFree> {
+    /**
+     * 查询 免费试用题列表
+     *
+     * @param questionFree  免费试用题
+     * @return  免费试用题集合
+     */
+    public List<QuestionFree> selectQuestionFreeList(QuestionFree questionFree);
+
+}

+ 29 - 0
zzjs-service/src/main/java/com/miaxis/question/mapper/QuestionInfoMapper.java

@@ -0,0 +1,29 @@
+package com.miaxis.question.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.question.domain.QuestionInfo;
+import com.miaxis.question.dto.*;
+
+import java.util.List;
+
+/**
+ * 题库Mapper接口
+ *
+ * @author miaxis
+ * @date 2021-10-20
+ */
+public interface QuestionInfoMapper extends BaseMapper<QuestionInfo> {
+    /**
+     * 查询题库列表
+     *
+     * @param
+     * @return 题库集合
+     */
+    List<QuestionInfo> selectQuestionInfoList(QuestionInfoDTO questionInfoDTO);
+
+    List<QuestionInfo> selectQuestionInfoListByYdtIds(Long[] ids);
+
+    List<QuestionInfo> selectQuestionInfoListByIds(Long[] ids);
+
+    List<QuestionInfo> selectTestQuestionInfoList(QuestionInfoTestDTO questionInfoTestDTO);
+}

+ 24 - 0
zzjs-service/src/main/java/com/miaxis/question/mapper/QuestionYdtJsMapper.java

@@ -0,0 +1,24 @@
+package com.miaxis.question.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.question.domain.QuestionYdtJs;
+
+/**
+ * 驾校一点通解释Mapper接口
+ *
+ * @author miaxis
+ * @date 2022-05-06
+ */
+public interface QuestionYdtJsMapper extends BaseMapper<QuestionYdtJs> {
+    /**
+     * 查询驾校一点通解释列表
+     *
+     * @param questionYdtJs 驾校一点通解释
+     * @return 驾校一点通解释集合
+     */
+    public List<QuestionYdtJs> selectQuestionYdtJsList(QuestionYdtJs questionYdtJs);
+
+
+    public List<QuestionYdtJs> selectQuestionYdtJsList2(QuestionYdtJs questionYdtJs);
+}

+ 22 - 0
zzjs-service/src/main/java/com/miaxis/question/mapper/TAppExamRuleMapper.java

@@ -0,0 +1,22 @@
+package com.miaxis.question.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.question.domain.TAppExamRule;
+
+/**
+ * 考试取题Mapper接口
+ *
+ * @author miaxis
+ * @date 2022-05-23
+ */
+public interface TAppExamRuleMapper extends BaseMapper<TAppExamRule> {
+    /**
+     * 查询考试取题列表
+     *
+     * @param tAppExamRule 考试取题
+     * @return 考试取题集合
+     */
+    public List<TAppExamRule> selectTAppExamRuleList(TAppExamRule tAppExamRule);
+
+}

+ 22 - 0
zzjs-service/src/main/java/com/miaxis/question/mapper/WebNoteAllMapper.java

@@ -0,0 +1,22 @@
+package com.miaxis.question.mapper;
+
+import java.util.List;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.miaxis.question.domain.WebNoteAll;
+
+/**
+ * 一点通整合题库Mapper接口
+ *
+ * @author miaxis
+ * @date 2022-05-06
+ */
+public interface WebNoteAllMapper extends BaseMapper<WebNoteAll> {
+    /**
+     * 查询一点通整合题库列表
+     *
+     * @param webNoteAll 一点通整合题库
+     * @return 一点通整合题库集合
+     */
+    public List<WebNoteAll> selectWebNoteAllList(WebNoteAll webNoteAll);
+
+}

+ 21 - 0
zzjs-service/src/main/java/com/miaxis/question/service/IQuestionFreeService.java

@@ -0,0 +1,21 @@
+package com.miaxis.question.service;
+
+import java.util.List;
+import com.miaxis.question.domain.QuestionFree;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ *  免费试用题Service接口
+ *
+ * @author miaxis
+ * @date 2022-06-10
+ */
+public interface IQuestionFreeService extends IService<QuestionFree>{
+    /**
+     * 查询 免费试用题列表
+     *
+     * @param questionFree  免费试用题
+     * @return  免费试用题集合
+     */
+    public List<QuestionFree> selectQuestionFreeList(QuestionFree questionFree);
+}

+ 33 - 0
zzjs-service/src/main/java/com/miaxis/question/service/IQuestionInfoService.java

@@ -0,0 +1,33 @@
+package com.miaxis.question.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.miaxis.question.domain.QuestionInfo;
+import com.miaxis.question.dto.*;
+
+import java.util.List;
+
+/**
+ * 题库Service接口
+ *
+ * @author miaxis
+ * @date 2021-10-20
+ */
+public interface IQuestionInfoService extends IService<QuestionInfo>{
+    /**
+     * 查询题库列表
+     *
+     * @param
+     * @return 题库集合
+     */
+    List<QuestionInfo> selectQuestionInfoList(QuestionInfoDTO questionInfoDTO);
+
+    List<QuestionInfo> selectQuestionInfoListByIds(Long[] ids);
+
+    List<QuestionInfo> selectQuestionInfoListByYdtIds(Long[] ids);
+
+    List<QuestionInfo> selectTestQuestionInfoList(QuestionInfoTestDTO questionInfoTestDTO);
+
+    List<QuestionInfo> selectTestK14QuestionInfoList(QuestionInfoTestDTO questionInfoTestDTO);
+
+}
+

+ 23 - 0
zzjs-service/src/main/java/com/miaxis/question/service/IQuestionYdtJsService.java

@@ -0,0 +1,23 @@
+package com.miaxis.question.service;
+
+import java.util.List;
+import com.miaxis.question.domain.QuestionYdtJs;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 驾校一点通解释Service接口
+ *
+ * @author miaxis
+ * @date 2022-05-06
+ */
+public interface IQuestionYdtJsService extends IService<QuestionYdtJs>{
+    /**
+     * 查询驾校一点通解释列表
+     *
+     * @param questionYdtJs 驾校一点通解释
+     * @return 驾校一点通解释集合
+     */
+    public List<QuestionYdtJs> selectQuestionYdtJsList(QuestionYdtJs questionYdtJs);
+
+    public List<QuestionYdtJs> selectQuestionYdtJsList2(QuestionYdtJs questionYdtJs);
+}

+ 21 - 0
zzjs-service/src/main/java/com/miaxis/question/service/ITAppExamRuleService.java

@@ -0,0 +1,21 @@
+package com.miaxis.question.service;
+
+import java.util.List;
+import com.miaxis.question.domain.TAppExamRule;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 考试取题Service接口
+ *
+ * @author miaxis
+ * @date 2022-05-23
+ */
+public interface ITAppExamRuleService extends IService<TAppExamRule>{
+    /**
+     * 查询考试取题列表
+     *
+     * @param tAppExamRule 考试取题
+     * @return 考试取题集合
+     */
+    public List<TAppExamRule> selectTAppExamRuleList(TAppExamRule tAppExamRule);
+}

+ 21 - 0
zzjs-service/src/main/java/com/miaxis/question/service/IWebNoteAllService.java

@@ -0,0 +1,21 @@
+package com.miaxis.question.service;
+
+import java.util.List;
+import com.miaxis.question.domain.WebNoteAll;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * 一点通整合题库Service接口
+ *
+ * @author miaxis
+ * @date 2022-05-06
+ */
+public interface IWebNoteAllService extends IService<WebNoteAll>{
+    /**
+     * 查询一点通整合题库列表
+     *
+     * @param webNoteAll 一点通整合题库
+     * @return 一点通整合题库集合
+     */
+    public List<WebNoteAll> selectWebNoteAllList(WebNoteAll webNoteAll);
+}

+ 36 - 0
zzjs-service/src/main/java/com/miaxis/question/service/impl/QuestionFreeServiceImpl.java

@@ -0,0 +1,36 @@
+package com.miaxis.question.service.impl;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.miaxis.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.apache.commons.lang3.StringUtils;
+import com.miaxis.question.mapper.QuestionFreeMapper;
+import com.miaxis.question.domain.QuestionFree;
+import com.miaxis.question.service.IQuestionFreeService;
+
+/**
+ *  免费试用题Service业务层处理
+ *
+ * @author miaxis
+ * @date 2022-06-10
+ */
+@Service
+public class QuestionFreeServiceImpl extends ServiceImpl<QuestionFreeMapper, QuestionFree> implements IQuestionFreeService {
+    @Autowired
+    private QuestionFreeMapper questionFreeMapper;
+
+    /**
+     * 查询 免费试用题列表
+     *
+     * @param questionFree  免费试用题
+     * @return  免费试用题
+     */
+    @Override
+    public List<QuestionFree> selectQuestionFreeList(QuestionFree questionFree){
+        return questionFreeMapper.selectQuestionFreeList(questionFree);
+    }
+}

+ 251 - 0
zzjs-service/src/main/java/com/miaxis/question/service/impl/QuestionInfoServiceImpl.java

@@ -0,0 +1,251 @@
+package com.miaxis.question.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.miaxis.common.exception.CustomException;
+import com.miaxis.question.domain.QuestionInfo;
+import com.miaxis.question.domain.TAppExamRule;
+import com.miaxis.question.dto.*;
+import com.miaxis.question.mapper.QuestionInfoMapper;
+import com.miaxis.question.service.IQuestionInfoService;
+import com.miaxis.question.service.ITAppExamRuleService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Random;
+
+/**
+ * 题库Service业务层处理
+ *
+ * @author miaxis
+ * @date 2021-10-20
+ */
+@Service
+public class QuestionInfoServiceImpl extends ServiceImpl<QuestionInfoMapper, QuestionInfo> implements IQuestionInfoService {
+    @Autowired
+    private QuestionInfoMapper questionInfoMapper;
+
+    @Autowired
+    private ITAppExamRuleService appExamRuleService;
+
+    /**
+     * 查询题库列表
+     *
+     * @param
+     * @return 题库
+     */
+    @Override
+    public List<QuestionInfo> selectQuestionInfoList(QuestionInfoDTO questionInfoDTO) {
+
+        //1:分类练习:class_sort;2:精选考题:excell_sort;3:地方专题:place_sort;4:顺序练习:seque_sort;
+        Integer sort = questionInfoDTO.getSort();
+        if (sort != null) {
+            switch (sort) {
+                case 1:
+                    questionInfoDTO.setSortName("class_sort");
+                    break;
+                case 2:
+                    questionInfoDTO.setSortName("excell_sort");
+                    break;
+                case 3:
+                    questionInfoDTO.setSortName("place_sort");
+                    break;
+                case 4:
+                    questionInfoDTO.setSortName("seque_sort");
+                    break;
+                default:
+                    throw new CustomException("请正常输入sort字段");
+            }
+        }
+        return questionInfoMapper.selectQuestionInfoList(questionInfoDTO);
+    }
+
+    @Override
+    public List<QuestionInfo> selectQuestionInfoListByIds(Long[] ids) {
+        return questionInfoMapper.selectQuestionInfoListByIds(ids);
+    }
+
+    @Override
+    public List<QuestionInfo> selectQuestionInfoListByYdtIds(Long[] ids) {
+        return questionInfoMapper.selectQuestionInfoListByYdtIds(ids);
+    }
+
+    @Override
+    public List<QuestionInfo> selectTestQuestionInfoList(QuestionInfoTestDTO questionInfoTestDTO) {
+        return questionInfoMapper.selectTestQuestionInfoList(questionInfoTestDTO);
+    }
+
+
+
+    @Override
+    public List<QuestionInfo> selectTestK14QuestionInfoList(QuestionInfoTestDTO qt) {
+
+        int total = 100;
+        if ("mtc".equals(qt.getGs())) { //如果是摩托车取题50
+            total = 50;
+        } else if (qt.getSubject()==1) {
+            total = 100;
+        } else if (qt.getSubject()==4) {
+            total = 50;
+        }
+
+        if("mtc".equals(qt.getGs())) {
+            qt.setLiceMoto("1");
+        } else if("xc".equals(qt.getGs())){
+            qt.setLiceCar("1");
+        } else if("hc".equals(qt.getGs())){
+            qt.setLiceTruck("1");
+        } else if("kc".equals(qt.getGs())){
+            qt.setLiceBus("1");
+        }
+
+        //全题库
+        List<QuestionInfo> allList = new ArrayList<QuestionInfo>();
+        int error = 0;
+        while (allList.size() != total && error < 10) {
+            System.out.println("error:" + error);
+            allList = new ArrayList<QuestionInfo>();
+            //判断题
+            List<QuestionInfo> judgeList = new ArrayList<QuestionInfo>();
+            //选择题
+            List<QuestionInfo> choiceList = new ArrayList<QuestionInfo>();
+            //多选题
+            List<QuestionInfo> multipleList = new ArrayList<QuestionInfo>();
+
+            //简单题
+            List<Integer> easyDegree = new ArrayList<Integer>();
+            easyDegree.add(1);
+            easyDegree.add(2);
+            easyDegree.add(3);
+            //难题
+            List<Integer> diffDegree = new ArrayList<Integer>();
+            diffDegree.add(4);
+            diffDegree.add(5);
+            //科目一通用
+            TAppExamRule tAppExamRule = new TAppExamRule();
+            tAppExamRule.setKemu(qt.getSubject());
+            tAppExamRule.setGs(qt.getGs());
+            tAppExamRule.setAreacode(0);
+
+            List<TAppExamRule> list = appExamRuleService.selectTAppExamRuleList(tAppExamRule);
+            if(list.size()==0){
+                return allList;
+            }
+            for (int i = 0; i < list.size(); i++) {
+                TAppExamRule er = list.get(i);
+                int easyJudge = er.getJudgeCount();
+                int easyChoice = er.getChoiceCount();
+                int easyMultiple = er.getMultipleChoiceCount();
+                int x = i + 1;
+                System.out.println("第" + x + "轮easyJudge:" + easyJudge);
+
+                Random random = new Random();
+                int p = 0; //判断题
+                int d = 0; //单选题
+                int m = 0; //多选题
+                for (int j = 0; j < er.getDifficultCount(); j++) {
+                    if (random.nextInt(9) <= 2) {   //判断题
+                        if (easyJudge - 1 < 0) {
+                            j--;
+                        } else {
+                            p++;
+                            easyJudge--;
+                        }
+                    } else if (random.nextInt(9) <= 5) {  //单选题
+                        if (easyChoice - 1 < 0) {
+                            j--;
+                        } else {
+                            d++;
+                            easyChoice--;
+                        }
+                    } else if (random.nextInt(9) <= 8) {    //多选题
+                        if (easyMultiple - 1 < 0) {
+                            j--;
+                        } else {
+                            m++;
+                            easyMultiple--;
+                        }
+                    }
+                }
+
+//                System.out.println("简单判断:" + easyJudge);
+//                System.out.println("简单选择:" + easyChoice);
+//                System.out.println("简单多选:" + easyMultiple);
+//                System.out.println("难题判断:" + p);
+//                System.out.println("难题选择:" + d);
+//                System.out.println("难题多择:" + m);
+//                System.out.println("---------------------------------------------");
+
+                //判断简单
+                qt.setChapterId(er.getChapterId()); //章节ID
+                qt.setDiffDegree(easyDegree);       //简单难度
+                qt.setQuestionType(1);              //判断题
+                qt.setNum(easyJudge);               //题数
+                List<QuestionInfo> easyJudgeList = this.selectTestQuestionInfoList(qt);
+                //单选简单
+                qt.setChapterId(er.getChapterId()); //章节ID
+                qt.setDiffDegree(easyDegree);       //简单难度
+                qt.setQuestionType(2);              //判断题
+                qt.setNum(easyChoice);              //题数
+                List<QuestionInfo> easyChoiceList = this.selectTestQuestionInfoList(qt);
+                //多选简单
+                qt.setChapterId(er.getChapterId()); //章节ID
+                qt.setDiffDegree(easyDegree);       //简单难度
+                qt.setQuestionType(3);              //判断题
+                qt.setNum(easyMultiple);              //题数
+                List<QuestionInfo> easyMultipleList = this.selectTestQuestionInfoList(qt);
+
+                //判断难题
+                qt.setChapterId(er.getChapterId()); //章节ID
+                qt.setDiffDegree(diffDegree);       //高难度
+                qt.setQuestionType(1);              //判断题
+                qt.setNum(p);                       //题数
+                List<QuestionInfo> diffJudgeList = this.selectTestQuestionInfoList(qt);
+                if (p != diffJudgeList.size()) {
+                    System.out.println("p!=diffJudgeList.size()");
+                    error++;
+                    break;
+                }
+
+                //单选难题
+                qt.setChapterId(er.getChapterId()); //章节ID
+                qt.setDiffDegree(diffDegree);       //高难度
+                qt.setQuestionType(2);              //判断题
+                qt.setNum(d);                       //题数
+                List<QuestionInfo> diffChoiceList = this.selectTestQuestionInfoList(qt);
+                if (d != diffChoiceList.size()) {
+                    System.out.println("d!=diffChoiceList.size()");
+                    error++;
+                    break;
+                }
+                //多选简单
+                qt.setChapterId(er.getChapterId()); //章节ID
+                qt.setDiffDegree(diffDegree);       //高难度
+                qt.setQuestionType(3);              //判断题
+                qt.setNum(m);                       //题数
+                List<QuestionInfo> diffMultipleList = this.selectTestQuestionInfoList(qt);
+                if (m != diffMultipleList.size()) {
+                    System.out.println("m!=diffMultipleList.size()");
+                    error++;
+                    break;
+                }
+
+                judgeList.addAll(easyJudgeList);
+                judgeList.addAll(diffJudgeList);
+                choiceList.addAll(easyChoiceList);
+                choiceList.addAll(diffChoiceList);
+                multipleList.addAll(easyMultipleList);
+                multipleList.addAll(diffMultipleList);
+            }
+            allList.addAll(judgeList);
+            allList.addAll(choiceList);
+            allList.addAll(multipleList);
+//            System.out.println("error:" + error);
+//            System.out.println("allList:" + allList.size());
+        }
+        return allList;
+    }
+
+
+}

+ 40 - 0
zzjs-service/src/main/java/com/miaxis/question/service/impl/QuestionYdtJsServiceImpl.java

@@ -0,0 +1,40 @@
+package com.miaxis.question.service.impl;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.apache.commons.lang3.StringUtils;
+import com.miaxis.question.mapper.QuestionYdtJsMapper;
+import com.miaxis.question.domain.QuestionYdtJs;
+import com.miaxis.question.service.IQuestionYdtJsService;
+
+/**
+ * 驾校一点通解释Service业务层处理
+ *
+ * @author miaxis
+ * @date 2022-05-06
+ */
+@Service
+public class QuestionYdtJsServiceImpl extends ServiceImpl<QuestionYdtJsMapper, QuestionYdtJs> implements IQuestionYdtJsService {
+    @Autowired
+    private QuestionYdtJsMapper questionYdtJsMapper;
+
+    /**
+     * 查询驾校一点通解释列表
+     *
+     * @param questionYdtJs 驾校一点通解释
+     * @return 驾校一点通解释
+     */
+    @Override
+    public List<QuestionYdtJs> selectQuestionYdtJsList(QuestionYdtJs questionYdtJs){
+        return questionYdtJsMapper.selectQuestionYdtJsList(questionYdtJs);
+    }
+
+    @Override
+    public List<QuestionYdtJs> selectQuestionYdtJsList2(QuestionYdtJs questionYdtJs){
+        return questionYdtJsMapper.selectQuestionYdtJsList2(questionYdtJs);
+    }
+}

+ 36 - 0
zzjs-service/src/main/java/com/miaxis/question/service/impl/TAppExamRuleServiceImpl.java

@@ -0,0 +1,36 @@
+package com.miaxis.question.service.impl;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.apache.commons.lang3.StringUtils;
+import com.miaxis.question.mapper.TAppExamRuleMapper;
+import com.miaxis.question.domain.TAppExamRule;
+import com.miaxis.question.service.ITAppExamRuleService;
+
+/**
+ * 考试取题Service业务层处理
+ *
+ * @author miaxis
+ * @date 2022-05-23
+ */
+@Service
+public class TAppExamRuleServiceImpl extends ServiceImpl<TAppExamRuleMapper, TAppExamRule> implements ITAppExamRuleService {
+
+    @Autowired
+    private TAppExamRuleMapper tAppExamRuleMapper;
+
+    /**
+     * 查询考试取题列表
+     *
+     * @param tAppExamRule 考试取题
+     * @return 考试取题
+     */
+    @Override
+    public List<TAppExamRule> selectTAppExamRuleList(TAppExamRule tAppExamRule){
+        return tAppExamRuleMapper.selectTAppExamRuleList(tAppExamRule);
+    }
+}

+ 35 - 0
zzjs-service/src/main/java/com/miaxis/question/service/impl/WebNoteAllServiceImpl.java

@@ -0,0 +1,35 @@
+package com.miaxis.question.service.impl;
+
+import java.util.List;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.apache.commons.lang3.StringUtils;
+import com.miaxis.question.mapper.WebNoteAllMapper;
+import com.miaxis.question.domain.WebNoteAll;
+import com.miaxis.question.service.IWebNoteAllService;
+
+/**
+ * 一点通整合题库Service业务层处理
+ *
+ * @author miaxis
+ * @date 2022-05-06
+ */
+@Service
+public class WebNoteAllServiceImpl extends ServiceImpl<WebNoteAllMapper, WebNoteAll> implements IWebNoteAllService {
+    @Autowired
+    private WebNoteAllMapper webNoteAllMapper;
+
+    /**
+     * 查询一点通整合题库列表
+     *
+     * @param webNoteAll 一点通整合题库
+     * @return 一点通整合题库
+     */
+    @Override
+    public List<WebNoteAll> selectWebNoteAllList(WebNoteAll webNoteAll){
+        return webNoteAllMapper.selectWebNoteAllList(webNoteAll);
+    }
+}

+ 0 - 0
zzjs-service/src/main/resources/mapper/carousel/HomePageDataInfoMapper.xml → zzjs-service/src/main/resources/mapper/dict/carousel/HomePageDataInfoMapper.xml


+ 29 - 0
zzjs-service/src/main/resources/mapper/free/QuestionFreeMapper.xml

@@ -0,0 +1,29 @@
+<?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.miaxis.question.mapper.QuestionFreeMapper">
+
+    <resultMap type="QuestionFree" id="QuestionFreeResult">
+        <result property="id"    column="id"    />
+        <result property="idYdt"    column="id_ydt"    />
+        <result property="subject"    column="subject"    />
+        <result property="freeSort"    column="free_sort"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectQuestionFreeVo">
+        select * from question_free
+    </sql>
+
+    <select id="selectQuestionFreeList" parameterType="QuestionFree" resultMap="QuestionFreeResult">
+        <include refid="selectQuestionFreeVo"/>
+        <where>
+            <if test="idYdt != null "> and id_ydt = #{idYdt}</if>
+            <if test="subject != null "> and subject = #{subject}</if>
+            <if test="freeSort != null "> and free_sort = #{freeSort}</if>
+        </where>
+    </select>
+
+</mapper>

+ 102 - 23
zzjs-service/src/main/resources/mapper/question/QuestionInfoKtGetMapper.xml

@@ -6,7 +6,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <resultMap type="QuestionInfoKtGet" id="QuestionInfoKtGetResult">
         <result property="id"    column="id"    />
-        <result property="idKt"    column="id_kt"    />
         <result property="idYdt"    column="id_ydt"    />
         <result property="number"    column="number"    />
         <result property="answer"    column="answer"    />
@@ -46,6 +45,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="sequeSort"    column="seque_sort"    />
         <result property="placeSort"    column="place_sort"    />
         <result property="subject"    column="subject"    />
+        <result property="isFree"    column="is_free"    />
+        <result property="freeSort"    column="free_sort"    />
     </resultMap>
 
     <sql id="selectQuestionInfoKtGetVo">
@@ -55,7 +56,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectQuestionInfoKtGetList" parameterType="QuestionInfoKtGet" resultMap="QuestionInfoKtGetResult">
         <include refid="selectQuestionInfoKtGetVo"/>
         <where>
-            <if test="idKt != null "> and id_kt = #{idKt}</if>
+            <if test="id != null "> and id = #{id}</if>
             <if test="idYdt != null "> and id_ydt = #{idYdt}</if>
             <if test="number != null "> and number = #{number}</if>
             <if test="answer != null  and answer != ''"> and answer = #{answer}</if>
@@ -93,6 +94,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="sequeSort != null "> and seque_sort = #{sequeSort}</if>
             <if test="placeSort != null "> and place_sort = #{placeSort}</if>
             <if test="subject != null "> and subject = #{subject}</if>
+            <if test="isFree != null "> and is_free = #{isFree}</if>
+            <if test="freeSort != null "> and free_sort = #{freeSort}</if>
         </where>
     </select>
 
@@ -101,7 +104,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectQuestionInfoKtGetCount" parameterType="QuestionInfoKtGet" resultType="int">
         select count(1) from question_info_kt_get
         <where>
-            <if test="idKt != null "> and id_kt = #{idKt}</if>
+            <if test="id != null "> and id = #{id}</if>
             <if test="idYdt != null "> and id_ydt = #{idYdt}</if>
             <if test="number != null "> and number = #{number}</if>
             <if test="answer != null  and answer != ''"> and answer = #{answer}</if>
@@ -139,6 +142,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="sequeSort != null "> and seque_sort = #{sequeSort}</if>
             <if test="placeSort != null "> and place_sort = #{placeSort}</if>
             <if test="subject != null "> and subject = #{subject}</if>
+            <if test="isFree != null "> and is_free = #{isFree}</if>
         </where>
     </select>
 
@@ -146,31 +150,106 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectQuestionInfoKtGetExplainGifList"  resultMap="QuestionInfoKtGetResult">
         select * from question_info_kt_get where explain_gif!=''
+        <!--elect * from question_info_kt_get t1 where t1.id not in (select id  from question_info) and explain_gif!=''
+        union
+        SELECT t1.*
+        FROM
+        question_info_kt_get t1
+        JOIN question_info t2 ON t1.id = t2.id
+        WHERE
+        t1.explain_gif!='' and t1.explain_gif is not null and
+        REPLACE(t1.explain_gif, 'https://sucai-cdn.kuaitongjiakao.com/kuaitong/issue/explain_gif/', 'https://t1-1305573081.file.myqcloud.com/kt/explain_gif/' ) != t2.explain_gif
+        and
+        REPLACE(t1.explain_gif, 'https://sucai-cdn.kuaitongjiakao.com/kuaitong/issue/explain_gif/', 'https://t1-1305573081.file.myqcloud.com/kt/explain_gif/' ) != t2.explain_gif
+         -->
     </select>
 
     <select id="selectQuestionInfoKtGetExplainMp3List"  resultMap="QuestionInfoKtGetResult">
         select * from question_info_kt_get where explain_mp3!=''
+        <!--select * from question_info_kt_get t1 where t1.id not in (select id  from question_info) and explain_mp3!=''
+        union
+        SELECT t1.*
+        FROM
+        question_info_kt_get t1
+        JOIN question_info t2 ON t1.id = t2.id
+        WHERE
+        t1.explain_mp3!='' and t1.explain_mp3 is not null and
+        REPLACE(t1.explain_mp3, 'https://sucai-cdn.kuaitongjiakao.com/kuaitong/issue/explain_mp3/', 'https://t1-1305573081.file.myqcloud.com/kt/explain_mp3/' ) != t2.explain_mp3
+        and
+        REPLACE(t1.explain_mp3, 'https://sucai.hunanliehu.com/mp3/', 'https://t1-1305573081.file.myqcloud.com/kt/explain_mp3/' ) != t2.explain_mp3
+-->
     </select>
 
     <select id="selectQuestionInfoKtGetImageList"  resultMap="QuestionInfoKtGetResult">
-        select * from question_info_kt_get where image!=''
-    </select>
-
-    <select id="selectQuestionInfoKtGetImageYdtList"  resultMap="QuestionInfoKtGetResult">
-        select * from question_info_kt_get where image_ydt!=''
-    </select>
-
-    <select id="selectQuestionInfoKtGetIssuemp3List"  resultMap="QuestionInfoKtGetResult">
+         select * from question_info_kt_get where image!=''
+        <!--select * from question_info_kt_get t1 where t1.id not in (select id  from question_info) and image!=''
+        union
+        SELECT t1.*
+        FROM
+        question_info_kt_get t1
+        JOIN question_info t2 ON t1.id = t2.id
+        WHERE
+        t1.image!='' and t1.image is not null and
+        REPLACE(t1.image, 'https://sucai-cdn.kuaitongjiakao.com/kuaitong/issue/image/', 'https://t1-1305573081.file.myqcloud.com/kt/image/' ) != t2.image
+        and
+        REPLACE(t1.image, 'https://wos.58cdn.com.cn/XyVuTsRqXyf/question/', 'https://t1-1305573081.file.myqcloud.com/kt/image/' ) != t2.image
+-->
+     </select>
+
+     <select id="selectQuestionInfoKtGetImageYdtList"  resultMap="QuestionInfoKtGetResult">
+         <!--select * from question_info_kt_get where image_ydt!=''-->
+         select * from question_info_kt_get t1 where t1.id not in (select id  from question_info) and image_ydt!='';
+     </select>
+
+     <select id="selectQuestionInfoKtGetIssuemp3List"  resultMap="QuestionInfoKtGetResult">
         select * from question_info_kt_get where issuemp3!=''
-    </select>
-
-    <select id="selectQuestionInfoKtGetAnswermp3List"  resultMap="QuestionInfoKtGetResult">
-        select * from question_info_kt_get where answermp3!=''
-    </select>
-
-    <select id="selectQuestionInfoKtGetExplainjsmp3List"  resultMap="QuestionInfoKtGetResult">
-        select * from question_info_kt_get where explainjsmp3!=''
-    </select>
-
-
-</mapper>
+         <!--select * from question_info_kt_get t1 where t1.id not in (select id  from question_info) and issuemp3!=''
+          union
+          SELECT t1.*
+          FROM
+          question_info_kt_get t1
+          JOIN question_info t2 ON t1.id = t2.id
+          WHERE
+          t1.issuemp3!='' and t1.issuemp3 is not null and
+          REPLACE(t1.issuemp3, 'https://sucai-cdn.kuaitongjiakao.com/kuaitong/issue/issue_mp3/', 'https://t1-1305573081.file.myqcloud.com/kt/issue_mp3/' ) != t2.issuemp3
+          and
+          REPLACE(t1.issuemp3, 'https://sucai.hunanliehu.com/mp3/', 'https://t1-1305573081.file.myqcloud.com/kt/issue_mp3/' ) != t2.issuemp3
+ -->
+      </select>
+
+      <select id="selectQuestionInfoKtGetAnswermp3List"  resultMap="QuestionInfoKtGetResult">
+          select * from question_info_kt_get where answermp3!=''
+          <!--select * from question_info_kt_get t1 where t1.id not in (select id  from question_info) and answermp3!=''
+          union
+          SELECT t1.*
+          FROM
+          question_info_kt_get t1
+          JOIN question_info t2 ON t1.id = t2.id
+          WHERE
+          t1.answermp3!='' and t1.answermp3 is not null and
+          REPLACE(t1.answermp3, 'https://sucai-cdn.kuaitongjiakao.com/kuaitong/issue/answer_mp3/', 'https://t1-1305573081.file.myqcloud.com/kt/answer_mp3/' ) != t2.answermp3
+          and
+          REPLACE(t1.answermp3, 'https://sucai.hunanliehu.com/mp3/', 'https://t1-1305573081.file.myqcloud.com/kt/answer_mp3/' ) != t2.answermp3
+ -->
+
+     </select>
+
+     <select id="selectQuestionInfoKtGetExplainjsmp3List"  resultMap="QuestionInfoKtGetResult">
+         select * from question_info_kt_get where explainjsmp3!=''
+         <!-- select * from question_info_kt_get t1 where t1.id not in (select id  from question_info) and explainjsmp3!=''
+          union
+          SELECT t1.*
+          FROM
+
+          question_info_kt_get t1
+          JOIN question_info t2 ON t1.id = t2.id
+          WHERE
+          t1.explainjsmp3!='' and t1.explainjsmp3 is not null and
+          REPLACE(t1.explainjsmp3, 'https://sucai-cdn.kuaitongjiakao.com/kuaitong/issue/explain_js_mp3/', 'https://t1-1305573081.file.myqcloud.com/kt/explain_js_mp3/' ) != t2.explainjsmp3
+          and
+          REPLACE(t1.explainjsmp3, 'https://sucai.hunanliehu.com/mp3/', 'https://t1-1305573081.file.myqcloud.com/kt/explain_js_mp3/' ) != t2.explainjsmp3
+          -->
+     </select>
+
+
+ </mapper>

+ 148 - 0
zzjs-service/src/main/resources/mapper/question/QuestionInfoMapper.xml

@@ -0,0 +1,148 @@
+<?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.miaxis.question.mapper.QuestionInfoMapper">
+
+    <resultMap type="QuestionInfo" id="QuestionInfoResult">
+        <result property="id"    column="id"    />
+        <result property="number"    column="number"    />
+        <result property="answer"    column="answer"    />
+        <result property="answerkeyword"    column="answerkeyword"    />
+        <result property="explainGif"    column="explain_gif"    />
+        <result property="explainJq"    column="explain_jq"    />
+        <result property="explainJs"    column="explain_js"    />
+        <result property="explainMp3"    column="explain_mp3"    />
+        <result property="image"    column="image"    />
+        <result property="imageYdt"    column="image_ydt"    />
+        <result property="issue"    column="issue"    />
+        <result property="opts"    column="opts"    />
+        <result property="skillkeyword"    column="skillkeyword"    />
+        <result property="titlekeyword"    column="titlekeyword"    />
+        <result property="issuemp3"    column="issuemp3"    />
+        <result property="answermp3"    column="answermp3"    />
+        <result property="explainjsmp3"    column="explainjsmp3"    />
+        <result property="liceCar"    column="lice_car"    />
+        <result property="liceBus"    column="lice_bus"    />
+        <result property="liceTruck"    column="lice_truck"    />
+        <result property="liceMoto"    column="lice_moto"    />
+        <result property="sequeIssue"    column="seque_issue"    />
+        <result property="classIssue"    column="class_issue"    />
+        <result property="placeIssue"    column="place_issue"    />
+        <result property="excellIssue"    column="excell_issue"    />
+        <result property="sequeIssueName"    column="seque_issue_name"    />
+        <result property="placeIssueName"    column="place_issue_name"    />
+        <result property="excellIssueName"    column="excell_issue_name"    />
+        <result property="classIssueName"    column="class_issue_name"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="subject"    column="subject"    />
+        <result property="classSort"    column="class_sort"    />
+        <result property="excellSort"    column="excell_sort"    />
+        <result property="sequeSort"    column="seque_sort"    />
+        <result property="placeSort"    column="place_sort"    />
+
+
+    </resultMap>
+
+    <sql id="selectQuestionInfoVo">
+        select * from question_info
+    </sql>
+
+    <select id="selectQuestionInfoList" parameterType="QuestionInfoDTO" resultMap="QuestionInfoResult">
+        <include refid="selectQuestionInfoVo"/>
+        <where>
+            <if test="number != null "> and number = #{number}</if>
+            <if test="answer != null  and answer != ''"> and answer = #{answer}</if>
+            <if test="answerkeyword != null  and answerkeyword != ''"> and answerkeyword = #{answerkeyword}</if>
+            <if test="explainGif != null  and explainGif != ''"> and explain_gif = #{explainGif}</if>
+            <if test="explainJq != null  and explainJq != ''"> and explain_jq = #{explainJq}</if>
+            <if test="explainJs != null  and explainJs != ''"> and explain_js = #{explainJs}</if>
+            <if test="explainMp3 != null  and explainMp3 != ''"> and explain_mp3 = #{explainMp3}</if>
+            <if test="image != null  and image != ''"> and image = #{image}</if>
+            <if test="imageYdt != null  and imageYdt != ''"> and image_ydt = #{imageYdt}</if>
+            <if test="issue != null  and issue != ''"> and issue = #{issue}</if>
+            <if test="opts != null  and opts != ''"> and opts = #{opts}</if>
+            <if test="skillkeyword != null  and skillkeyword != ''"> and skillkeyword = #{skillkeyword}</if>
+            <if test="titlekeyword != null  and titlekeyword != ''"> and titlekeyword = #{titlekeyword}</if>
+            <if test="issuemp3 != null  and issuemp3 != ''"> and issuemp3 = #{issuemp3}</if>
+            <if test="answermp3 != null  and answermp3 != ''"> and answermp3 = #{answermp3}</if>
+            <if test="explainjsmp3 != null  and explainjsmp3 != ''"> and explainjsmp3 = #{explainjsmp3}</if>
+            <if test="liceCar != null  and liceCar != ''"> and lice_car = #{liceCar}</if>
+            <if test="liceBus != null  and liceBus != ''"> and lice_bus = #{liceBus}</if>
+            <if test="liceTruck != null  and liceTruck != ''"> and lice_truck = #{liceTruck}</if>
+            <if test="liceMoto != null  and liceMoto != ''"> and lice_moto = #{liceMoto}</if>
+            <if test="sequeIssue != null  and sequeIssue != ''"> and seque_issue = #{sequeIssue}</if>
+            <if test="classIssue != null  and classIssue != ''"> and class_issue = #{classIssue}</if>
+            <if test="placeIssue != null  and placeIssue != ''"> and place_issue = #{placeIssue}</if>
+            <if test="excellIssue != null  and excellIssue != ''"> and excell_issue = #{excellIssue}</if>
+            <if test="sequeIssueName != null  and sequeIssueName != ''"> and seque_issue_name like concat('%', #{sequeIssueName}, '%')</if>
+            <if test="placeIssueName != null  and placeIssueName != ''"> and place_issue_name like concat('%', #{placeIssueName}, '%')</if>
+            <if test="excellIssueName != null  and excellIssueName != ''"> and excell_issue_name like concat('%', #{excellIssueName}, '%')</if>
+            <if test="questionType != null "> and question_type = #{questionType}</if>
+            <if test="subject != null  and subject != ''"> and subject = #{subject}</if>
+        </where>
+
+        <if test="isRand!=null and isRand!=''"> order by rand() </if>
+        <if test="isRand==null or isRand=='' and  sort!=null and sort!='' "> order by IFNULL(${sortName},10000) </if>
+    </select>
+
+
+
+
+    <select id="selectQuestionInfoListByIds" parameterType="Long" resultMap="QuestionInfoResult">
+        <include refid="selectQuestionInfoVo"/>
+        <where>
+            and id in
+             <foreach collection="array" item="id" index="index" open="(" close=")" separator=",">
+                 #{id}
+             </foreach>
+
+        </where>
+    </select>
+
+    <select id="selectQuestionInfoListByYdtIds" parameterType="Long" resultMap="QuestionInfoResult">
+        <include refid="selectQuestionInfoVo"/>
+        <where>
+            and id_ydt in
+            <foreach collection="array" item="id" index="index" open="(" close=")" separator=",">
+                #{id}
+            </foreach>
+
+        </where>
+    </select>
+
+
+
+    <select id="selectTestQuestionInfoList"   resultMap="QuestionInfoResult">
+        select * from question_info
+        <where>
+            <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>
+            <if test="liceBus != null  and liceBus != ''"> and lice_bus = #{liceBus}</if>
+            <if test="liceTruck != null  and liceTruck != ''"> and lice_truck = #{liceTruck}</if>
+            <if test="liceMoto != null  and liceMoto != ''"> and lice_moto = #{liceMoto}</if>
+            <if test="chapterId != null "> and chapter_id = #{chapterId}</if>
+            <if test="diffDegree != null "> and diff_degree in
+                <foreach item="degree" index="index" collection="diffDegree"
+                         open="(" separator="," close=")">
+                    #{degree}
+                </foreach>
+            </if>
+        </where>
+        ORDER BY rand() limit 0,${num}
+    </select>
+
+
+
+
+
+
+
+
+
+
+
+
+</mapper>

+ 84 - 0
zzjs-service/src/main/resources/mapper/question/WebNoteAllMapper.xml

@@ -0,0 +1,84 @@
+<?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.miaxis.question.mapper.WebNoteAllMapper">
+
+    <resultMap type="WebNoteAll" id="WebNoteAllResult">
+        <result property="id"    column="ID"    />
+        <result property="type"    column="Type"    />
+        <result property="intnumber"    column="intNumber"    />
+        <result property="strtppe"    column="strTppe"    />
+        <result property="strtypeL"    column="strType_l"    />
+        <result property="licensetype"    column="LicenseType"    />
+        <result property="question"    column="Question"    />
+        <result property="an1"    column="An1"    />
+        <result property="an2"    column="An2"    />
+        <result property="an3"    column="An3"    />
+        <result property="an4"    column="An4"    />
+        <result property="an5"    column="An5"    />
+        <result property="an6"    column="An6"    />
+        <result property="an7"    column="An7"    />
+        <result property="answertrue"    column="AnswerTrue"    />
+        <result property="explain"    column="explain"    />
+        <result property="bestanswerid"    column="BestAnswerId"    />
+        <result property="kemu"    column="kemu"    />
+        <result property="jieshiFrom"    column="jieshi_from"    />
+        <result property="moretypes"    column="moretypes"    />
+        <result property="chapterid"    column="chapterid"    />
+        <result property="sinaimg"    column="sinaimg"    />
+        <result property="videoUrl"    column="video_url"    />
+        <result property="diffDegree"    column="diff_degree"    />
+        <result property="cityid"    column="cityid"    />
+        <result property="gs"    column="gs"    />
+        <result property="keyword"    column="keyword"    />
+        <result property="errorRate"    column="error_rate"    />
+        <result property="mediaUrl"    column="media_url"    />
+        <result property="showOptionType"    column="show_option_type"    />
+        <result property="questionSource"    column="question_source"    />
+        <result property="bestExplainNew"    column="best_explain_new"    />
+    </resultMap>
+
+    <sql id="selectWebNoteAllVo">
+        select DISTINCT * from web_note_all
+    </sql>
+
+    <select id="selectWebNoteAllList" parameterType="WebNoteAll" resultMap="WebNoteAllResult">
+        <include refid="selectWebNoteAllVo"/>
+        <where>
+            <if test="id != null "> and ID = #{id}</if>
+            <if test="type != null "> and Type = #{type}</if>
+            <if test="intnumber != null  and intnumber != ''"> and intNumber = #{intnumber}</if>
+            <if test="strtppe != null  and strtppe != ''"> and strTppe = #{strtppe}</if>
+            <if test="strtypeL != null  and strtypeL != ''"> and strType_l = #{strtypeL}</if>
+            <if test="licensetype != null  and licensetype != ''"> and LicenseType = #{licensetype}</if>
+            <if test="question != null  and question != ''"> and Question = #{question}</if>
+            <if test="an1 != null  and an1 != ''"> and An1 = #{an1}</if>
+            <if test="an2 != null  and an2 != ''"> and An2 = #{an2}</if>
+            <if test="an3 != null  and an3 != ''"> and An3 = #{an3}</if>
+            <if test="an4 != null  and an4 != ''"> and An4 = #{an4}</if>
+            <if test="an5 != null  and an5 != ''"> and An5 = #{an5}</if>
+            <if test="an6 != null  and an6 != ''"> and An6 = #{an6}</if>
+            <if test="an7 != null  and an7 != ''"> and An7 = #{an7}</if>
+            <if test="answertrue != null  and answertrue != ''"> and AnswerTrue = #{answertrue}</if>
+            <if test="explain != null  and explain != ''"> and explain = #{explain}</if>
+            <if test="bestanswerid != null  and bestanswerid != ''"> and BestAnswerId = #{bestanswerid}</if>
+            <if test="kemu != null "> and kemu = #{kemu}</if>
+            <if test="jieshiFrom != null  and jieshiFrom != ''"> and jieshi_from = #{jieshiFrom}</if>
+            <if test="moretypes != null  and moretypes != ''"> and moretypes = #{moretypes}</if>
+            <if test="chapterid != null "> and chapterid = #{chapterid}</if>
+            <if test="sinaimg != null  and sinaimg != ''"> and sinaimg = #{sinaimg}</if>
+            <if test="videoUrl != null  and videoUrl != ''"> and video_url = #{videoUrl}</if>
+            <if test="diffDegree != null "> and diff_degree = #{diffDegree}</if>
+            <if test="cityid != null "> and cityid = #{cityid}</if>
+            <if test="gs != null  and gs != ''"> and gs = #{gs}</if>
+            <if test="keyword != null  and keyword != ''"> and keyword = #{keyword}</if>
+            <if test="errorRate != null "> and error_rate = #{errorRate}</if>
+            <if test="mediaUrl != null  and mediaUrl != ''"> and media_url = #{mediaUrl}</if>
+            <if test="showOptionType != null "> and show_option_type = #{showOptionType}</if>
+            <if test="questionSource != null "> and question_source = #{questionSource}</if>
+            <if test="bestExplainNew != null  and bestExplainNew != ''"> and best_explain_new = #{bestExplainNew}</if>
+        </where>
+    </select>
+
+</mapper>

+ 41 - 0
zzjs-service/src/main/resources/mapper/rule/TAppExamRuleMapper.xml

@@ -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.miaxis.question.mapper.TAppExamRuleMapper">
+
+    <resultMap type="TAppExamRule" id="TAppExamRuleResult">
+        <result property="id"    column="id"    />
+        <result property="gs"    column="gs"    />
+        <result property="kemu"    column="kemu"    />
+        <result property="chapterId"    column="chapter_id"    />
+        <result property="totalCount"    column="total_count"    />
+        <result property="judgeCount"    column="judge_count"    />
+        <result property="choiceCount"    column="choice_count"    />
+        <result property="multipleChoiceCount"    column="multiple_choice_count"    />
+        <result property="difficultCount"    column="difficult_count"    />
+        <result property="areacode"    column="areacode"    />
+        <result property="cityId"    column="city_id"    />
+    </resultMap>
+
+    <sql id="selectTAppExamRuleVo">
+        select * from t_app_exam_rule
+    </sql>
+
+    <select id="selectTAppExamRuleList" parameterType="TAppExamRule" resultMap="TAppExamRuleResult">
+        <include refid="selectTAppExamRuleVo"/>
+        <where>
+            <if test="gs != null  and gs != ''"> and gs = #{gs}</if>
+            <if test="kemu != null "> and kemu = #{kemu}</if>
+            <if test="chapterId != null "> and chapter_id = #{chapterId}</if>
+            <if test="totalCount != null "> and total_count = #{totalCount}</if>
+            <if test="judgeCount != null "> and judge_count = #{judgeCount}</if>
+            <if test="choiceCount != null "> and choice_count = #{choiceCount}</if>
+            <if test="multipleChoiceCount != null "> and multiple_choice_count = #{multipleChoiceCount}</if>
+            <if test="difficultCount != null "> and difficult_count = #{difficultCount}</if>
+            <if test="areacode != null "> and areacode = #{areacode}</if>
+            <if test="cityId != null "> and city_id = #{cityId}</if>
+        </where>
+    </select>
+
+</mapper>

+ 60 - 0
zzjs-service/src/main/resources/mapper/ydt/QuestionYdtJsMapper.xml

@@ -0,0 +1,60 @@
+<?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.miaxis.question.mapper.QuestionYdtJsMapper">
+
+    <resultMap type="QuestionYdtJs" id="QuestionYdtJsResult">
+        <result property="id"    column="id"    />
+        <result property="kemu"    column="kemu"    />
+        <result property="qbAnalyse"    column="qb_analyse"    />
+        <result property="qbContent"    column="qb_content"    />
+        <result property="qbReadAnalyse"    column="qb_read_analyse"    />
+        <result property="qbSkillPicture"    column="qb_skill_picture"    />
+        <result property="qbAnswers"    column="qb_answers"    />
+        <result property="questionids"    column="questionIds"    />
+        <result property="shortVideoDuration"    column="short_video_duration"    />
+        <result property="shortVideoSize"    column="short_video_size"    />
+        <result property="shortVideoUrl"    column="short_video_url"    />
+        <result property="shortVideoImage"    column="short_video_image"    />
+        <result property="ydtAnalyse"    column="ydt_analyse"    />
+        <result property="ydtAnalysePic"    column="ydt_analyse_pic"    />
+        <result property="ydtVideo"    column="ydt_video"    />
+        <result property="ydtVideoLen"    column="ydt_video_len"    />
+        <result property="ydtVideoPic"    column="ydt_video_pic"    />
+        <result property="ydtVideoSize"    column="ydt_video_size"    />
+    </resultMap>
+
+    <sql id="selectQuestionYdtJsVo">
+        select * from question_ydt_js
+    </sql>
+
+    <select id="selectQuestionYdtJsList" parameterType="QuestionYdtJs" resultMap="QuestionYdtJsResult">
+        <include refid="selectQuestionYdtJsVo"/>
+        <where>
+            <if test="kemu != null  and kemu != ''"> and kemu = #{kemu}</if>
+            <if test="qbAnalyse != null  and qbAnalyse != ''"> and qb_analyse = #{qbAnalyse}</if>
+            <if test="qbContent != null  and qbContent != ''"> and qb_content = #{qbContent}</if>
+            <if test="qbReadAnalyse != null  and qbReadAnalyse != ''"> and qb_read_analyse = #{qbReadAnalyse}</if>
+            <if test="qbSkillPicture != null  and qbSkillPicture != ''"> and qb_skill_picture = #{qbSkillPicture}</if>
+            <if test="qbAnswers != null  and qbAnswers != ''"> and qb_answers = #{qbAnswers}</if>
+            <if test="questionids != null  and questionids != ''"> and questionIds = #{questionids}</if>
+            <if test="shortVideoDuration != null  and shortVideoDuration != ''"> and short_video_duration = #{shortVideoDuration}</if>
+            <if test="shortVideoSize != null  and shortVideoSize != ''"> and short_video_size = #{shortVideoSize}</if>
+            <if test="shortVideoUrl != null  and shortVideoUrl != ''"> and short_video_url = #{shortVideoUrl}</if>
+            <if test="shortVideoImage != null  and shortVideoImage != ''"> and short_video_image = #{shortVideoImage}</if>
+            <if test="ydtAnalyse != null  and ydtAnalyse != ''"> and ydt_analyse = #{ydtAnalyse}</if>
+            <if test="ydtAnalysePic != null  and ydtAnalysePic != ''"> and ydt_analyse_pic = #{ydtAnalysePic}</if>
+            <if test="ydtVideo != null  and ydtVideo != ''"> and ydt_video = #{ydtVideo}</if>
+            <if test="ydtVideoLen != null  and ydtVideoLen != ''"> and ydt_video_len = #{ydtVideoLen}</if>
+            <if test="ydtVideoPic != null  and ydtVideoPic != ''"> and ydt_video_pic = #{ydtVideoPic}</if>
+            <if test="ydtVideoSize != null  and ydtVideoSize != ''"> and ydt_video_size = #{ydtVideoSize}</if>
+        </where>
+    </select>
+
+    <select id="selectQuestionYdtJsList2" parameterType="QuestionYdtJs" resultMap="QuestionYdtJsResult">
+        select * from question_ydt_js where short_video_url is not null and short_video_url !=''
+    </select>
+
+
+</mapper>