Exemple #1
0
 @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
 public boolean create(String operator, User user) throws Exception {
   int ret = userDao.insert(user);
   SysLog sysLog = new SysLog();
   sysLog.setUserName(operator);
   sysLog.setAction(Thread.currentThread().getStackTrace()[1].getMethodName());
   sysLog.setClassName(this.getClass().getName());
   sysLog.setClassObj(user.toString());
   sysLog.setResult(ret + "");
   sysLogDao.insert(sysLog);
   return ret > 0 ? true : false;
 }
Exemple #2
0
 public User login(User user) {
   user.setPassword(MD5.md5(user.getPassword()));
   User retUser = userDao.login(user);
   return retUser;
 }