.
This commit is contained in:
2
dev.sql
2
dev.sql
@@ -34,6 +34,8 @@ INSERT INTO `user` (`u_id`, `u_email`, `u_pwd`, `u_email_status`, `u_avatar`, `u
|
||||
VALUES (1, 'a@celess.cn', '25f9e794323b453885f5181f1b624d0b', 1, 'a@celess.cn_2.png', '禾几海不需要自我介绍',
|
||||
'2020-07-02 11:30:38', '禾几海', 'admin', 0),
|
||||
(2, 'b@celess.cn', '25f9e794323b453885f5181f1b624d0b', 1, NULL, NULL, '2020-05-16 13:21:35', NULL, 'user',
|
||||
0),
|
||||
(3, 'zh56462271@qq.com', '25f9e794323b453885f5181f1b624d0b', 1, NULL, NULL, '2020-05-16 13:21:35', NULL, 'user',
|
||||
0);
|
||||
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
<select id="findAllByPagePath" resultMap="commentViewResultMap" parameterType="string">
|
||||
select *
|
||||
from commentView
|
||||
<if test="pagePath != null ">
|
||||
<if test="toString() != null ">
|
||||
where pagePath = #{pagePath}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
@@ -75,10 +75,8 @@ public class ArticleTagMapperTest extends BaseTest {
|
||||
@Test
|
||||
public void deleteMultiById() {
|
||||
ArticleTag articleTag = new ArticleTag();
|
||||
Article article = new Article();
|
||||
article.setId(-1L);
|
||||
Tag tag = new Tag();
|
||||
tag.setId(1L);
|
||||
Article article = articleMapper.getLastestArticle();
|
||||
Tag tag = tagMapper.getLastestTag();
|
||||
articleTag.setArticle(article);
|
||||
articleTag.setTag(tag);
|
||||
|
||||
@@ -89,7 +87,7 @@ public class ArticleTagMapperTest extends BaseTest {
|
||||
articleTagMapper.insert(articleTag);
|
||||
articleTagMapper.insert(articleTag);
|
||||
|
||||
List<ArticleTag> allByArticleId = articleTagMapper.findAllByArticleId(-1L);
|
||||
List<ArticleTag> allByArticleId = articleTagMapper.findAllByArticleId(article.getId());
|
||||
assertTrue(allByArticleId.size() >= 6);
|
||||
int lines = articleTagMapper.deleteMultiById(allByArticleId);
|
||||
assertTrue(lines >= 6);
|
||||
|
||||
Reference in New Issue
Block a user