package com.qiankun.dao;

import org.springframework.stereotype.Repository;

import com.qiankun.dao.core.AbsDao;
import com.qiankun.dao.core.Hints;
import com.qiankun.entity.Certificate;
import com.qiankun.entity.User;

@Repository
public class CarertificateDaoImpl extends AbsDao<Certificate,String> implements CertificateDao {

	@Override
	public void updateStatus(String id) {
		String hql="update Certificate set status=false where id<>?";
		super.execUpdate(hql, id);
	}
	
	@Override
	public Certificate findByStatus() {
		String hql="from Certificate where status = true";
		return findUnique(hql, new Hints());
	}
}
