package com.sifang.modules.changes.dao;

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

import java.util.List;

@Repository
public class CustomerEntrySurveyChangeRecordDetailDao extends BaseDao<CustomerEntrySurveyChangeRecordDetail> {

    public List<CustomerEntrySurveyChangeRecordDetail> findByChangeRecord(String changeRecordId) {
        return find("from CustomerEntrySurveyChangeRecordDetail where changeRecordId = :p1", new Parameter(changeRecordId));
    }


    public List<Record> findByChangeRecordId(String changeRecordId) {
        return Db.find("  SELECT d.* FROM `crm_customer_entry_survey_change_record_detail`d  WHERE d.change_record_id=? ",changeRecordId);
    }

}
