diff --git a/src/main/java/com/sztzjy/fund_investment/config/Constant.java b/src/main/java/com/sztzjy/fund_investment/config/Constant.java index 7559f80..60aea77 100644 --- a/src/main/java/com/sztzjy/fund_investment/config/Constant.java +++ b/src/main/java/com/sztzjy/fund_investment/config/Constant.java @@ -16,6 +16,8 @@ public class Constant { */ public static final String BASIC = "Basic"; - + public static final String TOFQUESTIONS = "判断题"; + public static final String SINGLECHOICE = "单选题"; + public static final String MULTIPLECHOICE = "多选题"; } diff --git a/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java new file mode 100644 index 0000000..d4d3f95 --- /dev/null +++ b/src/main/java/com/sztzjy/fund_investment/controller/TopicController.java @@ -0,0 +1,84 @@ +package com.sztzjy.fund_investment.controller; + +import com.sztzjy.fund_investment.annotation.AnonymousAccess; +import com.sztzjy.fund_investment.entity.TopicRecord; +import com.sztzjy.fund_investment.entity.Topics; +import com.sztzjy.fund_investment.entity.TopicsExample; +import com.sztzjy.fund_investment.mapper.TopicRecordMapper; +import com.sztzjy.fund_investment.mapper.TopicsMapper; +import com.sztzjy.fund_investment.service.TopicService; +import com.sztzjy.fund_investment.util.ResultEntity; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +/** + * @Author xcj + * @Date 2023/11/14 + */ +@RestController +@RequestMapping("/topics") +@Api(tags = "学生端--知识测评答题") +public class TopicController { + @Autowired + private TopicsMapper topicsMapper; + @Autowired + private TopicService topicService; + @Autowired + private TopicRecordMapper topicRecordMapper; + + + /* + * @author xcj + * @Date 2023/11/14 + */ + @GetMapping("getRandomTopic") + @ApiOperation("知识测评、项目估值、项目尽调,答题页面返回随机6条数据") + @AnonymousAccess + public ResultEntity> getRandomTopic(@ApiParam("题目来源模块") @RequestParam String module) { + TopicsExample topicsExample = new TopicsExample(); + topicsExample.createCriteria().andModuleEqualTo(module); + List topics = topicsMapper.selectByExampleWithBLOBs(topicsExample); + //随机取6道题目 + Collections.shuffle(topics); + int size = Math.min(6, topics.size()); + List randomTopics = topics.subList(0, size); + for (Topics randomTopic : randomTopics) { + randomTopic.setAnswer(null); + } + return new ResultEntity<>(randomTopics); + } + + /* + * @author xcj + * @Date 2023/11/15 + */ + @PostMapping("getRightScore") + @ApiOperation("知识测评、项目估值、项目尽调,判断答案对错并返回得分") + @AnonymousAccess + public ResultEntity> getRightScore(@ApiParam("需要ID和用户填写的答案") @RequestBody List topics, @RequestParam String flowId) { + return topicService.getRightScore(topics, flowId); + } + + /* + * @author xcj + * @Date 2023/11/15 + */ + @PostMapping("getTopicRecord") + @ApiOperation("知识测评、项目估值、项目尽调,回显答题记录") + @AnonymousAccess + public ResultEntity > getTopicRecord(@ApiParam("getRightScore返回的ID集合")@RequestParam List ids) { + Listlist= new ArrayList<>(); + for (String id : ids) { + TopicRecord topicRecord = topicRecordMapper.selectByPrimaryKey(id); + list.add(topicRecord); + } + return new ResultEntity<>(list); + } +} diff --git a/src/main/java/com/sztzjy/fund_investment/controller/topicController.java b/src/main/java/com/sztzjy/fund_investment/controller/topicController.java deleted file mode 100644 index 8da48b0..0000000 --- a/src/main/java/com/sztzjy/fund_investment/controller/topicController.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.sztzjy.fund_investment.controller; - -import com.sztzjy.fund_investment.annotation.AnonymousAccess; -import com.sztzjy.fund_investment.entity.Topics; -import com.sztzjy.fund_investment.entity.TopicsExample; -import com.sztzjy.fund_investment.mapper.TopicsMapper; -import com.sztzjy.fund_investment.util.ResultEntity; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import io.swagger.annotations.ApiParam; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestParam; -import org.springframework.web.bind.annotation.RestController; - -import java.util.Collections; -import java.util.List; - -/** - * @Author xcj - * @Date 2023/11/14 - */ -@RestController -@RequestMapping("/topics") -@Api(tags = "学生端--知识测评答题") -public class topicController { - @Autowired - private TopicsMapper topicsMapper; - - /* 知识测评答题 - * @author xcj - * @Date 2023/11/14 - */ - @GetMapping("getRandomTopic") - @ApiOperation("知识测评答题页面返回随机6条数据") - @AnonymousAccess - public ResultEntity> getRandomTopic(@ApiParam("题目来源模块") @RequestParam String module) { - TopicsExample topicsExample =new TopicsExample(); - topicsExample.createCriteria().andModuleEqualTo(module); - List topics = topicsMapper.selectByExampleWithBLOBs(topicsExample); - //随机取6道题目 - Collections.shuffle(topics); - int size = Math.min(6, topics.size()); - List randomTopics = topics.subList(0, size); - return new ResultEntity<>(randomTopics); - } -} diff --git a/src/main/java/com/sztzjy/fund_investment/entity/PerformanceScore.java b/src/main/java/com/sztzjy/fund_investment/entity/PerformanceScore.java index b6f4e1d..1a7bc9a 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/PerformanceScore.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/PerformanceScore.java @@ -1,5 +1,6 @@ package com.sztzjy.fund_investment.entity; +import java.lang.reflect.Method; import java.math.BigDecimal; import io.swagger.annotations.ApiModelProperty; @@ -54,6 +55,32 @@ public class PerformanceScore { @ApiModelProperty("投资报告得分") private BigDecimal investmentReportScore; + @ApiModelProperty("总成绩") + private BigDecimal totalScore; + + + public void set(String methodName, Object value) { + try { + Method method = getClass().getMethod("set" + Character.toUpperCase(methodName.charAt(0)) + methodName.substring(1),value.getClass()); + method.invoke(this, value); + } catch (Exception e) { + e.printStackTrace(); + } + } + + public Object get(String methodName) { + Object result = null; + try { + Method method = getClass().getMethod("get" + Character.toUpperCase(methodName.charAt(0)) + methodName.substring(1)); + result = method.invoke(this); + } catch (Exception e) { + e.printStackTrace(); + } + return result; + } + + + public String getId() { return id; } @@ -173,4 +200,12 @@ public class PerformanceScore { public void setInvestmentReportScore(BigDecimal investmentReportScore) { this.investmentReportScore = investmentReportScore; } + + public BigDecimal getTotalScore() { + return totalScore; + } + + public void setTotalScore(BigDecimal totalScore) { + this.totalScore = totalScore; + } } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/fund_investment/entity/PerformanceScoreExample.java b/src/main/java/com/sztzjy/fund_investment/entity/PerformanceScoreExample.java index b617737..bedadfa 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/PerformanceScoreExample.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/PerformanceScoreExample.java @@ -1034,6 +1034,66 @@ public class PerformanceScoreExample { addCriterion("investment_report_score not between", value1, value2, "investmentReportScore"); return (Criteria) this; } + + public Criteria andTotalScoreIsNull() { + addCriterion("total_score is null"); + return (Criteria) this; + } + + public Criteria andTotalScoreIsNotNull() { + addCriterion("total_score is not null"); + return (Criteria) this; + } + + public Criteria andTotalScoreEqualTo(BigDecimal value) { + addCriterion("total_score =", value, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreNotEqualTo(BigDecimal value) { + addCriterion("total_score <>", value, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreGreaterThan(BigDecimal value) { + addCriterion("total_score >", value, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreGreaterThanOrEqualTo(BigDecimal value) { + addCriterion("total_score >=", value, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreLessThan(BigDecimal value) { + addCriterion("total_score <", value, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreLessThanOrEqualTo(BigDecimal value) { + addCriterion("total_score <=", value, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreIn(List values) { + addCriterion("total_score in", values, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreNotIn(List values) { + addCriterion("total_score not in", values, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("total_score between", value1, value2, "totalScore"); + return (Criteria) this; + } + + public Criteria andTotalScoreNotBetween(BigDecimal value1, BigDecimal value2) { + addCriterion("total_score not between", value1, value2, "totalScore"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/src/main/java/com/sztzjy/fund_investment/entity/TopicRecord.java b/src/main/java/com/sztzjy/fund_investment/entity/TopicRecord.java index ade78bc..e74acde 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/TopicRecord.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/TopicRecord.java @@ -21,6 +21,9 @@ public class TopicRecord { @ApiModelProperty("正确答案") private String answer; + @ApiModelProperty("题干") + private String topicContent; + public String getId() { return id; } @@ -60,4 +63,12 @@ public class TopicRecord { public void setAnswer(String answer) { this.answer = answer == null ? null : answer.trim(); } + + public String getTopicContent() { + return topicContent; + } + + public void setTopicContent(String topicContent) { + this.topicContent = topicContent == null ? null : topicContent.trim(); + } } \ No newline at end of file diff --git a/src/main/java/com/sztzjy/fund_investment/entity/TopicRecordExample.java b/src/main/java/com/sztzjy/fund_investment/entity/TopicRecordExample.java index 483f7c4..9f2f7ad 100644 --- a/src/main/java/com/sztzjy/fund_investment/entity/TopicRecordExample.java +++ b/src/main/java/com/sztzjy/fund_investment/entity/TopicRecordExample.java @@ -453,6 +453,76 @@ public class TopicRecordExample { addCriterion("answer not between", value1, value2, "answer"); return (Criteria) this; } + + public Criteria andTopicContentIsNull() { + addCriterion("topic_content is null"); + return (Criteria) this; + } + + public Criteria andTopicContentIsNotNull() { + addCriterion("topic_content is not null"); + return (Criteria) this; + } + + public Criteria andTopicContentEqualTo(String value) { + addCriterion("topic_content =", value, "topicContent"); + return (Criteria) this; + } + + public Criteria andTopicContentNotEqualTo(String value) { + addCriterion("topic_content <>", value, "topicContent"); + return (Criteria) this; + } + + public Criteria andTopicContentGreaterThan(String value) { + addCriterion("topic_content >", value, "topicContent"); + return (Criteria) this; + } + + public Criteria andTopicContentGreaterThanOrEqualTo(String value) { + addCriterion("topic_content >=", value, "topicContent"); + return (Criteria) this; + } + + public Criteria andTopicContentLessThan(String value) { + addCriterion("topic_content <", value, "topicContent"); + return (Criteria) this; + } + + public Criteria andTopicContentLessThanOrEqualTo(String value) { + addCriterion("topic_content <=", value, "topicContent"); + return (Criteria) this; + } + + public Criteria andTopicContentLike(String value) { + addCriterion("topic_content like", value, "topicContent"); + return (Criteria) this; + } + + public Criteria andTopicContentNotLike(String value) { + addCriterion("topic_content not like", value, "topicContent"); + return (Criteria) this; + } + + public Criteria andTopicContentIn(List values) { + addCriterion("topic_content in", values, "topicContent"); + return (Criteria) this; + } + + public Criteria andTopicContentNotIn(List values) { + addCriterion("topic_content not in", values, "topicContent"); + return (Criteria) this; + } + + public Criteria andTopicContentBetween(String value1, String value2) { + addCriterion("topic_content between", value1, value2, "topicContent"); + return (Criteria) this; + } + + public Criteria andTopicContentNotBetween(String value1, String value2) { + addCriterion("topic_content not between", value1, value2, "topicContent"); + return (Criteria) this; + } } public static class Criteria extends GeneratedCriteria { diff --git a/src/main/java/com/sztzjy/fund_investment/service/PerformanceScoreService.java b/src/main/java/com/sztzjy/fund_investment/service/PerformanceScoreService.java new file mode 100644 index 0000000..dd13ed4 --- /dev/null +++ b/src/main/java/com/sztzjy/fund_investment/service/PerformanceScoreService.java @@ -0,0 +1,9 @@ +package com.sztzjy.fund_investment.service; + +/** + * @Author xcj + * @Date 2023/11/15 + */ +public interface PerformanceScoreService { + void calculateScoreByModule(String methodName, Integer score, String flowId); +} diff --git a/src/main/java/com/sztzjy/fund_investment/service/TopicService.java b/src/main/java/com/sztzjy/fund_investment/service/TopicService.java new file mode 100644 index 0000000..c6e23bd --- /dev/null +++ b/src/main/java/com/sztzjy/fund_investment/service/TopicService.java @@ -0,0 +1,15 @@ +package com.sztzjy.fund_investment.service; + +import com.sztzjy.fund_investment.entity.Topics; +import com.sztzjy.fund_investment.util.ResultEntity; + +import java.util.List; + +/** + * @Author xcj + * @Date 2023/11/15 + */ +public interface TopicService { + ResultEntity> getRightScore(List topics,String flowId); + +} diff --git a/src/main/java/com/sztzjy/fund_investment/service/trainingReportService.java b/src/main/java/com/sztzjy/fund_investment/service/TrainingReportService.java similarity index 68% rename from src/main/java/com/sztzjy/fund_investment/service/trainingReportService.java rename to src/main/java/com/sztzjy/fund_investment/service/TrainingReportService.java index b382975..3737181 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/trainingReportService.java +++ b/src/main/java/com/sztzjy/fund_investment/service/TrainingReportService.java @@ -4,5 +4,5 @@ package com.sztzjy.fund_investment.service; * @Author xcj * @Date 2023/11/14 */ -public interface trainingReportService { +public interface TrainingReportService { } diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/PerformanceScoreServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/PerformanceScoreServiceImpl.java new file mode 100644 index 0000000..0d317b7 --- /dev/null +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/PerformanceScoreServiceImpl.java @@ -0,0 +1,35 @@ +package com.sztzjy.fund_investment.service.serviceImpl; + +import com.sztzjy.fund_investment.entity.PerformanceScore; +import com.sztzjy.fund_investment.entity.PerformanceScoreExample; +import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; +import com.sztzjy.fund_investment.service.PerformanceScoreService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @Author xcj + * @Date 2023/11/15 + */ +@Service +public class PerformanceScoreServiceImpl implements PerformanceScoreService { + @Autowired + private PerformanceScoreMapper performanceScoreMapper; + + + /* 计分方法 + * @author xcj + * @Date 2023/11/15 + */ + @Override // 实体类字段名 分数 流程ID + public void calculateScoreByModule(String methodName, Integer score, String flowId) { + PerformanceScoreExample performanceScoreExample = new PerformanceScoreExample(); + performanceScoreExample.createCriteria().andFlowIdEqualTo(flowId); + List performanceScores = performanceScoreMapper.selectByExample(performanceScoreExample); + PerformanceScore performanceScore = performanceScores.get(0); + performanceScore.set(methodName,score); + performanceScoreMapper.updateByPrimaryKey(performanceScore); + } +} diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java new file mode 100644 index 0000000..c556e7f --- /dev/null +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TopicServiceImpl.java @@ -0,0 +1,105 @@ +package com.sztzjy.fund_investment.service.serviceImpl; + +import cn.hutool.core.util.IdUtil; +import com.sztzjy.fund_investment.config.Constant; +import com.sztzjy.fund_investment.entity.PerformanceScore; +import com.sztzjy.fund_investment.entity.PerformanceScoreExample; +import com.sztzjy.fund_investment.entity.TopicRecord; +import com.sztzjy.fund_investment.entity.Topics; +import com.sztzjy.fund_investment.mapper.PerformanceScoreMapper; +import com.sztzjy.fund_investment.mapper.TopicRecordMapper; +import com.sztzjy.fund_investment.mapper.TopicsMapper; +import com.sztzjy.fund_investment.service.PerformanceScoreService; +import com.sztzjy.fund_investment.service.TopicService; +import com.sztzjy.fund_investment.util.ResultEntity; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.ArrayList; +import java.util.List; + +/** + * @Author xcj + * @Date 2023/11/15 + */ +@Service +public class TopicServiceImpl implements TopicService { + @Autowired + private TopicsMapper topicsMapper; + @Autowired + private PerformanceScoreService performanceScoreService; + @Autowired + private TopicRecordMapper topicRecordMapper; + + @Override + public ResultEntity> getRightScore(List topics, String flowId) { + int score = 0; + Listlist =new ArrayList<>(); + for (Topics topic : topics) { + String userAnswer = topic.getAnswer(); + String topicId = topic.getTopicId(); + Topics topicsData = topicsMapper.selectByPrimaryKey(topicId); + String rightAnswer = topicsData.getAnswer(); + String topicType = topicsData.getTopicType(); + if (topicType.equals(Constant.MULTIPLECHOICE)) { + // 将用户选择的答案和正确答案转换为字符数组或集合 + char[] userAnswerArray = userAnswer.toCharArray(); + char[] rightAnswerArray = rightAnswer.toCharArray(); + + // 检查答案长度是否相等 + if (userAnswerArray.length != rightAnswerArray.length) { + // 答案长度不相等,答案错误跳过循环 + continue; + } + + // 检查每个选项是否同时存在于用户答案和正确答案中 + boolean isCorrect = true; + for (char c : rightAnswerArray) { + if (!containsChar(userAnswerArray, c)) { + isCorrect = false; + break; + } + } + if (isCorrect) { + // 答案正确 + score = score + 1; // 设置得分为1或其他适当的值 + } + } else { + if (userAnswer.equals(rightAnswer)) { + score = score + 1; + } + } + + //添加到答题记录表 + TopicRecord topicRecord =new TopicRecord(); + String recordId = IdUtil.simpleUUID(); + topicRecord.setId(recordId); + topicRecord.setTopicId(topicId); + topicRecord.setUserAnswer(userAnswer); + topicRecord.setAnswer(rightAnswer); + topicRecord.setFlowId(flowId); + topicRecord.setTopicContent(topic.getTopicContent()); + topicRecordMapper.insert(topicRecord); + list.add(recordId); + } + //六道题总分最多五分 + if (score >= 5) { + score = 5; + } +// 调用计分方法 + performanceScoreService.calculateScoreByModule("knowledgeAssessmentScore", score, flowId); + String strScore = String.valueOf(score); + list.add(strScore); + return new ResultEntity<>(list); + } + + // 检查字符数组是否包含指定字符 + private boolean containsChar(char[] array, char c) { + for (char element : array) { + if (element == c) { + return true; + } + } + return false; + } +} diff --git a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/trainingReportService.java b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TrainingReportService.java similarity index 81% rename from src/main/java/com/sztzjy/fund_investment/service/serviceImpl/trainingReportService.java rename to src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TrainingReportService.java index a9f880a..dfbe344 100644 --- a/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/trainingReportService.java +++ b/src/main/java/com/sztzjy/fund_investment/service/serviceImpl/TrainingReportService.java @@ -7,6 +7,6 @@ import org.springframework.stereotype.Service; * @Date 2023/11/14 */ @Service -public class trainingReportService { +public class TrainingReportService { } diff --git a/src/main/resources/generatorConfig.xml b/src/main/resources/generatorConfig.xml index 5bb82aa..76e9959 100644 --- a/src/main/resources/generatorConfig.xml +++ b/src/main/resources/generatorConfig.xml @@ -37,20 +37,20 @@ - -
-
-
-
-
-
-
-
-
-
+ + + + + + + + + + +
-
-
+ + diff --git a/src/main/resources/mappers/PerformanceScoreMapper.xml b/src/main/resources/mappers/PerformanceScoreMapper.xml index 3e56708..f70131b 100644 --- a/src/main/resources/mappers/PerformanceScoreMapper.xml +++ b/src/main/resources/mappers/PerformanceScoreMapper.xml @@ -17,6 +17,7 @@ + @@ -80,7 +81,7 @@ id, flow_id, schoolId, practical_cognition_score, knowledge_assessment_score, fundraising_score, project_search_score, project_due_diligence_score, project_valuation_score, investment_signing_score, IPO_application_score, pricing_issuance_score, profit_management_score, profit_distribution_score, - investment_report_score + investment_report_score, total_score @@ -279,6 +286,9 @@ investment_report_score = #{record.investmentReportScore,jdbcType=DECIMAL}, + + total_score = #{record.totalScore,jdbcType=DECIMAL}, + @@ -300,7 +310,8 @@ pricing_issuance_score = #{record.pricingIssuanceScore,jdbcType=DECIMAL}, profit_management_score = #{record.profitManagementScore,jdbcType=DECIMAL}, profit_distribution_score = #{record.profitDistributionScore,jdbcType=DECIMAL}, - investment_report_score = #{record.investmentReportScore,jdbcType=DECIMAL} + investment_report_score = #{record.investmentReportScore,jdbcType=DECIMAL}, + total_score = #{record.totalScore,jdbcType=DECIMAL} @@ -350,6 +361,9 @@ investment_report_score = #{investmentReportScore,jdbcType=DECIMAL}, + + total_score = #{totalScore,jdbcType=DECIMAL}, + where id = #{id,jdbcType=VARCHAR} @@ -368,7 +382,8 @@ pricing_issuance_score = #{pricingIssuanceScore,jdbcType=DECIMAL}, profit_management_score = #{profitManagementScore,jdbcType=DECIMAL}, profit_distribution_score = #{profitDistributionScore,jdbcType=DECIMAL}, - investment_report_score = #{investmentReportScore,jdbcType=DECIMAL} + investment_report_score = #{investmentReportScore,jdbcType=DECIMAL}, + total_score = #{totalScore,jdbcType=DECIMAL} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file diff --git a/src/main/resources/mappers/TopicRecordMapper.xml b/src/main/resources/mappers/TopicRecordMapper.xml index 608319d..57ad196 100644 --- a/src/main/resources/mappers/TopicRecordMapper.xml +++ b/src/main/resources/mappers/TopicRecordMapper.xml @@ -7,6 +7,7 @@ + @@ -67,7 +68,7 @@ - id, topic_id, flow_id, user_answer, answer + id, topic_id, flow_id, user_answer, answer, topic_content @@ -166,6 +175,9 @@ answer = #{record.answer,jdbcType=VARCHAR}, + + topic_content = #{record.topicContent,jdbcType=VARCHAR}, + @@ -177,7 +189,8 @@ topic_id = #{record.topicId,jdbcType=VARCHAR}, flow_id = #{record.flowId,jdbcType=VARCHAR}, user_answer = #{record.userAnswer,jdbcType=VARCHAR}, - answer = #{record.answer,jdbcType=VARCHAR} + answer = #{record.answer,jdbcType=VARCHAR}, + topic_content = #{record.topicContent,jdbcType=VARCHAR} @@ -197,6 +210,9 @@ answer = #{answer,jdbcType=VARCHAR}, + + topic_content = #{topicContent,jdbcType=VARCHAR}, + where id = #{id,jdbcType=VARCHAR} @@ -205,7 +221,8 @@ set topic_id = #{topicId,jdbcType=VARCHAR}, flow_id = #{flowId,jdbcType=VARCHAR}, user_answer = #{userAnswer,jdbcType=VARCHAR}, - answer = #{answer,jdbcType=VARCHAR} + answer = #{answer,jdbcType=VARCHAR}, + topic_content = #{topicContent,jdbcType=VARCHAR} where id = #{id,jdbcType=VARCHAR} \ No newline at end of file