yanite %!s(int64=3) %!d(string=hai) anos
pai
achega
b37d630e77

+ 2 - 2
mec-biz/src/main/resources/config/mybatis/SubjectMapper.xml

@@ -147,7 +147,7 @@
     <select id="queryPageByIdOrNameCount" resultType="integer">
         SELECT count(1) FROM `subject`
         <where>
-            del_flag_ = 0
+            del_flag_ = 0 AND parent_subject_id_  != 0
             <if test="parentSubjectId != null and parentSubjectId != ''">
                 AND parent_subject_id_ = #{parentSubjectId}
             </if>
@@ -159,7 +159,7 @@
     <select id="queryPageByIdOrName" resultMap="Subject">
         SELECT * FROM `subject`
         <where>
-            del_flag_ = 0
+            del_flag_ = 0 AND parent_subject_id_  != 0
             <if test="parentSubjectId != null and parentSubjectId != ''">
                 AND parent_subject_id_ = #{parentSubjectId}
             </if>