Ejemplo n.º 1
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());
 }
Ejemplo n.º 2
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);
 }
Ejemplo n.º 3
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())));
 }
Ejemplo n.º 4
0
 public void add(MemberPointRecord record) {
   checkMid(record.getUid(), record.getMid());
   memberPointRecordMapper.add(record);
   memberMapper.addPoint(record);
 }
Ejemplo n.º 5
0
 public void add(MemberExpRecord record) {
   checkMid(record.getUid(), record.getMid());
   memberExpRecordMapper.add(record);
   memberMapper.addExp(record);
 }
Ejemplo n.º 6
0
 public int queryMemberCountByUid(long uid) {
   return memberMapper.queryCountByUid(uid);
 }
Ejemplo n.º 7
0
 public Member update(Member member) {
   checkMemberLevelId(member.getUid(), member.getMember_level_id());
   memberMapper.update(member);
   return memberMapper.get(member.getUid(), member.getMid());
 }
Ejemplo n.º 8
0
 public Member getMember(long uid, long mid) {
   return memberMapper.get(uid, mid);
 }
Ejemplo n.º 9
0
 public void deleteMember(long uid, long mid) {
   checkMid(uid, mid);
   userMapper.exitMember(uid, mid);
   memberMapper.delete(uid, mid);
 }