浏览代码

抓取一点通题库media

小么熊🐻 2 年之前
父节点
当前提交
90a37682dc

+ 66 - 19
zzjs-admin/src/test/java/com/miaxis/test/KTDownload.java

@@ -1,6 +1,8 @@
 package com.miaxis.test;
 
 
+import com.miaxis.question.domain.WebNoteAll;
+import com.miaxis.question.service.IWebNoteAllService;
 import org.junit.Test;
 import com.miaxis.ZzjsApplication;
 import com.miaxis.common.utils.StringUtils;
@@ -26,36 +28,69 @@ public class KTDownload {
     @Autowired
     private IQuestionInfoKtGetService questionInfoGetService;
 
+    @Autowired
+    private IWebNoteAllService webNoteAllService;
+
     @Test
     public void testExcel() throws Exception {
 
         //explain_gif
-        List<QuestionInfoKtGet> explainGifList = questionInfoGetService.selectQuestionInfoKtGetExplainGifList(); //要修改
-        downLoadList(explainGifList, "explainGifList");
+//        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");
+
+        //image_ydt
+//        List<QuestionInfoKtGet> imageYdtList = questionInfoGetService.selectQuestionInfoKtGetImageYdtList(); //要修改
+//        downLoadList(imageYdtList, "imageYdtList");
 
-        //explain_mp3
-        List<QuestionInfoKtGet> explainMp3List = questionInfoGetService.selectQuestionInfoKtGetExplainMp3List(); //要修改
-        downLoadList(explainMp3List, "explainMp3List");
+        //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");
+
+
+        List<WebNoteAll> webNoteAllList = webNoteAllService.selectWebNoteAllMediaUrlList();
+        downLoadList2(webNoteAllList, "webNoteAllList");
 
-        //image
-        List<QuestionInfoKtGet> imageList = questionInfoGetService.selectQuestionInfoKtGetImageList(); //要修改
-        downLoadList(imageList, "imageList");
+    }
 
-        //issuemp3
-        List<QuestionInfoKtGet> issuemp3List = questionInfoGetService.selectQuestionInfoKtGetIssuemp3List(); //要修改
-        downLoadList(issuemp3List, "issuemp3List");
 
+    public static void downLoadList2(List<WebNoteAll> list, String listType) {
 
-        //answermp3
-        List<QuestionInfoKtGet> answermp3List = questionInfoGetService.selectQuestionInfoKtGetAnswermp3List(); //要修改
-        downLoadList(answermp3List, "answermp3List");
+        if ("webNoteAllList".equals(listType)) {
 
-        //explainjsmp3
-        List<QuestionInfoKtGet> explainjsmp3List = questionInfoGetService.selectQuestionInfoKtGetExplainjsmp3List(); //要修改
-        downLoadList(explainjsmp3List, "explainjsmp3List");
+            for (int i = 0; i < list.size(); i++) {
+                WebNoteAll WebNoteAll = list.get(i);
+                String mediaUrl = WebNoteAll.getMediaUrl(); //要修改
 
+                int index = mediaUrl.lastIndexOf("/");
+                String fileName = mediaUrl.substring(index + 1);
+                System.out.println(mediaUrl + "," + fileName);
+                try {
+                    downLoadFromUrl(mediaUrl, fileName, "G:\\中正\\题库图\\kt20230223\\media_ydt"); //要修改
+                } catch (Exception e) {
+                    e.printStackTrace();
+                }
+            }
+        }
     }
 
+
     public static void downLoadList(List<QuestionInfoKtGet> list, String listType) {
 
         if ("explainGifList".equals(listType)) {
@@ -105,9 +140,21 @@ public class KTDownload {
                     e.printStackTrace();
                 }
             }
+        } else if("imageYdtList".equals(listType)){
+            for (int i = 0; i < list.size(); i++) {
+                QuestionInfoKtGet questionInfoKtGet = list.get(i);
+                String mediaUrl = questionInfoKtGet.getImageYdt(); //要修改
 
-
-        } else if ("issuemp3List".equals(listType)) {
+                int index = mediaUrl.lastIndexOf("/");
+                String fileName = mediaUrl.substring(index + 1);
+                System.out.println(mediaUrl + "," + fileName);
+                try {
+                    downLoadFromUrl(mediaUrl, fileName, "G:\\中正\\题库图\\kt20230223\\image_ydt"); //要修改
+                } 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(); //要修改

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

@@ -1,117 +0,0 @@
-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);
-    }
-}

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

@@ -1,117 +0,0 @@
-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);
-    }
-}

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

@@ -1,117 +0,0 @@
-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);
-    }
-}

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

@@ -19,4 +19,5 @@ public interface WebNoteAllMapper extends BaseMapper<WebNoteAll> {
      */
     public List<WebNoteAll> selectWebNoteAllList(WebNoteAll webNoteAll);
 
+    List<WebNoteAll> selectWebNoteAllMediaUrlList();
 }

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

@@ -18,4 +18,7 @@ public interface IWebNoteAllService extends IService<WebNoteAll>{
      * @return 一点通整合题库集合
      */
     public List<WebNoteAll> selectWebNoteAllList(WebNoteAll webNoteAll);
+
+
+    public List<WebNoteAll> selectWebNoteAllMediaUrlList();
 }

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

@@ -32,4 +32,9 @@ public class WebNoteAllServiceImpl extends ServiceImpl<WebNoteAllMapper, WebNote
     public List<WebNoteAll> selectWebNoteAllList(WebNoteAll webNoteAll){
         return webNoteAllMapper.selectWebNoteAllList(webNoteAll);
     }
+
+    @Override
+    public List<WebNoteAll> selectWebNoteAllMediaUrlList() {
+        return webNoteAllMapper.selectWebNoteAllMediaUrlList();
+    }
 }

+ 6 - 74
zzjs-service/src/main/resources/mapper/question/QuestionInfoKtGetMapper.xml

@@ -150,105 +150,37 @@ 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 * 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 * from question_info_kt_get  where image_ydt!='';
      </select>
 
      <select id="selectQuestionInfoKtGetIssuemp3List"  resultMap="QuestionInfoKtGetResult">
         select * from question_info_kt_get where issuemp3!=''
-         <!--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>
 
 

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

@@ -43,6 +43,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select DISTINCT * from web_note_all
     </sql>
 
+    <select id="selectWebNoteAllMediaUrlList"  resultMap="WebNoteAllResult">
+        select * from web_note_all  where media_url!='';
+    </select>
+
+
     <select id="selectWebNoteAllList" parameterType="WebNoteAll" resultMap="WebNoteAllResult">
         <include refid="selectWebNoteAllVo"/>
         <where>