예제 #1
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();
 }
예제 #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;
 }