├── 1.txt ├── src ├── main │ ├── resources │ │ ├── static │ │ │ ├── photo │ │ │ │ ├── 1671778483744_ │ │ │ │ ├── 1671806674281_ │ │ │ │ ├── 1671806679209_ │ │ │ │ ├── 4d123b70-1d3d-4f9a-bd08-db32d7c73693 │ │ │ │ ├── 55f8141c-240e-436b-8705-7a5bab7f22dd │ │ │ │ ├── 1670830260933_奥特1.jpg │ │ │ │ ├── 1671110078204_假面2.jpg │ │ │ │ ├── 1671174239878_假面2.jpg │ │ │ │ ├── 1671194756288_假面3.jpg │ │ │ │ ├── 1671250072439_假面1.jpg │ │ │ │ ├── 1671250167248_假面1.jpg │ │ │ │ ├── 1671250245152_假面1.jpg │ │ │ │ ├── 1671695247281_奥特1.jpg │ │ │ │ ├── 1671807970780_假面1.jpg │ │ │ │ ├── 1671808115462_假面1.jpg │ │ │ │ ├── 1671808251205_假面1.jpg │ │ │ │ ├── 1671808323109_假面2.jpg │ │ │ │ ├── 1671865868886_奥特2.jpg │ │ │ │ ├── 1670844150054_02--.webp │ │ │ │ ├── 1671955021242_firefox-icon.png │ │ │ │ ├── 2000dec7-ef83-487a-834c-97320369f9032.jpg │ │ │ │ ├── 272b6411-9664-44e9-bcc2-ae6626caca4b7.jpg │ │ │ │ ├── 4a57bc0c-dc38-4b98-b47b-4cbc4f6bedf73.jpg │ │ │ │ ├── 59a707aa-c726-4aa0-9d5a-9b7a3852d43c10.jpg │ │ │ │ ├── 5a3d3d40-18cd-497f-b20f-eaaccfdf1f5f4.jpg │ │ │ │ ├── 7de3b8d4-46fc-4ebf-8d6c-4723d014d3798.jpg │ │ │ │ ├── a3a284f9-2e43-44b7-bde3-095309bd85bf5.jpg │ │ │ │ ├── a7e35fd2-c23a-4219-a62a-1a6eeccae6e36.jpeg │ │ │ │ ├── d29eef1f-7069-4d0a-a47b-7353e8b661b51.jpg │ │ │ │ ├── f5c74e4f-a763-4840-a650-54c185ad15ec9.jpg │ │ │ │ ├── 2b0e6040-ce6a-4233-9a98-edff6e00fc82假面1.jpg │ │ │ │ ├── 59ec3684-5583-44ec-bb36-1e5621a0d9bb假面1.jpg │ │ │ │ ├── 6b517e88-e07c-4db2-a040-43a2e5bbdd99路飞.jpeg │ │ │ │ ├── 7e6a4a7f-3492-4c66-a41d-ec5115a1da55假面1.jpg │ │ │ │ ├── 83bbaa74-65bc-45dd-9307-7f46356502cc假面1.jpg │ │ │ │ ├── e17aa731-094c-4ca0-91e2-6836365e640e假面1.jpg │ │ │ │ └── 45638eee-be78-4ad1-95b9-8e0e9d853ba0000221-1494864141c298.jpg │ │ │ ├── comic │ │ │ │ ├── 1677140911039_久.png │ │ │ │ ├── 1677241603349_网.jpg │ │ │ │ ├── 1677241652661_网.jpg │ │ │ │ ├── 1677241737222_网.jpg │ │ │ │ ├── 1677286223678_网.jpg │ │ │ │ ├── 1677286370050_网.jpg │ │ │ │ ├── 1677308559962_久.png │ │ │ │ ├── 1677308607233_网.jpg │ │ │ │ └── 1677140883213_自拍照.JPG │ │ │ ├── user │ │ │ │ ├── 1677241702338_久.png │ │ │ │ ├── 1677285438231_久.png │ │ │ │ ├── 1677285732516_网.jpg │ │ │ │ ├── 1677285786236_久.png │ │ │ │ ├── 1677285948758_久.png │ │ │ │ ├── 1677286035273_久.png │ │ │ │ ├── 1677287091426_久.png │ │ │ │ ├── 1677287990558_久.png │ │ │ │ ├── 1677288074631_网.jpg │ │ │ │ ├── 1677288105894_久.png │ │ │ │ ├── 1677288205376_网.jpg │ │ │ │ ├── 1677288279644_网.jpg │ │ │ │ ├── 1677288312266_久.png │ │ │ │ ├── 1677288479342_网.jpg │ │ │ │ ├── 1677288538820_网.jpg │ │ │ │ ├── 1677288569793_网.jpg │ │ │ │ ├── 1677288579949_久.png │ │ │ │ ├── 1677288606408_网.jpg │ │ │ │ ├── 1677288636227_久.png │ │ │ │ ├── 1677288788735_久.png │ │ │ │ ├── 1677289109447_久.png │ │ │ │ ├── 1677289181762_网.jpg │ │ │ │ ├── 1677289215538_网.jpg │ │ │ │ ├── 1677289311829_久.png │ │ │ │ ├── 1677289378118_久.png │ │ │ │ ├── 1677289456900_久.png │ │ │ │ ├── 1677289680219_久.png │ │ │ │ ├── 1677289764801_久.png │ │ │ │ ├── 1677289791517_久.png │ │ │ │ ├── 1677290448923_久.png │ │ │ │ ├── 1677290723867_久.png │ │ │ │ ├── 1677292271149_久.png │ │ │ │ ├── 1677293851459_网.jpg │ │ │ │ ├── 1677293963580_久.png │ │ │ │ ├── 1677308296976_网.jpg │ │ │ │ ├── 1677137100367_自拍照.JPG │ │ │ │ ├── 1677228090700_无标题.png │ │ │ │ ├── 1677233970667_无标题.png │ │ │ │ ├── 1677235120681_无标题.png │ │ │ │ ├── 1677235161892_无标题.png │ │ │ │ ├── 1677235249226_无标题.png │ │ │ │ ├── 1677235324699_无标题.png │ │ │ │ ├── 1677235838122_无标题.png │ │ │ │ ├── 1677235943380_无标题.png │ │ │ │ ├── 1677236098904_无标题.png │ │ │ │ ├── 1677236443799_无标题.png │ │ │ │ ├── 1677236617466_无标题.png │ │ │ │ ├── 1677237123319_无标题.png │ │ │ │ ├── 1677224496277_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677224930319_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677224959006_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677225061258_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677225082464_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677225125835_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677225156379_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677225207214_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677225446002_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677225526374_u=1771389468,3533157149&fm=26&gp=0.jpg │ │ │ │ ├── 1677225973212_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677226034855_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677226331459_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677226369297_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677226430058_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677226502247_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677226533316_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677226626492_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677226712118_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677226919324_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677227061699_u=1771389468,3533157149&fm=26&gp=0.jpg │ │ │ │ ├── 1677237098351_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677237126120_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ ├── 1677237355956_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ │ └── 1677237859528_u=2770854646,866920428&fm=26&gp=0.jpg │ │ │ └── profile │ │ │ │ └── 1677240046269_u=1771389468,3533157149&fm=26&gp=0.jpg │ │ ├── banner.txt │ │ ├── application.properties │ │ └── logback-spring.xml │ └── java │ │ └── com │ │ └── comic │ │ └── springbootproject │ │ ├── comment │ │ ├── entity │ │ │ ├── Comment.java │ │ │ ├── CommentReplyContent.java │ │ │ └── ComicComment.java │ │ ├── service │ │ │ ├── ComicCommentService.java │ │ │ ├── CommentReplyContentService.java │ │ │ └── impl │ │ │ │ ├── CommentReplyContentServiceImpl.java │ │ │ │ └── ComicCommentImpl.java │ │ ├── dao │ │ │ ├── ComicCommentDao.java │ │ │ └── CommentReplyContentDao.java │ │ └── controller │ │ │ ├── CommentController.java │ │ │ └── CommentReplyContentController.java │ │ ├── SpringbootprojectApplication.java │ │ ├── common │ │ ├── service │ │ │ ├── ImageService.java │ │ │ └── Impl │ │ │ │ └── ImageServiceImpl.java │ │ ├── vo │ │ │ ├── Search.java │ │ │ ├── ImageType.java │ │ │ └── Result.java │ │ ├── controller │ │ │ └── ImageController.java │ │ └── entiy │ │ │ └── AbstractEntity.java │ │ ├── user │ │ ├── entity │ │ │ ├── UserCollection.java │ │ │ ├── UserHistory.java │ │ │ └── User.java │ │ ├── service │ │ │ ├── UserService.java │ │ │ ├── UserRecordService.java │ │ │ └── Impl │ │ │ │ ├── UserRecordServiceImpl.java │ │ │ │ └── UserServiceImpl.java │ │ ├── dao │ │ │ ├── UserRecord.java │ │ │ └── UserDao.java │ │ └── controller │ │ │ └── UserController.java │ │ ├── util │ │ ├── MD5Util.java │ │ └── FileUtil.java │ │ ├── comic │ │ ├── service │ │ │ ├── ComicService.java │ │ │ └── impl │ │ │ │ └── ComicServiceImpl.java │ │ ├── entity │ │ │ └── Comic.java │ │ ├── dao │ │ │ └── ComicDao.java │ │ └── controller │ │ │ └── ComicController.java │ │ └── config │ │ ├── ResourceBean.java │ │ ├── Swagger2Configuration.java │ │ └── WebMvcConfig.java └── test │ └── java │ └── com │ └── comic │ └── springbootproject │ └── SpringbootprojectApplicationTests.java ├── photo ├── img0.png ├── img1.png ├── img2.png ├── img3.png ├── img4.png └── img5.png ├── vue ├── public │ ├── favicon.ico │ └── index.html ├── src │ ├── assets │ │ └── logo.png │ ├── utils │ │ ├── bus.js │ │ ├── you.css │ │ ├── login.js │ │ ├── cookie.js │ │ ├── storage.js │ │ ├── testData.js │ │ ├── vuexStore.js │ │ ├── filter.js │ │ ├── common.js │ │ └── request.js │ ├── App.vue │ ├── components │ │ ├── fragements │ │ │ ├── Footer.vue │ │ │ ├── Userhead.vue │ │ │ ├── Pagination.vue │ │ │ ├── BreadCrumb.vue │ │ │ ├── Sidebar.vue │ │ │ ├── Usersidebar.vue │ │ │ └── Header.vue │ │ ├── HelloWorld.vue │ │ ├── User │ │ │ ├── Update.vue │ │ │ ├── Detail.vue │ │ │ ├── Record.vue │ │ │ └── Like.vue │ │ ├── Permission.vue │ │ ├── Comic │ │ │ ├── UserEdit.vue │ │ │ ├── User.vue │ │ │ └── Comic.vue │ │ ├── User.vue │ │ └── Login.vue │ ├── main.js │ └── router │ │ └── index.js ├── babel.config.js ├── .gitignore ├── jsconfig.json ├── README.md ├── vue.config.js ├── .eslintrc.js └── package.json ├── README.md ├── .gitignore └── pom.xml /1.txt: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671778483744_: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671806674281_: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671806679209_: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/photo/4d123b70-1d3d-4f9a-bd08-db32d7c73693: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/main/resources/static/photo/55f8141c-240e-436b-8705-7a5bab7f22dd: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /photo/img0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/photo/img0.png -------------------------------------------------------------------------------- /photo/img1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/photo/img1.png -------------------------------------------------------------------------------- /photo/img2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/photo/img2.png -------------------------------------------------------------------------------- /photo/img3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/photo/img3.png -------------------------------------------------------------------------------- /photo/img4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/photo/img4.png -------------------------------------------------------------------------------- /photo/img5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/photo/img5.png -------------------------------------------------------------------------------- /vue/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/vue/public/favicon.ico -------------------------------------------------------------------------------- /vue/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/vue/src/assets/logo.png -------------------------------------------------------------------------------- /vue/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /vue/src/utils/bus.js: -------------------------------------------------------------------------------- 1 | // 利用 Vue 来实现非父子组件(兄弟组件)间的通信 2 | import Vue from "vue"; 3 | export default new Vue(); 4 | -------------------------------------------------------------------------------- /src/main/resources/static/comic/1677140911039_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/comic/1677140911039_久.png -------------------------------------------------------------------------------- /src/main/resources/static/comic/1677241603349_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/comic/1677241603349_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/comic/1677241652661_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/comic/1677241652661_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/comic/1677241737222_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/comic/1677241737222_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/comic/1677286223678_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/comic/1677286223678_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/comic/1677286370050_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/comic/1677286370050_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/comic/1677308559962_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/comic/1677308559962_久.png -------------------------------------------------------------------------------- /src/main/resources/static/comic/1677308607233_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/comic/1677308607233_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677241702338_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677241702338_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677285438231_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677285438231_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677285732516_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677285732516_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677285786236_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677285786236_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677285948758_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677285948758_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677286035273_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677286035273_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677287091426_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677287091426_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677287990558_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677287990558_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677288074631_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677288074631_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677288105894_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677288105894_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677288205376_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677288205376_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677288279644_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677288279644_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677288312266_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677288312266_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677288479342_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677288479342_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677288538820_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677288538820_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677288569793_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677288569793_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677288579949_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677288579949_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677288606408_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677288606408_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677288636227_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677288636227_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677288788735_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677288788735_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677289109447_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677289109447_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677289181762_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677289181762_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677289215538_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677289215538_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677289311829_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677289311829_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677289378118_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677289378118_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677289456900_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677289456900_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677289680219_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677289680219_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677289764801_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677289764801_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677289791517_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677289791517_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677290448923_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677290448923_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677290723867_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677290723867_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677292271149_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677292271149_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677293851459_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677293851459_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677293963580_久.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677293963580_久.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677308296976_网.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677308296976_网.jpg -------------------------------------------------------------------------------- /src/main/resources/static/comic/1677140883213_自拍照.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/comic/1677140883213_自拍照.JPG -------------------------------------------------------------------------------- /src/main/resources/static/photo/1670830260933_奥特1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1670830260933_奥特1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671110078204_假面2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671110078204_假面2.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671174239878_假面2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671174239878_假面2.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671194756288_假面3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671194756288_假面3.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671250072439_假面1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671250072439_假面1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671250167248_假面1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671250167248_假面1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671250245152_假面1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671250245152_假面1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671695247281_奥特1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671695247281_奥特1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671807970780_假面1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671807970780_假面1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671808115462_假面1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671808115462_假面1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671808251205_假面1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671808251205_假面1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671808323109_假面2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671808323109_假面2.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671865868886_奥特2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671865868886_奥特2.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677137100367_自拍照.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677137100367_自拍照.JPG -------------------------------------------------------------------------------- /src/main/resources/static/user/1677228090700_无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677228090700_无标题.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677233970667_无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677233970667_无标题.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677235120681_无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677235120681_无标题.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677235161892_无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677235161892_无标题.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677235249226_无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677235249226_无标题.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677235324699_无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677235324699_无标题.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677235838122_无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677235838122_无标题.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677235943380_无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677235943380_无标题.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677236098904_无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677236098904_无标题.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677236443799_无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677236443799_无标题.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677236617466_无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677236617466_无标题.png -------------------------------------------------------------------------------- /src/main/resources/static/user/1677237123319_无标题.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677237123319_无标题.png -------------------------------------------------------------------------------- /src/main/resources/static/photo/1670844150054_02--.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1670844150054_02--.webp -------------------------------------------------------------------------------- /src/main/resources/static/photo/1671955021242_firefox-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/1671955021242_firefox-icon.png -------------------------------------------------------------------------------- /src/main/resources/static/photo/2000dec7-ef83-487a-834c-97320369f9032.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/2000dec7-ef83-487a-834c-97320369f9032.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/272b6411-9664-44e9-bcc2-ae6626caca4b7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/272b6411-9664-44e9-bcc2-ae6626caca4b7.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/4a57bc0c-dc38-4b98-b47b-4cbc4f6bedf73.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/4a57bc0c-dc38-4b98-b47b-4cbc4f6bedf73.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/59a707aa-c726-4aa0-9d5a-9b7a3852d43c10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/59a707aa-c726-4aa0-9d5a-9b7a3852d43c10.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/5a3d3d40-18cd-497f-b20f-eaaccfdf1f5f4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/5a3d3d40-18cd-497f-b20f-eaaccfdf1f5f4.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/7de3b8d4-46fc-4ebf-8d6c-4723d014d3798.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/7de3b8d4-46fc-4ebf-8d6c-4723d014d3798.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/a3a284f9-2e43-44b7-bde3-095309bd85bf5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/a3a284f9-2e43-44b7-bde3-095309bd85bf5.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/a7e35fd2-c23a-4219-a62a-1a6eeccae6e36.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/a7e35fd2-c23a-4219-a62a-1a6eeccae6e36.jpeg -------------------------------------------------------------------------------- /src/main/resources/static/photo/d29eef1f-7069-4d0a-a47b-7353e8b661b51.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/d29eef1f-7069-4d0a-a47b-7353e8b661b51.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/f5c74e4f-a763-4840-a650-54c185ad15ec9.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/f5c74e4f-a763-4840-a650-54c185ad15ec9.jpg -------------------------------------------------------------------------------- /vue/src/utils/you.css: -------------------------------------------------------------------------------- 1 | .zong{ 2 | width: 100%; 3 | height: 100%; 4 | margin-top: 10%; 5 | } 6 | .touxiang{ 7 | margin-left: 30%; 8 | width: 50px; 9 | height: 50px; 10 | } -------------------------------------------------------------------------------- /src/main/resources/static/photo/2b0e6040-ce6a-4233-9a98-edff6e00fc82假面1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/2b0e6040-ce6a-4233-9a98-edff6e00fc82假面1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/59ec3684-5583-44ec-bb36-1e5621a0d9bb假面1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/59ec3684-5583-44ec-bb36-1e5621a0d9bb假面1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/6b517e88-e07c-4db2-a040-43a2e5bbdd99路飞.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/6b517e88-e07c-4db2-a040-43a2e5bbdd99路飞.jpeg -------------------------------------------------------------------------------- /src/main/resources/static/photo/7e6a4a7f-3492-4c66-a41d-ec5115a1da55假面1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/7e6a4a7f-3492-4c66-a41d-ec5115a1da55假面1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/83bbaa74-65bc-45dd-9307-7f46356502cc假面1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/83bbaa74-65bc-45dd-9307-7f46356502cc假面1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/e17aa731-094c-4ca0-91e2-6836365e640e假面1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/e17aa731-094c-4ca0-91e2-6836365e640e假面1.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677224496277_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677224496277_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677224930319_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677224930319_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677224959006_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677224959006_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677225061258_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677225061258_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677225082464_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677225082464_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677225125835_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677225125835_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677225156379_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677225156379_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677225207214_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677225207214_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677225446002_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677225446002_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677225526374_u=1771389468,3533157149&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677225526374_u=1771389468,3533157149&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677225973212_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677225973212_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677226034855_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677226034855_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677226331459_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677226331459_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677226369297_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677226369297_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677226430058_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677226430058_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677226502247_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677226502247_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677226533316_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677226533316_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677226626492_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677226626492_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677226712118_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677226712118_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677226919324_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677226919324_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677227061699_u=1771389468,3533157149&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677227061699_u=1771389468,3533157149&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677237098351_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677237098351_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677237126120_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677237126120_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677237355956_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677237355956_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/user/1677237859528_u=2770854646,866920428&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/user/1677237859528_u=2770854646,866920428&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/profile/1677240046269_u=1771389468,3533157149&fm=26&gp=0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/profile/1677240046269_u=1771389468,3533157149&fm=26&gp=0.jpg -------------------------------------------------------------------------------- /src/main/resources/static/photo/45638eee-be78-4ad1-95b9-8e0e9d853ba0000221-1494864141c298.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/onelibero/springboot-vue/HEAD/src/main/resources/static/photo/45638eee-be78-4ad1-95b9-8e0e9d853ba0000221-1494864141c298.jpg -------------------------------------------------------------------------------- /vue/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | 6 | # local env files 7 | .env.local 8 | .env.*.local 9 | 10 | # Log files 11 | npm-debug.log* 12 | yarn-debug.log* 13 | yarn-error.log* 14 | pnpm-debug.log* 15 | 16 | # Editor directories and files 17 | .idea 18 | .vscode 19 | *.suo 20 | *.ntvs* 21 | *.njsproj 22 | *.sln 23 | *.sw? 24 | -------------------------------------------------------------------------------- /src/main/resources/banner.txt: -------------------------------------------------------------------------------- 1 | _ ___ 2 | __ | | ___ ___ ___ |_ ) _ _ 3 | / _| | | / _ \ (_-< / -_) / / | +| | 4 | \__|_ _|_|_ \___/ /__/_ \___| /___| \_,_| 5 | _|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""|_|"""""| 6 | "`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-'"`-0-0-' 7 | -------------------------------------------------------------------------------- /vue/jsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "module": "esnext", 5 | "baseUrl": "./", 6 | "moduleResolution": "node", 7 | "paths": { 8 | "@/*": [ 9 | "src/*" 10 | ] 11 | }, 12 | "lib": [ 13 | "esnext", 14 | "dom", 15 | "dom.iterable", 16 | "scripthost" 17 | ] 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /vue/src/utils/login.js: -------------------------------------------------------------------------------- 1 | const container = document.getElementById('container'); 2 | const signUpButton = document.getElementById('signUp'); 3 | const signInButton = document.getElementById('signIn'); 4 | 5 | signUpButton.onclick = function() { 6 | container.classList.add('penal-right-active'); 7 | } 8 | 9 | signInButton.onclick = function() { 10 | container.classList.remove('penal-right-active'); 11 | } 12 | 13 | -------------------------------------------------------------------------------- /vue/README.md: -------------------------------------------------------------------------------- 1 | # shixun01 2 | 3 | ## Project setup 4 | ``` 5 | npm install 6 | ``` 7 | 8 | ### Compiles and hot-reloads for development 9 | ``` 10 | npm run serve 11 | ``` 12 | 13 | ### Compiles and minifies for production 14 | ``` 15 | npm run build 16 | ``` 17 | 18 | ### Lints and fixes files 19 | ``` 20 | npm run lint 21 | ``` 22 | 23 | ### Customize configuration 24 | See [Configuration Reference](https://cli.vuejs.org/config/). 25 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comment/entity/Comment.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comment.entity; 2 | 3 | import lombok.Data; 4 | 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | @Data 9 | public class Comment { 10 | @Id 11 | @GeneratedValue(strategy = GenerationType.IDENTITY) 12 | private int id; 13 | private String comment; 14 | } 15 | -------------------------------------------------------------------------------- /vue/src/utils/cookie.js: -------------------------------------------------------------------------------- 1 | import Cookies from "js-cookie"; 2 | 3 | // 获取 4 | export function get(key) { 5 | return Cookies.get(key); 6 | } 7 | 8 | // 返回 js 对象 9 | export function getObject(key) { 10 | return JSON.parse(Cookies.get(key)); 11 | } 12 | 13 | // 设置 value ---- js 对象 14 | export function setToken(key, value) { 15 | return Cookies.set(key, value); 16 | } 17 | 18 | // 移除 19 | export function remove(key) { 20 | return Cookies.remove(key); 21 | } 22 | -------------------------------------------------------------------------------- /vue/vue.config.js: -------------------------------------------------------------------------------- 1 | const { defineConfig } = require("@vue/cli-service"); 2 | const webpack = require("webpack"); 3 | module.exports = defineConfig({ 4 | transpileDependencies: true, 5 | // 关闭语法检查 6 | lintOnSave: false, 7 | devServer: { 8 | port: 8080, 9 | }, 10 | configureWebpack: { 11 | plugins: [ 12 | new webpack.ProvidePlugin({ 13 | $: "jquery", 14 | jQuery: "jquery", 15 | "windows.jQuery": "jquery", 16 | }), 17 | ], 18 | }, 19 | }); 20 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/SpringbootprojectApplication.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject; 2 | 3 | import org.springframework.boot.SpringApplication; 4 | import org.springframework.boot.autoconfigure.SpringBootApplication; 5 | 6 | @SpringBootApplication 7 | public class SpringbootprojectApplication { 8 | 9 | public static void main(String[] args) { 10 | SpringApplication.run(SpringbootprojectApplication.class, args); 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /vue/src/App.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 14 | 15 | 27 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/common/service/ImageService.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.common.service; 2 | 3 | import com.comic.springbootproject.common.vo.Result; 4 | import org.springframework.web.multipart.MultipartFile; 5 | 6 | import java.io.FileNotFoundException; 7 | 8 | /** 9 | * image service 10 | */ 11 | public interface ImageService { 12 | Result uploadImage(MultipartFile mf, String imageTypeName) throws FileNotFoundException; 13 | } 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # springboot-vue 2 | springboot+vue动漫网站 3 | ## 下面展示运行效果,有兴趣的同学可以查看(前端学的烂有点丑) 4 | ##### 这是主页,未登录跳转的页面,实现了分页,未登录无法跳转详情页 5 | ![img.png](/photo/img0.png) 6 | ![img.png](/photo/img1.png) 7 | ##### 这是详情页,登录之后可查看也能进行评论,也能进行回复,这里算法没设计好,所以多级评论展示会很慢 8 | ![img.png](/photo/img2.png) 9 | ##### 然后是登录页,前端做了处理,登录成功会赋予权限开放其余页面,根据后端返回值跳转不同页面(主页面或管理页) 10 | ![img.png](/photo/img4.png) 11 | ##### 个人中心页,这里就是基本的信息展示 12 | ![img.png](/photo/img3.png) 13 | ##### 管理页面,前端用的组件,后端就基础crud 14 | ![img.png](/photo/img5.png) -------------------------------------------------------------------------------- /vue/src/components/fragements/Footer.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | HELP.md 2 | target/ 3 | !.mvn/wrapper/maven-wrapper.jar 4 | !**/src/main/**/target/ 5 | !**/src/test/**/target/ 6 | 7 | ### STS ### 8 | .apt_generated 9 | .classpath 10 | .factorypath 11 | .project 12 | .settings 13 | .springBeans 14 | .sts4-cache 15 | 16 | ### IntelliJ IDEA ### 17 | .idea 18 | *.iws 19 | *.iml 20 | *.ipr 21 | 22 | ### NetBeans ### 23 | /nbproject/private/ 24 | /nbbuild/ 25 | /dist/ 26 | /nbdist/ 27 | /.nb-gradle/ 28 | build/ 29 | !**/src/main/**/build/ 30 | !**/src/test/**/build/ 31 | 32 | ### VS Code ### 33 | .vscode/ 34 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comment/service/ComicCommentService.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comment.service; 2 | 3 | import com.comic.springbootproject.comment.entity.ComicComment; 4 | import com.comic.springbootproject.common.vo.Result; 5 | 6 | import java.util.List; 7 | 8 | public interface ComicCommentService { 9 | Result insertComicComment(ComicComment comicComment); 10 | 11 | Result deleteComicCommentByComicCommentId(int ComicCommentId); 12 | 13 | Result> selectCommentByComicId(int comicId); 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /vue/.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { 4 | node: true, 5 | }, 6 | extends: ["plugin:vue/essential", "eslint:recommended"], 7 | parserOptions: { 8 | parser: "@babel/eslint-parser", 9 | }, 10 | rules: { 11 | "no-console": process.env.NODE_ENV === "production" ? "warn" : "off", 12 | "no-debugger": process.env.NODE_ENV === "production" ? "warn" : "off", 13 | //在rules中添加自定义规则 14 | //关闭组件命名规则 15 | "vue/multi-word-component-names": "off", 16 | }, 17 | overrides: [ 18 | { 19 | files: ["**/__tests__/*.{j,t}s?(x)", "**/tests/unit/**/*.spec.{j,t}s?(x)"], 20 | env: { 21 | jest: true, 22 | }, 23 | }, 24 | ], 25 | }; 26 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/user/entity/UserCollection.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.user.entity; 2 | 3 | import lombok.Data; 4 | import lombok.Generated; 5 | 6 | import javax.persistence.*; 7 | 8 | @Data 9 | @Entity 10 | @Table(name = "user_collection") 11 | public class UserCollection { 12 | @Id 13 | @GeneratedValue(strategy = GenerationType.IDENTITY) 14 | private int id; 15 | private int userId; 16 | private int comicId; 17 | 18 | public UserCollection(int userId, int comicId) { 19 | this.userId = userId; 20 | this.comicId = comicId; 21 | } 22 | 23 | public UserCollection() { 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vue/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | <%= htmlWebpackPlugin.options.title %> 9 | 10 | 11 | 14 |
15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/util/MD5Util.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.util; 2 | 3 | import org.apache.commons.lang3.StringUtils; 4 | import org.springframework.util.DigestUtils; 5 | 6 | public class MD5Util { 7 | private static final String SALT = "&%5123***&&%%$$#@"; 8 | 9 | public static String getMD5(String password) { 10 | if (StringUtils.isBlank(password)) { 11 | return null; 12 | } 13 | String base = password + "/" + SALT; 14 | return DigestUtils.md5DigestAsHex(base.getBytes()); 15 | } 16 | 17 | public static void main(String[] args) { 18 | System.out.println(MD5Util.getMD5("111111")); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/user/entity/UserHistory.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.user.entity; 2 | 3 | import lombok.Data; 4 | 5 | import javax.persistence.*; 6 | 7 | @Data 8 | @Entity 9 | @Table(name = "user_history") 10 | public class UserHistory { 11 | @Id 12 | @GeneratedValue(strategy = GenerationType.IDENTITY) 13 | private int id; 14 | private int userId; 15 | private int comicId; 16 | 17 | private String createTime; 18 | 19 | public UserHistory(int userId, int comicId,String createTime) { 20 | this.userId = userId; 21 | this.comicId = comicId; 22 | this.createTime = createTime; 23 | } 24 | 25 | public UserHistory() { 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/user/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.user.service; 2 | 3 | import com.comic.springbootproject.common.vo.Result; 4 | import com.comic.springbootproject.common.vo.Search; 5 | import com.comic.springbootproject.user.entity.User; 6 | import com.github.pagehelper.PageInfo; 7 | 8 | public interface UserService { 9 | Result insertUser(User user); 10 | 11 | Result updateUser(User user); 12 | 13 | Result deleteUser(int id); 14 | 15 | User getUserById(int id); 16 | 17 | Result login(User user); 18 | 19 | Result setAdmin(int id); 20 | 21 | PageInfo getUserBySearch(Search search); 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/common/vo/Search.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.common.vo; 2 | 3 | import lombok.Data; 4 | 5 | /** 6 | * @description: Search 7 | * @program: shixun1 8 | * @date: 2020-12-29 15:48 9 | */ 10 | @Data 11 | public class Search { 12 | // 当前页 13 | private int currentPage; 14 | //页长 15 | private int pageSize; 16 | //排序字段 17 | private String sort; 18 | //排序方式 19 | private String direction; 20 | //关键字 21 | private String keyword; 22 | 23 | public void initSearch() { 24 | if (currentPage == 0) { 25 | currentPage = 1; 26 | } 27 | if (pageSize == 0) { 28 | pageSize = 5; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comic/service/ComicService.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comic.service; 2 | 3 | 4 | import com.comic.springbootproject.comic.entity.Comic; 5 | import com.comic.springbootproject.common.vo.Result; 6 | import com.comic.springbootproject.common.vo.Search; 7 | import com.github.pagehelper.PageInfo; 8 | 9 | import java.util.List; 10 | 11 | public interface ComicService { 12 | 13 | Result insertComic(Comic comic); 14 | 15 | Result updateComic(Comic comic); 16 | 17 | Result deleteComicById(int id); 18 | 19 | Comic getComicById(int id); 20 | 21 | PageInfo getComicListBySearch(Search search); 22 | 23 | PageInfo getComicListByPopularity(); 24 | } 25 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/config/ResourceBean.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.config; 2 | 3 | import lombok.Data; 4 | import org.springframework.beans.factory.annotation.Value; 5 | import org.springframework.context.annotation.PropertySource; 6 | import org.springframework.stereotype.Component; 7 | 8 | @Component 9 | @Data 10 | @PropertySource(value = "classpath:application.properties") 11 | public class ResourceBean { 12 | @Value("${resource.path}") 13 | private String path; 14 | @Value("${resource.path.pattern}") 15 | private String pathPattern; 16 | @Value("${resource.local.path.windows}") 17 | private String windowLocation; 18 | @Value("${resource.local.path.linux}") 19 | private String linuxLocation; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/user/service/UserRecordService.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.user.service; 2 | 3 | import com.comic.springbootproject.common.vo.Result; 4 | import com.comic.springbootproject.user.entity.UserCollection; 5 | import com.comic.springbootproject.user.entity.UserHistory; 6 | 7 | import java.util.List; 8 | 9 | public interface UserRecordService { 10 | Result insertHistory(UserHistory userHistory); 11 | Result selectHistoryByUserId(int id); 12 | Result selectCollectionByUserId(int id); 13 | Result insertCollection(UserCollection userCollection); 14 | 15 | Result deleteCollection(UserCollection userCollection); 16 | //Result updateCollection(UserCollection userCollection); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /src/test/java/com/comic/springbootproject/SpringbootprojectApplicationTests.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject; 2 | 3 | import com.comic.springbootproject.util.MD5Util; 4 | import org.junit.jupiter.api.Test; 5 | import org.springframework.boot.test.context.SpringBootTest; 6 | 7 | import java.text.SimpleDateFormat; 8 | import java.util.Date; 9 | 10 | @SpringBootTest 11 | class SpringbootprojectApplicationTests { 12 | 13 | @Test 14 | void contextLoads() { 15 | SimpleDateFormat sdfDatetime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 16 | long time = Long.valueOf("1670253343538"); 17 | System.out.println(time); 18 | String format = sdfDatetime.format(time); 19 | System.out.println(format); 20 | System.out.println(sdfDatetime.format(time)); 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comment/service/CommentReplyContentService.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comment.service; 2 | 3 | import com.comic.springbootproject.comment.entity.ComicComment; 4 | import com.comic.springbootproject.comment.entity.CommentReplyContent; 5 | import com.comic.springbootproject.common.vo.Result; 6 | import com.comic.springbootproject.common.vo.Search; 7 | import com.github.pagehelper.PageInfo; 8 | 9 | import java.util.List; 10 | 11 | public interface CommentReplyContentService { 12 | List selectCommentReplyContentByComicCommentId(int ComicCommentId); 13 | 14 | 15 | Result insertCommentReplyContent(CommentReplyContent commentReplyContent); 16 | 17 | Result deleteCommentReplyContentByCommentReplyContentId(int commentReplyContentId); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /vue/src/components/fragements/Userhead.vue: -------------------------------------------------------------------------------- 1 | 8 | 39 | 42 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/common/vo/ImageType.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.common.vo; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | 5 | /** 6 | *ImageType 7 | */ 8 | @JsonFormat(shape = JsonFormat.Shape.OBJECT) 9 | public enum ImageType { 10 | PROFILE("profile", 300, 300, 1024), 11 | USER("user", 300, 300, 1024), 12 | COMIC("comic", 300, 300, 1024), 13 | TEST("test", 300, 300, 1024) 14 | 15 | ; 16 | public String name; 17 | public int width; 18 | public int height; 19 | public int size; 20 | public static ImageType getImageTypeByName(String name) { 21 | for (ImageType imageType : ImageType.values()) { 22 | if (imageType.name.equals(name)) { 23 | return imageType; 24 | } 25 | } 26 | return null; 27 | } 28 | ImageType(String name, int width, int height, int size) { 29 | this.name = name; 30 | this.width = width; 31 | this.height = height; 32 | this.size = size; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /vue/src/utils/storage.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Storage 3 | * sessionStorage ---- 临时存储,在浏览器打开期间存在,包括页面重新加载 4 | * localStorage ---- 长期存储,浏览器关闭后,数据依然会一直存在 5 | */ 6 | let ls = window.localStorage; 7 | let ss = window.sessionStorage; 8 | export default { 9 | // localStorage 操作 10 | getItemForLs(key) { 11 | try { 12 | return JSON.parse(ls.getItem(key)); 13 | } catch (err) { 14 | return null; 15 | } 16 | }, 17 | setItemForLs(key, val) { 18 | ls.setItem(key, JSON.stringify(val)); 19 | }, 20 | removeItemForLs(key) { 21 | ls.removeItem(key); 22 | }, 23 | clearLs() { 24 | ls.clear(); 25 | }, 26 | keysForLs() { 27 | return ls.keys(); 28 | }, 29 | // sessionStorage 操作 30 | getItemForSs(key) { 31 | try { 32 | return JSON.parse(ss.getItem(key)); 33 | } catch (err) { 34 | return null; 35 | } 36 | }, 37 | setItemForSs(key, val) { 38 | ss.setItem(key, JSON.stringify(val)); 39 | }, 40 | removeItemForSs(key) { 41 | ss.removeItem(key); 42 | }, 43 | clearForSs() { 44 | ss.clear(); 45 | }, 46 | keysForSs() { 47 | return ss.keys(); 48 | }, 49 | }; 50 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/common/controller/ImageController.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.common.controller; 2 | 3 | 4 | import com.comic.springbootproject.common.service.ImageService; 5 | import com.comic.springbootproject.common.vo.Result; 6 | import org.springframework.http.MediaType; 7 | import org.springframework.web.bind.annotation.*; 8 | import org.springframework.web.multipart.MultipartFile; 9 | 10 | import javax.annotation.Resource; 11 | import java.io.FileNotFoundException; 12 | 13 | @RestController 14 | @RequestMapping(value = "/api/common") 15 | public class ImageController { 16 | @Resource 17 | private ImageService imageService; 18 | 19 | /** 20 | * 127.0.0.1/api/common/image/PROFILE --- post 21 | * return image url 22 | */ 23 | @PostMapping(value = "/image/{imageTypeName}",consumes = MediaType.MULTIPART_FORM_DATA_VALUE) 24 | public Result uploadImage(@RequestParam MultipartFile file, 25 | @PathVariable String imageTypeName) throws FileNotFoundException { 26 | return imageService.uploadImage(file, imageTypeName); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/user/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.user.entity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; 5 | import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; 6 | import lombok.Data; 7 | 8 | import javax.persistence.*; 9 | 10 | @Data 11 | public class User { 12 | @Id 13 | @GeneratedValue(strategy = GenerationType.IDENTITY) 14 | private int id; 15 | private String userName; 16 | private String password; 17 | private String avatar; 18 | private String email; 19 | private String phone; 20 | private String createTime; 21 | private int isAdmin; 22 | 23 | public User() { 24 | } 25 | 26 | public User(int id, String userName, String password,int isAdmin, String avatar, String email, String phone, String createTime) { 27 | this.id = id; 28 | this.userName = userName; 29 | this.password = password; 30 | this.avatar = avatar; 31 | this.email = email; 32 | this.phone = phone; 33 | this.createTime = createTime; 34 | this.isAdmin = isAdmin; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /src/main/resources/application.properties: -------------------------------------------------------------------------------- 1 | 2 | server.port=8081 3 | 4 | # 1.logback 5 | 6 | # 2.database 7 | spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver 8 | spring.datasource.url=jdbc:mysql://localhost:3306/website?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=UTC 9 | spring.datasource.username=root 10 | spring.datasource.password=179220 11 | 12 | #hikari pool 13 | spring.datasource.hikari.maximum-pool-size=20 14 | spring.datasource.hikari.minimum-idle=5 15 | spring.datasource.hikari.idle-timeout=180000 16 | spring.datasource.hikari.auto-commit=true 17 | 18 | # 3.jpa 19 | spring.jpa.hibernate.ddl-auto=update 20 | logging.level.org.hibernate.type.descriptor.sqL.BasicBinder=trace 21 | logging.level.org.hibernate.sQL=DEBUG 22 | spring.jpa.show-sql=true 23 | spring.jpa.database-platform=org.hibernate.dialect.MySQL5InnoDBDialect 24 | spring.jackson.serialization.fail-on-empty-beans=false 25 | 26 | # 4.mybatis 27 | mybatis.mapper-locations=classpath:mapper/*.xml 28 | mybatis.configuration.map-underscore-to-camel-case=true 29 | 30 | # static resource config 31 | resource.path=/static/ 32 | resource.path.pattern=/static/** 33 | resource.local.path.windows=D:/static/ 34 | resource.local.path.linux=/static/ 35 | 36 | spring.mvc.pathmatch.matching-strategy=ant_path_matcher -------------------------------------------------------------------------------- /vue/src/components/fragements/Pagination.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 48 | 49 | 56 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comment/entity/CommentReplyContent.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comment.entity; 2 | 3 | import lombok.Data; 4 | 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Transient; 9 | 10 | @Data 11 | public class CommentReplyContent { 12 | @Id 13 | @GeneratedValue(strategy = GenerationType.IDENTITY) 14 | private int id; 15 | private int commentId; 16 | private int replyId; 17 | private int repliedId; 18 | private String createTime; 19 | private int comicCommentId; 20 | @Transient 21 | private String comment; 22 | @Transient 23 | private String replyUserName; 24 | @Transient 25 | private String replyAvatar; 26 | @Transient 27 | private String repliedUserName; 28 | @Transient 29 | private String repliedAvatar; 30 | 31 | public CommentReplyContent(int id, int commentId, int replyId, int repliedId, String createTime, int comicCommentId) { 32 | this.id = id; 33 | this.commentId = commentId; 34 | this.replyId = replyId; 35 | this.repliedId = repliedId; 36 | this.createTime = createTime; 37 | this.comicCommentId = comicCommentId; 38 | } 39 | 40 | public CommentReplyContent() { 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /vue/src/components/fragements/BreadCrumb.vue: -------------------------------------------------------------------------------- 1 | 7 | 8 | 44 | 45 | 51 | -------------------------------------------------------------------------------- /vue/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "comic_web", 3 | "version": "0.1.0", 4 | "private": true, 5 | "scripts": { 6 | "serve": "vue-cli-service serve", 7 | "build": "vue-cli-service build", 8 | "lint": "vue-cli-service lint" 9 | }, 10 | "dependencies": { 11 | "axios": "^1.3.3", 12 | "core-js": "^3.8.3", 13 | "echarts": "^5.4.1", 14 | "element-ui": "^2.15.13", 15 | "font-awesome": "^4.7.0", 16 | "jquery": "^3.6.3", 17 | "js-cookie": "^3.0.1", 18 | "vue": "^2.6.14", 19 | "vue-router": "^3.0.1", 20 | "vuex": "^3.6.2" 21 | }, 22 | "devDependencies": { 23 | "@babel/core": "^7.12.16", 24 | "@babel/eslint-parser": "^7.12.16", 25 | "@vue/cli-plugin-babel": "~5.0.0", 26 | "@vue/cli-plugin-eslint": "~5.0.0", 27 | "@vue/cli-service": "~5.0.0", 28 | "eslint": "^7.32.0", 29 | "eslint-plugin-vue": "^8.0.3", 30 | "less": "^4.1.3", 31 | "less-loader": "^11.1.0", 32 | "node-sass": "^8.0.0", 33 | "sass-loader": "^13.2.0", 34 | "style-loader": "^3.3.1", 35 | "vue-template-compiler": "^2.6.14" 36 | }, 37 | "eslintConfig": { 38 | "root": true, 39 | "env": { 40 | "node": true 41 | }, 42 | "extends": [ 43 | "plugin:vue/essential", 44 | "eslint:recommended" 45 | ], 46 | "parserOptions": { 47 | "parser": "@babel/eslint-parser" 48 | }, 49 | "rules": { 50 | "vue/no-unused-components": "off" 51 | } 52 | }, 53 | "browserslist": [ 54 | "> 1%", 55 | "last 2 versions", 56 | "not dead" 57 | ] 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/config/Swagger2Configuration.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.config; 2 | 3 | import io.swagger.annotations.Api; 4 | import org.springframework.context.annotation.Bean; 5 | import org.springframework.context.annotation.Configuration; 6 | import springfox.documentation.builders.ApiInfoBuilder; 7 | import springfox.documentation.builders.PathSelectors; 8 | import springfox.documentation.builders.RequestHandlerSelectors; 9 | import springfox.documentation.service.ApiInfo; 10 | import springfox.documentation.spi.DocumentationType; 11 | import springfox.documentation.spring.web.plugins.Docket; 12 | import springfox.documentation.swagger2.annotations.EnableSwagger2; 13 | 14 | @Configuration 15 | @EnableSwagger2 16 | public class Swagger2Configuration { 17 | @Bean 18 | public Docket createRestApi(){ 19 | return new Docket(DocumentationType.SWAGGER_2) 20 | .apiInfo(apiInfo()) 21 | .select() 22 | .apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) 23 | .paths(PathSelectors.any()) 24 | .build(); 25 | } 26 | 27 | //基本信息的配置,信息会在api文档上显示 28 | private ApiInfo apiInfo(){ 29 | return new ApiInfoBuilder() 30 | .title("zg测试的接口文档") 31 | .description("xx相关接口的文档") 32 | .termsOfServiceUrl("http://localhost:8080/hello") 33 | .version("1.0") 34 | .build(); 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /vue/src/utils/testData.js: -------------------------------------------------------------------------------- 1 | // LocalStorage keys 2 | export const TOKEN_OBJECT_KEY = "TokenObject"; 3 | export const TOKEN_KEY = "Token"; 4 | export const u="http://127.0.0.1:8081"; 5 | // 站点相关信息 6 | export const yonghu = { 7 | userName:'', 8 | password:'', 9 | avatar:'', 10 | createTime:'', 11 | isAdmin:'', 12 | phone:'', 13 | email:'', 14 | id:'' 15 | }; 16 | export const comic = { 17 | comic:{ 18 | id:'', 19 | comicName:'', 20 | cover:'', 21 | description:'', 22 | label:'', 23 | nickName:'', 24 | number:'', 25 | popularity:'', 26 | region:'', 27 | remark:'', 28 | updateTime:'', 29 | year:'' 30 | }, 31 | 32 | }; 33 | // SideBar 测试数据 34 | export const user = [ 35 | 36 | { 37 | title: "个人中心", 38 | path: "/user", 39 | icon: "el-icon-user-solid", 40 | subItems: [ 41 | { 42 | title: "个人详情", 43 | path: "/user/Setting", 44 | }, 45 | { 46 | title: "个人设置", 47 | path: "/user/update" 48 | }, 49 | ], 50 | }, 51 | { 52 | title: "动漫管理", 53 | path: "/history", 54 | icon: "el-icon-user-solid", 55 | subItems: [ 56 | { 57 | title: "收藏", 58 | path: "/comic/like", 59 | }, 60 | { 61 | title: "浏览记录", 62 | path: "/comic/record", 63 | } 64 | ] 65 | } 66 | 67 | ]; 68 | export const permission = [ 69 | 70 | { 71 | title: "管理员", 72 | path: "/permission", 73 | icon: "el-icon-user-solid", 74 | subItems: [ 75 | { 76 | title: "用户管理", 77 | path: "/permission/user", 78 | }, 79 | { 80 | title: "动漫管理", 81 | path: "/permission/comic" 82 | }, 83 | ], 84 | } 85 | 86 | 87 | ]; 88 | 89 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comic/entity/Comic.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comic.entity; 2 | 3 | 4 | import com.comic.springbootproject.common.entiy.AbstractEntity; 5 | import lombok.Data; 6 | 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | 11 | @Data 12 | public class Comic { 13 | @Id 14 | @GeneratedValue(strategy = GenerationType.IDENTITY) 15 | private int id; 16 | private String comicName;//名称 17 | private String nickName;//昵称 18 | private String region;//地区 19 | private String remark; 20 | private String label;//标签 21 | private String year;//上映年 22 | private String updateTime;//上映时间 23 | private String description;//详情 24 | private String cover;//封面 25 | private int number;//集数 26 | private int popularity;//热度 27 | 28 | private String url;//类型 29 | 30 | public Comic() { 31 | } 32 | 33 | public Comic(String label,int id, String comicName, String nickName, String region, String remark, String year, String updateTime, String description, String cover, int number, int popularity, String url) { 34 | this.id = id; 35 | this.comicName = comicName; 36 | this.nickName = nickName; 37 | this.region = region; 38 | this.remark = remark; 39 | this.year = year; 40 | this.updateTime = updateTime; 41 | this.description = description; 42 | this.cover = cover; 43 | this.number = number; 44 | this.popularity = popularity; 45 | this.url = url; 46 | this.label = label; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /vue/src/utils/vuexStore.js: -------------------------------------------------------------------------------- 1 | // 引入 Vue、Vuex 2 | import Vue from "vue"; 3 | import Vuex from "vuex"; 4 | Vue.use(Vuex); 5 | import Storage from "@/utils/storage.js"; 6 | //import * as Cookie from "@/utils/cookie.js"; 7 | 8 | //const TOKEN_KEY = "Token"; 9 | const TOKEN_OBJECT_KEY = "TokenObject"; 10 | 11 | // 导出 store 实例 12 | export default new Vuex.Store({ 13 | /** 14 | * 设置一个全局访问的 state 对象 15 | * collapse:sidebar 是否压缩显示 16 | * token:登录凭证信息,当前用户 17 | * 取值:this.$VuexStore.state.collapse 18 | */ 19 | state: { 20 | collapse: false, 21 | /** 22 | * JS 代码是运行在内存中的,页面刷新时会重新加载 JS 脚本,变量重新赋值 23 | * 登录信息存在 localStorage 中永久保存,重新加载脚本时从 localStorage 获取 token 信息 24 | */ 25 | token: Storage.getItemForLs(TOKEN_OBJECT_KEY) || "", 26 | }, 27 | /** 28 | * 实时监控 state 值的变化,并包装数据以函数形式返回 29 | * 取值:this.$VuexStore.getters.isLogin 30 | */ 31 | getters: { 32 | // 判断用户是否登录 33 | isLogin: function (state) { 34 | return state.token != ""; 35 | }, 36 | }, 37 | /** 38 | * 操作 state 数据的方法的集合 39 | * 默认形参 ---- (state, payload) 40 | * state ---- 对应上面定义的 state 对象 41 | * payload ---- 挂载的参数,如果是多个参数封装为一个 js 对象,可选 42 | * 调用 ---- this.$VuexStore.commit("changeCollapse", this.collapse); 43 | */ 44 | mutations: { 45 | // 变更 collapse 值 46 | changeCollapse: function (state, payload) { 47 | state.collapse = payload; 48 | }, 49 | // 变更 token 值 50 | setToken: function (state, payload) { 51 | if (payload == "") { 52 | Storage.removeItemForLs(TOKEN_OBJECT_KEY); 53 | state.token = ""; 54 | } else { 55 | Storage.setItemForLs(TOKEN_OBJECT_KEY, payload); 56 | state.token = payload; 57 | } 58 | }, 59 | }, 60 | }); 61 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comment/dao/ComicCommentDao.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comment.dao; 2 | 3 | 4 | import com.comic.springbootproject.comment.entity.ComicComment; 5 | import com.comic.springbootproject.comment.entity.Comment; 6 | import org.apache.ibatis.annotations.*; 7 | import org.springframework.stereotype.Repository; 8 | 9 | import java.util.List; 10 | 11 | @Repository 12 | @Mapper 13 | public interface ComicCommentDao { 14 | @Insert("insert into comic_comment(userId,comicId,commentId,createTime) " + 15 | "values(#{userId}, #{comicId}, #{commentId}, #{createTime})") 16 | void insertComicComment(ComicComment comicComment); 17 | 18 | @Delete("delete from comic_comment where id = #{ComicCommentId}") 19 | void deleteComicCommentByComicCommentId(int ComicCommentId); 20 | 21 | @Insert("insert into comment(comment) " + "values(#{comment})") 22 | @SelectKey(statement = "SELECT LAST_INSERT_ID()", keyProperty = "id", before = false, resultType = int.class) 23 | void insertComment(Comment comment); 24 | @Select("select * from comic_comment where id = #{ComicCommentId}") 25 | ComicComment selectComicCommentByComicCommentId(int ComicCommentId); 26 | @Select("select * from comment where id = #{commentId}") 27 | Comment selectCommentByCommentId(int commentId); 28 | 29 | @Delete("delete from comment where id = #{commentId}") 30 | void deleteCommentByCommentId(int commentId); 31 | //根据动漫id根据createTime排序 32 | @Select("select * from comic_comment where comicId = #{comicId} order by createTime asc") 33 | List selectCommentByComicId(int comicId); 34 | } 35 | -------------------------------------------------------------------------------- /vue/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | // 引入 vue-router 及路由配置 4 | import Router from "vue-router"; 5 | import router from "./router"; 6 | Vue.use(Router); 7 | // 引入 ElementUI 和主题样式 8 | import ElementUI from "element-ui"; 9 | import "element-ui/lib/theme-chalk/index.css"; 10 | Vue.use(ElementUI); 11 | // EChart 组件 12 | import * as echarts from "echarts"; 13 | Vue.prototype.$echarts = echarts; 14 | Vue.config.productionTip = false; 15 | 16 | // Bus,用于组件间传递消息 17 | import Bus from "@/utils/bus.js"; 18 | Vue.prototype.$Bus = Bus; 19 | // Cookie 组件 20 | import * as Cookie from "@/utils/cookie.js"; 21 | Vue.prototype.$Cookie = Cookie; 22 | // Storage 组件 23 | import Storage from "@/utils/storage.js"; 24 | Vue.prototype.$Storage = Storage; 25 | // Vuex Store 组件 26 | import VuexStore from "@/utils/vuexStore.js"; 27 | Vue.prototype.$VuexStore = VuexStore; 28 | // Axios Request 组件 29 | import * as Request from "@/utils/request"; 30 | Vue.prototype.$Request = Request; 31 | // 注册过滤器组件 32 | import * as Filters from "@/utils/filter.js"; 33 | Object.keys(Filters).forEach((key) => { 34 | Vue.filter(key, Filters[key]); 35 | }); 36 | // Common 组件 37 | import * as Common from "@/utils/common.js"; 38 | Vue.prototype.$Common = Common; 39 | // TestData 组件 40 | import * as TestData from "@/utils/testData.js"; 41 | Vue.prototype.$TestData = TestData; 42 | 43 | 44 | 45 | // 使用 router.beforeEach 注册一个全局前置守卫,进行登录验证 46 | router.beforeEach((to, from, next) => { 47 | if (to.meta.requireAuth) { 48 | if (VuexStore.getters.isLogin) { 49 | next(); 50 | } else { 51 | next("/login"); 52 | } 53 | } else { 54 | next(); 55 | } 56 | }); 57 | 58 | 59 | 60 | new Vue({ 61 | router, 62 | render: h => h(App), 63 | }).$mount('#app') 64 | -------------------------------------------------------------------------------- /vue/src/utils/filter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 10000 => "10,000" 3 | * @param {number} num 4 | */ 5 | export function toThousandFilter(num) { 6 | return (+num || 0).toString().replace(/^-?\d+/g, (m) => m.replace(/(?=(?!\b)(\d{3})+$)/g, ",")); 7 | } 8 | 9 | /** 10 | * Upper case first char 11 | * {{ user.userName | upperCaseFirst }} 12 | * @param {String} string 13 | */ 14 | export function upperCaseFirst(string) { 15 | return string.charAt(0).toUpperCase() + string.slice(1); 16 | } 17 | 18 | // 去掉 html 标签 19 | export function delHtmlTag(value) { 20 | return value.replace(/<[^>]+>/g, ""); 21 | } 22 | 23 | /** 24 | * 字符串超长替换省略号 25 | * {{ model.name | ellipsis }} 26 | */ 27 | export function ellipsis(value) { 28 | if (!value) return ""; 29 | if (value.length > 5) { 30 | return value.slice(0, 5) + "..."; 31 | } 32 | return value; 33 | } 34 | 35 | export function ellipsis10(value) { 36 | if (!value) return ""; 37 | if (value.length > 10) { 38 | return value.slice(0, 10) + "..."; 39 | } 40 | return value; 41 | } 42 | 43 | export function ellipsis30(value) { 44 | if (!value) return ""; 45 | if (value.length > 30) { 46 | return value.slice(0, 30) + "..."; 47 | } 48 | return value; 49 | } 50 | 51 | export function ellipsis100(value) { 52 | if (!value) return ""; 53 | if (value.length > 100) { 54 | return value.slice(0, 100) + "..."; 55 | } 56 | return value; 57 | } 58 | 59 | // 日期字符串省掉时分秒 60 | export function buildDateString(value) { 61 | if (!value) return ""; 62 | if (value.length > 10) { 63 | return value.slice(0, 10); 64 | } 65 | return value; 66 | } 67 | 68 | // 金钱格式化 69 | export function moneyFormats(value) { 70 | let a = Number(value); 71 | let b = a.toLocaleString("zh", { style: "currency", currency: "CNY" }); 72 | return b; 73 | } 74 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comment/dao/CommentReplyContentDao.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comment.dao; 2 | 3 | import com.comic.springbootproject.comic.entity.Comic; 4 | import com.comic.springbootproject.comment.entity.ComicComment; 5 | import com.comic.springbootproject.comment.entity.CommentReplyContent; 6 | import com.comic.springbootproject.common.vo.Search; 7 | import org.apache.ibatis.annotations.Delete; 8 | import org.apache.ibatis.annotations.Insert; 9 | import org.apache.ibatis.annotations.Mapper; 10 | import org.apache.ibatis.annotations.Select; 11 | import org.springframework.beans.factory.annotation.Value; 12 | import org.springframework.stereotype.Repository; 13 | 14 | import java.util.List; 15 | 16 | @Repository 17 | @Mapper 18 | public interface CommentReplyContentDao { 19 | 20 | @Insert("insert into comment_reply_content(commentId,replyId,repliedId," + 21 | "createTime,comicCommentId) " + 22 | "values(#{commentId}, #{replyId}, " + 23 | "#{repliedId}, #{createTime}, #{comicCommentId})") 24 | void insertCommentReplyContent(CommentReplyContent commentReplyContent); 25 | @Delete("delete from comment_reply_content where id = #{commentReplyContentId}") 26 | void deleteCommentReplyContentByCommentReplyContentId(int commentReplyContentId); 27 | 28 | @Select("select * from comment_reply_content where comicCommentId = #{ComicCommentId} order by createTime asc") 29 | List selectCommentReplyContentByComicCommentId(int ComicCommentId); 30 | 31 | @Select("select * from comment_reply_content where id = #{CommentReplyContentId}") 32 | CommentReplyContent selectCommentReplyContentById(int CommentReplyContentId); 33 | } 34 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/config/WebMvcConfig.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.config; 2 | 3 | import org.springframework.boot.autoconfigure.AutoConfigureAfter; 4 | import org.springframework.context.annotation.Configuration; 5 | import org.springframework.web.servlet.config.annotation.CorsRegistry; 6 | import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 7 | 8 | import javax.annotation.Resource; 9 | 10 | @Configuration 11 | @AutoConfigureAfter(WebMvcConfigurer.class) 12 | public class WebMvcConfig implements WebMvcConfigurer { 13 | @Resource 14 | private ResourceBean resourceBean; 15 | 16 | /** 17 | * 跨域配置 18 | * @param registry 19 | */ 20 | @Override 21 | public void addCorsMappings(CorsRegistry registry) { 22 | registry.addMapping("/**") 23 | .allowedOriginPatterns("*") 24 | .allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS") 25 | .allowedHeaders("*") 26 | .allowCredentials(true) 27 | .maxAge(3600); 28 | } 29 | 30 | /** 31 | * 配置静态资源 32 | * @param registry 33 | */ 34 | // @Override 35 | // public void addResourceHandlers(ResourceHandlerRegistry registry) { 36 | // String os = System.getProperty("os.name"); 37 | // if (os.toLowerCase().startsWith("win")) { 38 | // registry.addResourceHandler("/static/**") 39 | // .addResourceLocations(ResourceUtils.FILE_URL_PREFIX + 40 | // resourceBean.getWindowLocation()); 41 | // }else { 42 | // registry.addResourceHandler("/static/**") 43 | // .addResourceLocations(ResourceUtils.FILE_URL_PREFIX + 44 | // resourceBean.getLinuxLocation()); 45 | // } 46 | // } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/user/dao/UserRecord.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.user.dao; 2 | 3 | import com.comic.springbootproject.user.entity.UserCollection; 4 | import com.comic.springbootproject.user.entity.UserHistory; 5 | import org.apache.ibatis.annotations.*; 6 | import org.springframework.stereotype.Repository; 7 | 8 | import java.util.List; 9 | 10 | 11 | @Repository 12 | @Mapper 13 | public interface UserRecord { 14 | //插入浏览历史,如果已经存在则不做更改 15 | @Insert("insert into user_history(user_id, comic_id, create_time) " + 16 | "values(#{userId}, #{comicId}, #{createTime})") 17 | void insertHistory(UserHistory userHistory); 18 | @Select("select * from user_history where user_id = #{userId} and comic_id = #{comicId}") 19 | UserHistory selectHistory(UserHistory userHistory); 20 | 21 | @Update("update user_history set create_time = #{createTime} where user_id = #{userId} and comic_id = #{comicId}") 22 | void updateHistory(UserHistory userHistory); 23 | @Select("select comic_id from user_history where user_id = #{id}") 24 | List selectHistoryByUserId(int id); 25 | @Insert("insert into user_collection(user_id, comic_id) " + 26 | "values(#{userId}, #{comicId})") 27 | void insertCollection(UserCollection userCollection); 28 | @Delete("delete from user_collection where user_id = #{userId} and comic_id = #{comicId}") 29 | void deleteCollection(UserCollection userCollection); 30 | @Update("update user_collection set comic_id = #{comicId} where user_id = #{userId} and comic_id = #{comicId}") 31 | void updateCollection(UserCollection userCollection); 32 | @Select("select * from user_collection where user_id = #{userId} and comic_id = #{comicId}") 33 | UserCollection selectCollection(UserCollection userCollection); 34 | @Select("select comic_id from user_collection where user_id = #{id}") 35 | List selectCollectionByUserId(int id); 36 | } 37 | -------------------------------------------------------------------------------- /vue/src/utils/common.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 公共函数 3 | */ 4 | 5 | /** 6 | * 驼峰转下划线 7 | * @param {*} name 8 | * @returns 9 | */ 10 | export function camecaseToLine(name) { 11 | return name.replace(/([A-Z])/g, "_$1").toLowerCase(); 12 | } 13 | 14 | /** 15 | * 调用:new Date().Format("yyyy-MM-dd hh:mm:ss"); 16 | * fmt ---- 时间格式 17 | * hasweek ---- 用来表示是否显示星期 18 | */ 19 | Date.prototype.Format = function (fmt, hasweek) { 20 | var weekday = ["星期日", "星期一", "星期二", "星期三", "星期四", "星期五", "星期六"]; 21 | var o = { 22 | "M+": this.getMonth() + 1, 23 | "d+": this.getDate(), 24 | "h+": this.getHours(), 25 | "m+": this.getMinutes(), 26 | "s+": this.getSeconds(), 27 | "q+": Math.floor((this.getMonth() + 3) / 3), // 季度 28 | S: this.getMilliseconds(), // 毫秒 29 | }; 30 | if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length)); 31 | for (var k in o) 32 | if (new RegExp("(" + k + ")").test(fmt)) 33 | fmt = fmt.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] : ("00" + o[k]).substr(("" + o[k]).length)); 34 | 35 | return fmt + (hasweek ? "    " + weekday[this.getDay()] : ""); 36 | }; 37 | 38 | /** 39 | * 数字补零,默认两位 40 | * let a=6; 41 | * a.az();//06 42 | * a.az(3);//006 43 | */ 44 | Number.prototype.az = function (n = 2) { 45 | let s = ""; 46 | for (let i = 1; i < n; i++) { 47 | s += "0"; 48 | } 49 | return (s + this).slice(-1 * n); 50 | }; 51 | 52 | /** 53 | * 数组分组 54 | * @param array 数组 55 | * @param f 函数 56 | * @returns 57 | * const groupByBooks = this.$Common.groupBy(this.booksList, function (item) {return item.booksType;}); 58 | */ 59 | export function groupBy(array, f) { 60 | const groups = {}; 61 | array.forEach(function (o) { 62 | const group = f(o); 63 | groups[group] = groups[group] || []; 64 | groups[group].push(o); 65 | }); 66 | return Object.keys(groups).map(function (group) { 67 | let resultObject = {}; 68 | resultObject[group] = groups[group]; 69 | return resultObject; 70 | }); 71 | } 72 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/common/vo/Result.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.common.vo; 2 | 3 | import lombok.Data; 4 | 5 | @Data 6 | public class Result { 7 | private int code; 8 | private String message; 9 | private T data; 10 | 11 | public static Result ok() { 12 | return new Result(ResultCode.SUCCESS.code, "success"); 13 | } 14 | 15 | public static Result ok(T data) { 16 | return new Result(ResultCode.SUCCESS.code, "success", data); 17 | } 18 | public static Result ok(String message,T data) { 19 | return new Result(ResultCode.SUCCESS.code, message, data); 20 | } 21 | 22 | public static Result failed(String message, T data) { 23 | return new Result(ResultCode.FAILED.code, message, data); 24 | } 25 | public static Result failed(String message) { 26 | return new Result(ResultCode.FAILED.code, message); 27 | } 28 | 29 | public Result() { 30 | } 31 | 32 | public Result(int code, String message, T data) { 33 | this.code = code; 34 | this.message = message; 35 | this.data = data; 36 | } 37 | 38 | public Result(int code, String message) { 39 | this.code = code; 40 | this.message = message; 41 | } 42 | 43 | public enum ResultCode { 44 | SUCCESS(200), 45 | FAILED(400), 46 | ; 47 | public int code; 48 | 49 | ResultCode(int code) { 50 | this.code = code; 51 | } 52 | } 53 | 54 | public int getCode() { 55 | return code; 56 | } 57 | 58 | public void setCode(int code) { 59 | this.code = code; 60 | } 61 | 62 | public String getMessage() { 63 | return message; 64 | } 65 | 66 | public void setMessage(String message) { 67 | this.message = message; 68 | } 69 | 70 | public T getData() { 71 | return data; 72 | } 73 | 74 | public void setData(T data) { 75 | this.data = data; 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comment/controller/CommentController.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comment.controller; 2 | 3 | 4 | import com.comic.springbootproject.comment.entity.ComicComment; 5 | import com.comic.springbootproject.comment.service.ComicCommentService; 6 | import com.comic.springbootproject.common.vo.Result; 7 | import org.apache.ibatis.annotations.Delete; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.http.MediaType; 10 | import org.springframework.web.bind.annotation.*; 11 | import javax.annotation.Resource; 12 | import java.util.List; 13 | 14 | @RestController 15 | @RequestMapping("/comment") 16 | public class CommentController { 17 | @Resource 18 | private ComicCommentService comicCommentService; 19 | 20 | /** 21 | * URL: http://localhost/comment/insertComicComment 22 | * @param comicComment:{comicId:1,userId:1,comment:"hello"} 23 | * @return 信息 24 | */ 25 | @PostMapping(value = "/insertComicComment", consumes = MediaType.APPLICATION_JSON_VALUE) 26 | public Result insertComicComment(@RequestBody ComicComment comicComment) { 27 | return comicCommentService.insertComicComment(comicComment); 28 | } 29 | 30 | /** 31 | * URL: http://localhost/comment/deleteComicCommentByComicCommentId/1 32 | * @param comicCommentId 33 | * @return 信息 34 | */ 35 | @DeleteMapping(value = "/deleteComicCommentByComicCommentId/{comicCommentId}") 36 | public Result deleteComicCommentByComicCommentId(@PathVariable("comicCommentId") int comicCommentId) { 37 | return comicCommentService.deleteComicCommentByComicCommentId(comicCommentId); 38 | } 39 | 40 | /** 41 | * URL: http://localhost/comment/selectCommentByComicId/1 42 | * @param comicId 43 | * @return 评论 44 | */ 45 | @GetMapping(value = "/selectCommentByComicId/{comicId}") 46 | public Result> selectCommentByComicId(@PathVariable("comicId") int comicId) { 47 | return comicCommentService.selectCommentByComicId(comicId); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/common/entiy/AbstractEntity.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.common.entiy; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | import com.fasterxml.jackson.databind.annotation.JsonSerialize; 5 | import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer; 6 | 7 | import javax.persistence.GeneratedValue; 8 | import javax.persistence.GenerationType; 9 | import javax.persistence.Id; 10 | import javax.persistence.MappedSuperclass; 11 | import java.time.LocalDateTime; 12 | 13 | @MappedSuperclass 14 | public class AbstractEntity { 15 | @Id 16 | @GeneratedValue(strategy = GenerationType. IDENTITY) 17 | private int id; 18 | @JsonSerialize(using = LocalDateTimeSerializer.class) 19 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 20 | private LocalDateTime createTime; 21 | @JsonSerialize(using = LocalDateTimeSerializer.class) 22 | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") 23 | private LocalDateTime updateTime; 24 | 25 | @Override 26 | public String toString() { 27 | return "AbstractEntity{" + 28 | "id=" + id + 29 | ", createTime=" + createTime + 30 | ", updateTime=" + updateTime + 31 | '}'; 32 | } 33 | 34 | public AbstractEntity() { 35 | } 36 | 37 | public AbstractEntity(int id, LocalDateTime createTime, LocalDateTime updateTime) { 38 | this.id = id; 39 | this.createTime = createTime; 40 | this.updateTime = updateTime; 41 | } 42 | 43 | public int getId() { 44 | return id; 45 | } 46 | 47 | public void setId(int id) { 48 | this.id = id; 49 | } 50 | 51 | public LocalDateTime getCreateTime() { 52 | return createTime; 53 | } 54 | 55 | public void setCreateTime(LocalDateTime createTime) { 56 | this.createTime = createTime; 57 | } 58 | 59 | public LocalDateTime getUpdateTime() { 60 | return updateTime; 61 | } 62 | 63 | public void setUpdateTime(LocalDateTime updateTime) { 64 | this.updateTime = updateTime; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /vue/src/components/HelloWorld.vue: -------------------------------------------------------------------------------- 1 | 32 | 33 | 41 | 42 | 43 | 59 | -------------------------------------------------------------------------------- /vue/src/components/User/Update.vue: -------------------------------------------------------------------------------- 1 | 21 | 22 | 67 | 68 | 69 | 78 | -------------------------------------------------------------------------------- /vue/src/components/fragements/Sidebar.vue: -------------------------------------------------------------------------------- 1 | 49 | 79 | 95 | -------------------------------------------------------------------------------- /vue/src/components/fragements/Usersidebar.vue: -------------------------------------------------------------------------------- 1 | 49 | 79 | 95 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comic/dao/ComicDao.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comic.dao; 2 | 3 | 4 | import com.comic.springbootproject.comic.entity.Comic; 5 | import com.comic.springbootproject.common.vo.Search; 6 | import org.apache.ibatis.annotations.*; 7 | import org.springframework.stereotype.Repository; 8 | 9 | import java.util.List; 10 | 11 | @Repository 12 | @Mapper 13 | public interface ComicDao { 14 | 15 | //增 ——传入对象 16 | @Insert("INSERT INTO comic_table(comicName, nickName, cover, region,label," + 17 | " year,remark,updateTime, description, number, popularity,url) " + 18 | "VALUES(#{comicName}, #{nickName}, #{cover}, #{region},#{label}, " + 19 | "#{year},#{remark}, #{updateTime}, #{description}, #{number}, " + 20 | "#{popularity},#{url})") 21 | void insertComic(Comic comic); 22 | 23 | //根据名字查 ——传入属性——名 24 | @Select("SELECT * FROM comic_table WHERE comicName = #{comicName} LIMIT 1") 25 | Comic getComicByName(String name); 26 | 27 | //根据 id查 ——传入属性——id 28 | @Select("SELECT * FROM comic_table WHERE id = #{id} LIMIT 1") 29 | Comic getComicById(int id); 30 | 31 | //更新 ——传入对象 32 | @Update("UPDATE comic_table SET comicName=#{comicName}, nickName=#{nickName}, cover=#{cover}, " + 33 | "region=#{region},label=#{label}, year=#{year},remark=#{remark}," + 34 | "updateTime=#{updateTime}, description=#{description}, number=#{number}," + 35 | " popularity=#{popularity},url=#{url} WHERE id=#{id}") 36 | void updateComic(Comic comic); 37 | 38 | //删除 39 | @Delete("DELETE FROM comic_table WHERE id= #{id}") 40 | void deleteComicById(int id); 41 | 42 | //按照地域查照 43 | 44 | 45 | @Select("") 61 | List getComicBySearch(Search search); 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/user/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.user.dao; 2 | 3 | import com.comic.springbootproject.common.vo.Search; 4 | import com.comic.springbootproject.user.entity.User; 5 | import org.apache.ibatis.annotations.*; 6 | import org.springframework.stereotype.Repository; 7 | 8 | import java.util.List; 9 | 10 | @Repository 11 | @Mapper 12 | public interface UserDao { 13 | @Insert("insert into user_table (userName,password,avatar,email,phone,createTime) " + 14 | "values (#{userName}, #{password},#{avatar},#{email},#{phone},#{createTime})") 15 | @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id") 16 | void insertUser(User user); 17 | 18 | @Select("select * from user_table where userName = #{userName}") 19 | User getUserByName(String userName); 20 | @Update("update user_table set userName = #{userName}, password = #{password}," + 21 | "avatar=#{avatar}, email=#{email}, phone=#{phone}, createTime = #{createTime} where id = #{id}") 22 | void updateUser(User user); 23 | 24 | @Update("update user_table set userName = #{userName}," + 25 | "avatar=#{avatar}, email=#{email}, phone=#{phone}, createTime = #{createTime} where id = #{id}") 26 | void updateUserExpPassword(User user); 27 | 28 | @Delete("delete from user_table where id = #{id}") 29 | void deleteUser(int id); 30 | @Select("select * from user_table where id = #{id}") 31 | User getUserById(int id); 32 | @Select("select * from user_table where userName=#{userName} and password=#{password} limit 1") 33 | User login(@Param("userName") String userName,@Param("password") String password); 34 | @Update("update user_table set isAdmin = 1 where id = #{id}") 35 | void setAdmin(int id); 36 | @Select("") 53 | List getUserBySearch(Search search); 54 | } 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/main/resources/logback-spring.xml: -------------------------------------------------------------------------------- 1 | 2 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | ${pattern} 33 | 34 | 35 | 36 | 37 | 38 | 39 | ${pattern} 40 | 41 | 42 | ${root}/${project}_${env}_%d.%i.log 43 | ${maxHistory} 44 | 46 | ${fileSize} 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comment/controller/CommentReplyContentController.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comment.controller; 2 | 3 | import com.comic.springbootproject.comment.entity.CommentReplyContent; 4 | import com.comic.springbootproject.comment.service.CommentReplyContentService; 5 | import com.comic.springbootproject.common.vo.Result; 6 | import com.comic.springbootproject.common.vo.Search; 7 | import com.github.pagehelper.PageInfo; 8 | import org.apache.ibatis.annotations.Delete; 9 | import org.springframework.data.repository.query.Param; 10 | import org.springframework.http.MediaType; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | import javax.annotation.Resource; 14 | import java.util.List; 15 | 16 | @RestController 17 | @RequestMapping("/commentReplyContent") 18 | public class CommentReplyContentController { 19 | @Resource 20 | private CommentReplyContentService commentReplyContentService; 21 | 22 | /** 23 | * URL: http://localhost/commentReplyContent/insertCommentReplyContent 24 | * @param commentReplyContent :{replyId:1,repliedId:1,comment:"hello",comicCommentId:1} 25 | * @return 插入信息 26 | */ 27 | @PostMapping(value = "/insertCommentReplyContent", consumes = MediaType.APPLICATION_JSON_VALUE) 28 | Result insertCommentReplyContent(@RequestBody CommentReplyContent commentReplyContent) { 29 | return commentReplyContentService.insertCommentReplyContent(commentReplyContent); 30 | } 31 | 32 | /** 33 | * URL: http://localhost/commentReplyContent/deleteCommentReplyContentByCommentReplyContentId/1 34 | * @param commentReplyContentId 评论回复内容id 35 | * @return 是否成功 36 | */ 37 | @DeleteMapping(value = "/deleteCommentReplyContentByCommentReplyContentId/{commentReplyContentId}") 38 | Result deleteCommentReplyContentByCommentReplyContentId(@PathVariable("commentReplyContentId") int commentReplyContentId){ 39 | return commentReplyContentService.deleteCommentReplyContentByCommentReplyContentId(commentReplyContentId); 40 | } 41 | 42 | /** 43 | * URL: http://localhost/commentReplyContent/selectCommentReplyContentList/{ComicCommentId} 44 | * @param ComicCommentId 45 | * @return 评论回复内容列表 46 | */ 47 | @GetMapping(value = "/selectCommentReplyContentList/{ComicCommentId}") 48 | List selectCommentReplyContentByComicCommentId(@PathVariable("ComicCommentId") int ComicCommentId){ 49 | return commentReplyContentService.selectCommentReplyContentByComicCommentId(ComicCommentId); 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comment/entity/ComicComment.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comment.entity; 2 | 3 | import lombok.Data; 4 | 5 | import javax.persistence.GeneratedValue; 6 | import javax.persistence.GenerationType; 7 | import javax.persistence.Id; 8 | import javax.persistence.Transient; 9 | import java.util.List; 10 | 11 | @Data 12 | public class ComicComment { 13 | @Id 14 | @GeneratedValue(strategy = GenerationType.IDENTITY) 15 | private int id; 16 | private int comicId; 17 | private int userId; 18 | private int commentId; 19 | private String createTime; 20 | @Transient 21 | private String comment; 22 | @Transient 23 | private String userName; 24 | @Transient 25 | private String avatar; 26 | @Transient 27 | private List commentReplyContentList; 28 | 29 | public ComicComment() { 30 | } 31 | 32 | public ComicComment(int comicId, int userId, int commentId, String createTime) { 33 | this.comicId = comicId; 34 | this.userId = userId; 35 | this.commentId = commentId; 36 | this.createTime = createTime; 37 | } 38 | 39 | public int getId() { 40 | return id; 41 | } 42 | 43 | public void setId(int id) { 44 | this.id = id; 45 | } 46 | 47 | public int getComicId() { 48 | return comicId; 49 | } 50 | 51 | public void setComicId(int comicId) { 52 | this.comicId = comicId; 53 | } 54 | 55 | public int getUserId() { 56 | return userId; 57 | } 58 | 59 | public void setUserId(int userId) { 60 | this.userId = userId; 61 | } 62 | 63 | public int getCommentId() { 64 | return commentId; 65 | } 66 | 67 | public void setCommentId(int commentId) { 68 | this.commentId = commentId; 69 | } 70 | 71 | public String getCreateTime() { 72 | return createTime; 73 | } 74 | 75 | public void setCreateTime(String createTime) { 76 | this.createTime = createTime; 77 | } 78 | 79 | public String getComment() { 80 | return comment; 81 | } 82 | 83 | public void setComment(String comment) { 84 | this.comment = comment; 85 | } 86 | 87 | public String getUserName() { 88 | return userName; 89 | } 90 | 91 | public void setUserName(String userName) { 92 | this.userName = userName; 93 | } 94 | 95 | public String getAvatar() { 96 | return avatar; 97 | } 98 | 99 | public void setAvatar(String avatar) { 100 | this.avatar = avatar; 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /vue/src/components/fragements/Header.vue: -------------------------------------------------------------------------------- 1 | 41 | 72 | 104 | -------------------------------------------------------------------------------- /vue/src/components/Permission.vue: -------------------------------------------------------------------------------- 1 | 31 | 61 | 117 | -------------------------------------------------------------------------------- /vue/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from "vue"; 2 | import Router from "vue-router"; 3 | 4 | Vue.use(Router); 5 | 6 | export default new Router({ 7 | mode: "history", // history 模式去除地址栏 # 号 8 | routes: [ 9 | { 10 | // http://127.0.0.1:8081/login 11 | path: "/login", 12 | name: "登录", 13 | component: () => import("@/components/Login.vue"), 14 | meta: { requireAuth: false }, 15 | }, 16 | { 17 | // http://127.0.0.1:8080/ 18 | path: "/", 19 | name: "主页", 20 | component: () => import("@/components/Comic/Index.vue"), 21 | meta: { requireAuth: false }, 22 | }, 23 | { 24 | // http://127.0.0.1:8080/account 25 | path: "/detail", 26 | name: "动漫详情", 27 | component: () => import("@/components/Comic/ComicDetail.vue"), 28 | meta: { requireAuth: true }, 29 | }, 30 | { 31 | // http://127.0.0.1:8080/resource 32 | path: "/user", 33 | name: "个人中心", 34 | component: () => import("@/components/User.vue"), 35 | redirect: "/user/setting", 36 | // 二级路由,渲染到该组件中的 37 | children: [ 38 | { 39 | // http://127.0.0.1:8080/resource/films 40 | path: "/user/setting", 41 | name: "个人详情", 42 | component: () => import("@/components/User/Detail.vue"), 43 | meta: { requireAuth: true }, 44 | }, 45 | { 46 | path: "/user/update", 47 | name: "个人设置", 48 | component: () => import("@/components/User/Update.vue"), 49 | meta: { requireAuth: true }, 50 | } 51 | ], 52 | }, 53 | { 54 | // http://127.0.0.1:8080/test 55 | path: "/history", 56 | name: "动漫管理", 57 | component: () => import("@/components/User.vue"), 58 | redirect: "/comic/like", 59 | // 二级路由,渲染到该组件中的 import("@/components/User/Like.vue"), 66 | meta: { requireAuth: true} 67 | }, 68 | { 69 | // http://127.0.0.1:8080/test/helloworld2 70 | path: "/comic/record", 71 | name: "浏览记录", 72 | component: () => import("@/components/User/Record.vue"), 73 | meta: { requireAuth: true }, 74 | }, 75 | ], 76 | }, 77 | { 78 | // http://127.0.0.1:8080/test 79 | path: "/permission", 80 | name: "管理员", 81 | component: () => import("@/components/Permission.vue"), 82 | redirect: "/permission/user", 83 | // 二级路由,渲染到该组件中的 import("@/components/Comic/User.vue"), 90 | meta: { requireAuth: true} 91 | }, 92 | { 93 | // http://127.0.0.1:8080/test/helloworld2 94 | path: "/permission/comic", 95 | name: "动漫管理", 96 | component: () => import("@/components/Comic/Comic.vue"), 97 | meta: { requireAuth: true }, 98 | }, 99 | 100 | ], 101 | }, 102 | ], 103 | }); 104 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/user/service/Impl/UserRecordServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.user.service.Impl; 2 | 3 | import ch.qos.logback.core.BasicStatusManager; 4 | import com.comic.springbootproject.comic.entity.Comic; 5 | import com.comic.springbootproject.comic.service.ComicService; 6 | import com.comic.springbootproject.common.vo.Result; 7 | import com.comic.springbootproject.user.dao.UserRecord; 8 | import com.comic.springbootproject.user.entity.UserCollection; 9 | import com.comic.springbootproject.user.entity.UserHistory; 10 | import com.comic.springbootproject.user.service.UserRecordService; 11 | import org.springframework.stereotype.Service; 12 | import javax.annotation.Resource; 13 | import javax.transaction.Transactional; 14 | import java.util.ArrayList; 15 | import java.util.Date; 16 | import java.util.List; 17 | 18 | @Service 19 | public class UserRecordServiceImpl implements UserRecordService { 20 | @Resource 21 | private UserRecord userRecord; 22 | @Resource 23 | private ComicService comicService; 24 | 25 | @Override 26 | @Transactional 27 | public Result insertHistory(UserHistory userHistory) { 28 | userHistory.setCreateTime(new Date().getTime()+""); 29 | if(userRecord.selectHistory(userHistory) != null){ 30 | userRecord.updateHistory(userHistory); 31 | }else{ 32 | userRecord.insertHistory(userHistory); 33 | } 34 | return Result.ok("添加成功"); 35 | } 36 | 37 | @Override 38 | @Transactional 39 | public Result selectHistoryByUserId(int id) { 40 | List list = userRecord.selectHistoryByUserId(id); 41 | List comicHistory = new ArrayList<>(); 42 | for (Integer integer : list) { 43 | Comic comic = comicService.getComicById(integer); 44 | comicHistory.add(comic); 45 | } 46 | if(comicHistory.size() == 0){ 47 | return Result.failed("没有历史记录"); 48 | } 49 | return Result.ok("查找成功",comicHistory); 50 | 51 | } 52 | 53 | @Override 54 | @Transactional 55 | public Result selectCollectionByUserId(int id) { 56 | List list = userRecord.selectCollectionByUserId(id); 57 | List comicCollection = new ArrayList<>(); 58 | for (Integer integer : list) { 59 | comicCollection.add(comicService.getComicById(integer)); 60 | } 61 | return Result.ok(comicCollection); 62 | } 63 | 64 | @Override 65 | @Transactional 66 | public Result insertCollection(UserCollection userCollection) { 67 | if(userRecord.selectCollection(userCollection) != null){ 68 | return Result.failed("已经收藏过了"); 69 | }else{ 70 | userRecord.insertCollection(userCollection); 71 | return Result.ok(); 72 | } 73 | } 74 | 75 | @Override 76 | @Transactional 77 | public Result deleteCollection(UserCollection userCollection) { 78 | userRecord.deleteCollection(userCollection); 79 | return Result.ok(); 80 | } 81 | 82 | } 83 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/common/service/Impl/ImageServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.common.service.Impl; 2 | 3 | import com.comic.springbootproject.common.service.ImageService; 4 | import com.comic.springbootproject.common.vo.ImageType; 5 | import com.comic.springbootproject.common.vo.Result; 6 | import com.comic.springbootproject.config.ResourceBean; 7 | import com.comic.springbootproject.util.FileUtil; 8 | 9 | import org.springframework.boot.system.ApplicationHome; 10 | import org.springframework.stereotype.Service; 11 | import org.springframework.util.ResourceUtils; 12 | import org.springframework.web.multipart.MultipartFile; 13 | 14 | import javax.annotation.Resource; 15 | import java.io.File; 16 | import java.io.FileNotFoundException; 17 | import java.io.IOException; 18 | import java.util.Date; 19 | 20 | @Service 21 | public class ImageServiceImpl implements ImageService { 22 | @Resource 23 | private ResourceBean resourceBean; 24 | 25 | @Override 26 | public Result uploadImage(MultipartFile mf, String imageTypeName) throws FileNotFoundException { 27 | if (mf.isEmpty()) { 28 | return Result.failed("图片为空"); 29 | } 30 | 31 | // 判断图片是否合法 32 | if (!FileUtil.isImage(mf)) { 33 | return Result.failed("请上传图片。"); 34 | } 35 | 36 | //获取图片类型 37 | ImageType it = ImageType.getImageTypeByName(imageTypeName); 38 | if (it == null) { 39 | return Result.failed("图片类型不存在"); 40 | } 41 | 42 | //获取文件夹 43 | String path1 = ResourceUtils.getURL("classpath:").getPath()+"static/"+it.name; 44 | String realPath = path1.replace('/', '\\').substring(1,path1.length()); 45 | ApplicationHome applicationHome = new ApplicationHome(this.getClass()); 46 | String pre = applicationHome.getDir().getParentFile().getParentFile(). 47 | getAbsolutePath() + "\\src\\main\\resources\\static\\"+it.name; 48 | 49 | //用于查看路径是否正确 50 | File pathFile1 = new File(realPath); 51 | if (!pathFile1.exists()) { 52 | pathFile1.mkdirs(); 53 | } 54 | File pathFile2 = new File(pre); 55 | if (!pathFile2.exists()) { 56 | pathFile2.mkdirs(); 57 | } 58 | //获取文件名 59 | // String fileName = String.format("%s.%s", System.currentTimeMillis(), 60 | // FileUtil.getFileType(mf.getOriginalFilename())); 61 | // 62 | String fileName = new Date().getTime()+"_"+mf.getOriginalFilename(); 63 | //文件写入路径 64 | String transferPath = realPath+"/"+fileName; 65 | String transferPath2 = pre+"/"+fileName; 66 | 67 | 68 | //获取文件访问路径 69 | String relatedPath = String.format("/%s/%s", it.name, fileName); 70 | 71 | //写文件 72 | try { 73 | mf.transferTo(new File(transferPath)); 74 | mf.transferTo(new File(transferPath2)); 75 | } catch (IOException e) { 76 | System.out.println("文件写入失败"); 77 | throw new RuntimeException(e); 78 | } 79 | return Result.ok(relatedPath); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comic/service/impl/ComicServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comic.service.impl; 2 | 3 | import com.comic.springbootproject.comic.dao.ComicDao; 4 | import com.comic.springbootproject.comic.entity.Comic; 5 | import com.comic.springbootproject.comic.service.ComicService; 6 | import com.comic.springbootproject.common.vo.Result; 7 | import com.comic.springbootproject.common.vo.Search; 8 | import com.github.pagehelper.PageHelper; 9 | import com.github.pagehelper.PageInfo; 10 | import org.springframework.beans.factory.annotation.Autowired; 11 | import org.springframework.stereotype.Service; 12 | 13 | import javax.annotation.Resource; 14 | import javax.transaction.Transactional; 15 | import java.util.Collections; 16 | import java.util.List; 17 | import java.util.Optional; 18 | 19 | @Service 20 | public class ComicServiceImpl implements ComicService { 21 | 22 | @Resource 23 | private ComicDao comicDao; 24 | 25 | //实现动漫添加 26 | @Override 27 | @Transactional 28 | public Result insertComic(Comic comic) { 29 | Comic temp = comicDao.getComicByName(comic.getComicName()); 30 | if( temp!=null){ 31 | return Result.failed("名字重复"); 32 | } 33 | 34 | //插入新动漫 35 | comicDao.insertComic(comic); 36 | 37 | // 返回结果 38 | return Result.ok(comic); 39 | } 40 | 41 | //实现动漫更新 42 | @Override 43 | @Transactional 44 | public Result updateComic(Comic comic) { 45 | 46 | Comic temp = comicDao.getComicByName(comic.getComicName()); 47 | if(temp!=null && temp.getId() != comic.getId()){ 48 | return Result.failed("动漫名称重复"); 49 | } 50 | comicDao.updateComic(comic); 51 | 52 | return Result.ok(comic); 53 | } 54 | 55 | //实现动漫删除 56 | @Override 57 | @Transactional 58 | public Result deleteComicById(int id) { 59 | //调用dao层删除方法 60 | comicDao.deleteComicById(id); 61 | return Result.ok(); 62 | } 63 | 64 | //根据id查 65 | @Override 66 | @Transactional 67 | public Comic getComicById(int id) { 68 | return comicDao.getComicById(id); 69 | } 70 | 71 | //分页查询 72 | @Override 73 | @Transactional 74 | public PageInfo getComicListBySearch(Search search) { 75 | // 初始化search对象 76 | search.initSearch(); 77 | // 开启分页 78 | PageHelper.startPage(search.getCurrentPage(), search.getPageSize()); 79 | // 返回 pageinfo 对象 80 | // return new PageInfo<>(userDao.getUsersBySearch(search)); 81 | return new PageInfo<>(Optional 82 | .ofNullable(comicDao.getComicBySearch(search)) 83 | .orElse(Collections.emptyList())); 84 | } 85 | 86 | @Override 87 | @Transactional 88 | public PageInfo getComicListByPopularity() { 89 | Search search = new Search(); 90 | search.initSearch(); 91 | PageHelper.startPage(search.getCurrentPage(), search.getPageSize()); 92 | return new PageInfo<>(Optional 93 | .ofNullable(comicDao.getComicBySearch(search)) 94 | .orElse(Collections.emptyList())); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /pom.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 4.0.0 5 | 6 | org.springframework.boot 7 | spring-boot-starter-parent 8 | 2.7.8 9 | 10 | 11 | com.comic 12 | springbootproject 13 | 0.0.1-SNAPSHOT 14 | springbootproject 15 | springbootproject 16 | 17 | 11 18 | 19 | 20 | 21 | 22 | org.springframework.boot 23 | spring-boot-starter-web 24 | 25 | 26 | io.springfox 27 | springfox-swagger2 28 | 2.9.2 29 | 30 | 31 | io.springfox 32 | springfox-swagger-ui 33 | 2.9.2 34 | 35 | 36 | 37 | org.springframework.boot 38 | spring-boot-starter-test 39 | test 40 | 41 | 42 | 43 | mysql 44 | mysql-connector-java 45 | 8.0.32 46 | 47 | 48 | 49 | org.mybatis.spring.boot 50 | mybatis-spring-boot-starter 51 | 2.1.0 52 | 53 | 54 | 55 | org.springframework.boot 56 | spring-boot-starter-data-jpa 57 | 58 | 59 | 60 | com.github.pagehelper 61 | pagehelper-spring-boot-starter 62 | 1.4.1 63 | 64 | 65 | 66 | org.projectlombok 67 | lombok 68 | true 69 | 70 | 71 | 72 | org.apache.commons 73 | commons-lang3 74 | 3.12.0 75 | 76 | 77 | 78 | 79 | 80 | 81 | org.springframework.boot 82 | spring-boot-maven-plugin 83 | 84 | 85 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /vue/src/components/User/Detail.vue: -------------------------------------------------------------------------------- 1 | 71 | 72 | 111 | 112 | 113 | 125 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comic/controller/ComicController.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comic.controller; 2 | 3 | import com.comic.springbootproject.comic.entity.Comic; 4 | import com.comic.springbootproject.comic.service.ComicService; 5 | import com.comic.springbootproject.common.vo.Result; 6 | import com.comic.springbootproject.common.vo.Search; 7 | import com.github.pagehelper.PageInfo; 8 | import org.springframework.http.MediaType; 9 | import org.springframework.web.bind.annotation.*; 10 | import javax.annotation.Resource; 11 | 12 | @RestController 13 | @RequestMapping("/comic") 14 | public class ComicController { 15 | 16 | @Resource 17 | private ComicService comicService; 18 | 19 | /** 20 | * localhost/comic/insert ---post 21 | * @param comic:{ "comicName":"火影忍者", "nickname":"hy","description" 22 | * :"火影忍者是日本漫画家岸本齐史创作的漫画作品,于1999年开始连载于 23 | * 周刊少年Jump,2006年开始连载于月刊少年Jump,2014年开始连载于 24 | * 月刊少年Jump GIGA,2016年开始连载于月刊少年Jump SQ。", 25 | * "popularity":100, "cover": 26 | * "/photo/4a57bc0c-dc38-4b98-b47b-4cbc4f6bedf73.jpg", 27 | * "label":"热血冒险", "region":"日本", 28 | * "url":"https://www.dongmanmanhua.cn/manhua/huoyingrenzhe/" 29 | * remark:"完结", 30 | * year:"2002", 31 | * updateTime:"2019-12-12", 32 | * number:700} 33 | * @return 返回的comic 34 | */ 35 | @PostMapping(value = "/insert", consumes = MediaType.APPLICATION_JSON_VALUE) 36 | public Result insertComic(@RequestBody Comic comic) { 37 | return comicService.insertComic(comic); 38 | } 39 | 40 | /** 41 | * localhost/comic/update ----put 42 | * */ 43 | @PutMapping(value = "/update", consumes = MediaType.APPLICATION_JSON_VALUE) 44 | public Result updateComic(@RequestBody Comic comic){ 45 | return comicService.updateComic(comic); 46 | } 47 | 48 | /** 49 | * localhost/comic/delete/{2} ----delete 50 | * */ 51 | @DeleteMapping(value = "/delete/{id}") 52 | public Result deleteComic(@PathVariable("id") int id){ 53 | return comicService.deleteComicById(id); 54 | } 55 | 56 | /** 57 | * localhost/comic/getComicBySearch ----post 58 | * {"currentPage":1, "pageSize":5, "sort":"id", "direction":"desc", "keyword":""} ---全查 59 | * keyword 即为模糊查询关键字 60 | * {"currentPage":1, "pageSize":5, "sort":"id", "direction":"desc", "keyword":"火"} ---模糊——火 61 | * {"currentPage":1, "pageSize":5, "sort":"popularity", "direction":"desc", "keyword":""} ---按照热度降序,无模糊 62 | * */ 63 | @PostMapping(value = "/getComicBySearch",consumes = MediaType.APPLICATION_JSON_VALUE) 64 | public PageInfo getComicBySearch(@RequestBody Search search){ 65 | return comicService.getComicListBySearch(search); 66 | } 67 | 68 | /** 69 | * localhost/comic/getComicById/2 ----get 70 | * @param id 71 | * @return 72 | */ 73 | @GetMapping(value = "/getComicById/{id}") 74 | public Comic getComicById(@PathVariable("id") int id) { 75 | return comicService.getComicById(id); 76 | } 77 | 78 | 79 | /** 80 | * localhost/comic/getComicByPopularity ----get 81 | * @return 按照热度降序排列前五条数据 82 | */ 83 | @GetMapping(value = "/getComicByPopularity") 84 | public PageInfo getComicListByPopularity() { 85 | return comicService.getComicListByPopularity(); 86 | } 87 | 88 | } 89 | -------------------------------------------------------------------------------- /vue/src/utils/request.js: -------------------------------------------------------------------------------- 1 | /** 2 | * 封装 axios 工具类 3 | * 统一封装请求头、参数、错误提示、权限共功能 4 | */ 5 | 6 | // 导入模块 7 | import axios from "axios"; 8 | import Storage from "@/utils/storage.js"; 9 | import * as Cookie from "@/utils/cookie.js"; 10 | import { Message } from "element-ui"; 11 | 12 | // 定义常量 13 | export const OK_CODE = 200; 14 | export const UNAUTHORIZED_CODE = 401; 15 | export const FORBIDDEN_CODE = 403; 16 | export const NOT_FOUND_CODE = 404; 17 | export const INTERNAL_SERVER_ERROR_CODE = 500; 18 | export const TOKEN_KEY = "Token"; 19 | export const TOKEN_OBJECT_KEY = "TokenObject"; 20 | 21 | // 定义全局变量,本机只能本地测试,生产环境不可用 22 | export const domain = "http://127.0.0.1:8081"; 23 | 24 | // 请求拦截器 25 | axios.interceptors.request.use( 26 | (config) => { 27 | // TODO 处理权限相关业务 28 | return config; 29 | }, 30 | (error) => { 31 | // TODO 32 | console.log(error); 33 | return Promise.reject(error); 34 | } 35 | ); 36 | 37 | // 响应拦截器 38 | axios.interceptors.response.use( 39 | (response) => { 40 | return response.data; 41 | // const res = response.data; 42 | // if (response.status == FORBIDDEN_CODE || response.status == UNAUTHORIZED_CODE) { 43 | // // 状态码为 401、403,说明 jwt 过期 44 | // // 清除 Storage、Cookie 中的 JWT 令牌,并跳转到登录页面 45 | // Storage.removeItemForLs(TOKEN_KEY); 46 | // Storage.removeItemForLs(TOKEN_OBJECT_KEY); 47 | // window.location.href = "/login"; 48 | // } else if (response.status == NOT_FOUND_CODE || response.status == INTERNAL_SERVER_ERROR_CODE) { 49 | // Message({ 50 | // message: res.message || "Error", 51 | // type: "error", 52 | // duration: 5 * 1000, 53 | // }); 54 | // return Promise.reject(new Error(res.message || "Error")); 55 | // } else { 56 | // return res; 57 | // } 58 | }, 59 | (error) => { 60 | console.log("err" + error); 61 | // if (error.response && (error.response.status == FORBIDDEN_CODE || error.response.status == UNAUTHORIZED_CODE)) { 62 | // // 状态码为 401、403,说明 jwt 过期 63 | // // 清除 Storage、Cookie 中的 JWT 令牌,并跳转到登录页面 64 | // Storage.removeItemForLs(TOKEN_KEY); 65 | // Storage.removeItemForLs(TOKEN_OBJECT_KEY); 66 | // window.location.href = "/login"; 67 | // } 68 | // Message({ 69 | // message: error.message, 70 | // type: "error", 71 | // duration: 5 * 1000, 72 | // }); 73 | return Promise.reject(error); 74 | } 75 | ); 76 | 77 | /** 78 | * 封装 get 请求 79 | * @param {*} url 80 | * @param {*} params 查询参数 81 | * @returns 82 | */ 83 | export function fetch(url, params = {}) { 84 | // const token = Cookies.get(TOKEN_KEY) === undefined ? "11111" : Cookies.get(TOKEN_KEY); 85 | const token = Storage.getItemForLs(TOKEN_KEY); 86 | return axios({ 87 | headers: { 88 | "Content-Type": "application/json;charset=UTF-8", 89 | Token: token, 90 | }, 91 | url: domain + url, 92 | method: "get", 93 | params: params, 94 | }); 95 | } 96 | 97 | /** 98 | * 封装非 get 请求 99 | * @param {*} url 100 | * @param {*} type 请求类型 101 | * @param {*} data js 对象 102 | * @returns 103 | */ 104 | export function fetch_(url, type = "post", data = {}) { 105 | // const token = Cookies.get(TOKEN_KEY) === undefined ? "11111" : Cookies.get(TOKEN_KEY); 106 | const token = Storage.getItemForLs(TOKEN_KEY); 107 | return axios({ 108 | headers: { 109 | "Content-Type": "application/json;charset=UTF-8", 110 | Token: token, 111 | }, 112 | url: domain + url, 113 | method: type, 114 | data: JSON.stringify(data), 115 | }); 116 | } 117 | 118 | // 获取 Cookies 119 | export function getCookies(key) { 120 | return Cookies.get(key) || ""; 121 | } 122 | 123 | // 设置 Cookies 124 | export function setCookies(key, value) { 125 | Cookies.set(key, value); 126 | } 127 | -------------------------------------------------------------------------------- /vue/src/components/User/Record.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 91 | 92 | 93 | 154 | -------------------------------------------------------------------------------- /vue/src/components/User/Like.vue: -------------------------------------------------------------------------------- 1 | 30 | 31 | 92 | 93 | 94 | 157 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comment/service/impl/CommentReplyContentServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comment.service.impl; 2 | 3 | import com.comic.springbootproject.comment.dao.ComicCommentDao; 4 | import com.comic.springbootproject.comment.dao.CommentReplyContentDao; 5 | import com.comic.springbootproject.comment.entity.ComicComment; 6 | import com.comic.springbootproject.comment.entity.Comment; 7 | import com.comic.springbootproject.comment.entity.CommentReplyContent; 8 | import com.comic.springbootproject.comment.service.CommentReplyContentService; 9 | import com.comic.springbootproject.common.vo.Result; 10 | import com.comic.springbootproject.common.vo.Search; 11 | import com.comic.springbootproject.user.dao.UserDao; 12 | import com.github.pagehelper.PageHelper; 13 | import com.github.pagehelper.PageInfo; 14 | import org.springframework.stereotype.Service; 15 | 16 | import javax.annotation.Resource; 17 | import javax.transaction.Transactional; 18 | import java.text.SimpleDateFormat; 19 | import java.util.Collections; 20 | import java.util.Date; 21 | import java.util.List; 22 | import java.util.Optional; 23 | 24 | @Service 25 | public class CommentReplyContentServiceImpl implements CommentReplyContentService { 26 | @Resource 27 | private CommentReplyContentDao commentReplyContentDao; 28 | @Resource 29 | private ComicCommentDao comicCommentDao; 30 | @Resource 31 | private UserDao userDao; 32 | 33 | 34 | @Override 35 | @Transactional 36 | public List selectCommentReplyContentByComicCommentId(int ComicCommentId) { 37 | List commentReplyContents = commentReplyContentDao. 38 | selectCommentReplyContentByComicCommentId(ComicCommentId); 39 | SimpleDateFormat sdfDatetime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 40 | //循环遍历,进行数据转换 41 | for (CommentReplyContent commentReplyContent : commentReplyContents) { 42 | //将用户id转换为用户名 43 | commentReplyContent.setReplyUserName(userDao.getUserById(commentReplyContent.getReplyId()).getUserName()); 44 | commentReplyContent.setRepliedUserName(userDao.getUserById(commentReplyContent.getRepliedId()).getUserName()); 45 | //头像转换 46 | commentReplyContent.setReplyAvatar(userDao.getUserById(commentReplyContent.getReplyId()).getAvatar()); 47 | commentReplyContent.setRepliedAvatar(userDao.getUserById(commentReplyContent.getRepliedId()).getAvatar()); 48 | //时间转换 49 | commentReplyContent.setCreateTime(sdfDatetime.format(new Date(Long.parseLong(commentReplyContent.getCreateTime())))); 50 | //评论内容转换 51 | commentReplyContent.setComment(comicCommentDao.selectCommentByCommentId(commentReplyContent.getCommentId()).getComment()); 52 | } 53 | return commentReplyContents; 54 | } 55 | 56 | @Override 57 | @Transactional 58 | public Result insertCommentReplyContent(CommentReplyContent commentReplyContent) { 59 | String time = new Date().getTime() + ""; 60 | commentReplyContent.setCreateTime(time); 61 | Comment comment = new Comment(); 62 | comment.setComment(commentReplyContent.getComment()); 63 | comicCommentDao.insertComment(comment); 64 | commentReplyContent.setCommentId(comment.getId()); 65 | commentReplyContentDao.insertCommentReplyContent(commentReplyContent); 66 | return Result.ok("评论成功,注意评论规范", commentReplyContent); 67 | } 68 | 69 | @Override 70 | @Transactional 71 | public Result deleteCommentReplyContentByCommentReplyContentId(int commentReplyContentId) { 72 | CommentReplyContent commentReplyContent = commentReplyContentDao. 73 | selectCommentReplyContentById(commentReplyContentId); 74 | if (commentReplyContent.getCommentId() != 0) { 75 | comicCommentDao.deleteCommentByCommentId(commentReplyContent.getCommentId()); 76 | } 77 | commentReplyContentDao.deleteCommentReplyContentByCommentReplyContentId 78 | (commentReplyContentId); 79 | return Result.ok("删除评论成功"); 80 | } 81 | } 82 | 83 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/comment/service/impl/ComicCommentImpl.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.comment.service.impl; 2 | 3 | import com.comic.springbootproject.comment.dao.ComicCommentDao; 4 | import com.comic.springbootproject.comment.dao.CommentReplyContentDao; 5 | import com.comic.springbootproject.comment.entity.ComicComment; 6 | import com.comic.springbootproject.comment.entity.Comment; 7 | import com.comic.springbootproject.comment.entity.CommentReplyContent; 8 | import com.comic.springbootproject.comment.service.ComicCommentService; 9 | import com.comic.springbootproject.comment.service.CommentReplyContentService; 10 | import com.comic.springbootproject.common.vo.Result; 11 | import com.comic.springbootproject.user.dao.UserDao; 12 | import com.comic.springbootproject.user.entity.User; 13 | import org.springframework.stereotype.Service; 14 | 15 | import javax.annotation.Resource; 16 | import javax.transaction.Transactional; 17 | import java.text.SimpleDateFormat; 18 | import java.util.Date; 19 | import java.util.List; 20 | 21 | @Service 22 | public class ComicCommentImpl implements ComicCommentService { 23 | @Resource 24 | private ComicCommentDao comicCommentDao; 25 | @Resource 26 | private CommentReplyContentService commentReplyContentService; 27 | @Resource 28 | private UserDao userDao; 29 | @Resource 30 | private CommentReplyContentDao commentReplyContentDao; 31 | 32 | @Override 33 | @Transactional 34 | public Result insertComicComment(ComicComment comicComment) { 35 | String time = new Date().getTime() + ""; 36 | comicComment.setCreateTime(time); 37 | Comment comment = new Comment(); 38 | comment.setComment(comicComment.getComment()); 39 | comicCommentDao.insertComment(comment); 40 | comicComment.setCommentId(comment.getId()); 41 | comicCommentDao.insertComicComment(comicComment); 42 | return Result.ok("评论成功,注意评论规范", comicComment); 43 | } 44 | 45 | @Override 46 | @Transactional 47 | public Result deleteComicCommentByComicCommentId(int ComicCommentId) { 48 | ComicComment comicComment = comicCommentDao.selectComicCommentByComicCommentId 49 | (ComicCommentId); 50 | if (comicComment.getCommentId() != 0) { 51 | comicCommentDao.deleteCommentByCommentId(comicComment.getCommentId()); 52 | } 53 | //得到二级回复列表 54 | List commentReplyContents = commentReplyContentDao. 55 | selectCommentReplyContentByComicCommentId(ComicCommentId); 56 | //遍历二级回复列表,删除二级回复 57 | for (CommentReplyContent commentReplyContent : commentReplyContents) { 58 | commentReplyContentService.deleteCommentReplyContentByCommentReplyContentId 59 | (commentReplyContent.getId()); 60 | } 61 | comicCommentDao.deleteComicCommentByComicCommentId(ComicCommentId); 62 | return Result.ok("删除评论成功"); 63 | } 64 | 65 | @Override 66 | @Transactional 67 | public Result> selectCommentByComicId(int comicId) { 68 | 69 | List comicCommentList = comicCommentDao.selectCommentByComicId(comicId); 70 | SimpleDateFormat sdfDatetime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 71 | //遍历评论列表,将评论id转换为评论内容 72 | for (ComicComment comicComment : comicCommentList) { 73 | Comment comment = comicCommentDao.selectCommentByCommentId(comicComment.getCommentId()); 74 | comicComment.setComment(comment.getComment()); 75 | comicComment.setCreateTime(sdfDatetime.format(Long.parseLong(comicComment.getCreateTime()))); 76 | User user1 = userDao.getUserById(comicComment.getUserId()); 77 | comicComment.setUserName(user1.getUserName()); 78 | comicComment.setAvatar(user1.getAvatar()); 79 | List commentReplyContents = commentReplyContentService. 80 | selectCommentReplyContentByComicCommentId(comicComment.getId()); 81 | comicComment.setCommentReplyContentList(commentReplyContents); 82 | } 83 | return Result.ok("一级评论查询成功", comicCommentList); 84 | } 85 | 86 | 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/user/service/Impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.user.service.Impl; 2 | 3 | import com.comic.springbootproject.common.vo.Result; 4 | import com.comic.springbootproject.common.vo.Search; 5 | import com.comic.springbootproject.user.dao.UserDao; 6 | import com.comic.springbootproject.user.entity.User; 7 | import com.comic.springbootproject.user.service.UserService; 8 | import com.comic.springbootproject.util.MD5Util; 9 | import com.github.pagehelper.PageHelper; 10 | import com.github.pagehelper.PageInfo; 11 | import org.springframework.stereotype.Service; 12 | 13 | import javax.annotation.Resource; 14 | import javax.transaction.Transactional; 15 | import java.beans.Transient; 16 | import java.text.SimpleDateFormat; 17 | import java.util.Collections; 18 | import java.util.Date; 19 | import java.util.Objects; 20 | import java.util.Optional; 21 | 22 | @Service 23 | public class UserServiceImpl implements UserService { 24 | @Resource 25 | private UserDao userDao; 26 | SimpleDateFormat sdfDatetime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 27 | @Override 28 | @Transactional 29 | public Result insertUser(User user) { 30 | // 根据用户名字查找用户是否存在 31 | User temp = userDao.getUserByName(user.getUserName()); 32 | // 如果存在返回错误信息 33 | if (temp != null) { 34 | return Result.failed("用户名已存在"); 35 | } 36 | String time = new Date().getTime() + ""; 37 | //初始化user属性 38 | user.setCreateTime(time); 39 | user.setPassword(MD5Util.getMD5(user.getPassword())); 40 | userDao.insertUser(user); 41 | user.setCreateTime(sdfDatetime.format(Long.parseLong(user.getCreateTime()))); 42 | return Result.ok(user); 43 | } 44 | 45 | @Override 46 | @Transactional 47 | public Result updateUser(User user) { 48 | User temp = userDao.getUserByName(user.getUserName()); 49 | User temp2 = userDao.getUserById(user.getId()); 50 | // 如果存在返回错误信息 51 | if (temp != null && temp.getId() != user.getId()) { 52 | return Result.failed("用户名已存在"); 53 | } 54 | String time = new Date().getTime() + ""; 55 | //初始化user属性 56 | user.setCreateTime(time); 57 | if (Objects.equals(user.getPassword(),temp2.getPassword())) { 58 | userDao.updateUserExpPassword(user); 59 | }else { 60 | user.setPassword(MD5Util.getMD5(user.getPassword())); 61 | userDao.updateUser(user); 62 | } 63 | user.setCreateTime(sdfDatetime.format(Long.parseLong(user.getCreateTime()))); 64 | return Result.ok(user); 65 | } 66 | 67 | @Override 68 | @Transactional 69 | public Result deleteUser(int id) { 70 | userDao.deleteUser(id); 71 | return Result.ok(); 72 | } 73 | 74 | @Override 75 | @Transactional 76 | public User getUserById(int id) { 77 | SimpleDateFormat sdfDatetime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 78 | User user = userDao.getUserById(id); 79 | Long time = Long.parseLong(user.getCreateTime()); 80 | user.setCreateTime(sdfDatetime.format(time)); 81 | return user; 82 | } 83 | 84 | @Override 85 | @Transactional 86 | public Result login(User user) { 87 | User temp = userDao.login(user.getUserName(), MD5Util.getMD5(user.getPassword())); 88 | if (temp != null) { 89 | temp.setCreateTime(sdfDatetime.format(Long.parseLong(temp.getCreateTime()))); 90 | return Result.ok(temp); 91 | } 92 | return Result.failed("用户名或密码错误"); 93 | } 94 | 95 | @Override 96 | @Transactional 97 | public Result setAdmin(int id) { 98 | User temp = userDao.getUserById(id); 99 | if (temp.getIsAdmin() == 1) { 100 | return Result.failed("该用户已经是管理员"); 101 | } 102 | userDao.setAdmin(id); 103 | temp.setIsAdmin(1); 104 | return Result.ok(temp); 105 | } 106 | 107 | @Override 108 | @Transactional 109 | public PageInfo getUserBySearch(Search search) { 110 | 111 | search.initSearch(); 112 | PageHelper.startPage(search.getCurrentPage(), search.getPageSize()); 113 | return new PageInfo<>(Optional.ofNullable 114 | (userDao.getUserBySearch(search)).orElse(Collections.emptyList())); 115 | } 116 | } 117 | -------------------------------------------------------------------------------- /vue/src/components/Comic/UserEdit.vue: -------------------------------------------------------------------------------- 1 | 56 | 57 | 198 | 199 | 211 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/user/controller/UserController.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.user.controller; 2 | 3 | import com.comic.springbootproject.common.vo.Result; 4 | import com.comic.springbootproject.common.vo.Search; 5 | import com.comic.springbootproject.user.entity.User; 6 | import com.comic.springbootproject.user.entity.UserCollection; 7 | import com.comic.springbootproject.user.entity.UserHistory; 8 | import com.comic.springbootproject.user.service.UserRecordService; 9 | import com.comic.springbootproject.user.service.UserService; 10 | import com.github.pagehelper.PageInfo; 11 | import io.swagger.annotations.Api; 12 | import org.springframework.http.MediaType; 13 | import org.springframework.web.bind.annotation.*; 14 | 15 | import javax.annotation.Resource; 16 | import java.util.List; 17 | 18 | @RestController 19 | @RequestMapping("/user") 20 | @Api(tags = "用户管理") 21 | public class UserController { 22 | @Resource 23 | private UserService userService; 24 | @Resource 25 | private UserRecordService userRecordService; 26 | 27 | /** 28 | *URL: ... ----post 29 | * @param {"userName":"lhj","password":"111111","email":"17990531116@qq.com","phone":17990531116} 30 | * @return result信息 31 | */ 32 | @PostMapping(value = "/insertUser",consumes = MediaType.APPLICATION_JSON_VALUE) 33 | 34 | public Result insertUser(@RequestBody User user) { 35 | return userService.insertUser(user); 36 | } 37 | 38 | /** 39 | * URL: ... ----get 40 | * @param id 41 | * @return user对象 42 | */ 43 | @GetMapping(value = "/getUserById/{id}") 44 | public User getUserById(@PathVariable int id) { 45 | return userService.getUserById(id); 46 | } 47 | 48 | /** 49 | * URL: ... ----put 50 | * @param user 51 | * @return 52 | */ 53 | @PutMapping(value = "/updateUser",consumes = MediaType.APPLICATION_JSON_VALUE) 54 | public Result updateUser(@RequestBody User user) { 55 | return userService.updateUser(user); 56 | } 57 | 58 | /** 59 | * URL: ... ----delete 60 | * @param id 61 | * @return 62 | */ 63 | @DeleteMapping(value = "/deleteUser/{id}") 64 | public Result deleteUser(@PathVariable("id") int id) { 65 | return userService.deleteUser(id); 66 | } 67 | 68 | /** 69 | * URL: ... ----post 70 | * @param user:{"userName":"chenchenchen","password":"000812"} 71 | * @return 成功的话返回user对象,失败的话返回错误信息 72 | */ 73 | @PostMapping(value = "/login",consumes = MediaType.APPLICATION_JSON_VALUE) 74 | public Result login(@RequestBody User user) { 75 | return userService.login(user); 76 | } 77 | 78 | /** 79 | * URL: ... ----put 80 | * @param id:用户id 81 | * @return 是否成功 82 | */ 83 | @PutMapping(value = "/setAdmin/{id}") 84 | public Result setAdmin(@PathVariable("id") int id) { 85 | return userService.setAdmin(id); 86 | } 87 | 88 | /** 89 | * URL: ... ----post 90 | * @param search :{"pageNum":1,"pageSize":5,"orderBy":"id desc","searchValue":"chen"} 91 | * @return 返回分页信息 92 | */ 93 | @PostMapping(value = "/userList",consumes = MediaType.APPLICATION_JSON_VALUE) 94 | public PageInfo getUserBySearch (@RequestBody Search search) { 95 | return userService.getUserBySearch(search); 96 | } 97 | 98 | /** 99 | * URL: ... ----post 100 | * @param userHistory:{"userId":1,"comicId":1} 101 | * @return 是否成功 102 | */ 103 | @PostMapping(value = "/insertHistory",consumes = MediaType.APPLICATION_JSON_VALUE) 104 | public Result insertHistory(@RequestBody UserHistory userHistory) { 105 | return userRecordService.insertHistory(userHistory); 106 | } 107 | 108 | /** 109 | * URL: ... ----get 110 | * @param id:用户id 111 | * @return 返回用户浏览记录 112 | */ 113 | @GetMapping(value = "/selectHistoryByUserId/{id}") 114 | public Result selectHistoryByUserId(@PathVariable("id") int id) { 115 | return userRecordService.selectHistoryByUserId(id); 116 | } 117 | 118 | /** 119 | * URL: ... ----get 120 | * @param id 121 | * @return 122 | */ 123 | @GetMapping(value = "/selectCollectionByUserId/{id}") 124 | public Result selectCollectionByUserId(@PathVariable("id") int id) { 125 | return userRecordService.selectCollectionByUserId(id); 126 | } 127 | 128 | /** 129 | * URL: ... ----delete 130 | * @param userCollection:{"userId":1,"comicId":1} 131 | * @return 是否成功 132 | */ 133 | @DeleteMapping(value = "/deleteCollection",consumes = MediaType.APPLICATION_JSON_VALUE) 134 | public Result deleteCollection(@RequestBody UserCollection userCollection) { 135 | return userRecordService.deleteCollection(userCollection); 136 | } 137 | 138 | /** 139 | * URL: ... ----post 140 | * @param userCollection:{"userId":1,"comicId":1} 141 | * @return 是否成功 142 | */ 143 | @PostMapping(value = "/insertCollection",consumes = MediaType.APPLICATION_JSON_VALUE) 144 | public Result insertCollection(@RequestBody UserCollection userCollection) { 145 | return userRecordService.insertCollection(userCollection); 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /vue/src/components/User.vue: -------------------------------------------------------------------------------- 1 | 66 | 171 | 257 | -------------------------------------------------------------------------------- /vue/src/components/Comic/User.vue: -------------------------------------------------------------------------------- 1 | 89 | 90 | 221 | 247 | -------------------------------------------------------------------------------- /vue/src/components/Login.vue: -------------------------------------------------------------------------------- 1 | 54 | 55 | 151 | 152 | 153 | 256 | -------------------------------------------------------------------------------- /vue/src/components/Comic/Comic.vue: -------------------------------------------------------------------------------- 1 | 90 | 91 | 221 | 246 | -------------------------------------------------------------------------------- /src/main/java/com/comic/springbootproject/util/FileUtil.java: -------------------------------------------------------------------------------- 1 | package com.comic.springbootproject.util; 2 | 3 | import org.apache.commons.lang3.StringUtils; 4 | import org.slf4j.Logger; 5 | import org.slf4j.LoggerFactory; 6 | import org.springframework.web.multipart.MultipartFile; 7 | 8 | import javax.imageio.ImageIO; 9 | import javax.imageio.ImageReader; 10 | import javax.imageio.stream.ImageInputStream; 11 | import javax.imageio.stream.ImageOutputStream; 12 | import java.awt.*; 13 | import java.awt.image.BufferedImage; 14 | import java.io.*; 15 | import java.util.HashMap; 16 | import java.util.Iterator; 17 | import java.util.Map; 18 | import java.util.stream.Collectors; 19 | 20 | /** 21 | * @Description: File Util 22 | * @author: HymanHu 23 | * @date: 2020年4月15日 24 | */ 25 | public class FileUtil { 26 | 27 | private final static Logger LOGGER = LoggerFactory.getLogger(FileUtil.class); 28 | 29 | public final static String FILE_SEPARATOR = "."; 30 | public final static Map FILE_TYPE_MAP = new HashMap(); 31 | 32 | static { 33 | FILE_TYPE_MAP.put("jpg", "FFD8FF"); 34 | FILE_TYPE_MAP.put("png", "89504E47"); 35 | FILE_TYPE_MAP.put("gif", "47494638"); 36 | FILE_TYPE_MAP.put("tif", "49492A00"); 37 | FILE_TYPE_MAP.put("bmp", "424D"); 38 | FILE_TYPE_MAP.put("dwg", "41433130"); 39 | FILE_TYPE_MAP.put("html", "68746D6C3E"); 40 | FILE_TYPE_MAP.put("rtf", "7B5C727466"); 41 | FILE_TYPE_MAP.put("xml", "3C3F786D6C"); 42 | FILE_TYPE_MAP.put("zip", "504B0304"); 43 | FILE_TYPE_MAP.put("rar", "52617221"); 44 | FILE_TYPE_MAP.put("psd", "38425053"); 45 | FILE_TYPE_MAP.put("eml", "44656C69766572792D646174653A"); 46 | FILE_TYPE_MAP.put("dbx", "CFAD12FEC5FD746F"); 47 | FILE_TYPE_MAP.put("pst", "2142444E"); 48 | FILE_TYPE_MAP.put("xls", "D0CF11E0"); 49 | FILE_TYPE_MAP.put("doc", "D0CF11E0"); 50 | FILE_TYPE_MAP.put("mdb", "5374616E64617264204A"); 51 | FILE_TYPE_MAP.put("wpd", "FF575043"); 52 | FILE_TYPE_MAP.put("eps", "252150532D41646F6265"); 53 | FILE_TYPE_MAP.put("ps", "252150532D41646F6265"); 54 | FILE_TYPE_MAP.put("pdf", "255044462D312E"); 55 | FILE_TYPE_MAP.put("qdf", "AC9EBD8F"); 56 | FILE_TYPE_MAP.put("pwl", "E3828596"); 57 | FILE_TYPE_MAP.put("wav", "57415645"); 58 | FILE_TYPE_MAP.put("avi", "41564920"); 59 | FILE_TYPE_MAP.put("ram", "2E7261FD"); 60 | FILE_TYPE_MAP.put("rm", "2E524D46"); 61 | FILE_TYPE_MAP.put("mpg", "000001BA"); 62 | FILE_TYPE_MAP.put("mov", "6D6F6F76"); 63 | FILE_TYPE_MAP.put("asf", "3026B2758E66CF11"); 64 | FILE_TYPE_MAP.put("mid", "4D546864"); 65 | } 66 | 67 | public static boolean isImage(File file) { 68 | try { 69 | BufferedImage bufreader = ImageIO.read(file); 70 | int width = bufreader.getWidth(); 71 | int height = bufreader.getHeight(); 72 | if (width > 0 && height > 0) { 73 | return true; 74 | } 75 | } catch (IOException e) { 76 | e.printStackTrace(); 77 | } 78 | 79 | return false; 80 | } 81 | 82 | public static boolean isImage(MultipartFile file) { 83 | try { 84 | BufferedImage bufreader = ImageIO.read(file.getInputStream()); 85 | if (bufreader == null) { 86 | return false; 87 | } 88 | int width = bufreader.getWidth(); 89 | int height = bufreader.getHeight(); 90 | if (width > 0 && height > 0) { 91 | return true; 92 | } 93 | } catch (IOException e) { 94 | LOGGER.debug(e.getMessage()); 95 | e.printStackTrace(); 96 | } 97 | 98 | return false; 99 | } 100 | 101 | public static String getImageType(File file) { 102 | if (isImage(file)) { 103 | ImageInputStream iis = null; 104 | try { 105 | iis = ImageIO.createImageInputStream(file); 106 | Iterator iter = ImageIO.getImageReaders(iis); 107 | while(!iter.hasNext()) { 108 | return null; 109 | } 110 | 111 | ImageReader reader = iter.next(); 112 | return reader.getFormatName(); 113 | } catch (IOException e) { 114 | LOGGER.debug(e.getMessage()); 115 | e.printStackTrace(); 116 | } finally { 117 | closeImageStream(iis, null); 118 | } 119 | } 120 | 121 | return null; 122 | } 123 | 124 | public static String getFileHexString(byte[] bytes) { 125 | if (bytes == null || bytes.length <= 0) { 126 | return null; 127 | } 128 | 129 | StringBuffer sb = new StringBuffer(); 130 | for (byte by : bytes) { 131 | int v = by & 0xFF; 132 | String hv = Integer.toHexString(v); 133 | if (hv.length() < 2) { 134 | sb.append(0); 135 | } 136 | sb.append(hv); 137 | } 138 | 139 | return sb.toString(); 140 | } 141 | 142 | public static String getFileType(byte[] bytes) { 143 | 144 | String filetypeHex = String.valueOf(getFileHexString(bytes)); 145 | return FILE_TYPE_MAP.entrySet() 146 | .stream() 147 | .filter(item -> filetypeHex.toUpperCase().startsWith(item.getValue())) 148 | .map(item -> item.getKey()) 149 | .collect(Collectors.joining()); 150 | } 151 | 152 | public static String getFileType(File file) { 153 | String filetype = null; 154 | byte[] bytes = new byte[50]; 155 | 156 | InputStream is = null; 157 | try { 158 | is = new FileInputStream(file); 159 | is.read(bytes); 160 | filetype = getFileType(bytes); 161 | } catch (IOException e) { 162 | e.printStackTrace(); 163 | } finally { 164 | closeStream(is, null); 165 | } 166 | 167 | return filetype; 168 | } 169 | 170 | public static String getFileType(String fileName) { 171 | if (StringUtils.isBlank(fileName)) { 172 | return null; 173 | } 174 | return fileName.substring(fileName.lastIndexOf(FILE_SEPARATOR) + 1, fileName.length()); 175 | } 176 | 177 | public static void changeImageSize(String sourcePath, String destPath, int width, int height) { 178 | BufferedInputStream in = null; 179 | BufferedOutputStream out = null; 180 | try { 181 | in = new BufferedInputStream(new FileInputStream(sourcePath)); 182 | Image bi = ImageIO.read(in); 183 | BufferedImage tag = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); 184 | tag.getGraphics().drawImage(bi, 0, 0, width, height, null); 185 | out = new BufferedOutputStream(new FileOutputStream(destPath)); 186 | ImageIO.write(tag, "PNG", out); 187 | } catch (IOException e) { 188 | e.printStackTrace(); 189 | } finally { 190 | closeStream(in, out); 191 | } 192 | } 193 | 194 | public static void closeImageStream(ImageInputStream iis, ImageOutputStream ios) { 195 | try { 196 | if (iis != null) { 197 | iis.close(); 198 | } 199 | if (ios != null) { 200 | ios.close(); 201 | } 202 | } catch (IOException e) { 203 | LOGGER.debug(e.getMessage()); 204 | e.printStackTrace(); 205 | } 206 | } 207 | 208 | public static void closeStream(InputStream is, OutputStream os) { 209 | try { 210 | if (is != null) { 211 | is.close(); 212 | } 213 | if (os != null) { 214 | os.close(); 215 | } 216 | } catch (IOException e) { 217 | LOGGER.debug(e.getMessage()); 218 | e.printStackTrace(); 219 | } 220 | } 221 | 222 | public static void main(String[] args) { 223 | System.out.println("getFileType: " + getFileType("i.zeze.com_app_2002_size_f9999,10000_q_a80_n_0_g_0n_fmt_jpeg.png")); 224 | // File file = new File("D:\\upload\\qqqqqqq.jpg"); 225 | // System.out.println("getImageType: " + getImageType(file)); 226 | // System.out.println("getFileType: " + getFileType(file)); 227 | 228 | // changeImageSize("D:\\upload\\qqqqqqq.jpg", "D:\\upload\\qqqqqqq_middle.jpg", 100, 100); 229 | // changeImageSize("D:\\upload\\qqqqqqq.jpg", "D:\\upload\\qqqqqqq_small.jpg", 55, 55); 230 | 231 | FileUtil.changeImageSize("/1.jpg", "/4.jpg", 232 | 1920, 366); 233 | } 234 | } 235 | --------------------------------------------------------------------------------