yonge 5 年之前
父節點
當前提交
39d05a339e
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      mec-biz/src/main/resources/config/mybatis/SchoolMapper.xml

+ 3 - 3
mec-biz/src/main/resources/config/mybatis/SchoolMapper.xml

@@ -122,7 +122,7 @@
     <select id="queryByOrganId" resultMap="School">
         SELECT * FROM school
         <where>
-            del_flag_ != 1
+            del_flag_ != 1 and user_id_ is null
             <if test="organId != null">
                 AND FIND_IN_SET(organ_id_,#{organId})
             </if>
@@ -144,10 +144,10 @@
             del_flag_ != 1
             AND FIND_IN_SET(organ_id_,#{organId})
             <if test="isDefault == null">
-                AND ( user_id_ IS NULL OR user_id_ = #{userId} )
+                or ( user_id_ IS NULL OR user_id_ = #{userId} )
             </if>
             <if test="isDefault != null">
-                AND user_id_ = #{userId}
+                or user_id_ = #{userId}
             </if>
     </select>
 </mapper>