Package org.j2cms.utils

Examples of org.j2cms.utils.MD532


@Service @Transactional
public class UserServiceImpl extends DaoSupport<User> implements UserService {
  public boolean validate(String username, String password){
    long count = (Long)em.createQuery("select count(o) from User o where o.username=?1 and o.password=?2")
    .setParameter(1, username).setParameter(2, new MD532().getMD5(password)).getSingleResult();
    return count>0;
  }
View Full Code Here


    user.setAddress(entity.getAddress());
    user.setZipCode(entity.getZipCode());
    user.setInfo(entity.getInfo());
    user.setSysDate(new Date());
    if (entity.getPassword() != null&& !"".equals(entity.getPassword()))
      user.setPassword(new MD532().getMD5(entity.getPassword()));
    return user;
  }
View Full Code Here

      }else
      {
        User user = new User();
        user.setUsername(this.entity.getUsername());
        user.setCheckState(CheckState.noCheck);//默认未审核
        user.setPassword(new MD532().getMD5(this.entity.getPassword()) );
        userService.save(user);
        return "success";     
      }
    }
    catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.j2cms.utils.MD532

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.