From 4b62aeaa85b5700217b8130903342a8fb27ac453 Mon Sep 17 00:00:00 2001
From: Administrator <15274802129@163.com>
Date: Thu, 12 Feb 2026 16:10:22 +0800
Subject: [PATCH] feat(ai): 添加产品问答管理功能的题目详情展示

---
 src/main/java/cc/mrbird/febs/ai/res/AdminQuestionInfoVo.java                        |    8 ++++++++
 src/main/resources/mapper/modules/AiProductQuestionMapper.xml                       |    7 ++++++-
 src/main/resources/templates/febs/views/modules/ai/productQuestion/jobInfoList.html |   12 ++++++++++++
 src/main/resources/templates/febs/views/modules/ai/productQuestion/jobList.html     |    1 +
 4 files changed, 27 insertions(+), 1 deletions(-)

diff --git a/src/main/java/cc/mrbird/febs/ai/res/AdminQuestionInfoVo.java b/src/main/java/cc/mrbird/febs/ai/res/AdminQuestionInfoVo.java
index 69bf680..de5b522 100644
--- a/src/main/java/cc/mrbird/febs/ai/res/AdminQuestionInfoVo.java
+++ b/src/main/java/cc/mrbird/febs/ai/res/AdminQuestionInfoVo.java
@@ -7,4 +7,12 @@
 
     private String id;
 
+    private String title;
+
+    private String answer;
+
+    private Integer correctAnswer;
+
+    private String answerAnalysis;
+
 }
diff --git a/src/main/resources/mapper/modules/AiProductQuestionMapper.xml b/src/main/resources/mapper/modules/AiProductQuestionMapper.xml
index 7b84a99..fe5c0cc 100644
--- a/src/main/resources/mapper/modules/AiProductQuestionMapper.xml
+++ b/src/main/resources/mapper/modules/AiProductQuestionMapper.xml
@@ -3,7 +3,12 @@
 <mapper namespace="cc.mrbird.febs.ai.mapper.AiProductQuestionMapper">
 
     <select id="selectJobChildPage" resultType="cc.mrbird.febs.ai.res.AdminQuestionInfoVo">
-        select a.id
+        select
+               a.product_question_id id,
+               a.title,
+               a.answer,
+               a.correct_answer,
+               a.answer_analysis
         from ai_product_question_item a
         where a.job_id = #{record.id}
         ORDER BY a.title DESC
diff --git a/src/main/resources/templates/febs/views/modules/ai/productQuestion/jobInfoList.html b/src/main/resources/templates/febs/views/modules/ai/productQuestion/jobInfoList.html
index d412c9d..157f748 100644
--- a/src/main/resources/templates/febs/views/modules/ai/productQuestion/jobInfoList.html
+++ b/src/main/resources/templates/febs/views/modules/ai/productQuestion/jobInfoList.html
@@ -9,6 +9,14 @@
         </div>
     </div>
 </div>
+
+<script type="text/html" id="correctAnswerFormat">
+    {{# if(d.correctAnswer == 1) { }}
+    <span>是</span>
+    {{# } else { }}
+    <span></span>
+    {{# } }}
+</script>
 <script data-th-inline="javascript" type="text/javascript">
     layui.use(['jquery', 'form', 'table', 'febs'], function () {
         var $ = layui.jquery,
@@ -29,6 +37,10 @@
                 url: ctx + 'admin/productQuestion/jobChild?jobId=' + jobId,
                 cols: [[
                     {field: 'id', title: 'ID', minWidth: 150, align: 'center'},
+                    {field: 'title', title: '题目', minWidth: 150, align: 'center'},
+                    {field: 'answer', title: '答案', minWidth: 150, align: 'center'},
+                    {templet:"#correctAnswerFormat",  title: '是否正确', minWidth: 140,align:'center'},
+                    {field: 'answerAnalysis', title: '答案解析', edit:'text', width:500}
                     // 添加更多列定义...
                 ]]
             });
diff --git a/src/main/resources/templates/febs/views/modules/ai/productQuestion/jobList.html b/src/main/resources/templates/febs/views/modules/ai/productQuestion/jobList.html
index fe8b9a5..af1ca6e 100644
--- a/src/main/resources/templates/febs/views/modules/ai/productQuestion/jobList.html
+++ b/src/main/resources/templates/febs/views/modules/ai/productQuestion/jobList.html
@@ -173,6 +173,7 @@
                 console.log("触发事件-ID:", data.id)
                 febs.modal.open( '详情', 'modules/ai/productQuestion/jobInfoList/' + data.id, {
                     maxmin: true,
+                    area: ['100%', '100%'],
                 });
             }
         });

--
Gitblit v1.9.1