Exemplo n.º 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;
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 public User login(User user) {
   user.setPassword(MD5.md5(user.getPassword()));
   User retUser = userDao.login(user);
   return retUser;
 }
Exemplo n.º 4
0
 public List<User> getUsersByGroup(int groupId) {
   return userDao.getUsersByGroup(groupId);
 }
Exemplo n.º 5
0
 public User get(User user) {
   return userDao.get(user);
 }