From 23c2122bfcf6206c24ac3b9a513fefc3182b761c Mon Sep 17 00:00:00 2001 From: xiaoCJ <406612557@qq.com> Date: Tue, 14 Nov 2023 17:41:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=AD=E5=BB=BAspringboot=E4=B8=89=E5=B1=82?= =?UTF-8?q?=E6=9E=B6=E6=9E=84=20=E5=AF=BC=E5=85=A5=E9=83=A8=E5=88=86?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E7=B1=BB=20=E6=96=B0=E5=A2=9E=E7=9F=A5?= =?UTF-8?q?=E8=AF=86=E8=AF=84=E6=B5=8B=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/topicController.java | 2 +- src/main/resources/generatorConfig.xml | 26 ++++++++--------- src/main/resources/mappers/TopicsMapper.xml | 28 +++++++++---------- 3 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/main/java/com/sztzjy/fund_investment/controller/topicController.java b/src/main/java/com/sztzjy/fund_investment/controller/topicController.java index 7305be7..8da48b0 100644 --- a/src/main/java/com/sztzjy/fund_investment/controller/topicController.java +++ b/src/main/java/com/sztzjy/fund_investment/controller/topicController.java @@ -38,7 +38,7 @@ public class topicController { public ResultEntity> getRandomTopic(@ApiParam("题目来源模块") @RequestParam String module) { TopicsExample topicsExample =new TopicsExample(); topicsExample.createCriteria().andModuleEqualTo(module); - List topics = topicsMapper.selectByExample(topicsExample); + List topics = topicsMapper.selectByExampleWithBLOBs(topicsExample); //随机取6道题目 Collections.shuffle(topics); int size = Math.min(6, topics.size()); diff --git a/src/main/resources/generatorConfig.xml b/src/main/resources/generatorConfig.xml index 2822fdb..a3b734c 100644 --- a/src/main/resources/generatorConfig.xml +++ b/src/main/resources/generatorConfig.xml @@ -38,19 +38,19 @@ - -
-
-
-
-
-
-
-
-
-
-
-
+ + + + + + + + + +
+ + + diff --git a/src/main/resources/mappers/TopicsMapper.xml b/src/main/resources/mappers/TopicsMapper.xml index 0d98493..391f7b9 100644 --- a/src/main/resources/mappers/TopicsMapper.xml +++ b/src/main/resources/mappers/TopicsMapper.xml @@ -84,7 +84,7 @@ , - from topics + from sys_topics @@ -98,7 +98,7 @@ distinct - from topics + from sys_topics @@ -111,21 +111,21 @@ , - from topics + from sys_topics where topic_id = #{topicId,jdbcType=VARCHAR} - delete from topics + delete from sys_topics where topic_id = #{topicId,jdbcType=VARCHAR} - delete from topics + delete from sys_topics - insert into topics (topic_id, topic_type, source, + insert into sys_topics (topic_id, topic_type, source, module, answer, school_id, topic_content) values (#{topicId,jdbcType=VARCHAR}, #{topicType,jdbcType=VARCHAR}, #{source,jdbcType=VARCHAR}, @@ -133,7 +133,7 @@ #{topicContent,jdbcType=LONGVARCHAR}) - insert into topics + insert into sys_topics topic_id, @@ -182,13 +182,13 @@ - update topics + update sys_topics topic_id = #{record.topicId,jdbcType=VARCHAR}, @@ -217,7 +217,7 @@ - update topics + update sys_topics set topic_id = #{record.topicId,jdbcType=VARCHAR}, topic_type = #{record.topicType,jdbcType=VARCHAR}, source = #{record.source,jdbcType=VARCHAR}, @@ -230,7 +230,7 @@ - update topics + update sys_topics set topic_id = #{record.topicId,jdbcType=VARCHAR}, topic_type = #{record.topicType,jdbcType=VARCHAR}, source = #{record.source,jdbcType=VARCHAR}, @@ -242,7 +242,7 @@ - update topics + update sys_topics topic_type = #{topicType,jdbcType=VARCHAR}, @@ -266,7 +266,7 @@ where topic_id = #{topicId,jdbcType=VARCHAR} - update topics + update sys_topics set topic_type = #{topicType,jdbcType=VARCHAR}, source = #{source,jdbcType=VARCHAR}, module = #{module,jdbcType=VARCHAR}, @@ -276,7 +276,7 @@ where topic_id = #{topicId,jdbcType=VARCHAR} - update topics + update sys_topics set topic_type = #{topicType,jdbcType=VARCHAR}, source = #{source,jdbcType=VARCHAR}, module = #{module,jdbcType=VARCHAR},