diff --git a/tamguo-bms/src/main/java/com/tamguo/config/web/WebConfig.java b/tamguo-bms/src/main/java/com/tamguo/config/web/WebConfig.java index 15347d5..27b0699 100644 --- a/tamguo-bms/src/main/java/com/tamguo/config/web/WebConfig.java +++ b/tamguo-bms/src/main/java/com/tamguo/config/web/WebConfig.java @@ -24,6 +24,6 @@ public class WebConfig implements WebMvcConfigurer { @Override public void addInterceptors(InterceptorRegistry registry) { - // registry.addInterceptor(memberInterceptor).addPathPatterns("/member/**"); + registry.addInterceptor(memberInterceptor).addPathPatterns("/member/**"); } } diff --git a/tamguo-bms/src/main/java/com/tamguo/web/BookController.java b/tamguo-bms/src/main/java/com/tamguo/web/BookController.java index 07b90ed..ac29c23 100644 --- a/tamguo-bms/src/main/java/com/tamguo/web/BookController.java +++ b/tamguo-bms/src/main/java/com/tamguo/web/BookController.java @@ -18,6 +18,7 @@ import com.baomidou.mybatisplus.mapper.Condition; import com.tamguo.common.utils.Result; import com.tamguo.modules.book.model.BookEntity; import com.tamguo.modules.book.model.DocumentEntity; +import com.tamguo.modules.book.model.enums.DocumentStatusEnum; import com.tamguo.modules.book.service.IBookService; import com.tamguo.modules.book.service.IDocumentService; @@ -39,11 +40,11 @@ public class BookController { model.setViewName("book/book"); // 查询第一章 - List documentList = iDocumentService.selectList(Condition.create().eq("book_id", id).eq("parent_id", "0").orderAsc(Arrays.asList("create_date"))); + List documentList = iDocumentService.selectList(Condition.create().eq("book_id", id).eq("status", DocumentStatusEnum.NORMAL.getValue()).eq("parent_id", "0").orderAsc(Arrays.asList("create_date"))); if(!CollectionUtils.isEmpty(documentList)) { model.addObject("document", documentList.get(0)); } - model.addObject("documentList", iDocumentService.selectList(Condition.create().eq("book_id", id).orderAsc(Arrays.asList("create_date")))); + model.addObject("documentList", iDocumentService.selectList(Condition.create().eq("book_id", id).eq("status", DocumentStatusEnum.NORMAL.getValue()).orderAsc(Arrays.asList("create_date")))); return model; } @@ -52,7 +53,7 @@ public class BookController { public ModelAndView document(@PathVariable String id , ModelAndView model) { model.setViewName("book/document"); DocumentEntity document = iDocumentService.selectById(id); - List documentList = iDocumentService.selectList(Condition.create().eq("book_id", document.getBookId()).orderAsc(Arrays.asList("create_date"))); + List documentList = iDocumentService.selectList(Condition.create().eq("book_id", document.getBookId()).eq("status", DocumentStatusEnum.NORMAL.getValue()).orderAsc(Arrays.asList("create_date"))); model.addObject("documentList", documentList); model.addObject("document", document); model.addObject("book", iBookService.selectById(document.getBookId())); diff --git a/tamguo-bms/src/main/resources/application.properties b/tamguo-bms/src/main/resources/application.properties index 804550b..30bc224 100644 --- a/tamguo-bms/src/main/resources/application.properties +++ b/tamguo-bms/src/main/resources/application.properties @@ -1,5 +1,6 @@ domain.name=http://localhost:8083/ admin.domain.name=http://localhost:8083/ +tamguo.admin.name=http://localhost:8081/login server.port=8083 jasypt.encryptor.password=tamguo diff --git a/tamguo-bms/src/main/resources/templates/book/book.html b/tamguo-bms/src/main/resources/templates/book/book.html index b1b1f5f..0cd38ff 100644 --- a/tamguo-bms/src/main/resources/templates/book/book.html +++ b/tamguo-bms/src/main/resources/templates/book/book.html @@ -10,6 +10,7 @@ + diff --git a/tamguo-bms/src/main/resources/templates/book/document.html b/tamguo-bms/src/main/resources/templates/book/document.html index aaae9b1..e02aeb5 100644 --- a/tamguo-bms/src/main/resources/templates/book/document.html +++ b/tamguo-bms/src/main/resources/templates/book/document.html @@ -10,6 +10,7 @@ + diff --git a/tamguo-bms/src/main/resources/templates/member/book/compare.html b/tamguo-bms/src/main/resources/templates/member/book/compare.html index b1ee25a..845bb4e 100644 --- a/tamguo-bms/src/main/resources/templates/member/book/compare.html +++ b/tamguo-bms/src/main/resources/templates/member/book/compare.html @@ -3,7 +3,7 @@ 文档比较 - Tamguo - + diff --git a/tamguo-bms/src/main/resources/templates/member/book/history.html b/tamguo-bms/src/main/resources/templates/member/book/history.html index 2e7bff2..07321cc 100644 --- a/tamguo-bms/src/main/resources/templates/member/book/history.html +++ b/tamguo-bms/src/main/resources/templates/member/book/history.html @@ -2,7 +2,7 @@ - +