package com.huiju.estateagents.property.dao; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.huiju.estateagents.center.taUser.entity.TaUser; import com.huiju.estateagents.property.model.BillInvoice; import com.huiju.estateagents.property.model.TpBillOrder; import org.apache.ibatis.annotations.*; import java.util.List; import java.util.Map; /** *

* 缴费单 Mapper 接口 *

* * @author weiximei * @since 2019-02-13 */ @Mapper public interface BillInvoiceMapper extends BaseMapper { /** * 查询有效的缴费单 * @param page * @param map * @return */ IPage selectBillInvoice(Page page, @Param("map") Map map); /** * 查询作废的缴费单 * 前台批量添加的缴费单, 默认是 作废 * @param map * @return */ List selectBillInvoiceTemp(@Param("map") Map map); /** * 查询有效的缴费单 * @param page * @return */ IPage selectBillInvoiceEffective(Page page, @Param("map") Map map); List> getPriceCount(); /** * 分页获取缴费和未缴费的数据 * @param orgId * @param roomNoId 房间id * @param payType * @return */ IPage> getBillsList(IPage> pg, @Param("orgId") Integer orgId, @Param("roomNoId") Integer roomNoId, @Param("payType") Integer payType); /** * 获取账单的详细信息 * @param billInvoiceId * @return */ Map getBillInvoiceDetail(@Param("orgId") Integer orgId,@Param("billInvoiceId") Integer billInvoiceId); /** * 获取需要支付的金额 * @param billInvoiceId * @param buildingOwnerInfoId * @param communityId * @return */ BillInvoice selectByIdAndroomNoId(@Param("id") Integer billInvoiceId,@Param("roomNoId") Integer buildingOwnerInfoId,@Param("communityId") Integer communityId); BillInvoice selectByOutTradeNo(@Param("outTradeNo") String outTradeNo); List selectByBuildingOwnerInfoId(@Param("buildingOwnerInfoId") Integer buildingOwnerInfoId); int updateBeach(Map map); /** * 根据 id 查询缴费单 * @param billId * @return */ @ResultType(BillInvoice.class) @Select("select " + "t.* ," + "b.bill_name as billName " + "from " + "tp_bill_invoice t " + "LEFT JOIN tp_bill b ON t.bill_id = b.id " + "where t.id = #{billId}") BillInvoice selectByIdBillInvoiceInfo(Integer billId); }