Prechádzať zdrojové kódy

修复店铺对账列表数据重复问题

codingliang 1 rok pred
rodič
commit
0d6beae429

+ 9 - 3
src/main/resources/mapper/reconciliation/PlatformBillMapper.xml

@@ -28,9 +28,14 @@
     </select>
 
     <select id="shopBill" resultType="com.sqx.modules.reconciliation.model.ShopBillVo">
-        select pb.*,gs.shop_name as shopName,gs.phone,gs.shop_id as shopId
-        from platform_bill pb left join tb_user tu on pb.user_id =tu.user_id
-        left join goods_shop gs on gs.user_id =tu.user_id
+        select
+            pb.*,
+            gs.shop_name as shopName,
+            gs.phone,
+            gs.shop_id as shopId
+        from
+            platform_bill pb
+            left join goods_shop gs on gs.user_id = pb.user_id and gs.status = 1
         <where>
             pb.`type` = 1
             <if test="params.startDate != null and params.startDate != '' and params.startDate != 'null'">
@@ -48,6 +53,7 @@
         </where>
         order by pb.day_id desc
     </select>
+
     <select id="platformBill" resultType="com.sqx.modules.reconciliation.model.PlatformBill">
         select pb.*
         from platform_bill pb