Browse Source

sql错误

zhoutg 5 năm trước cách đây
mục cha
commit
0f371f85a7

+ 6 - 3
icssman-service/src/main/resources/mapper/QuestionInfoMapper.xml

@@ -329,8 +329,11 @@
         update icss_question_mapping
         set is_deleted = 'Y', gmt_modified = #{date}, modifier = #{person}
         where is_deleted = 'N' and parent_question in
-        (SELECT c.id FROM `icss_question_info` a, icss_question_mapping b, icss_question_info c
-        where a.is_deleted = 'N' and b.is_deleted = 'N' and c.is_deleted = 'N' and
-        a.id = b.parent_question and b.son_question = c.id and a.id = #{id} and c.tag_type = 10)
+        (
+            select id from (
+            (SELECT c.id id FROM `icss_question_info` a, icss_question_mapping b, icss_question_info c
+            where a.is_deleted = 'N' and b.is_deleted = 'N' and c.is_deleted = 'N' and
+            a.id = b.parent_question and b.son_question = c.id and a.id = #{id} and c.tag_type = 10)) t
+        )
     </select>
 </mapper>