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

import java.util.List;
import java.util.Map;

import org.cs.core.dao.impl.BaseDao;
import org.cs.mgr.admin.dao.IDCProjectDao;
import org.cs.mgr.admin.model.DCProject;
import org.cs.util.Pager;
import org.cs.util.StringUtil;
import org.springframework.stereotype.Repository;

@Repository
public class DCProjectDao extends BaseDao<DCProject> implements IDCProjectDao{

	@Override
	public Pager findDCProject(Pager page, Map<String, String> map){
		StringBuffer sb = new StringBuffer("select name, create_date as createDate, id from mgr_dc_project");
		if(map != null&&StringUtil.isNotBlank(map.get("name"))){
			sb.append(" where name like '%"+map.get("name")+"%'");
		}
		return this.findPageBySql(sb.toString(), page, null);
	}
	
}
