コード例 #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);
   }
 }
コード例 #3
0
 public List<MemberLevelInfo> getMemberLevelInfos(long uid) {
   return memberLevelInfoMapper.list(uid);
 }
コード例 #4
0
 public void deleteMemberLevelInfo(long uid, int member_level_id) {
   memberLevelInfoMapper.delete(uid, member_level_id);
 }