From b3b566ebdfed4005aaa513da3d5d2fd3924903cc Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Wed, 31 Jan 2024 16:17:54 +0800
Subject: [PATCH] 拿不到地址总表数据,不设置网格信息

---
 src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.xml |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.xml b/src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.xml
index df68d96..c66cc6b 100644
--- a/src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.xml
+++ b/src/main/java/org/springblade/modules/subjectChoices/mapper/SubjectChoicesMapper.xml
@@ -30,9 +30,15 @@
     </resultMap>
 
     <select id="selectCircleCommentByParentId" parameterType="long"
-            resultType="org.springblade.modules.subjectOption.entity.SubjectOptionEntity">
-       select * from jczz_subject_option where
-        subject_choices_id = #{id}
+            resultType="org.springblade.modules.subjectOption.vo.SubjectOptionVO">
+        SELECT
+        jso.*,
+        jar.subject_option_id ids,
+        jar.answer numbers
+        FROM
+        jczz_subject_option jso LEFT JOIN jczz_answer_record jar on jso.id = jar.subject_option_id
+        WHERE
+        jso.subject_choices_id = #{id}
     </select>
 
 
@@ -77,7 +83,10 @@
             <if test="subjectChoices.modifyDate != null ">and modify_date = #{subjectChoices.modifyDate}</if>
             <if test="subjectChoices.delFlag != null ">and del_flag = #{subjectChoices.delFlag}</if>
             <if test="subjectChoices.level != null ">and level = #{subjectChoices.level}</if>
+
         </where>
+        order by level desc
+
     </select>
 
 

--
Gitblit v1.9.3