Просмотр исходного кода

修改公出列表客户查询

anderx лет назад: 2
Родитель
Сommit
823db42566
1 измененных файлов с 9 добавлено и 5 удалено
  1. 9 5
      src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

+ 9 - 5
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -492,9 +492,8 @@
     <if test="type==2">
       left join department d on c.department_id =d.id
     </if>
-    <if test="type==4">
-        /*审核列表由4来判断*/
-      left join public_release_details b on a.id=b.prid
+    <if test="type==4 or userName !=null">
+    left join public_release_details b on a.id=b.prid
       left join user e on b.uid=e.id
     </if>
       where 1=1
@@ -554,7 +553,9 @@
     <if test="releaseStarts != null and publicEnd != null">
       and a.release_start  BETWEEN #{releaseStarts} and #{publicEnd}
     </if>
-
+    <if test="userName !=null">
+      and e.nickname like concat('%',#{userName},'%')
+    </if>
     <if test="status !=null">
       and a.status = #{status}
     </if>
@@ -576,7 +577,7 @@
     <if test="type==2">
       left join department d on c.department_id =d.id
     </if>
-    <if test="type==4">
+    <if test="type==4 or userName !=null">
       left join public_release_details b on a.id=b.prid
       left join user e on b.uid=e.id
     </if>
@@ -628,6 +629,9 @@
       and e.aid = #{aid}
       and a.public_type in (1,2)
     </if>
+    <if test="userName !=null">
+      and e.nickname like concat('%',#{userName},'%')
+    </if>
 	<if test="clockTime !=null">
 	and a.release_start &lt; #{clockTime} and a.release_end &gt; #{clockTime}
 	</if>