Beispiel #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;
 }
Beispiel #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;
 }