dao层修改 单元测试
This commit is contained in:
@@ -21,15 +21,6 @@ public interface ArticleMapper {
|
||||
|
||||
int update(Article a);
|
||||
|
||||
@Deprecated
|
||||
int updateNextArticleId(long targetArticleID, long nextArticleID);
|
||||
|
||||
@Deprecated
|
||||
int updatePreArticleId(long targetArticleID, long preArticleID);
|
||||
|
||||
@Deprecated
|
||||
long getLastestArticleId();
|
||||
|
||||
Article getLastestArticle();
|
||||
|
||||
Article findArticleById(long id);
|
||||
@@ -38,7 +29,7 @@ public interface ArticleMapper {
|
||||
|
||||
boolean isDeletedById(long id);
|
||||
|
||||
List<Article> findAllByAuthorId(long authorID);
|
||||
List<Article> findAllByAuthorId(long authorId);
|
||||
|
||||
List<Article> findAllByOpen(boolean isOpen);
|
||||
|
||||
@@ -48,15 +39,6 @@ public interface ArticleMapper {
|
||||
|
||||
List<Article> findAll();
|
||||
|
||||
Article getSimpleInfo(long id);
|
||||
|
||||
List<Article> getSimpleInfoByCategory(long categoryId);
|
||||
|
||||
List<Article> getSimpleInfoByTag(List<String> idList);
|
||||
|
||||
@Deprecated
|
||||
int setReadingNumber(long number, long id);
|
||||
|
||||
int updateReadingNumber(long id);
|
||||
|
||||
long count();
|
||||
|
||||
31
src/main/java/cn/celess/blog/mapper/ArticleTagMapper.java
Normal file
31
src/main/java/cn/celess/blog/mapper/ArticleTagMapper.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package cn.celess.blog.mapper;
|
||||
|
||||
import cn.celess.blog.entity.ArticleTag;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: 小海
|
||||
* @Date: 2020-05-24 14:21
|
||||
* @Desc:
|
||||
*/
|
||||
@Mapper
|
||||
@Repository
|
||||
public interface ArticleTagMapper {
|
||||
|
||||
int insert(ArticleTag articleTag);
|
||||
|
||||
int update(ArticleTag articleTag);
|
||||
|
||||
ArticleTag findOneById(Long id);
|
||||
|
||||
int deleteById(Long id);
|
||||
|
||||
int deleteByArticleId(Long articleId);
|
||||
|
||||
List<ArticleTag> findAllByArticleId(Long articleId);
|
||||
|
||||
int deleteMultiById(List<ArticleTag> articleTags);
|
||||
}
|
||||
Reference in New Issue
Block a user