package org.cs.mgr.user.dao.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Repository;

import java.util.HashMap;
import java.util.Map;

import org.cs.core.dao.impl.BaseDao;
import org.cs.util.Pager;
import org.cs.mgr.user.model.MgmUser;
import org.cs.mgr.user.model.MgmUserBank;
import org.cs.mgr.user.dao.IMgmUserBankDao;

/**
 * 
 * @ClassName: MgmUserBankDao
 * @Description:  
 * @author: sunny_shi
 * @date: 2018-06-09 13:28:57
 */
@Repository
public class MgmUserBankDao extends BaseDao<MgmUserBank> implements IMgmUserBankDao {
	private final Logger logger = LoggerFactory.getLogger(this.getClass());
	
	@Override
	public Pager queryMgmUserBanks(Pager page){
		String hql = "from MgmUserBank where isDelete = false";
		return findPageByHql(hql, page, null);
	}
	
	@Override
	public MgmUserBank getByPropertie(String value,String entry) {
		Map<String, Object> params = new HashMap<>();
		params.put("value", value);
		return this.findOneByHql("from MgmUserBank where "+entry+"=:value", params);
	}
}
