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