Remove unnecessary annotation on MyBatis mapper interface
This commit is contained in:
parent
8ff3a372f3
commit
9b81b1fb25
@ -3,10 +3,8 @@ package io.spring.infrastructure.mybatis.mapper;
|
||||
import io.spring.core.favorite.ArticleFavorite;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface ArticleFavoriteMapper {
|
||||
ArticleFavorite find(@Param("articleId") String articleId, @Param("userId") String userId);
|
||||
|
||||
|
@ -4,9 +4,7 @@ import io.spring.core.article.Article;
|
||||
import io.spring.core.article.Tag;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface ArticleMapper {
|
||||
void insert(@Param("article") Article article);
|
||||
|
@ -3,9 +3,7 @@ package io.spring.infrastructure.mybatis.mapper;
|
||||
import io.spring.core.comment.Comment;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface CommentMapper {
|
||||
void insert(@Param("comment") Comment comment);
|
||||
|
@ -4,9 +4,7 @@ import io.spring.core.user.FollowRelation;
|
||||
import io.spring.core.user.User;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface UserMapper {
|
||||
void insert(@Param("user") User user);
|
||||
|
@ -4,13 +4,11 @@ import io.spring.application.data.ArticleFavoriteCount;
|
||||
import io.spring.core.user.User;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Mapper
|
||||
@Component
|
||||
public interface ArticleFavoritesReadService {
|
||||
boolean isUserFavorite(@Param("userId") String userId, @Param("articleId") String articleId);
|
||||
|
||||
|
@ -4,11 +4,9 @@ import io.spring.application.Page;
|
||||
import io.spring.application.data.ArticleData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface ArticleReadService {
|
||||
ArticleData findById(@Param("id") String id);
|
||||
|
@ -3,11 +3,9 @@ package io.spring.infrastructure.mybatis.readservice;
|
||||
import io.spring.application.data.CommentData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface CommentReadService {
|
||||
CommentData findById(@Param("id") String id);
|
||||
|
@ -1,11 +1,9 @@
|
||||
package io.spring.infrastructure.mybatis.readservice;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface TagReadService {
|
||||
List<String> all();
|
||||
|
@ -3,9 +3,7 @@ package io.spring.infrastructure.mybatis.readservice;
|
||||
import io.spring.application.data.UserData;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface UserReadService {
|
||||
|
||||
|
@ -2,12 +2,10 @@ package io.spring.infrastructure.mybatis.readservice;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
@Component
|
||||
@Mapper
|
||||
public interface UserRelationshipQueryService {
|
||||
boolean isUserFollowing(@Param("userId") String userId, @Param("anotherUserId") String anotherUserId);
|
||||
|
Loading…
Reference in New Issue
Block a user