/**
 */
package com.sifang.modules.flowpath.dao;

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


import com.sifang.modules.flowpath.entity.TraderApplyAgent;

import java.util.List;

/**
 * 代理商审批代理信息DAO接口
 * @author lzp
 * @version 
 */
@Repository
public class TraderApplyAgentDao extends BaseDao<TraderApplyAgent> {

    public List<Record> findAgentList(String applyId){

        return Db.find("SELECT * FROM `crm_trader_apply_agent` WHERE trader_apply_id=? ",applyId);
    }
    public List<Record> findAgentListByTraderId(String traderId){

        return Db.find("SELECT * FROM `crm_trader_apply_agent` WHERE trader_id=? ",traderId);
    }

    public void updateTraderId(String traderId,String applyId){
        Db.update("update crm_trader_apply_agent set trader_id =? where trader_apply_id=? ", traderId,applyId);
    }
	
}
