public int insert(User user) {
   byte[] bytes = null;
   try {
     System.out.println("privatekey: " + userStatusCache.getPrivateKey());
     System.out.println("password: "******"UTF-8");
     System.out.println("md5pw: " + md5pw);
     user.setPassword(md5pw);
     return userMapper.insert(user);
   } catch (Exception e) {
     e.printStackTrace();
     return -1;
   }
 }
 public int getCountByUserName(String name) {
   return userMapper.countByUserName(name);
 }
 public User getUserById(int id) {
   return userMapper.selectByPrimaryKey(id);
 }