public List<Map<String, Object>> queryByUid(long uid, int platform) {
   if (platform == 0) {
     return platformMapper.queryByUid(uid);
   } else {
     return platformMapper.queryByUidAndlatform(uid, platform);
   }
 }
 public Platform addOrUpdate(Platform platform) {
   if (platformMapper.query(platform.getUid(), platform.getMid(), platform.getPlatform())
       != null) {
     platformMapper.update(platform);
   } else {
     platformMapper.add(platform);
   }
   return platformMapper.query(platform.getUid(), platform.getMid(), platform.getPlatform());
 }
 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 List<Platform> queryByUidAndUserId(long uid, String platform_user_id) {
   return platformMapper.queryByUidAndUserId(uid, platform_user_id);
 }
 public List<UserIncrement> queryByUidAndDate(long uid, Date start, Date end) {
   return platformMapper.queryByUidAndDate(uid, start, end);
 }