Ver código fonte

修改操作日志搜索条件不可用

qianxb 1 ano atrás
pai
commit
6d06bfd118

+ 18 - 0
blade-service/blade-business/src/main/java/org/springblade/business/mapper/OperationLogMapper.xml

@@ -56,6 +56,24 @@
         select *
         from u_operation_log uol where is_deleted = 0
         and (SELECT contract_id from m_wbs_tree_contract WHERE p_key_id = SUBSTRING_INDEX(uol.business_id,",",1)) = #{vo.contractId}
+        <if test="vo.operationModule != null and vo.operationModule != '' ">
+             and operation_module = #{vo.operationModule}
+        </if>
+        <if test="vo.operationType != null and vo.operationType != '' ">
+            and operation_type = #{vo.operationType}
+        </if>
+        <if test="vo.operationMedium != null and vo.operationMedium != '' ">
+            and operation_medium = #{vo.operationMedium}
+        </if>
+        <if test="vo.createUser != null and vo.createUser != '' ">
+            and create_user = #{vo.createUser}
+        </if>
+        <if test="vo.queryValue != null and vo.queryValue != '' ">
+            and operation_content like CONCAT(CONCAT('%', #{vo.queryValue}), '%')
+        </if>
+        <if test="vo.startTime != null and vo.startTime != '' ">
+            and create_time &gt;= #{vo.startTime} and create_time &lt;= #{vo.endTime}
+        </if>
         order by uol.create_time desc
     </select>