/**
* 判断积分日志表中是否有某个用户的注册日志
*/
@transactional(propagation = propagation.required)
public boolean isexistregpointlog(int userid, useraction addreg) {
try {
string hql = "select count(pl) from pointlog pl where pl.userid = ? and pl.useraction = ? ";
object result = sessionfactory.getcurrentsession().createquery(hql)
.setparameter(0, userid).setparameter(1, addreg)
.uniqueresult();
if ((long) result > 0) {
return true;
}
} catch (exception e) {
e.printstacktrace();
}
return false;
}