public List<Map<String, Object>> queryStatusByUid(long uid, int platform) {
   if (platform == 0) {
     return userMapper.queryStatusByUid(uid);
   } else {
     return userMapper.queryStatusByUidAndPlatform(uid, platform);
   }
 }
 public List<User> list(UserQueryCondition condition) {
   List<User> result = userMapper.list(condition);
   for (User user : result) {
     fillUserExtInfo(user);
   }
   return result;
 }
 public User getUser(long uid, long mid) {
   User user = userMapper.get(uid, mid);
   if (user == null) {
     return null;
   }
   fillUserExtInfo(user);
   return user;
 }
 public void deleteAllByUidAndMid(long uid, long mid) {
   userContactMapper.delete(uid, mid);
   userExtMapper.delete(uid, mid);
   userLastActiveMappper.delete(uid, mid);
   userTagMapper.deleteUserTag(uid, mid);
   platformMapper.delete(uid, mid);
   userMapper.delete(uid, mid);
   memberExpRecordMapper.delete(uid, mid);
   memberPointRecordMapper.delete(uid, mid);
   addressMapper.deleteAll(mid);
   memberMapper.deleteMember(uid, mid);
 }
 public Member addOrUpdate(Member member) {
   checkMid(member.getUid(), member.getMid());
   checkMemberLevelId(member.getUid(), member.getMember_level_id());
   Member finded = memberMapper.get(member.getUid(), member.getMid());
   if (finded == null) {
     member.defaultValue();
     memberMapper.add(member);
     userMapper.joinMember(member.getUid(), member.getMid());
   } else {
     memberMapper.update(member);
   }
   return memberMapper.get(member.getUid(), member.getMid());
 }
 public User add(User user) {
   user.defaultValue();
   userMapper.add(user);
   return getUser(user.getUid(), user.getMid());
 }
 public int queryUserCountByUid(long uid) {
   return userMapper.queryCountByUid(uid);
 }
 public User update(User user) {
   userMapper.update(user);
   return getUser(user.getUid(), user.getMid());
 }
 public void deleteMember(long uid, long mid) {
   checkMid(uid, mid);
   userMapper.exitMember(uid, mid);
   memberMapper.delete(uid, mid);
 }
 public int countList(UserQueryCondition condition) {
   return userMapper.countList(condition);
 }
 private void checkMid(long uid, long mid) {
   if (userMapper.get(uid, mid) == null) {
     throw new IllegalArgumentException("user is not exist. uid=" + uid + ", mid=" + mid);
   }
 }