Browse Source

公出汇总列表修改

anderx 3 years ago
parent
commit
35d60f9d1a
1 changed files with 8 additions and 2 deletions
  1. 8 2
      src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

+ 8 - 2
src/main/java/com/goafanti/common/mapper/PublicReleaseMapper.xml

@@ -771,6 +771,9 @@
     e.total_amount  totalAmout
     from public_release a left join `user` b on a.uid=b.id left join admin c on a.aid =c.id
     left join admin d on b.aid=d.id left join t_order_new e on a.order_no =e.order_no
+    <if test="uid != null">
+    left join public_release_details prd on a.id=prd.prid
+    </if>
     where 1=1
     <if test="publicType != null">
       and a.type= #{publicType}
@@ -788,7 +791,7 @@
       </foreach>
     </if>
 	<if test="uid != null">
-	and a.uid = #{uid}
+	and prd.uid = #{uid}
 	</if>
 	<if test="releaseStart != null and releaseEnd != null">
 	and (a.release_start  between #{releaseStart} and #{releaseEnd} or a.release_end  between #{releaseStart} and #{releaseEnd})
@@ -812,6 +815,9 @@
   select count(*)
 	from public_release a left join `user` b on a.uid=b.id left join admin c on a.aid =c.id
     left join admin d on b.aid=d.id
+    <if test="uid != null">
+      left join public_release_details prd on a.id=prd.prid
+    </if>
 	where 1=1
     <if test="publicType != null">
       and a.type= #{publicType}
@@ -829,7 +835,7 @@
       </foreach>
     </if>
     <if test="uid != null">
-      and a.uid = #{uid}
+      and prd.uid = #{uid}
     </if>
     <if test="releaseStart != null and releaseEnd != null">
       and (a.release_start  between #{releaseStart} and #{releaseEnd} or a.release_end  between #{releaseStart} and #{releaseEnd})