Ejemplo n.º 1
0
 /*
  * (non-Javadoc)
  *
  * @see com.jcin.cms.service.system.IUserService#insertBatch(List)
  */
 @Override
 @Transactional(readOnly = false)
 public int insertBatch(List<User> list) {
   int result = userMapper.insertBatch(list);
   super.insertBatch(list);
   for (User user : list) {
     String password = PasswordHelper.encryptPassword(user.getPassword());
     user.setPassword(password);
   }
   return result;
 }
Ejemplo n.º 2
0
 /*
  * (non-Javadoc)
  *
  * @see
  * com.jcin.cms.service.system.IUserService#insert(com.jcin.cms.service.
  * system. User)
  */
 @Override
 @Transactional(readOnly = false)
 public String insert(User record) {
   if (record.getId() == null) super.insert(record);
   if ("".equals(record.getMemberLebelId())) {
     record.setMemberLebelId(null);
   }
   String password = PasswordHelper.encryptPassword(record.getPassword());
   record.setPassword(password);
   record.setCreateDate(new Date());
   int result = userMapper.insert(record);
   String id = record.getId();
   return id;
 }