コード例 #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());
 }
コード例 #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);
   }
 }