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},