package com.sifang.modules.q7link.dao;


import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.sifang.modules.q7link.entity.CrmSupplyMaterialProject;
import com.sifang.modules.sys.common.persistence.BaseDao;
import com.sifang.modules.sys.common.persistence.Parameter;
import org.springframework.stereotype.Component;


@Component
public class CrmSupplyMaterialProjectDao extends BaseDao<CrmSupplyMaterialProject> {

//    public CrmSupplyMaterialProject queryByCode(String code){
//        return getByHql("from CrmSupplyMaterialProject where status = '0' and  code =:p1", new Parameter(code));
//    }
    public Record queryByCode(String code) {
        return Db.findFirst("select * from crm_supply_material_project where status = '0' and  code = ?", code);
    }
}
