gaoluyang
7 天以前 3688f07fd292812994dbf3c84bde18a440d8275c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package cn.iocoder.yudao.module.erp.dal.mysql.purchase;
 
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.erp.dal.dataobject.purchase.ErpPurchaseInvoiceOrderDO;
import org.apache.ibatis.annotations.Mapper;
 
import java.util.Collection;
import java.util.List;
 
/**
 * ERP 采购来票-采购订单分摊 Mapper
 *
 * @author 超级管理员
 */
@Mapper
public interface ErpPurchaseInvoiceOrderMapper extends BaseMapperX<ErpPurchaseInvoiceOrderDO> {
 
    default List<ErpPurchaseInvoiceOrderDO> selectListByInvoiceId(Long invoiceId) {
        return selectList(new LambdaQueryWrapperX<ErpPurchaseInvoiceOrderDO>()
                .eq(ErpPurchaseInvoiceOrderDO::getInvoiceId, invoiceId)
                .orderByAsc(ErpPurchaseInvoiceOrderDO::getSort));
    }
 
    default List<ErpPurchaseInvoiceOrderDO> selectListByInvoiceIds(Collection<Long> invoiceIds) {
        return selectList(new LambdaQueryWrapperX<ErpPurchaseInvoiceOrderDO>()
                .in(ErpPurchaseInvoiceOrderDO::getInvoiceId, invoiceIds)
                .orderByAsc(ErpPurchaseInvoiceOrderDO::getSort));
    }
 
    default List<ErpPurchaseInvoiceOrderDO> selectListByPurchaseOrderId(Long purchaseOrderId) {
        return selectList(new LambdaQueryWrapperX<ErpPurchaseInvoiceOrderDO>()
                .eq(ErpPurchaseInvoiceOrderDO::getPurchaseOrderId, purchaseOrderId));
    }
 
    default List<ErpPurchaseInvoiceOrderDO> selectListByPurchaseOrderIds(Collection<Long> purchaseOrderIds) {
        return selectList(new LambdaQueryWrapperX<ErpPurchaseInvoiceOrderDO>()
                .in(ErpPurchaseInvoiceOrderDO::getPurchaseOrderId, purchaseOrderIds));
    }
 
    default int deleteByInvoiceId(Long invoiceId) {
        return delete(new LambdaQueryWrapperX<ErpPurchaseInvoiceOrderDO>()
                .eq(ErpPurchaseInvoiceOrderDO::getInvoiceId, invoiceId));
    }
 
}