class SurveyDetailManagerImpl extends BaseServiceImpl<SurveyDetail, String> implements SurveyDetailManager{

	@Autowired
	private SurveyDetailDao surveyDetailDao;

	@Override
	public void setBaseDao() {
		this.baseDao=surveyDetailDao;
	}

	@Transactional
	@Override
	public void save(SurveyDetail t) {<FILL_FUNCTION_BODY>}

	private SurveyDetail findUn(String dirId){
		Criterion criterion=Restrictions.eq("dirId", dirId);
		 List<SurveyDetail> details=surveyDetailDao.find(criterion);
		 if(details!=null && details.size()>0){
			 return details.get(0);
		 }
		 return null;
	}

	@Override
	public SurveyDetail getBySurveyId(String surveyId) {
		 return findUn(surveyId);
	}

	@Transactional
	@Override
	public void saveBaseUp(SurveyDetail t) {
		//判断有无，有则更新
		SurveyDetail surveyDetail=findUn(t.getDirId());
		if(surveyDetail!=null){

			surveyDetail.setEffective(t.getEffective());
			surveyDetail.setEffectiveIp(t.getEffectiveIp());
			surveyDetail.setRefresh(t.getRefresh());
			surveyDetail.setRule(t.getRule());
			surveyDetail.setRuleCode(t.getRuleCode());
			surveyDetail.setYnEndTime(t.getYnEndTime());
			surveyDetail.setYnEndNum(t.getYnEndNum());
			surveyDetail.setEndNum(t.getEndNum());
			surveyDetail.setEndTime(t.getEndTime());


			super.save(surveyDetail);
		}

	}
}

		//判断有无，有则更新
		SurveyDetail surveyDetail=findUn(t.getDirId());
		if(surveyDetail==null){
			surveyDetail=new SurveyDetail();
		}
		ReflectionUtils.copyAttr(t,surveyDetail);
		super.save(surveyDetail);
	
<methods>public non-sealed void <init>() ,public void delete(net.diaowen.dwsurvey.entity.SurveyDetail) ,public void delete(java.lang.String) ,public net.diaowen.dwsurvey.entity.SurveyDetail findById(java.lang.String) ,public transient List<net.diaowen.dwsurvey.entity.SurveyDetail> findList(org.hibernate.criterion.Criterion[]) ,public transient Page<net.diaowen.dwsurvey.entity.SurveyDetail> findPage(Page<net.diaowen.dwsurvey.entity.SurveyDetail>, org.hibernate.criterion.Criterion[]) ,public Page<net.diaowen.dwsurvey.entity.SurveyDetail> findPageByCri(Page<net.diaowen.dwsurvey.entity.SurveyDetail>, List<org.hibernate.criterion.Criterion>) ,public net.diaowen.dwsurvey.entity.SurveyDetail get(java.lang.String) ,public net.diaowen.dwsurvey.entity.SurveyDetail getModel(java.lang.String) ,public void save(net.diaowen.dwsurvey.entity.SurveyDetail) <variables>protected BaseDao<net.diaowen.dwsurvey.entity.SurveyDetail,java.lang.String> baseDao