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 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);
 }
 private void fillUserExtInfo(User user) {
   if (user == null) {
     return;
   }
   if (user.getIs_member() == 1) {
     user.setMember(memberMapper.get(user.getUid(), user.getMid()));
   }
   user.setPlatforms(platformMapper.list(user.getUid(), user.getMid()));
   user.setTags(userTagMapper.getUserTags(user.getUid(), user.getMid()));
   user.setUserExts(Arrays.asList(userExtMapper.query(user.getUid(), user.getMid())));
   user.setUserContacts(userContactMapper.queryForList(user.getUid(), user.getMid()));
   user.setUserLastActives(
       Arrays.asList(userLastActiveMappper.query(user.getUid(), user.getMid())));
 }
 public void add(MemberPointRecord record) {
   checkMid(record.getUid(), record.getMid());
   memberPointRecordMapper.add(record);
   memberMapper.addPoint(record);
 }
 public void add(MemberExpRecord record) {
   checkMid(record.getUid(), record.getMid());
   memberExpRecordMapper.add(record);
   memberMapper.addExp(record);
 }
 public int queryMemberCountByUid(long uid) {
   return memberMapper.queryCountByUid(uid);
 }
 public Member update(Member member) {
   checkMemberLevelId(member.getUid(), member.getMember_level_id());
   memberMapper.update(member);
   return memberMapper.get(member.getUid(), member.getMid());
 }
 public Member getMember(long uid, long mid) {
   return memberMapper.get(uid, mid);
 }
 public void deleteMember(long uid, long mid) {
   checkMid(uid, mid);
   userMapper.exitMember(uid, mid);
   memberMapper.delete(uid, mid);
 }