Ejemplo n.º 1
0
 public MemberLevelInfo add(MemberLevelInfo memberLevelInfo) {
   if (memberLevelInfo.getMember_level_id() == 0) {
     memberLevelInfoMapper.add(memberLevelInfo);
   } else {
     memberLevelInfoMapper.update(memberLevelInfo);
   }
   return memberLevelInfoMapper.get(
       memberLevelInfo.getUid(), memberLevelInfo.getMember_level_id());
 }
Ejemplo n.º 2
0
 private void checkMemberLevelId(long uid, Integer memberLevelId) {
   if (memberLevelId == null) {
     return;
   }
   if (memberLevelInfoMapper.get(uid, memberLevelId) == null) {
     throw new IllegalArgumentException(
         "member_level_id is not exist. uid=" + uid + ", member_level_id=" + memberLevelId);
   }
 }
Ejemplo n.º 3
0
 public List<MemberLevelInfo> getMemberLevelInfos(long uid) {
   return memberLevelInfoMapper.list(uid);
 }
Ejemplo n.º 4
0
 public void deleteMemberLevelInfo(long uid, int member_level_id) {
   memberLevelInfoMapper.delete(uid, member_level_id);
 }