package com.sifang.modules.releorder.dao;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.sifang.modules.releorder.entity.CrmInvoiceFile;
import com.sifang.modules.sys.common.persistence.BaseDao;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @title: CrmInvoiceFileDao
 * @Author Tan
 * @Date: 2024/10/21 10:00
 * @Version 1.0
 */
@Repository
public class CrmInvoiceFileDao extends BaseDao<CrmInvoiceFile> {

    public List<Record> getInvoiceInfoList(String invoiceNumber) {
        StringBuilder sql = new StringBuilder();
        sql.append(" SELECT *FROM crm_invoice_file ");
        sql.append(" WHERE 1 = 1  ");
        sql.append(" AND invoice_code = "+"'"+invoiceNumber+"'");
        return Db.find(sql.toString());
    }

}