Преглед на файлове

缺陷:1.文章审核,单个文章审核时提示信息为“批量审核成功”,提示信息不准确2.【后台管理】基础资料-知识分类-导出,导出内容“是否有子节点”字段显示不准确(没有子节点时为空)

danch преди 3 месеца
родител
ревизия
37c5dfd9c1

+ 1 - 1
jeecg-module-kms/src/main/java/org/jeecg/modules/kms/bas/entity/Category.java

@@ -50,7 +50,7 @@ public class Category implements Serializable {
     @ApiModelProperty(value = "所属部门")
     private String sysOrgCode;
 	/**父级节点*/
-	@Excel(name = "父级节点", width = 15)
+	@Excel(name = "父级节点", width = 15,dictTable ="kms_bas_article_category",dicText = "name",dicCode = "id")
     @ApiModelProperty(value = "父级节点")
     private String pid;
 	/**是否有子节点*/

+ 7 - 2
jeecg-module-kms/src/main/java/org/jeecg/modules/kms/knowledge/controller/ArticleController.java

@@ -144,8 +144,13 @@ public class ArticleController extends JeecgController<Article, IArticleService>
     @RequiresPermissions("kms:kms_knowledge_article:deleteAudit")
     @GetMapping(value = "/auditBatch")
     public Result<String> auditBatch(@RequestParam(name = "ids", required = true) String ids) {
-        this.articleService.auditBatchByIds(Arrays.asList(ids.split(",")));
-        return Result.OK("批量审核成功!");
+        List<String> idList = Arrays.asList(ids.split(","));
+        this.articleService.auditBatchByIds(idList);
+        if (idList.size() == 1) {
+            return Result.OK("审核成功!");
+        }else {
+            return Result.OK("批量审核成功!");
+        }
     }
 
     /**

+ 2 - 1
jeecg-module-kms/src/main/java/org/jeecg/modules/kms/knowledge/service/impl/ArticleServiceImpl.java

@@ -23,6 +23,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
 import java.util.ArrayList;
+import java.util.Comparator;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -60,7 +61,7 @@ public class ArticleServiceImpl extends ServiceImpl<ArticleMapper, Article> impl
                 article.setTags(tags);
             }
         }
-        List<Article> collect = articles.stream().sorted().collect(Collectors.toList());
+        List<Article> collect = articles.stream().sorted(Comparator.comparing(Article::getTitle)).collect(Collectors.toList());
         articleIPage.setRecords(collect);
         return articleIPage;
     }