Пример #1
0
 public TagInfo add(TagInfo tagInfo) {
   if (tagInfo.getTag_id() == 0) {
     tagInfoMapper.add(tagInfo);
   } else {
     tagInfoMapper.update(tagInfo);
   }
   return tagInfoMapper.get(tagInfo.getUid(), tagInfo.getTag_id());
 }
Пример #2
0
 public List<TagInfo> queryTagInfo(long uid, long mid) {
   return tagInfoMapper.queryTagInfo(uid, mid);
 }
Пример #3
0
 public void deleteTagInfo(long uid, int tag_id) {
   tagInfoMapper.delete(uid, tag_id);
 }
Пример #4
0
 public List<TagInfo> getTagInfos(long uid) {
   return tagInfoMapper.list(uid);
 }
Пример #5
0
 private void checkTagId(long uid, int tagId) {
   if (tagInfoMapper.get(uid, tagId) == null) {
     throw new IllegalArgumentException("tagInfo is not exist. uid=" + uid + ", tag_id=" + tagId);
   }
 }