|
|
|
@@ -733,7 +733,6 @@ |
|
|
|
select tt.* from ( |
|
|
|
select m.tenant_id,m.id,m.name,ws.shop_number shopNumber,ws.type,m.link_person linkPerson,m.link_phone linkPhone, |
|
|
|
xb.title business,rc.rental_start_date rentalStartDate,rc.rental_end_date rentalEndDate,rc.rent_shop_type, |
|
|
|
|
|
|
|
round( |
|
|
|
(select sum(bill.receive_pay) from ( |
|
|
|
select merchant_id,receive_pay from wx_bill_rent where is_preview = 0 and status not in(3,6) |
|
|
|
@@ -805,10 +804,14 @@ |
|
|
|
select receive_pay money,merchant_id id from wx_bill_other_deposit where status = 3 |
|
|
|
)ss where ss.id = m.id |
|
|
|
)/100,2)) balance |
|
|
|
|
|
|
|
from wx_merchant m left join wx_merchant_shop wms on wms.merchant_id = m.id left join wx_shop ws on wms.shop_id = ws.id |
|
|
|
|
|
|
|
from wx_merchant m |
|
|
|
left join (select ms.merchant_id,s.type,GROUP_CONCAT(s.shop_number) as shop_number |
|
|
|
from wx_merchant_shop ms inner join wx_shop s on ms.shop_id=s.id where ms.is_del=0 |
|
|
|
group by ms.merchant_id) ws on m.id=ws.merchant_id |
|
|
|
left join wx_business xb on(m.business_id = xb.id) |
|
|
|
left join wx_rent_contract rc on(rc.merchant_id = m.id) |
|
|
|
where m.status=1 |
|
|
|
) tt where tt.receivePay >0 and tt.payOut>0 |
|
|
|
|
|
|
|
<if test=" null != tenantId"> and tt.tenant_id = #{tenantId} </if> |
|
|
|
|