package com.sifang.modules.sunshine.SystemSetting.dao;

import com.jfinal.plugin.activerecord.Db;
import com.jfinal.plugin.activerecord.Record;
import com.sifang.modules.sunshine.SystemSetting.entity.CrmPlan;
import com.sifang.modules.sunshine.SystemSetting.entity.CrmProjectContract;
import com.sifang.modules.sys.common.persistence.BaseDao;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @author lzp
 */
@Repository
public class ProjectContractDao extends BaseDao<CrmProjectContract> {

    public Record getPlanById(String id){
        return Db.findFirst("select * from crm_customer_project_contract where id=?", id);
    }

    public List<Record> findAllPlan(){
        return Db.find("select * from crm_customer_project_contract where status !='3' order by create_time desc");
    }
}
