Skip to content

Commit 3298304

Browse files
author
UlricQin
committed
Update TagService.java
1 parent c287104 commit 3298304

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/org/iperl/service/TagService.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,16 +32,17 @@ public static void batchAddTags(Long blogId, String keywords) {
3232
bt.Save();
3333
}
3434
}
35-
35+
3636
public static void batchDelTags(Long blogId, String keywords) {
3737
if (StringUtils.isBlank(keywords)) {
3838
return;
3939
}
4040

4141
List<BlogTag> list = BlogTag.INSTANCE.BatchGetByAttr("blog", blogId);
4242
for (BlogTag bt : list) {
43+
int tagId = bt.getTag();
4344
if (bt.Delete()) {
44-
Tag t = Tag.INSTANCE.Get(bt.getTag());
45+
Tag t = Tag.INSTANCE.GetByAttr("id", tagId);
4546
int cnt = t.getCnt() - 1;
4647
if (cnt == 0) {
4748
t.Delete();

0 commit comments

Comments
 (0)