コード例 #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;
 }
コード例 #2
0
 /*
  * (non-Javadoc)
  *
  * @see
  * com.jcin.cms.service.system.IUserService#update(com.jcin.cms.service.
  * system. User)
  */
 @Override
 @Transactional(readOnly = false)
 public String update(User record) {
   // super.update(record);
   record.setUpdateDate(new Date());
   if ("".equals(record.getMemberLebelId())) {
     record.setMemberLebelId(null);
   }
   int result = userMapper.updateByPrimaryKeySelective(record);
   return record.getId();
 }
コード例 #3
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;
 }