package com.sifang.modules.quality.dao;

import com.sifang.modules.quality.entity.CrmEntryQualitySeekEntry;
import com.sifang.modules.sys.common.persistence.BaseDao;
import com.sifang.modules.sys.common.persistence.Parameter;
import org.springframework.stereotype.Repository;

import java.util.Date;

@Repository
public class CrmEntryQualitySeekEntryDao extends BaseDao<CrmEntryQualitySeekEntry> {

    public void saveSeekEntry(String entryId,String traderId, Date acceptTime){
        CrmEntryQualitySeekEntry seekEntry=new CrmEntryQualitySeekEntry();
        seekEntry.setEntryId(entryId);
        seekEntry.setCheckAcceptTime(acceptTime);
       // seekEntry.setFinishAcceptCount(Integer.valueOf(String.valueOf(count)));
        seekEntry.setTraderId(traderId);
        seekEntry.setIfSample("0");
        save(seekEntry);
    }

    public CrmEntryQualitySeekEntry findInfoByEntryId(String entryId){

        return getByHql(" from CrmEntryQualitySeekEntry where entryId =:p1", new Parameter(entryId));
    }
}
