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