package com.sifang.modules.setting.dao;

import com.jfinal.plugin.activerecord.Db;
import com.sifang.modules.setting.entity.CrmHrEpcPriceSet;
import com.sifang.modules.sys.common.persistence.BaseDao;
import com.sifang.modules.sys.util.SqlBuilder;
import org.springframework.stereotype.Repository;

import java.math.BigDecimal;

@Repository
public class CrmHrEpcPriceSetDao extends BaseDao<CrmHrEpcPriceSet> {
    public BigDecimal getEpcPriceSet(String brand, String spec, String roofType){
        SqlBuilder builder = new SqlBuilder();
        builder.line(" select price from crm_hr_epc_price_set where brand = ? and spec = ? and roof_type = ? ",brand,spec,roofType);
        return Db.queryBigDecimal(builder.build(),builder.params());
    }
}
