|
|
|
@@ -17,11 +17,13 @@ |
|
|
|
<result column="pay_way" jdbcType="INTEGER" property="payWay" /> |
|
|
|
<result column="receipt_num" jdbcType="VARCHAR" property="receiptNum" /> |
|
|
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId" /> |
|
|
|
<result column="owe" jdbcType="DECIMAL" property="owe" /> |
|
|
|
|
|
|
|
|
|
|
|
</resultMap> |
|
|
|
|
|
|
|
<sql id="allColumns"> |
|
|
|
`id`,`shop_id`,`user_area`,`price`,`need_pay`,`receive_pay`,`pay`,`receive_period`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`pay_way`,`receipt_num`,`tenant_id` |
|
|
|
`id`,`shop_id`,`user_area`,`price`,`need_pay`,`receive_pay`,`pay`,`receive_period`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`pay_way`,`receipt_num`,`tenant_id`,`owe` |
|
|
|
</sql> |
|
|
|
|
|
|
|
<sql id="dynamicWhereConditions"> |
|
|
|
@@ -59,7 +61,7 @@ |
|
|
|
select br.id,br.shop_id shopId,br.user_area userArea,br.price,br.need_pay needPay,br.receive_pay receivePay, |
|
|
|
br.pay,br.receive_period receivePeriod,br.receive_date receiveDate,br.pay_date payDate,br.createtime, |
|
|
|
br.expired_day expiredDay,br.pay_way payWay,br.receipt_num receiptNum,m.`name` merchantName, |
|
|
|
s.build_area buildArea,s.operation_area operationArea,s.shop_number shopNumber |
|
|
|
s.build_area buildArea,s.operation_area operationArea,s.shop_number shopNumber,br.owe |
|
|
|
from wx_bill_rent br left join wx_merchant_shop ms on br.shop_id=ms.shop_id and ms.is_del=0 |
|
|
|
inner join wx_merchant m on ms.merchant_id=m.id |
|
|
|
inner join wx_shop s on ms.shop_id=s.id |
|
|
|
@@ -89,6 +91,11 @@ |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
<select id="queryPayInfo" resultType="hashmap" parameterType="hashmap"> |
|
|
|
select sum(receive_pay) receivepay,sum(pay) pay,tenant_id from wx_bill_rent |
|
|
|
where tenant_id=#{tenantId} and date_format(receive_date,'%Y-%m')=#{receiveDate} |
|
|
|
group by tenant_id |
|
|
|
</select> |
|
|
|
|
|
|
|
|
|
|
|
</mapper> |