Преглед изворни кода

订单任务池查询优化

hxl13994548489 пре 2 година
родитељ
комит
9f7555147f
1 измењених фајлова са 4 додато и 8 уклоњено
  1. 4 8
      src/main/resources/mapper/modules/order/InsOrdersMapper.xml

+ 4 - 8
src/main/resources/mapper/modules/order/InsOrdersMapper.xml

@@ -818,7 +818,7 @@
                 <foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
                 <foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
                     #{item}
                     #{item}
                 </foreach>
                 </foreach>
-                AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' )
+                AND ( iac.new_operator_id IS NULL  OR iac.new_operator_id = #{orderQueryVo.userId} )
                 <if test="deptIds != null and deptIds.size>0" >
                 <if test="deptIds != null and deptIds.size>0" >
                     AND (
                     AND (
                     <foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
                     <foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
@@ -827,7 +827,6 @@
                     )
                     )
                 </if>
                 </if>
                 )
                 )
-                OR iac.new_operator_id = #{orderQueryVo.userId}
                 <if test="flag" >
                 <if test="flag" >
                     OR iac.operator_id = #{orderQueryVo.userId}
                     OR iac.operator_id = #{orderQueryVo.userId}
                 </if>
                 </if>
@@ -839,8 +838,7 @@
                 <foreach collection="agreeIds" item="item" open="(" separator="," close=")">
                 <foreach collection="agreeIds" item="item" open="(" separator="," close=")">
                     #{item}
                     #{item}
                 </foreach>
                 </foreach>
-                AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' ) )
-                OR iac.new_operator_id = #{orderQueryVo.userId}
+                AND ( iac.new_operator_id IS NULL  OR iac.new_operator_id = #{orderQueryVo.userId} ) )
                 <if test="flag" >
                 <if test="flag" >
                     OR iac.operator_id = #{orderQueryVo.userId}
                     OR iac.operator_id = #{orderQueryVo.userId}
                 </if>
                 </if>
@@ -897,7 +895,7 @@
                 <foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
                 <foreach collection="agentUserIds" item="item" open="(" separator="," close=")">
                     #{item}
                     #{item}
                 </foreach>
                 </foreach>
-                AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' )
+                AND ( iac.new_operator_id IS NULL  OR iac.new_operator_id = #{orderQueryVo.userId} )
                 <if test="deptIds != null and deptIds.size>0" >
                 <if test="deptIds != null and deptIds.size>0" >
                     AND (
                     AND (
                     <foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
                     <foreach collection="deptIds" item="item" open="(" separator="OR" close=")">
@@ -906,7 +904,6 @@
                     )
                     )
                 </if>
                 </if>
                 )
                 )
-                OR iac.new_operator_id = #{orderQueryVo.userId}
               <if test="flag" >
               <if test="flag" >
                 OR iac.operator_id = #{orderQueryVo.userId}
                 OR iac.operator_id = #{orderQueryVo.userId}
               </if>
               </if>
@@ -918,8 +915,7 @@
                 <foreach collection="agreeIds" item="item" open="(" separator="," close=")">
                 <foreach collection="agreeIds" item="item" open="(" separator="," close=")">
                     #{item}
                     #{item}
                 </foreach>
                 </foreach>
-                AND ( iac.new_operator_id IS NULL OR iac.new_operator_id = '' ) )
-                OR iac.new_operator_id = #{orderQueryVo.userId}
+                AND ( iac.new_operator_id IS NULL  OR iac.new_operator_id = #{orderQueryVo.userId} ) )
                 <if test="flag" >
                 <if test="flag" >
                     OR iac.operator_id = #{orderQueryVo.userId}
                     OR iac.operator_id = #{orderQueryVo.userId}
                 </if>
                 </if>