Browse Source

修改indexOf为contains

wukai 1 năm trước cách đây
mục cha
commit
01d7e214c3

+ 1 - 1
doc-biz/src/main/java/com/doc/biz/controller/DocDirController.java

@@ -147,7 +147,7 @@ public class DocDirController extends BaseController {
             DocInfo info = new DocInfo();
             info.setDirId(dir.getDirId());
             docInfoService.selectDocInfoList(info).forEach(d -> {
-                if (!picTree.equals(st) || Constants.IMAGE_EXTENSION.indexOf(d.getFileType()) != -1) {
+                if (!picTree.equals(st) || Constants.IMAGE_EXTENSION.contains(d.getFileType())) {
                     TreeVO childVO = new TreeVO();
                     childVO.setId(d.getDocId());
                     childVO.setLabel(d.getFileName());