Преглед на файлове

日志分页查询时同时匹配公司和部门

wangli преди 4 години
родител
ревизия
5c9799767d
променени са 2 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 1 1
      user_center/src/main/resources/mapper/LoginLogMapper.xml
  2. 1 1
      user_center/src/main/resources/mapper/OperateLogMapper.xml

+ 1 - 1
user_center/src/main/resources/mapper/LoginLogMapper.xml

@@ -158,7 +158,7 @@
                 and a.company_id = #{loginLogDto.companyId}
             </if>
             <if test="loginLogDto.departmentId != null">
-                and a.DEPARTMENT_ID = #{loginLogDto.departmentId}
+                and (a.DEPARTMENT_ID = #{loginLogDto.departmentId} or a.company_id = #{loginLogDto.departmentId})
             </if>
             <if test="loginLogDto.beginTime != null">
                 and a.create_time >= #{loginLogDto.beginTime}

+ 1 - 1
user_center/src/main/resources/mapper/OperateLogMapper.xml

@@ -154,7 +154,7 @@
                 and a.company_id = #{operateLogDto.companyId}
             </if>
             <if test="operateLogDto.departmentId != null">
-                and a.DEPARTMENT_ID = #{operateLogDto.departmentId}
+                and (a.DEPARTMENT_ID = #{operateLogDto.departmentId} or a.company_id = #{operateLogDto.departmentId})
             </if>
             <if test="operateLogDto.beginTime != null">
                 and a.create_time >= #{operateLogDto.beginTime}