Exemplo n.º 1
0
 public List<Map<String, Object>> queryStatusByUid(long uid, int platform) {
   if (platform == 0) {
     return userMapper.queryStatusByUid(uid);
   } else {
     return userMapper.queryStatusByUidAndPlatform(uid, platform);
   }
 }
Exemplo n.º 2
0
 public List<User> list(UserQueryCondition condition) {
   List<User> result = userMapper.list(condition);
   for (User user : result) {
     fillUserExtInfo(user);
   }
   return result;
 }
Exemplo n.º 3
0
 public User getUser(long uid, long mid) {
   User user = userMapper.get(uid, mid);
   if (user == null) {
     return null;
   }
   fillUserExtInfo(user);
   return user;
 }
Exemplo n.º 4
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);
 }
Exemplo n.º 5
0
 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());
 }
Exemplo n.º 6
0
 public User add(User user) {
   user.defaultValue();
   userMapper.add(user);
   return getUser(user.getUid(), user.getMid());
 }
Exemplo n.º 7
0
 public int queryUserCountByUid(long uid) {
   return userMapper.queryCountByUid(uid);
 }
Exemplo n.º 8
0
 public User update(User user) {
   userMapper.update(user);
   return getUser(user.getUid(), user.getMid());
 }
Exemplo n.º 9
0
 public void deleteMember(long uid, long mid) {
   checkMid(uid, mid);
   userMapper.exitMember(uid, mid);
   memberMapper.delete(uid, mid);
 }
Exemplo n.º 10
0
 public int countList(UserQueryCondition condition) {
   return userMapper.countList(condition);
 }
Exemplo n.º 11
0
 private void checkMid(long uid, long mid) {
   if (userMapper.get(uid, mid) == null) {
     throw new IllegalArgumentException("user is not exist. uid=" + uid + ", mid=" + mid);
   }
 }