anderx лет назад: 7
Родитель
Сommit
bb2930da5b
1 измененных файлов с 3 добавлено и 1 удалено
  1. 3 1
      src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

+ 3 - 1
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -375,9 +375,11 @@
 		<if test="departmentId != null and departmentId !=''">
 		<if test="departmentId != null and departmentId !=''">
 		left join (select id
 		left join (select id
 		from admin 
 		from admin 
-		where department_id=#{departmentId,jdbcType=VARCHAR}) d on a.aid = d.id
 		</if>
 		</if>
 		where a.type = 1 and a.status != 1
 		where a.type = 1 and a.status != 1
+		<if test="departmentId != null and departmentId !=''">
+		and department_id=#{departmentId,jdbcType=VARCHAR}) d on a.aid = d.id
+		</if>
 		<if test="aid != null and aid !=''">
 		<if test="aid != null and aid !=''">
 			and a.aid = #{aid,jdbcType=VARCHAR}
 			and a.aid = #{aid,jdbcType=VARCHAR}
 		</if>
 		</if>