|
|
|
@@ -183,5 +183,37 @@ |
|
|
|
select count(br.id) from wx_bill_property br,wx_property_contract c |
|
|
|
where c.id = br.property_contract_id and br.status = 1 and c.id = #{contractId} |
|
|
|
</select> |
|
|
|
|
|
|
|
<insert id="insertBills" parameterType="java.util.List"> |
|
|
|
INSERT INTO wx_bill_property (id,property_contract_id, receive_pay, pay, receive_date, pay_date, createtime, |
|
|
|
expired_day, |
|
|
|
tenant_id, owe, status, is_del, need_pay, merchant_id, user_id, shop_id, updatetime, starttime, endtime, |
|
|
|
rent_shop_type, revenue, late_pay_ratio, late_pay_time, late_pay_price, period, is_preview, shop_info, |
|
|
|
pay_way, late_pay_status, comments) |
|
|
|
VALUES |
|
|
|
<foreach collection="list" item="item" index="index" separator=","> |
|
|
|
( |
|
|
|
#{item.id},#{item.propertyContractId},#{item.receivePay},#{item.pay},#{item.receiveDate},#{item.payDate},#{item.createtime}, |
|
|
|
#{item.expiredDay},#{item.tenantId},#{item.owe},#{item.status},#{item.isDel},#{item.needPay},#{item.merchantId}, |
|
|
|
#{item.userId},#{item.shopId},#{item.updatetime},#{item.starttime},#{item.endtime},#{item.rentShopType},#{item.revenue}, |
|
|
|
#{item.latePayRatio},#{item.latePayTime},#{item.latePayPrice},#{item.period},#{item.isPreview},#{item.shopInfo}, |
|
|
|
#{item.payWay},#{item.latePayStatus},#{item.comments} |
|
|
|
) |
|
|
|
</foreach> |
|
|
|
</insert> |
|
|
|
|
|
|
|
<update id="updateBills" parameterType="java.util.List"> |
|
|
|
<foreach collection="list" item="item" index="index" open="" close="" separator=";"> |
|
|
|
update wx_bill_rent |
|
|
|
<set> |
|
|
|
<if test=" null != item.receivePay ">updatetime = now(),receive_pay = #{item.receivePay},</if> |
|
|
|
<if test=" null != item.comments ">comments = #{item.comments},</if> |
|
|
|
<if test=" null != item.receiveDate ">receive_date = #{item.receiveDate},</if> |
|
|
|
<if test="0 == item.receivePay or 0l == item.receivePay">status = 3,pay_date=now()</if> |
|
|
|
</set> |
|
|
|
where id = #{item.id} |
|
|
|
</foreach> |
|
|
|
</update> |
|
|
|
|
|
|
|
</mapper> |
|
|
|
|