Example #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;
 }
Example #2
0
 public boolean modifyUsersGroup(String operator, Map map) {
   int ret = userDao.modifyUsersGroup(map);
   if (ret > 0) {
     SysLog sysLog = new SysLog();
     sysLog.setUserName(operator);
     sysLog.setAction(Thread.currentThread().getStackTrace()[1].getMethodName());
     sysLog.setClassName(this.getClass().getName());
     sysLog.setClassObj(
         "userGroup:" + map.get("userGroup") + ";userIds:" + map.get("userIds").toString());
     sysLog.setResult(ret + "");
     sysLogDao.insert(sysLog);
   }
   return ret > 0 ? true : false;
 }
Example #3
0
 public User login(User user) {
   user.setPassword(MD5.md5(user.getPassword()));
   User retUser = userDao.login(user);
   return retUser;
 }
Example #4
0
 public List<User> getUsersByGroup(int groupId) {
   return userDao.getUsersByGroup(groupId);
 }
Example #5
0
 public User get(User user) {
   return userDao.get(user);
 }