예제 #1
0
 public List<Map<String, Object>> queryProvinceByUid(long uid, int platform) {
   if (platform == 0) {
     return userExtMapper.queryProvinceByUid(uid);
   } else {
     return userExtMapper.queryProvinceByUidAndPlatform(uid, platform);
   }
 }
예제 #2
0
 public UserExt addOrUpdate(UserExt userExt) {
   if (userExtMapper.query(userExt.getUid(), userExt.getMid()) != null) {
     userExtMapper.update(userExt);
   } else {
     userExtMapper.add(userExt);
   }
   return userExtMapper.query(userExt.getUid(), userExt.getMid());
 }
예제 #3
0
 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);
 }
예제 #4
0
 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())));
 }