├── target ├── classes │ ├── META-INF │ │ └── headline.kotlin_module │ ├── com │ │ └── nuc │ │ │ └── calvin │ │ │ └── ssm │ │ │ ├── BaseTest.class │ │ │ ├── dto │ │ │ ├── Ok.class │ │ │ ├── UserOk.class │ │ │ ├── ArticleOk.class │ │ │ └── LoginOk.class │ │ │ ├── dao │ │ │ ├── BannerDao.class │ │ │ ├── LikesDao.class │ │ │ ├── ReplyDao.class │ │ │ ├── UserDao.class │ │ │ ├── ArticleDao.class │ │ │ ├── CommentDao.class │ │ │ ├── RelationDao.class │ │ │ ├── CollectionDao.class │ │ │ ├── LikesCustomDao.class │ │ │ ├── ReplyCustomDao.class │ │ │ ├── UserCustomDao.class │ │ │ ├── ArticleCustomDao.class │ │ │ ├── BannerCustomDao.class │ │ │ ├── CommentCustomDao.class │ │ │ ├── CollectionCustomDao.class │ │ │ └── RelationCustomDao.class │ │ │ ├── entity │ │ │ ├── Banner.class │ │ │ ├── Likes.class │ │ │ ├── Reply.class │ │ │ ├── User.class │ │ │ ├── UserVo.class │ │ │ ├── Article.class │ │ │ ├── Collect.class │ │ │ ├── Comment.class │ │ │ ├── Relation.class │ │ │ ├── ArticleVo.class │ │ │ ├── LikesCustom.class │ │ │ ├── ReplyCustom.class │ │ │ ├── UserCustom.class │ │ │ ├── ArticleCustom.class │ │ │ ├── BannerCustom.class │ │ │ ├── CollectCustom.class │ │ │ ├── CommentCustom.class │ │ │ └── RelationCustom.class │ │ │ ├── utils │ │ │ ├── DateConvert.class │ │ │ └── CompareValueUtils.class │ │ │ ├── web │ │ │ ├── UserController.class │ │ │ ├── BannerController.class │ │ │ ├── LikesController.class │ │ │ ├── ArticleController.class │ │ │ ├── CollectController.class │ │ │ ├── CommentController.class │ │ │ └── RelationController.class │ │ │ └── service │ │ │ ├── LikesService.class │ │ │ ├── ReplyService.class │ │ │ ├── UserService.class │ │ │ ├── ArticleService.class │ │ │ ├── BannerService.class │ │ │ ├── CollectService.class │ │ │ ├── CommentService.class │ │ │ ├── RelationService.class │ │ │ └── impl │ │ │ ├── LikesServiveImp.class │ │ │ ├── ReplyServiceImp.class │ │ │ ├── UserServiceImpl.class │ │ │ ├── ArticleServiceImp.class │ │ │ ├── BannerServiceImpl.class │ │ │ ├── CollectServiceImp.class │ │ │ ├── CommentServiceImp.class │ │ │ └── RelationServiceImp.class │ ├── jdbc.properties │ ├── logback.xml │ ├── mybatis-config.xml │ ├── spring │ │ ├── spring-service.xml │ │ ├── spring-web.xml │ │ └── spring-dao.xml │ └── mapper │ │ ├── BannerDao.xml │ │ ├── LikesDao.xml │ │ ├── CollectDao.xml │ │ ├── RelationDao.xml │ │ ├── BannerCustomDao.xml │ │ ├── ArticleDao.xml │ │ ├── RelationCustomDao.xml │ │ └── UserDao.xml ├── test-classes │ ├── META-INF │ │ └── headline.kotlin_module │ └── com │ │ └── nuc │ │ └── calvin │ │ └── ssm │ │ └── dao │ │ ├── UserDaoTest.class │ │ └── UserCustomDaoTest.class └── headline │ ├── WEB-INF │ ├── classes │ │ ├── META-INF │ │ │ └── headline.kotlin_module │ │ ├── com │ │ │ └── nuc │ │ │ │ └── calvin │ │ │ │ └── ssm │ │ │ │ ├── dto │ │ │ │ ├── Ok.class │ │ │ │ ├── LoginOk.class │ │ │ │ ├── UserOk.class │ │ │ │ └── ArticleOk.class │ │ │ │ ├── BaseTest.class │ │ │ │ ├── dao │ │ │ │ ├── UserDao.class │ │ │ │ ├── BannerDao.class │ │ │ │ ├── LikesDao.class │ │ │ │ ├── ReplyDao.class │ │ │ │ ├── ArticleDao.class │ │ │ │ ├── CommentDao.class │ │ │ │ ├── RelationDao.class │ │ │ │ ├── CollectionDao.class │ │ │ │ ├── LikesCustomDao.class │ │ │ │ ├── ReplyCustomDao.class │ │ │ │ ├── UserCustomDao.class │ │ │ │ ├── ArticleCustomDao.class │ │ │ │ ├── BannerCustomDao.class │ │ │ │ ├── CommentCustomDao.class │ │ │ │ ├── RelationCustomDao.class │ │ │ │ └── CollectionCustomDao.class │ │ │ │ ├── entity │ │ │ │ ├── User.class │ │ │ │ ├── Banner.class │ │ │ │ ├── Likes.class │ │ │ │ ├── Reply.class │ │ │ │ ├── UserVo.class │ │ │ │ ├── Article.class │ │ │ │ ├── ArticleVo.class │ │ │ │ ├── Collect.class │ │ │ │ ├── Comment.class │ │ │ │ ├── Relation.class │ │ │ │ ├── LikesCustom.class │ │ │ │ ├── ReplyCustom.class │ │ │ │ ├── UserCustom.class │ │ │ │ ├── ArticleCustom.class │ │ │ │ ├── BannerCustom.class │ │ │ │ ├── CollectCustom.class │ │ │ │ ├── CommentCustom.class │ │ │ │ └── RelationCustom.class │ │ │ │ ├── utils │ │ │ │ ├── DateConvert.class │ │ │ │ └── CompareValueUtils.class │ │ │ │ ├── web │ │ │ │ ├── UserController.class │ │ │ │ ├── ArticleController.class │ │ │ │ ├── BannerController.class │ │ │ │ ├── CollectController.class │ │ │ │ ├── CommentController.class │ │ │ │ ├── LikesController.class │ │ │ │ └── RelationController.class │ │ │ │ └── service │ │ │ │ ├── BannerService.class │ │ │ │ ├── LikesService.class │ │ │ │ ├── ReplyService.class │ │ │ │ ├── UserService.class │ │ │ │ ├── ArticleService.class │ │ │ │ ├── CollectService.class │ │ │ │ ├── CommentService.class │ │ │ │ ├── RelationService.class │ │ │ │ └── impl │ │ │ │ ├── LikesServiveImp.class │ │ │ │ ├── ReplyServiceImp.class │ │ │ │ ├── UserServiceImpl.class │ │ │ │ ├── ArticleServiceImp.class │ │ │ │ ├── BannerServiceImpl.class │ │ │ │ ├── CollectServiceImp.class │ │ │ │ ├── CommentServiceImp.class │ │ │ │ └── RelationServiceImp.class │ │ ├── jdbc.properties │ │ ├── logback.xml │ │ ├── mybatis-config.xml │ │ ├── spring │ │ │ ├── spring-service.xml │ │ │ ├── spring-web.xml │ │ │ └── spring-dao.xml │ │ └── mapper │ │ │ ├── BannerDao.xml │ │ │ ├── LikesDao.xml │ │ │ ├── CollectDao.xml │ │ │ ├── RelationDao.xml │ │ │ ├── BannerCustomDao.xml │ │ │ ├── ArticleDao.xml │ │ │ ├── RelationCustomDao.xml │ │ │ └── UserDao.xml │ ├── lib │ │ ├── jstl-1.2.jar │ │ ├── jedis-2.9.0.jar │ │ ├── junit-4.12.jar │ │ ├── okio-1.14.0.jar │ │ ├── c3p0-0.9.1.2.jar │ │ ├── mybatis-3.4.4.jar │ │ ├── okhttp-3.10.0.jar │ │ ├── slf4j-api-1.7.25.jar │ │ ├── standard-1.1.2.jar │ │ ├── hamcrest-core-1.3.jar │ │ ├── jackson-core-2.9.8.jar │ │ ├── logback-core-1.2.3.jar │ │ ├── commons-logging-1.2.jar │ │ ├── commons-pool2-2.4.2.jar │ │ ├── logback-classic-1.2.3.jar │ │ ├── mybatis-spring-1.3.1.jar │ │ ├── protobuf-java-3.6.1.jar │ │ ├── protostuff-api-1.0.8.jar │ │ ├── protostuff-core-1.0.8.jar │ │ ├── commons-collections-3.2.jar │ │ ├── jackson-databind-2.9.8.jar │ │ ├── javax.servlet-api-4.0.0.jar │ │ ├── jackson-annotations-2.9.0.jar │ │ ├── protostuff-runtime-1.0.8.jar │ │ ├── spring-aop-4.3.16.RELEASE.jar │ │ ├── spring-core-4.3.16.RELEASE.jar │ │ ├── spring-jdbc-4.3.16.RELEASE.jar │ │ ├── spring-test-4.3.16.RELEASE.jar │ │ ├── spring-tx-4.3.16.RELEASE.jar │ │ ├── spring-web-4.3.16.RELEASE.jar │ │ ├── mysql-connector-java-8.0.13.jar │ │ ├── spring-beans-4.3.16.RELEASE.jar │ │ ├── spring-webmvc-4.3.16.RELEASE.jar │ │ ├── spring-context-4.3.16.RELEASE.jar │ │ ├── protostuff-collectionschema-1.0.8.jar │ │ └── spring-expression-4.3.16.RELEASE.jar │ ├── web.xml │ └── jsp │ │ ├── article.jsp │ │ └── main.jsp │ ├── META-INF │ └── MANIFEST.MF │ ├── web.xml │ └── index.jsp ├── headline.iml ├── .idea ├── encodings.xml ├── vcs.xml ├── compiler.xml ├── misc.xml └── inspectionProfiles │ └── Project_Default.xml └── src ├── main ├── resources │ ├── jdbc.properties │ ├── logback.xml │ ├── mybatis-config.xml │ ├── spring │ │ ├── spring-service.xml │ │ ├── spring-web.xml │ │ └── spring-dao.xml │ └── mapper │ │ ├── BannerDao.xml │ │ ├── LikesDao.xml │ │ ├── CollectDao.xml │ │ ├── RelationDao.xml │ │ ├── BannerCustomDao.xml │ │ ├── ArticleDao.xml │ │ ├── RelationCustomDao.xml │ │ └── UserDao.xml ├── java │ └── com │ │ └── nuc │ │ └── calvin │ │ └── ssm │ │ ├── dao │ │ ├── BannerCustomDao.java │ │ ├── LikesDao.java │ │ ├── CollectionDao.java │ │ ├── RelationDao.java │ │ ├── ReplyDao.java │ │ ├── ReplyCustomDao.java │ │ ├── BannerDao.java │ │ ├── CommentDao.java │ │ ├── LikesCustomDao.java │ │ ├── CollectionCustomDao.java │ │ ├── UserDao.java │ │ ├── RelationCustomDao.java │ │ ├── ArticleDao.java │ │ ├── CommentCustomDao.java │ │ ├── UserCustomDao.java │ │ └── ArticleCustomDao.java │ │ ├── utils │ │ ├── CompareValueUtils.java │ │ └── DateConvert.java │ │ ├── service │ │ ├── BannerService.java │ │ ├── ReplyService.java │ │ ├── impl │ │ │ ├── BannerServiceImpl.java │ │ │ ├── ReplyServiceImp.java │ │ │ ├── CommentServiceImp.java │ │ │ ├── CollectServiceImp.java │ │ │ └── LikesServiveImp.java │ │ ├── CollectService.java │ │ ├── LikesService.java │ │ ├── CommentService.java │ │ ├── RelationService.java │ │ ├── ArticleService.java │ │ └── UserService.java │ │ ├── entity │ │ ├── RelationCustom.java │ │ ├── ArticleVo.java │ │ ├── UserVo.java │ │ ├── BannerCustom.java │ │ ├── Banner.java │ │ ├── Relation.java │ │ ├── Likes.java │ │ ├── CollectCustom.java │ │ ├── Collect.java │ │ ├── UserCustom.java │ │ ├── LikesCustom.java │ │ ├── Article.java │ │ ├── Comment.java │ │ ├── ReplyCustom.java │ │ ├── CommentCustom.java │ │ ├── Reply.java │ │ ├── User.java │ │ └── ArticleCustom.java │ │ ├── BaseTest.java │ │ ├── dto │ │ ├── Ok.java │ │ ├── LoginOk.java │ │ ├── UserOk.java │ │ └── ArticleOk.java │ │ └── web │ │ ├── BannerController.java │ │ ├── LikesController.java │ │ ├── RelationController.java │ │ └── CollectController.java └── webapp │ ├── web.xml │ ├── index.jsp │ └── WEB-INF │ └── jsp │ ├── article.jsp │ └── main.jsp └── test └── com └── nuc └── calvin └── ssm └── dao ├── UserCustomDaoTest.java └── UserDaoTest.java /target/classes/META-INF/headline.kotlin_module: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /target/test-classes/META-INF/headline.kotlin_module: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/META-INF/headline.kotlin_module: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /headline.iml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/jstl-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/jstl-1.2.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/jedis-2.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/jedis-2.9.0.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/junit-4.12.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/junit-4.12.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/okio-1.14.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/okio-1.14.0.jar -------------------------------------------------------------------------------- /target/headline/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Built-By: Binean 3 | Created-By: IntelliJ IDEA 4 | Build-Jdk: 1.8.0_201 5 | 6 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/c3p0-0.9.1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/c3p0-0.9.1.2.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/mybatis-3.4.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/mybatis-3.4.4.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/okhttp-3.10.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/okhttp-3.10.0.jar -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/BaseTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/BaseTest.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dto/Ok.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dto/Ok.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/slf4j-api-1.7.25.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/slf4j-api-1.7.25.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/standard-1.1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/standard-1.1.2.jar -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dto/UserOk.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dto/UserOk.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/hamcrest-core-1.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/hamcrest-core-1.3.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/jackson-core-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/jackson-core-2.9.8.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/logback-core-1.2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/logback-core-1.2.3.jar -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/BannerDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/BannerDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/LikesDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/LikesDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/ReplyDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/ReplyDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/UserDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/UserDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dto/ArticleOk.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dto/ArticleOk.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dto/LoginOk.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dto/LoginOk.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/Banner.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/Banner.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/Likes.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/Likes.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/Reply.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/Reply.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/User.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/UserVo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/UserVo.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/commons-logging-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/commons-logging-1.2.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/commons-pool2-2.4.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/commons-pool2-2.4.2.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/logback-classic-1.2.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/logback-classic-1.2.3.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/mybatis-spring-1.3.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/mybatis-spring-1.3.1.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/protobuf-java-3.6.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/protobuf-java-3.6.1.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/protostuff-api-1.0.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/protostuff-api-1.0.8.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/protostuff-core-1.0.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/protostuff-core-1.0.8.jar -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/ArticleDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/ArticleDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/CommentDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/CommentDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/RelationDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/RelationDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/Article.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/Article.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/Collect.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/Collect.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/Comment.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/Comment.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/Relation.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/Relation.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/commons-collections-3.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/commons-collections-3.2.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/jackson-databind-2.9.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/jackson-databind-2.9.8.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/javax.servlet-api-4.0.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/javax.servlet-api-4.0.0.jar -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/CollectionDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/CollectionDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/LikesCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/LikesCustomDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/ReplyCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/ReplyCustomDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/UserCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/UserCustomDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/ArticleVo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/ArticleVo.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/LikesCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/LikesCustom.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/ReplyCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/ReplyCustom.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/UserCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/UserCustom.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/utils/DateConvert.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/utils/DateConvert.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/web/UserController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/web/UserController.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/jackson-annotations-2.9.0.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/jackson-annotations-2.9.0.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/protostuff-runtime-1.0.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/protostuff-runtime-1.0.8.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/spring-aop-4.3.16.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/spring-aop-4.3.16.RELEASE.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/spring-core-4.3.16.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/spring-core-4.3.16.RELEASE.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/spring-jdbc-4.3.16.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/spring-jdbc-4.3.16.RELEASE.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/spring-test-4.3.16.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/spring-test-4.3.16.RELEASE.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/spring-tx-4.3.16.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/spring-tx-4.3.16.RELEASE.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/spring-web-4.3.16.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/spring-web-4.3.16.RELEASE.jar -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/ArticleCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/ArticleCustomDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/BannerCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/BannerCustomDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/CommentCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/CommentCustomDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/ArticleCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/ArticleCustom.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/BannerCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/BannerCustom.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/CollectCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/CollectCustom.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/CommentCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/CommentCustom.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/LikesService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/LikesService.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/ReplyService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/ReplyService.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/UserService.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/web/BannerController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/web/BannerController.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/web/LikesController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/web/LikesController.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/mysql-connector-java-8.0.13.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/mysql-connector-java-8.0.13.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/spring-beans-4.3.16.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/spring-beans-4.3.16.RELEASE.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/spring-webmvc-4.3.16.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/spring-webmvc-4.3.16.RELEASE.jar -------------------------------------------------------------------------------- /target/test-classes/com/nuc/calvin/ssm/dao/UserDaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/test-classes/com/nuc/calvin/ssm/dao/UserDaoTest.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/CollectionCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/CollectionCustomDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/dao/RelationCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/dao/RelationCustomDao.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/entity/RelationCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/entity/RelationCustom.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/ArticleService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/ArticleService.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/BannerService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/BannerService.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/CollectService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/CollectService.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/CommentService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/CommentService.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/RelationService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/RelationService.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/utils/CompareValueUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/utils/CompareValueUtils.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/web/ArticleController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/web/ArticleController.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/web/CollectController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/web/CollectController.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/web/CommentController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/web/CommentController.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/web/RelationController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/web/RelationController.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dto/Ok.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dto/Ok.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/spring-context-4.3.16.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/spring-context-4.3.16.RELEASE.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/BaseTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/BaseTest.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/protostuff-collectionschema-1.0.8.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/protostuff-collectionschema-1.0.8.jar -------------------------------------------------------------------------------- /target/headline/WEB-INF/lib/spring-expression-4.3.16.RELEASE.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/lib/spring-expression-4.3.16.RELEASE.jar -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/impl/LikesServiveImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/impl/LikesServiveImp.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/impl/ReplyServiceImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/impl/ReplyServiceImp.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/impl/UserServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/impl/UserServiceImpl.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/UserDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/UserDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dto/LoginOk.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dto/LoginOk.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dto/UserOk.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dto/UserOk.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/User.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/User.class -------------------------------------------------------------------------------- /target/test-classes/com/nuc/calvin/ssm/dao/UserCustomDaoTest.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/test-classes/com/nuc/calvin/ssm/dao/UserCustomDaoTest.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/impl/ArticleServiceImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/impl/ArticleServiceImp.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/impl/BannerServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/impl/BannerServiceImpl.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/impl/CollectServiceImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/impl/CollectServiceImp.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/impl/CommentServiceImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/impl/CommentServiceImp.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/BannerDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/BannerDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/LikesDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/LikesDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/ReplyDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/ReplyDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dto/ArticleOk.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dto/ArticleOk.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Banner.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Banner.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Likes.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Likes.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Reply.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Reply.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/UserVo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/UserVo.class -------------------------------------------------------------------------------- /target/classes/com/nuc/calvin/ssm/service/impl/RelationServiceImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/classes/com/nuc/calvin/ssm/service/impl/RelationServiceImp.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/ArticleDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/ArticleDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/CommentDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/CommentDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/RelationDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/RelationDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Article.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Article.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/ArticleVo.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/ArticleVo.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Collect.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Collect.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Comment.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Comment.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Relation.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/Relation.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/CollectionDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/CollectionDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/LikesCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/LikesCustomDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/ReplyCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/ReplyCustomDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/UserCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/UserCustomDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/LikesCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/LikesCustom.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/ReplyCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/ReplyCustom.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/UserCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/UserCustom.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/utils/DateConvert.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/utils/DateConvert.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/UserController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/UserController.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/ArticleCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/ArticleCustomDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/BannerCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/BannerCustomDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/CommentCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/CommentCustomDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/RelationCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/RelationCustomDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/ArticleCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/ArticleCustom.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/BannerCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/BannerCustom.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/CollectCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/CollectCustom.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/CommentCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/CommentCustom.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/RelationCustom.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/entity/RelationCustom.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/BannerService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/BannerService.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/LikesService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/LikesService.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/ReplyService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/ReplyService.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/UserService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/UserService.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/ArticleController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/ArticleController.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/BannerController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/BannerController.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/CollectController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/CollectController.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/CommentController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/CommentController.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/LikesController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/LikesController.class -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/CollectionCustomDao.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/dao/CollectionCustomDao.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/ArticleService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/ArticleService.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/CollectService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/CollectService.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/CommentService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/CommentService.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/RelationService.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/RelationService.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/utils/CompareValueUtils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/utils/CompareValueUtils.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/RelationController.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/web/RelationController.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/LikesServiveImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/LikesServiveImp.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/ReplyServiceImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/ReplyServiceImp.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/UserServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/UserServiceImpl.class -------------------------------------------------------------------------------- /src/main/resources/jdbc.properties: -------------------------------------------------------------------------------- 1 | jdbc.driver=com.mysql.cj.jdbc.Driver 2 | jdbc.url=jdbc:mysql://localhost:3306/headline?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC 3 | jdbc.username=root 4 | jdbc.password=even0704 -------------------------------------------------------------------------------- /target/classes/jdbc.properties: -------------------------------------------------------------------------------- 1 | jdbc.driver=com.mysql.cj.jdbc.Driver 2 | jdbc.url=jdbc:mysql://localhost:3306/headline?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC 3 | jdbc.username=root 4 | jdbc.password=even0704 -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/ArticleServiceImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/ArticleServiceImp.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/BannerServiceImpl.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/BannerServiceImpl.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/CollectServiceImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/CollectServiceImp.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/CommentServiceImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/CommentServiceImp.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/RelationServiceImp.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenzhibin66/SSM/HEAD/target/headline/WEB-INF/classes/com/nuc/calvin/ssm/service/impl/RelationServiceImp.class -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/jdbc.properties: -------------------------------------------------------------------------------- 1 | jdbc.driver=com.mysql.cj.jdbc.Driver 2 | jdbc.url=jdbc:mysql://localhost:3306/headline?useUnicode=true&characterEncoding=utf8&serverTimezone=UTC 3 | jdbc.username=root 4 | jdbc.password=even0704 -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/BannerCustomDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.Banner; 4 | import com.nuc.calvin.ssm.entity.BannerCustom; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author Calvin 10 | * @Description: 11 | */ 12 | public interface BannerCustomDao { 13 | 14 | List queryAllBanner(); 15 | } 16 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/utils/CompareValueUtils.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.utils; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class CompareValueUtils { 8 | public static boolean isEquals(String value_1, String value_2) { 9 | if (value_1.equals(value_2)) { 10 | return true; 11 | } 12 | return false; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/BannerService.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service; 2 | 3 | import com.nuc.calvin.ssm.entity.BannerCustom; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public interface BannerService { 12 | /** 13 | * 查询所有广告 14 | * 15 | * @return 16 | */ 17 | List queryAllBanner(); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/LikesDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.Likes; 4 | 5 | /** 6 | * @author Calvin 7 | * @Description: 8 | */ 9 | public interface LikesDao { 10 | 11 | int insert(Likes likes); 12 | 13 | Likes queryByLikesId(Integer likesId); 14 | 15 | int updateByLikesId(Likes likes); 16 | 17 | int deleteByLikesId(Integer likesId); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/RelationCustom.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class RelationCustom extends Relation { 8 | 9 | private UserCustom user; 10 | 11 | public UserCustom getUser() { 12 | return user; 13 | } 14 | 15 | public void setUser(UserCustom user) { 16 | this.user = user; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/CollectionDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.Collect; 4 | 5 | /** 6 | * @author Calvin 7 | * @Description: 8 | */ 9 | public interface CollectionDao { 10 | 11 | int insert(Collect collect); 12 | 13 | Collect queryByCollectId(Integer collectId); 14 | 15 | 16 | int updateByCollectId(Collect collect); 17 | 18 | int deleteByCollectId(Integer collectId); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/RelationDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.Relation; 4 | 5 | /** 6 | * @author Calvin 7 | * @Description: 8 | */ 9 | public interface RelationDao { 10 | 11 | int insertRelation(Relation relation); 12 | 13 | Relation queryByRelationId(Integer relationId); 14 | 15 | int updateByRelationId(Relation relation); 16 | 17 | int deleteByRelationId(Integer relationId); 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/ArticleVo.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class ArticleVo { 8 | 9 | private ArticleCustom articleCustom; 10 | 11 | public ArticleCustom getArticleCustom() { 12 | return articleCustom; 13 | } 14 | 15 | public void setArticleCustom(ArticleCustom articleCustom) { 16 | this.articleCustom = articleCustom; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/UserVo.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class UserVo { 8 | /** 9 | * User扩展类 10 | */ 11 | private UserCustom userCustom; 12 | 13 | public UserCustom getUserCustom() { 14 | return userCustom; 15 | } 16 | 17 | public void setUserCustom(UserCustom userCustom) { 18 | this.userCustom = userCustom; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /target/classes/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/resources/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/logback.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/BaseTest.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm; 2 | 3 | import org.junit.runner.RunWith; 4 | import org.springframework.test.context.ContextConfiguration; 5 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description:配置spring和junit整合,junit启动时加载springIOC容器 10 | */ 11 | @RunWith(SpringJUnit4ClassRunner.class) 12 | /** 13 | * 告诉junit spring配置文件的位置 14 | */ 15 | @ContextConfiguration({"classpath:spring/spring-dao.xml","classpath:spring/spring-service.xml"}) 16 | public class BaseTest { 17 | } 18 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dto/Ok.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dto; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class Ok { 8 | private int code ; 9 | private String msg ; 10 | 11 | public Ok(int code, String msg) { 12 | this.code = code; 13 | this.msg = msg; 14 | } 15 | 16 | public int getCode() { 17 | return code; 18 | } 19 | 20 | public void setCode(int code) { 21 | this.code = code; 22 | } 23 | 24 | public String getMsg() { 25 | return msg; 26 | } 27 | 28 | public void setMsg(String msg) { 29 | this.msg = msg; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /target/classes/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/BannerCustom.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class BannerCustom extends Banner { 8 | 9 | 10 | /** 11 | * 广告所属的文章 一对一关系 12 | */ 13 | private Article article; 14 | private User user; 15 | 16 | public User getUser() { 17 | return user; 18 | } 19 | 20 | public void setUser(User user) { 21 | this.user = user; 22 | } 23 | 24 | public Article getArticle() { 25 | return article; 26 | } 27 | 28 | public void setArticle(Article article) { 29 | this.article = article; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/ReplyDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.Reply; 4 | 5 | /** 6 | * @author Calvin 7 | * @Description: 8 | */ 9 | public interface ReplyDao { 10 | /** 11 | * 插入 12 | * @param reply 13 | * @return 14 | */ 15 | int insert(Reply reply); 16 | 17 | /** 18 | * 查询 19 | * @param replyId 20 | * @return 21 | */ 22 | Reply queryByReplyId(Integer replyId); 23 | 24 | /** 25 | * 更新 26 | * @param reply 27 | * @return 28 | */ 29 | int updateByReplyId(Reply reply); 30 | 31 | /** 32 | * 删除 33 | * @param replyId 34 | * @return 35 | */ 36 | int deleteByReplyId(Integer replyId); 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/ReplyService.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service; 2 | 3 | import com.nuc.calvin.ssm.entity.ReplyCustom; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public interface ReplyService { 12 | /** 13 | * 添加回复 14 | * 15 | * @param replyCustom 16 | */ 17 | void addReply(ReplyCustom replyCustom); 18 | 19 | /** 20 | * 遍历commentId的回复 21 | * 22 | * @param commentId 23 | * @return 24 | */ 25 | List queryReply(int commentId); 26 | 27 | /** 28 | * 根据userId查询回复列表 29 | * 30 | * @param userId 31 | * @return 32 | */ 33 | List queryReplyByUserId(Integer userId); 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/ReplyCustomDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.Relation; 4 | import com.nuc.calvin.ssm.entity.ReplyCustom; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author Calvin 10 | * @Description: 11 | */ 12 | public interface ReplyCustomDao { 13 | 14 | /** 15 | * 添加回复 16 | * 17 | * @param custom 18 | */ 19 | void addReply(ReplyCustom custom); 20 | 21 | /** 22 | * 根据评论id遍历回复 23 | * 24 | * @param commentId 25 | * @return 26 | */ 27 | List queryReply(int commentId); 28 | 29 | /** 30 | * 根据userId查询回复列表 31 | * 32 | * @param userId 33 | * @return 34 | */ 35 | List queryReplyByUserId(Integer userId); 36 | } 37 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/BannerDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.Banner; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public interface BannerDao { 12 | 13 | /** 14 | * 根据广告id查询广告 15 | * 16 | * @param bannerId 17 | * @return 18 | */ 19 | Banner queryBannerById(int bannerId); 20 | 21 | /** 22 | * 插入一条广告 23 | * @param banner 24 | * @return 25 | */ 26 | int insertBanner(Banner banner); 27 | 28 | /** 29 | * 更新一条广告 30 | * @param banner 31 | * @return 32 | */ 33 | int updateBanner(Banner banner); 34 | 35 | /** 36 | * 根据id删除广告 37 | * @param bannerId 38 | * @return 39 | */ 40 | int deleteBanner(int bannerId); 41 | } 42 | -------------------------------------------------------------------------------- /src/test/com/nuc/calvin/ssm/dao/UserCustomDaoTest.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.BaseTest; 4 | import com.nuc.calvin.ssm.entity.User; 5 | import com.nuc.calvin.ssm.entity.UserCustom; 6 | import org.junit.Test; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | 9 | import java.util.Date; 10 | import java.util.List; 11 | 12 | /** 13 | * @author Calvin 14 | * @Description: 15 | */ 16 | public class UserCustomDaoTest extends BaseTest { 17 | 18 | @Autowired 19 | private UserCustomDao userCustomDao; 20 | 21 | @Test 22 | public void test() { 23 | User user = new User(); 24 | user.setUsername("calvin"); 25 | user.setEmail("809122566@qq.com"); 26 | user.setPassword("000000"); 27 | userCustomDao.insertUser(user); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/CommentDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.Comment; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public interface CommentDao { 12 | /** 13 | * 根据评论id删除评论 14 | * @param commentId 15 | * @return 16 | */ 17 | int deleteByCommentId(Integer commentId); 18 | 19 | /** 20 | * 增加评论 21 | * @param comment 22 | * @return 23 | */ 24 | int insert(Comment comment); 25 | 26 | 27 | /** 28 | * 根据评论id查询评论 29 | * @param commentId 30 | * @return 31 | */ 32 | Comment queryByCommentId(Integer commentId); 33 | 34 | /** 35 | *更新评论内容 36 | * @param comment 37 | * @return 38 | */ 39 | int updateByCommentId(Comment comment); 40 | } 41 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /src/test/com/nuc/calvin/ssm/dao/UserDaoTest.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.BaseTest; 4 | import com.nuc.calvin.ssm.entity.User; 5 | import org.junit.Test; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * @author Calvin 12 | * @Description: 13 | */ 14 | public class UserDaoTest extends BaseTest { 15 | 16 | @Autowired 17 | private UserDao userDao; 18 | 19 | @Test 20 | public void query() { 21 | List userList = userDao.queryUserAll(); 22 | for(User user:userList){ 23 | System.out.println(user.toString()); 24 | } 25 | } 26 | 27 | @Test 28 | public void query1(){ 29 | User user=userDao.queryUserById(1); 30 | System.out.println(user.toString()); 31 | } 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/LikesCustomDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.LikesCustom; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public interface LikesCustomDao { 12 | /** 13 | * 点赞 14 | * 15 | * @param likesCustom 16 | */ 17 | void like(LikesCustom likesCustom); 18 | 19 | /** 20 | * 取消赞 21 | * 22 | * @param likesCustom 23 | */ 24 | void unLike(LikesCustom likesCustom); 25 | 26 | /** 27 | * 检查是否赞 28 | * 29 | * @param likesCustom 30 | * @return 31 | */ 32 | List queryIsLike(LikesCustom likesCustom); 33 | 34 | /** 35 | * 查询被赞记录 36 | * @param userId 37 | * @return 38 | */ 39 | List queryLikesByUserId(Integer userId); 40 | 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/CollectionCustomDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.CollectCustom; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public interface CollectionCustomDao { 12 | /** 13 | * 收藏 14 | * 15 | * @param collectCustom 16 | */ 17 | void collect(CollectCustom collectCustom); 18 | 19 | /** 20 | * 取消收藏 21 | * 22 | * @param collectCustom 23 | */ 24 | void uncollect(CollectCustom collectCustom); 25 | 26 | /** 27 | * 该用户是否收藏 28 | * 29 | * @param collectCustom 30 | * @return 31 | */ 32 | List isCollect(CollectCustom collectCustom); 33 | 34 | /** 35 | * 查询我的收藏列表 36 | * @return 37 | */ 38 | List queryAllCollection(Integer userId); 39 | } 40 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/impl/BannerServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service.impl; 2 | 3 | import com.nuc.calvin.ssm.dao.BannerCustomDao; 4 | import com.nuc.calvin.ssm.entity.BannerCustom; 5 | import com.nuc.calvin.ssm.service.BannerService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import java.util.ArrayList; 11 | import java.util.List; 12 | 13 | /** 14 | * @author Calvin 15 | * @Description: 16 | */ 17 | @Transactional(rollbackFor = Exception.class) 18 | @Service("bannerService") 19 | public class BannerServiceImpl implements BannerService { 20 | 21 | @Autowired 22 | private BannerCustomDao bannerCustomDao; 23 | 24 | @Override 25 | public List queryAllBanner() { 26 | return bannerCustomDao.queryAllBanner(); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dto/LoginOk.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dto; 2 | 3 | import com.nuc.calvin.ssm.entity.User; 4 | 5 | /** 6 | * @author Calvin 7 | * @Description: 8 | */ 9 | public class LoginOk { 10 | private int code; 11 | private String msg; 12 | private User user; 13 | 14 | public LoginOk(int code, String msg, User user) { 15 | this.code = code; 16 | this.msg = msg; 17 | this.user = user; 18 | } 19 | 20 | public int getCode() { 21 | return code; 22 | } 23 | 24 | public void setCode(int code) { 25 | this.code = code; 26 | } 27 | 28 | public String getMsg() { 29 | return msg; 30 | } 31 | 32 | public void setMsg(String msg) { 33 | this.msg = msg; 34 | } 35 | 36 | public User getUser() { 37 | return user; 38 | } 39 | 40 | public void setUser(User user) { 41 | this.user = user; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/UserDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.User; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public interface UserDao { 12 | /** 13 | * 通过id删除用户 14 | * 15 | * @param userId 16 | * @return 17 | */ 18 | int deleteUserById(Integer userId); 19 | 20 | /** 21 | * 注册用户 22 | * 23 | * @param user 24 | * @return 25 | */ 26 | int insertUser(User user); 27 | 28 | /** 29 | * 通过id查询用户 30 | * 31 | * @param userId 32 | * @return 33 | */ 34 | User queryUserById(int userId); 35 | 36 | /** 37 | * 查询所有用户 38 | * 39 | * @return 40 | */ 41 | List queryUserAll(); 42 | 43 | /** 44 | * 修改用户信息 45 | * 46 | * @param user 47 | * @return 48 | */ 49 | int updateUser(User user); 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/Banner.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class Banner { 8 | /** 9 | * 广告id 10 | */ 11 | private Integer bannerId; 12 | /** 13 | * 文章id 14 | */ 15 | private Integer articleId; 16 | 17 | private String bannerImage; 18 | 19 | public Integer getBannerId() { 20 | return bannerId; 21 | } 22 | 23 | public void setBannerId(Integer bannerId) { 24 | this.bannerId = bannerId; 25 | } 26 | 27 | public Integer getArticleId() { 28 | return articleId; 29 | } 30 | 31 | public void setArticleId(Integer articleId) { 32 | this.articleId = articleId; 33 | } 34 | 35 | public String getBannerImage() { 36 | return bannerImage; 37 | } 38 | 39 | public void setBannerImage(String bannerImage) { 40 | this.bannerImage = bannerImage; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/RelationCustomDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.Relation; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public interface RelationCustomDao { 12 | /** 13 | * 查询相互关注 14 | * 15 | * @param relation 16 | * @return 17 | */ 18 | List queryMutual(Relation relation); 19 | 20 | /** 21 | * 查询单方关注 22 | * 23 | * @param relation 24 | * @return 25 | */ 26 | List queryUnilateral(Relation relation); 27 | 28 | /** 29 | * 关注 30 | * 31 | * @param relation 32 | */ 33 | void follow(Relation relation); 34 | 35 | /** 36 | * 取关 37 | * 38 | * @param relation 39 | */ 40 | void unFollow(Relation relation); 41 | 42 | /** 43 | * 改变关注状态 44 | * @param relation 45 | */ 46 | void Status(Relation relation); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/CollectService.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service; 2 | 3 | import com.nuc.calvin.ssm.entity.CollectCustom; 4 | import org.springframework.transaction.annotation.Transactional; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author Calvin 10 | * @Description: 11 | */ 12 | public interface CollectService { 13 | /** 14 | * 收藏 15 | * 16 | * @param collectCustom 17 | */ 18 | void collect(CollectCustom collectCustom); 19 | 20 | /** 21 | * 取消收藏 22 | * 23 | * @param collectCustom 24 | */ 25 | void unCollect(CollectCustom collectCustom); 26 | 27 | /** 28 | * 该用户是否收藏 0---否 1---是 29 | * 30 | * @param userId 31 | * @param articleId 32 | * @return 33 | */ 34 | int isCollect(Integer userId, Integer articleId); 35 | 36 | /** 37 | * 查询我的收藏列表 38 | * @param userId 39 | * @return 40 | */ 41 | List queryMyCollection(Integer userId); 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/LikesService.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service; 2 | 3 | import com.nuc.calvin.ssm.entity.LikesCustom; 4 | import org.springframework.transaction.annotation.Transactional; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author Calvin 10 | * @Description: 11 | */ 12 | public interface LikesService { 13 | /** 14 | * 点赞 15 | * @param articleId 16 | * @param userId 17 | */ 18 | void like(Integer articleId, Integer userId); 19 | 20 | /** 21 | * 取消赞 22 | * @param articleId 23 | * @param userId 24 | */ 25 | void unLike(Integer articleId,Integer userId); 26 | 27 | /** 28 | * 是否赞 0----否 1---是 29 | * @param userId 30 | * @param articleId 31 | * @return 32 | */ 33 | int isLike(Integer userId,Integer articleId); 34 | 35 | /** 36 | * 查询用户被赞过信息 37 | * @param userId 38 | * @return 39 | */ 40 | List queryLikesByUserId(Integer userId); 41 | } 42 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/ArticleDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.Article; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public interface ArticleDao { 12 | /** 13 | * 插入文章 14 | * 15 | * @param article 16 | * @return 17 | */ 18 | int insertArticle(Article article); 19 | 20 | /** 21 | * 通过id查询文章 22 | * 23 | * @param articleId 24 | * @return 25 | */ 26 | int queryArticleById(Integer articleId); 27 | 28 | /** 29 | * 通过id删除文章 30 | * 31 | * @param articleId 32 | * @return 33 | */ 34 | int deleteArticleById(Integer articleId); 35 | 36 | /** 37 | * 根据id修改文章url 38 | * @param article 39 | * @return 40 | */ 41 | int updateArticleById(Article article); 42 | 43 | /** 44 | * 查询所有文章 45 | * 46 | * @return 47 | */ 48 | List
queryAllArticle(); 49 | 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dto/UserOk.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dto; 2 | 3 | import com.nuc.calvin.ssm.entity.UserCustom; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public class UserOk { 12 | private int code; 13 | private String msg; 14 | private List user; 15 | 16 | public UserOk(int code, String msg, List user) { 17 | this.code = code; 18 | this.msg = msg; 19 | this.user = user; 20 | } 21 | 22 | public int getCode() { 23 | return code; 24 | } 25 | 26 | public void setCode(int code) { 27 | this.code = code; 28 | } 29 | 30 | public String getMsg() { 31 | return msg; 32 | } 33 | 34 | public void setMsg(String msg) { 35 | this.msg = msg; 36 | } 37 | 38 | public List getUser() { 39 | return user; 40 | } 41 | 42 | public void setUser(List user) { 43 | this.user = user; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/CommentService.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service; 2 | 3 | import com.nuc.calvin.ssm.entity.CommentCustom; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public interface CommentService { 12 | /** 13 | * 评论 14 | * 15 | * @param commentCustom 16 | */ 17 | void addComment(CommentCustom commentCustom); 18 | 19 | /** 20 | * 查询文章下的评论 21 | * 22 | * @param articleId 23 | * @return 24 | */ 25 | List queryComment(Integer articleId); 26 | 27 | /** 28 | * 查询评论下回复数 29 | * 30 | * @param commentId 31 | * @return 32 | */ 33 | int queryCountReply(Integer commentId); 34 | 35 | /** 36 | * 根据id删除评论 37 | * @param commentId 38 | */ 39 | void deleteCommentById(Integer commentId); 40 | 41 | /** 42 | * 根据userId查询评论列表 43 | * @param userId 44 | * @return 45 | */ 46 | List queryCommentByUserId(Integer userId); 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/CommentCustomDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.CommentCustom; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public interface CommentCustomDao { 12 | /** 13 | * 评论 14 | * 15 | * @param commentCustom 16 | */ 17 | void addComment(CommentCustom commentCustom); 18 | 19 | /** 20 | * 查询文章的评论 21 | * 22 | * @param articleId 23 | * @return 24 | */ 25 | List queryComment(Integer articleId); 26 | 27 | /** 28 | * 查询评下下回复数量 29 | * 30 | * @param commentId 31 | * @return 32 | */ 33 | int queryCountReply(Integer commentId); 34 | 35 | /** 36 | * 删除评论 37 | * 38 | * @param commentId 39 | */ 40 | void deleteCommentById(Integer commentId); 41 | 42 | /** 43 | * 根据userId查询评论列表 44 | * @param userId 45 | * @return 46 | */ 47 | List queryCommentByUserId(Integer userId); 48 | } 49 | -------------------------------------------------------------------------------- /src/main/webapp/web.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | mvc-dispatcher 9 | org.springframework.web.servlet.DispatcherServlet 10 | 14 | 15 | contextConfigLocation 16 | classpath:spring/spring-*.xml 17 | 18 | 19 | 20 | mvc-dispatcher 21 | 22 | / 23 | 24 | -------------------------------------------------------------------------------- /target/headline/web.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | mvc-dispatcher 9 | org.springframework.web.servlet.DispatcherServlet 10 | 14 | 15 | contextConfigLocation 16 | classpath:spring/spring-*.xml 17 | 18 | 19 | 20 | mvc-dispatcher 21 | 22 | / 23 | 24 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | mvc-dispatcher 9 | org.springframework.web.servlet.DispatcherServlet 10 | 14 | 15 | contextConfigLocation 16 | classpath:spring/spring-*.xml 17 | 18 | 19 | 20 | mvc-dispatcher 21 | 22 | / 23 | 24 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/RelationService.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service; 2 | 3 | import com.nuc.calvin.ssm.entity.Relation; 4 | 5 | import java.util.List; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public interface RelationService { 12 | /** 13 | * 查询相互关注 14 | * 15 | * @param relation 16 | * @return 17 | */ 18 | List queryMutual(Relation relation); 19 | 20 | /** 21 | * 查询是否单方关注 22 | * 23 | * @param relation 24 | * @return 25 | */ 26 | List queryUnilateral(Relation relation); 27 | 28 | /** 29 | * 关注 30 | * 31 | * @param relation 32 | * @param flag 33 | */ 34 | void follow(Relation relation, int flag); 35 | 36 | /** 37 | * 取关 38 | * 39 | * @param relation 40 | * @param flag 41 | */ 42 | void unFollow(Relation relation, int flag); 43 | 44 | /** 45 | * 查询关系 46 | * 47 | * @param userId 48 | * @param followId 49 | * @return 50 | */ 51 | int queryRelation(Integer userId, Integer followId); 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dto/ArticleOk.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dto; 2 | 3 | import com.nuc.calvin.ssm.entity.Article; 4 | import com.nuc.calvin.ssm.entity.ArticleCustom; 5 | 6 | import java.util.List; 7 | 8 | /** 9 | * @author Calvin 10 | * @Description: 11 | */ 12 | public class ArticleOk { 13 | private int code; 14 | private String msg; 15 | private List articles; 16 | 17 | public ArticleOk(int code, String msg, List articles) { 18 | this.code = code; 19 | this.msg = msg; 20 | this.articles = articles; 21 | } 22 | 23 | public int getCode() { 24 | return code; 25 | } 26 | 27 | public void setCode(int code) { 28 | this.code = code; 29 | } 30 | 31 | public String getMsg() { 32 | return msg; 33 | } 34 | 35 | public void setMsg(String msg) { 36 | this.msg = msg; 37 | } 38 | 39 | public List getArticles() { 40 | return articles; 41 | } 42 | 43 | public void setArticles(List articles) { 44 | this.articles = articles; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | IT头条信息管理系统 5 | 20 | 21 | 22 | 23 |
24 |
25 | 欢迎来到IT头条信息管理系统 26 |

27 |
28 | 账户:
29 |
30 | 31 | 密码:
32 |
33 | 34 | 35 | 36 |
37 |
38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /target/headline/index.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | IT头条信息管理系统 5 | 20 | 21 | 22 | 23 |
24 |
25 | 欢迎来到IT头条信息管理系统 26 |

27 |
28 | 账户:
29 |
30 | 31 | 密码:
32 |
33 | 34 | 35 | 36 |
37 |
38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/utils/DateConvert.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.utils; 2 | 3 | import java.text.ParseException; 4 | import java.text.ParsePosition; 5 | import java.text.SimpleDateFormat; 6 | import java.util.Date; 7 | 8 | /** 9 | * @author Calvin 10 | * @Description: 11 | */ 12 | public class DateConvert { 13 | public static Date convert2Date(String bir) throws ParseException { 14 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 15 | ParsePosition pos = new ParsePosition(0); 16 | Date date = sdf.parse(bir); 17 | return date; 18 | } 19 | 20 | public static String convert2d(Date date){ 21 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 22 | return sdf.format(date); 23 | } 24 | 25 | public static String convert2s(Date date){ 26 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 27 | return sdf.format(date); 28 | } 29 | 30 | public static String convert2json(Long l){ 31 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 32 | Date date = new Date(l); 33 | return sdf.format(date); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/Relation.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class Relation { 8 | /** 9 | * 相关id 10 | */ 11 | private Integer relationId; 12 | /** 13 | * 用户id 14 | */ 15 | private Integer userId; 16 | /** 17 | *关注的用户的id 18 | */ 19 | private Integer followId; 20 | /** 21 | * 22 | */ 23 | private Integer state; 24 | 25 | public Integer getRelationId() { 26 | return relationId; 27 | } 28 | 29 | public void setRelationId(Integer relationId) { 30 | this.relationId = relationId; 31 | } 32 | 33 | public Integer getUserId() { 34 | return userId; 35 | } 36 | 37 | public void setUserId(Integer userId) { 38 | this.userId = userId; 39 | } 40 | 41 | public Integer getFollowId() { 42 | return followId; 43 | } 44 | 45 | public void setFollowId(Integer followId) { 46 | this.followId = followId; 47 | } 48 | 49 | public Integer getState() { 50 | return state; 51 | } 52 | 53 | public void setState(Integer state) { 54 | this.state = state; 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/web/BannerController.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.web; 2 | 3 | import com.nuc.calvin.ssm.entity.BannerCustom; 4 | import com.nuc.calvin.ssm.service.BannerService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.web.bind.annotation.RequestMapping; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | 10 | import javax.servlet.http.HttpSession; 11 | import java.util.List; 12 | 13 | /** 14 | * @author Calvin 15 | * @Description: 16 | */ 17 | @Controller("bannerController") 18 | @RequestMapping("/banner") 19 | public class BannerController { 20 | 21 | @Autowired 22 | private BannerService bannerService; 23 | 24 | @ResponseBody 25 | @RequestMapping("/queryAllBanner") 26 | public List queryAllBanner() { 27 | List list = bannerService.queryAllBanner(); 28 | return list; 29 | } 30 | 31 | @RequestMapping("/bannerManage") 32 | public String getAllBanner(HttpSession session) { 33 | List banners = bannerService.queryAllBanner(); 34 | session.setAttribute("banner", banners); 35 | return "banner"; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/Likes.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * @author Calvin 7 | * @Description: 8 | */ 9 | public class Likes { 10 | /** 11 | * 点赞id 12 | */ 13 | private Integer likesId; 14 | /** 15 | * 点赞用户的id 16 | */ 17 | private Integer userId; 18 | /** 19 | * 被点赞的文章 20 | */ 21 | private Integer articleId; 22 | /** 23 | * 点赞的时间 24 | */ 25 | private Date likesTime; 26 | 27 | 28 | 29 | public Integer getLikesId() { 30 | return likesId; 31 | } 32 | 33 | public void setLikesId(Integer likesId) { 34 | this.likesId = likesId; 35 | } 36 | 37 | public Integer getUserId() { 38 | return userId; 39 | } 40 | 41 | public void setUserId(Integer userId) { 42 | this.userId = userId; 43 | } 44 | 45 | public Integer getArticleId() { 46 | return articleId; 47 | } 48 | 49 | public void setArticleId(Integer articleId) { 50 | this.articleId = articleId; 51 | } 52 | 53 | public Date getLikesTime() { 54 | return likesTime; 55 | } 56 | 57 | public void setLikeTime(Date likeTime) { 58 | this.likesTime = likeTime; 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/CollectCustom.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class CollectCustom extends Collect{ 8 | private String date; 9 | private String username; 10 | private String userImg; 11 | 12 | private UserCustom user; 13 | private ArticleCustom article; 14 | 15 | public String getDate() { 16 | return date; 17 | } 18 | 19 | public void setDate(String date) { 20 | this.date = date; 21 | } 22 | 23 | public String getUsername() { 24 | return username; 25 | } 26 | 27 | public void setUsername(String username) { 28 | this.username = username; 29 | } 30 | 31 | public String getUserImg() { 32 | return userImg; 33 | } 34 | 35 | public void setUserImg(String userImg) { 36 | this.userImg = userImg; 37 | } 38 | 39 | public UserCustom getUser() { 40 | return user; 41 | } 42 | 43 | public void setUser(UserCustom user) { 44 | this.user = user; 45 | } 46 | 47 | public ArticleCustom getArticle() { 48 | return article; 49 | } 50 | 51 | public void setArticle(ArticleCustom article) { 52 | this.article = article; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/Collect.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * @author Calvin 7 | * @Description: 8 | */ 9 | public class Collect { 10 | /** 11 | * 收藏id 12 | */ 13 | private Integer collectId; 14 | /** 15 | * 文章id 16 | */ 17 | private Integer ArticleId; 18 | /** 19 | * 用户id 20 | */ 21 | private Integer userId; 22 | /** 23 | * 收藏时间 24 | */ 25 | private Date collectTime; 26 | 27 | public Integer getCollectId() { 28 | return collectId; 29 | } 30 | 31 | public void setCollectId(Integer collectId) { 32 | this.collectId = collectId; 33 | } 34 | 35 | public Integer getArticleId() { 36 | return ArticleId; 37 | } 38 | 39 | public void setArticleId(Integer articleId) { 40 | ArticleId = articleId; 41 | } 42 | 43 | public Integer getUserId() { 44 | return userId; 45 | } 46 | 47 | public void setUserId(Integer userId) { 48 | this.userId = userId; 49 | } 50 | 51 | public Date getCollectTime() { 52 | return collectTime; 53 | } 54 | 55 | public void setCollectTime(Date collectTime) { 56 | this.collectTime = collectTime; 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/UserCustom.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class UserCustom extends User { 8 | /** 9 | * 用户关系 0——未关注 1——已关注 2——相互关注 10 | */ 11 | private Relation relation; 12 | 13 | /** 14 | * 文章数 15 | */ 16 | private int articleCount; 17 | /** 18 | * 关注数 19 | */ 20 | private int followCount; 21 | /** 22 | * 粉丝数 23 | */ 24 | private int fansCount; 25 | 26 | public Relation getRelation() { 27 | return relation; 28 | } 29 | 30 | public void setRelation(Relation relation) { 31 | this.relation = relation; 32 | } 33 | 34 | public int getArticleCount() { 35 | return articleCount; 36 | } 37 | 38 | public void setArticleCount(int articleCount) { 39 | this.articleCount = articleCount; 40 | } 41 | 42 | public int getFollowCount() { 43 | return followCount; 44 | } 45 | 46 | public void setFollowCount(int followCount) { 47 | this.followCount = followCount; 48 | } 49 | 50 | public int getFansCount() { 51 | return fansCount; 52 | } 53 | 54 | public void setFansCount(int fansCount) { 55 | this.fansCount = fansCount; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/LikesCustom.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class LikesCustom extends Likes { 8 | /** 9 | * 扩展自定义的date String类型 10 | */ 11 | private String date; 12 | 13 | private String username; 14 | private String userImg; 15 | private ArticleCustom article; 16 | private UserCustom user; 17 | 18 | public String getDate() { 19 | return date; 20 | } 21 | 22 | public void setDate(String date) { 23 | this.date = date; 24 | } 25 | 26 | public String getUsername() { 27 | return username; 28 | } 29 | 30 | public void setUsername(String username) { 31 | this.username = username; 32 | } 33 | 34 | public String getUserImg() { 35 | return userImg; 36 | } 37 | 38 | public void setUserImg(String userImg) { 39 | this.userImg = userImg; 40 | } 41 | 42 | public ArticleCustom getArticle() { 43 | return article; 44 | } 45 | 46 | public void setArticle(ArticleCustom article) { 47 | this.article = article; 48 | } 49 | 50 | public UserCustom getUser() { 51 | return user; 52 | } 53 | 54 | public void setUser(UserCustom user) { 55 | this.user = user; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /target/classes/spring/spring-service.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/resources/spring/spring-service.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/spring/spring-service.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/Article.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | 5 | import java.util.Date; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public class Article { 12 | /** 13 | * 文章id 14 | */ 15 | private Integer articleId; 16 | /** 17 | * 作者id 18 | */ 19 | private Integer userId; 20 | /** 21 | * 文章标题 22 | */ 23 | private String articleTitle; 24 | /** 25 | * 文章url 26 | */ 27 | private String articleUrl; 28 | 29 | 30 | public Integer getArticleId() { 31 | return articleId; 32 | } 33 | 34 | public void setArticleId(Integer articleId) { 35 | this.articleId = articleId; 36 | } 37 | 38 | public Integer getUserId() { 39 | return userId; 40 | } 41 | 42 | public void setUserId(Integer userId) { 43 | this.userId = userId; 44 | } 45 | 46 | public String getArticleTitle() { 47 | return articleTitle; 48 | } 49 | 50 | public void setArticleTitle(String articleTitle) { 51 | this.articleTitle = articleTitle; 52 | } 53 | 54 | public String getArticleUrl() { 55 | return articleUrl; 56 | } 57 | 58 | public void setArticleUrl(String articleUrl) { 59 | this.articleUrl = articleUrl; 60 | } 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/web/LikesController.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.web; 2 | 3 | import com.nuc.calvin.ssm.service.LikesService; 4 | import org.springframework.beans.factory.annotation.Autowired; 5 | import org.springframework.stereotype.Controller; 6 | import org.springframework.web.bind.annotation.RequestMapping; 7 | import org.springframework.web.bind.annotation.RequestMethod; 8 | import org.springframework.web.bind.annotation.ResponseBody; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | 12 | /** 13 | * @author Calvin 14 | * @Description: 15 | */ 16 | @Controller("likesController") 17 | @RequestMapping("/likes") 18 | public class LikesController { 19 | 20 | @Autowired 21 | private LikesService likesService; 22 | 23 | @ResponseBody 24 | @RequestMapping( "/like") 25 | public void like(HttpServletRequest request) { 26 | Integer articleId = Integer.valueOf(request.getParameter("articleId")); 27 | Integer userId = Integer.valueOf(request.getParameter("userId")); 28 | System.out.println("userId" + userId + "articleId" + articleId); 29 | likesService.like(articleId, userId); 30 | } 31 | 32 | @ResponseBody 33 | @RequestMapping("/unlike") 34 | public void unLike(int articleId, HttpServletRequest request) { 35 | Integer userId = Integer.parseInt(request.getParameter("userId")); 36 | likesService.unLike(articleId, userId); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/impl/ReplyServiceImp.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service.impl; 2 | 3 | import com.nuc.calvin.ssm.dao.ReplyCustomDao; 4 | import com.nuc.calvin.ssm.entity.ReplyCustom; 5 | import com.nuc.calvin.ssm.service.ReplyService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @author Calvin 14 | * @Description: 15 | */ 16 | @Transactional(rollbackFor = Exception.class) 17 | @Service("replyService") 18 | public class ReplyServiceImp implements ReplyService { 19 | 20 | @Autowired 21 | private ReplyCustomDao replyCustomDao; 22 | 23 | /** 24 | * 添加回复 25 | * @param replyCustom 26 | */ 27 | @Override 28 | public void addReply(ReplyCustom replyCustom) { 29 | replyCustomDao.addReply(replyCustom); 30 | } 31 | 32 | /** 33 | * 遍历评论id为commentId的回复 34 | * @param commentId 35 | * @return 36 | */ 37 | @Override 38 | public List queryReply(int commentId) { 39 | return replyCustomDao.queryReply(commentId); 40 | } 41 | 42 | /** 43 | * 根据userId查询回复列表 44 | * @param userId 45 | * @return 46 | */ 47 | @Override 48 | public List queryReplyByUserId(Integer userId) { 49 | return replyCustomDao.queryReplyByUserId(userId); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /target/classes/mapper/BannerDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | insert into banner(bannerTitle,bannerImage) values (#{bannerImage,jdbcType=VARCHAR} ) 19 | 20 | 21 | 22 | update banner 23 | 24 | articleId=#{articleId} 25 | bannerImage=#{bannerImage,jdbcType=VARCHAR} 26 | 27 | 28 | 29 | 30 | delete from banner where bannerId =#{bannerId} 31 | 32 | -------------------------------------------------------------------------------- /src/main/resources/mapper/BannerDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | insert into banner(bannerTitle,bannerImage) values (#{bannerImage,jdbcType=VARCHAR} ) 19 | 20 | 21 | 22 | update banner 23 | 24 | articleId=#{articleId} 25 | bannerImage=#{bannerImage,jdbcType=VARCHAR} 26 | 27 | 28 | 29 | 30 | delete from banner where bannerId =#{bannerId} 31 | 32 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/mapper/BannerDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | insert into banner(bannerTitle,bannerImage) values (#{bannerImage,jdbcType=VARCHAR} ) 19 | 20 | 21 | 22 | update banner 23 | 24 | articleId=#{articleId} 25 | bannerImage=#{bannerImage,jdbcType=VARCHAR} 26 | 27 | 28 | 29 | 30 | delete from banner where bannerId =#{bannerId} 31 | 32 | -------------------------------------------------------------------------------- /target/classes/mapper/LikesDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | insert into likes (userId,articleId,likesTime) 15 | values (#{userId,jdbcType=INTEGER} ,#{articleId,jdbcType=INTEGER} ,#{likesTime,jdbcType=TIMESTAMP} ); 16 | 17 | 18 | 22 | 23 | 24 | delete from likes 25 | where likesId=#{likesId,jdbcType=INTEGER} 26 | 27 | 28 | 29 | update likes set 30 | userId=#{userId,jdbcType=INTEGER} 31 | articleId=#{articleId,jdbcType=INTEGER} 32 | 33 | -------------------------------------------------------------------------------- /src/main/resources/mapper/LikesDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | insert into likes (userId,articleId,likesTime) 15 | values (#{userId,jdbcType=INTEGER} ,#{articleId,jdbcType=INTEGER} ,#{likesTime,jdbcType=TIMESTAMP} ); 16 | 17 | 18 | 22 | 23 | 24 | delete from likes 25 | where likesId=#{likesId,jdbcType=INTEGER} 26 | 27 | 28 | 29 | update likes set 30 | userId=#{userId,jdbcType=INTEGER} 31 | articleId=#{articleId,jdbcType=INTEGER} 32 | 33 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/mapper/LikesDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | insert into likes (userId,articleId,likesTime) 15 | values (#{userId,jdbcType=INTEGER} ,#{articleId,jdbcType=INTEGER} ,#{likesTime,jdbcType=TIMESTAMP} ); 16 | 17 | 18 | 22 | 23 | 24 | delete from likes 25 | where likesId=#{likesId,jdbcType=INTEGER} 26 | 27 | 28 | 29 | update likes set 30 | userId=#{userId,jdbcType=INTEGER} 31 | articleId=#{articleId,jdbcType=INTEGER} 32 | 33 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/Comment.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * @author Calvin 7 | * @Description: 8 | */ 9 | public class Comment { 10 | /** 11 | * 评论id 12 | */ 13 | private Integer commentId; 14 | /** 15 | * 用户id 16 | */ 17 | private Integer userId; 18 | /** 19 | * 文章id 20 | */ 21 | private Integer articleId; 22 | /** 23 | * 评论内容 24 | */ 25 | private String commentContent; 26 | private Date commentTime; 27 | 28 | 29 | public Date getCommentTime() { 30 | return commentTime; 31 | } 32 | 33 | public void setCommentTime(Date commentTime) { 34 | this.commentTime = commentTime; 35 | } 36 | 37 | public Integer getCommentId() { 38 | return commentId; 39 | } 40 | 41 | public void setCommentId(Integer commentId) { 42 | this.commentId = commentId; 43 | } 44 | 45 | public Integer getUserId() { 46 | return userId; 47 | } 48 | 49 | public void setUserId(Integer userId) { 50 | this.userId = userId; 51 | } 52 | 53 | public Integer getArticleId() { 54 | return articleId; 55 | } 56 | 57 | public void setArticleId(Integer articleId) { 58 | this.articleId = articleId; 59 | } 60 | 61 | public String getCommentContent() { 62 | return commentContent; 63 | } 64 | 65 | public void setCommentContent(String commentContent) { 66 | this.commentContent = commentContent; 67 | } 68 | } 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/impl/CommentServiceImp.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service.impl; 2 | 3 | import com.nuc.calvin.ssm.dao.CommentCustomDao; 4 | import com.nuc.calvin.ssm.entity.CommentCustom; 5 | import com.nuc.calvin.ssm.service.CommentService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @author Calvin 14 | * @Description: 15 | */ 16 | @Transactional(rollbackFor = Exception.class) 17 | @Service("commentService") 18 | public class CommentServiceImp implements CommentService { 19 | 20 | @Autowired 21 | private CommentCustomDao commentCustomDao; 22 | 23 | @Override 24 | public void addComment(CommentCustom commentCustom) { 25 | commentCustomDao.addComment(commentCustom); 26 | } 27 | 28 | @Override 29 | public List queryComment(Integer articleId) { 30 | return commentCustomDao.queryComment(articleId); 31 | } 32 | 33 | @Override 34 | public int queryCountReply(Integer commentId) { 35 | return commentCustomDao.queryCountReply(commentId); 36 | } 37 | 38 | @Override 39 | public void deleteCommentById(Integer commentId) { 40 | commentCustomDao.deleteCommentById(commentId); 41 | } 42 | 43 | 44 | @Override 45 | public List queryCommentByUserId(Integer userId) { 46 | List commentList = commentCustomDao.queryCommentByUserId(userId); 47 | return commentList; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /target/classes/spring/spring-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/resources/spring/spring-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/spring/spring-web.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 18 | 19 | 20 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/ReplyCustom.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class ReplyCustom extends Reply { 8 | /** 9 | * from 昵称 10 | */ 11 | private String fromName; 12 | /** 13 | * to 昵称 14 | */ 15 | private String toName; 16 | /** 17 | * 头像 18 | */ 19 | private String fromImg; 20 | private String toImg; 21 | /** 22 | * 源文章 23 | */ 24 | private Article article; 25 | 26 | /** 27 | * 回复时间 sql扩展 28 | */ 29 | private String rtime; 30 | 31 | public String getFromName() { 32 | return fromName; 33 | } 34 | 35 | public void setFromName(String fromName) { 36 | this.fromName = fromName; 37 | } 38 | 39 | public String getToName() { 40 | return toName; 41 | } 42 | 43 | public void setToName(String toName) { 44 | this.toName = toName; 45 | } 46 | 47 | public String getFromImg() { 48 | return fromImg; 49 | } 50 | 51 | public void setFromImg(String fromImg) { 52 | this.fromImg = fromImg; 53 | } 54 | 55 | public String getToImg() { 56 | return toImg; 57 | } 58 | 59 | public void setToImg(String toImg) { 60 | this.toImg = toImg; 61 | } 62 | 63 | public Article getArticle() { 64 | return article; 65 | } 66 | 67 | public void setArticle(Article article) { 68 | this.article = article; 69 | } 70 | 71 | public String getRtime() { 72 | return rtime; 73 | } 74 | 75 | public void setRtime(String rtime) { 76 | this.rtime = rtime; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/CommentCustom.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | import java.util.List; 4 | 5 | /** 6 | * @author Calvin 7 | * @Description: 8 | */ 9 | public class CommentCustom extends Comment { 10 | private User user; 11 | private Article article; 12 | /** 13 | * 被评论文章作者昵称 14 | */ 15 | private String username; 16 | 17 | /** 18 | * json评论时间 19 | */ 20 | private String time; 21 | /** 22 | * 评论回复数 23 | */ 24 | private int countReply; 25 | 26 | /** 27 | * 回复列表 28 | */ 29 | private List replyList; 30 | 31 | public Article getArticle() { 32 | return article; 33 | } 34 | 35 | public void setArticle(Article article) { 36 | this.article = article; 37 | } 38 | 39 | public User getUser() { 40 | return user; 41 | } 42 | 43 | public void setUser(User user) { 44 | this.user = user; 45 | } 46 | 47 | public String getUsername() { 48 | return username; 49 | } 50 | 51 | public void setUsername(String username) { 52 | this.username = username; 53 | } 54 | 55 | public String getTime() { 56 | return time; 57 | } 58 | 59 | public void setTime(String time) { 60 | this.time = time; 61 | } 62 | 63 | public int getCountReply() { 64 | return countReply; 65 | } 66 | 67 | public void setCountReply(int countReply) { 68 | this.countReply = countReply; 69 | } 70 | 71 | public List getReplyList() { 72 | return replyList; 73 | } 74 | 75 | public void setReplyList(List replyList) { 76 | this.replyList = replyList; 77 | } 78 | } 79 | -------------------------------------------------------------------------------- /target/classes/mapper/CollectDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | insert into collect (collectId,articleId,userId,collectTime) 15 | values (#{collectId,jdbcType=INTEGER} ,#{articleId,jdbcType=INTEGER} 16 | ,#{userId,jdbcType=INTEGER} ,#{collectTime,jdbcType=TIMESTAMP} ); 17 | 18 | 19 | 24 | 25 | 26 | delete from collect 27 | where collectId=#{collectId,jdbcType=INTEGER} 28 | 29 | 30 | 31 | update collcet set 32 | articleId=#{articleId,jdbcType=INTEGER} , 33 | userId=#{userId,jdbcType=INTEGER} , 34 | collectTime=#{collectTime,jdbcType=TIMESTAMP} 35 | 36 | -------------------------------------------------------------------------------- /src/main/resources/mapper/CollectDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | insert into collect (collectId,articleId,userId,collectTime) 15 | values (#{collectId,jdbcType=INTEGER} ,#{articleId,jdbcType=INTEGER} 16 | ,#{userId,jdbcType=INTEGER} ,#{collectTime,jdbcType=TIMESTAMP} ); 17 | 18 | 19 | 24 | 25 | 26 | delete from collect 27 | where collectId=#{collectId,jdbcType=INTEGER} 28 | 29 | 30 | 31 | update collcet set 32 | articleId=#{articleId,jdbcType=INTEGER} , 33 | userId=#{userId,jdbcType=INTEGER} , 34 | collectTime=#{collectTime,jdbcType=TIMESTAMP} 35 | 36 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/mapper/CollectDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | insert into collect (collectId,articleId,userId,collectTime) 15 | values (#{collectId,jdbcType=INTEGER} ,#{articleId,jdbcType=INTEGER} 16 | ,#{userId,jdbcType=INTEGER} ,#{collectTime,jdbcType=TIMESTAMP} ); 17 | 18 | 19 | 24 | 25 | 26 | delete from collect 27 | where collectId=#{collectId,jdbcType=INTEGER} 28 | 29 | 30 | 31 | update collcet set 32 | articleId=#{articleId,jdbcType=INTEGER} , 33 | userId=#{userId,jdbcType=INTEGER} , 34 | collectTime=#{collectTime,jdbcType=TIMESTAMP} 35 | 36 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/Reply.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | import java.util.Date; 4 | 5 | /** 6 | * @author Calvin 7 | * @Description: 8 | */ 9 | public class Reply { 10 | /** 11 | * 回复id 12 | */ 13 | private Integer replyId; 14 | /** 15 | * 评论id 16 | */ 17 | private Integer commentId; 18 | /** 19 | * from 哪个user 20 | */ 21 | private Integer fromId; 22 | /** 23 | * to哪个user 24 | */ 25 | private Integer toId; 26 | /** 27 | * 评论内容 28 | */ 29 | private String replyContent; 30 | 31 | /** 32 | * 回复时间 33 | */ 34 | private Date replyTime; 35 | 36 | public Integer getReplyId() { 37 | return replyId; 38 | } 39 | 40 | public void setReplyId(Integer replyId) { 41 | this.replyId = replyId; 42 | } 43 | 44 | public Integer getCommentId() { 45 | return commentId; 46 | } 47 | 48 | public void setCommentId(Integer commentId) { 49 | this.commentId = commentId; 50 | } 51 | 52 | public Integer getFromId() { 53 | return fromId; 54 | } 55 | 56 | public void setFromId(Integer fromId) { 57 | this.fromId = fromId; 58 | } 59 | 60 | public Integer getToId() { 61 | return toId; 62 | } 63 | 64 | public void setToId(Integer toId) { 65 | this.toId = toId; 66 | } 67 | 68 | public String getReplyContent() { 69 | return replyContent; 70 | } 71 | 72 | public void setReplyContent(String replyContent) { 73 | this.replyContent = replyContent; 74 | } 75 | 76 | public Date getReplyTime() { 77 | return replyTime; 78 | } 79 | 80 | public void setReplyTime(Date replyTime) { 81 | this.replyTime = replyTime; 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /src/main/resources/mapper/RelationDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | insert into relation (userId,followId,state) 16 | values (#{userId,jdbcType=INTEGER} ,#{followId,jdbcType=INTEGER} ,#{state,jdbcType=INTEGER} ); 17 | 18 | 19 | 20 | delete from relation 21 | where relationId=#{relationId,jdbcType=INTEGER} 22 | 23 | 24 | 25 | update relation set 26 | userId=#{userId,jdbcType=INTEGER} , 27 | followId=#{followId,jdbcType=INTEGER} , 28 | state=#{state,jdbcType=INTEGER} 29 | where relationId=#{relationId,jdbcType=INTEGER} 30 | 31 | 32 | 36 | -------------------------------------------------------------------------------- /target/classes/mapper/RelationDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | insert into relation (userId,followId,state) 16 | values (#{userId,jdbcType=INTEGER} ,#{followId,jdbcType=INTEGER} ,#{state,jdbcType=INTEGER} ); 17 | 18 | 19 | 20 | delete from relation 21 | where relationId=#{relationId,jdbcType=INTEGER} 22 | 23 | 24 | 25 | update relation set 26 | userId=#{userId,jdbcType=INTEGER} , 27 | followId=#{followId,jdbcType=INTEGER} , 28 | state=#{state,jdbcType=INTEGER} 29 | where relationId=#{relationId,jdbcType=INTEGER} 30 | 31 | 32 | 36 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 38 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/mapper/RelationDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 15 | insert into relation (userId,followId,state) 16 | values (#{userId,jdbcType=INTEGER} ,#{followId,jdbcType=INTEGER} ,#{state,jdbcType=INTEGER} ); 17 | 18 | 19 | 20 | delete from relation 21 | where relationId=#{relationId,jdbcType=INTEGER} 22 | 23 | 24 | 25 | update relation set 26 | userId=#{userId,jdbcType=INTEGER} , 27 | followId=#{followId,jdbcType=INTEGER} , 28 | state=#{state,jdbcType=INTEGER} 29 | where relationId=#{relationId,jdbcType=INTEGER} 30 | 31 | 32 | 36 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/ArticleService.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service; 2 | 3 | import com.nuc.calvin.ssm.entity.Article; 4 | import com.nuc.calvin.ssm.entity.ArticleCustom; 5 | import com.nuc.calvin.ssm.entity.ArticleVo; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author Calvin 11 | * @Description: 12 | */ 13 | public interface ArticleService { 14 | 15 | /** 16 | * 根据用户id查询文章列表 17 | * 18 | * @param userId 19 | * @return 20 | */ 21 | List queryByUserId(Integer userId); 22 | 23 | /** 24 | * 发微博 25 | * @param articleCustom 26 | */ 27 | void post(ArticleCustom articleCustom); 28 | 29 | /** 30 | * 根据文章id删除文章 31 | * 32 | * @param articleId 33 | */ 34 | void deleteByArticle(Integer articleId); 35 | 36 | /** 37 | * 根据文章id查询文章信息 38 | * 39 | * @param articleId 40 | * @return 41 | */ 42 | List queryArticleByArticleId(Integer articleId); 43 | 44 | /** 45 | * 查询点赞次数 46 | * 47 | * @param articleId 48 | * @return 49 | */ 50 | int queryLikeCount(Integer articleId); 51 | 52 | /** 53 | * 查询评论次数 54 | * 55 | * @param articleId 56 | * @return 57 | */ 58 | int queryCommentCount(Integer articleId); 59 | 60 | /** 61 | * 查询文章被收藏数 62 | * @param articleId 63 | * @return 64 | */ 65 | int queryCollectCount(Integer articleId); 66 | 67 | 68 | /** 69 | * 根据关键字查询相关文章 70 | * 71 | * @param keyWord 72 | * @return 73 | */ 74 | List queryArticleByWord(String keyWord); 75 | 76 | /** 77 | * 查询所有文章 78 | * @return 79 | */ 80 | List queryAllArticle(); 81 | 82 | /** 83 | * 查询热门文章 84 | * @return 85 | */ 86 | List queryHotArticle(); 87 | } 88 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/impl/CollectServiceImp.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service.impl; 2 | 3 | import com.nuc.calvin.ssm.dao.CollectionCustomDao; 4 | import com.nuc.calvin.ssm.entity.CollectCustom; 5 | import com.nuc.calvin.ssm.service.CollectService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | import org.springframework.transaction.annotation.Transactional; 9 | 10 | import java.util.List; 11 | 12 | /** 13 | * @author Calvin 14 | * @Description: 15 | */ 16 | @Transactional(rollbackFor = Exception.class) 17 | @Service("collectService") 18 | public class CollectServiceImp implements CollectService { 19 | 20 | @Autowired 21 | private CollectionCustomDao collectionCustomDao; 22 | 23 | /** 24 | * 收藏 25 | * 26 | * @param collectCustom 27 | */ 28 | @Override 29 | public void collect(CollectCustom collectCustom) { 30 | collectionCustomDao.collect(collectCustom); 31 | } 32 | 33 | @Override 34 | public void unCollect(CollectCustom collectCustom) { 35 | collectionCustomDao.uncollect(collectCustom); 36 | } 37 | 38 | /** 39 | * 是否收藏 1——是 0——否 40 | * 41 | * @param userId 42 | * @param articleId 43 | * @return 44 | */ 45 | @Override 46 | public int isCollect(Integer userId, Integer articleId) { 47 | CollectCustom collect = new CollectCustom(); 48 | collect.setUserId(userId); 49 | collect.setArticleId(articleId); 50 | List collectList = collectionCustomDao.isCollect(collect); 51 | if (collectList.size() != 0) { 52 | return 1; 53 | } else { 54 | return 0; 55 | } 56 | } 57 | 58 | @Override 59 | public List queryMyCollection(Integer userId) { 60 | List list = collectionCustomDao.queryAllCollection(userId); 61 | return list; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /target/classes/mapper/BannerCustomDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 35 | -------------------------------------------------------------------------------- /src/main/resources/mapper/BannerCustomDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 35 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/mapper/BannerCustomDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 35 | -------------------------------------------------------------------------------- /target/classes/mapper/ArticleDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | insert into article(articleId,userId,articleTitle,articleUrl,postTime) 17 | values (#{articleId,jdbcType=INTEGER} ,#{userId,jdbcType=INTEGER} ,#{articleTitle,jdbcType=VARCHAR} 18 | ,#{articleUrl,jdbcType=VARCHAR} ,#{postTime,jdbcType=TIMESTAMP} ) 19 | 20 | 21 | 22 | 23 | delete from article where articleId=#{articleId,jdbcType=INTEGER} 24 | 25 | 26 | 27 | 28 | update article set 29 | userId=#{userId,jdbcType=INTEGER} , 30 | articleTitle=#{articleTitle,jdbcType=VARCHAR} , 31 | articleUrl=#{articleUrl,jdbcType=VARCHAR} 32 | where articleId=#{articleId,jdbcType=INTEGER} 33 | 34 | 35 | 36 | 39 | 40 | 41 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/resources/mapper/ArticleDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | insert into article(articleId,userId,articleTitle,articleUrl,postTime) 17 | values (#{articleId,jdbcType=INTEGER} ,#{userId,jdbcType=INTEGER} ,#{articleTitle,jdbcType=VARCHAR} 18 | ,#{articleUrl,jdbcType=VARCHAR} ,#{postTime,jdbcType=TIMESTAMP} ) 19 | 20 | 21 | 22 | 23 | delete from article where articleId=#{articleId,jdbcType=INTEGER} 24 | 25 | 26 | 27 | 28 | update article set 29 | userId=#{userId,jdbcType=INTEGER} , 30 | articleTitle=#{articleTitle,jdbcType=VARCHAR} , 31 | articleUrl=#{articleUrl,jdbcType=VARCHAR} 32 | where articleId=#{articleId,jdbcType=INTEGER} 33 | 34 | 35 | 36 | 39 | 40 | 41 | 44 | 45 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/mapper/ArticleDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | insert into article(articleId,userId,articleTitle,articleUrl,postTime) 17 | values (#{articleId,jdbcType=INTEGER} ,#{userId,jdbcType=INTEGER} ,#{articleTitle,jdbcType=VARCHAR} 18 | ,#{articleUrl,jdbcType=VARCHAR} ,#{postTime,jdbcType=TIMESTAMP} ) 19 | 20 | 21 | 22 | 23 | delete from article where articleId=#{articleId,jdbcType=INTEGER} 24 | 25 | 26 | 27 | 28 | update article set 29 | userId=#{userId,jdbcType=INTEGER} , 30 | articleTitle=#{articleTitle,jdbcType=VARCHAR} , 31 | articleUrl=#{articleUrl,jdbcType=VARCHAR} 32 | where articleId=#{articleId,jdbcType=INTEGER} 33 | 34 | 35 | 36 | 39 | 40 | 41 | 44 | 45 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/User.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | import com.fasterxml.jackson.annotation.JsonFormat; 4 | 5 | import java.util.Date; 6 | 7 | /** 8 | * @author Calvin 9 | * @Description: 10 | */ 11 | public class User { 12 | /** 13 | * 用户id 14 | */ 15 | private Integer userId; 16 | /** 17 | * 用户昵称 18 | */ 19 | private String username; 20 | /** 21 | * 注册邮箱 22 | */ 23 | private String email; 24 | /** 25 | * 用户密码 26 | */ 27 | private String password; 28 | /** 29 | * 用户头像 30 | */ 31 | private String headImg; 32 | /** 33 | * 用户个性签名 34 | */ 35 | private String signature; 36 | /** 37 | * 用户性别 0--男 1--女 38 | */ 39 | private Integer sex; 40 | 41 | 42 | public Integer getUserId() { 43 | return userId; 44 | } 45 | 46 | public void setUserId(Integer userId) { 47 | this.userId = userId; 48 | } 49 | 50 | public String getUsername() { 51 | return username; 52 | } 53 | 54 | public void setUsername(String username) { 55 | this.username = username; 56 | } 57 | 58 | public String getEmail() { 59 | return email; 60 | } 61 | 62 | public void setEmail(String email) { 63 | this.email = email; 64 | } 65 | 66 | public String getPassword() { 67 | return password; 68 | } 69 | 70 | public void setPassword(String password) { 71 | this.password = password; 72 | } 73 | 74 | public String getHeadImg() { 75 | return headImg; 76 | } 77 | 78 | public void setHeadImg(String headImg) { 79 | this.headImg = headImg; 80 | } 81 | 82 | public String getSignature() { 83 | return signature; 84 | } 85 | 86 | public void setSignature(String signature) { 87 | this.signature = signature; 88 | } 89 | 90 | public Integer getSex() { 91 | return sex; 92 | } 93 | 94 | public void setSex(Integer sex) { 95 | this.sex = sex; 96 | } 97 | 98 | 99 | } 100 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/UserCustomDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.User; 4 | import com.nuc.calvin.ssm.entity.UserCustom; 5 | import com.nuc.calvin.ssm.entity.UserVo; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author Calvin 11 | * @Description: 12 | */ 13 | public interface UserCustomDao { 14 | 15 | /** 16 | * 用户登录 17 | */ 18 | public List loginVerify(UserVo userVo); 19 | 20 | /** 21 | * 根据用户id查询用户信息 22 | * 23 | * @param id 24 | * @return 25 | */ 26 | UserCustom queryInfoByUserId(Integer id); 27 | 28 | /** 29 | * 修改用户id为userId的用户信息 30 | */ 31 | public void updateByUserId(UserVo userVo); 32 | 33 | /** 34 | * 查询用户分享文章数 35 | */ 36 | public int queryArticleCount(int id); 37 | 38 | /** 39 | * 查询用户关注数 40 | */ 41 | public int queryFollowCount(Integer userId); 42 | 43 | /** 44 | * 查询用户粉丝数 45 | */ 46 | public int queryFansCount(Integer userId); 47 | 48 | /** 49 | * 添加用户 50 | */ 51 | public int insertUser(User user); 52 | 53 | /** 54 | * 根据userId查询关注列表 55 | * 56 | * @param userId 57 | * @return 58 | */ 59 | public List queryFollowList(Integer userId); 60 | 61 | /** 62 | * 根据userId查询粉丝列表 63 | * 64 | * @param userId 65 | * @return 66 | */ 67 | public List queryFansList(Integer userId); 68 | 69 | /** 70 | * 修改密码 71 | * 72 | * @param user 73 | */ 74 | public void updatePassword(User user); 75 | 76 | /** 77 | * 模糊查询用户 78 | */ 79 | public List queryUserByWord(String keyWord); 80 | 81 | /** 82 | * 获得登录邮箱 83 | * 84 | * @param email 85 | * @return 86 | */ 87 | UserCustom getEmail(String email); 88 | 89 | /** 90 | * 查询所有用户 91 | * 92 | * @return 93 | */ 94 | List queryAllUser(); 95 | 96 | /** 97 | * 查询除userId外的热门用户 98 | * @param userId 99 | * @return 100 | */ 101 | List queryUserExSelf(Integer userId); 102 | 103 | 104 | } 105 | -------------------------------------------------------------------------------- /src/main/resources/mapper/RelationCustomDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | 26 | 27 | 28 | 30 | insert into relation (userId,followId,state) 31 | values (#{userId,jdbcType=INTEGER} ,#{followId,jdbcType=INTEGER} ,#{state,jdbcType=INTEGER} ); 32 | 33 | 34 | 35 | 36 | update relation set 37 | state=#{state,jdbcType=INTEGER} 38 | where userId=#{userId,jdbcType=INTEGER} and followId=#{followId,jdbcType=INTEGER} 39 | 40 | 41 | 42 | delete from relation where userId=#{userId,jdbcType=INTEGER} and 43 | followId=#{followId,jdbcType=INTEGER} 44 | 45 | -------------------------------------------------------------------------------- /target/classes/mapper/RelationCustomDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | 26 | 27 | 28 | 30 | insert into relation (userId,followId,state) 31 | values (#{userId,jdbcType=INTEGER} ,#{followId,jdbcType=INTEGER} ,#{state,jdbcType=INTEGER} ); 32 | 33 | 34 | 35 | 36 | update relation set 37 | state=#{state,jdbcType=INTEGER} 38 | where userId=#{userId,jdbcType=INTEGER} and followId=#{followId,jdbcType=INTEGER} 39 | 40 | 41 | 42 | delete from relation where userId=#{userId,jdbcType=INTEGER} and 43 | followId=#{followId,jdbcType=INTEGER} 44 | 45 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/mapper/RelationCustomDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 19 | 20 | 21 | 26 | 27 | 28 | 30 | insert into relation (userId,followId,state) 31 | values (#{userId,jdbcType=INTEGER} ,#{followId,jdbcType=INTEGER} ,#{state,jdbcType=INTEGER} ); 32 | 33 | 34 | 35 | 36 | update relation set 37 | state=#{state,jdbcType=INTEGER} 38 | where userId=#{userId,jdbcType=INTEGER} and followId=#{followId,jdbcType=INTEGER} 39 | 40 | 41 | 42 | delete from relation where userId=#{userId,jdbcType=INTEGER} and 43 | followId=#{followId,jdbcType=INTEGER} 44 | 45 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/dao/ArticleCustomDao.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.dao; 2 | 3 | import com.nuc.calvin.ssm.entity.Article; 4 | import com.nuc.calvin.ssm.entity.ArticleCustom; 5 | import com.nuc.calvin.ssm.entity.ArticleVo; 6 | 7 | import java.util.List; 8 | 9 | /** 10 | * @author Calvin 11 | * @Description: 12 | */ 13 | public interface ArticleCustomDao { 14 | /** 15 | * 通过用户id查询文章 16 | * 17 | * @param userId 18 | * @return 19 | */ 20 | List queryArticleByUserId(Integer userId); 21 | 22 | /** 23 | * 根据文章id查询文章 24 | * 25 | * @param articleId 26 | * @return 27 | */ 28 | List queryArticleByArticleId(Integer articleId); 29 | 30 | /** 31 | * 分享文章 32 | * @param articleCustom 33 | */ 34 | void postArticle(ArticleCustom articleCustom); 35 | 36 | /** 37 | * 根据文章id删除文章 38 | * 39 | * @param articleId 40 | */ 41 | void deleteByArticleId(Integer articleId); 42 | 43 | /** 44 | * 查询赞的次数 45 | * 46 | * @param articleId 47 | * @return 48 | */ 49 | int queryLikeCount(Integer articleId); 50 | 51 | /** 52 | * 查询评论次数 53 | * 54 | * @param articleId 55 | * @return 56 | */ 57 | int queryCommentCount(Integer articleId); 58 | 59 | /** 60 | * 查询被收藏次数 61 | * @param articleId 62 | * @return 63 | */ 64 | int queryCollectCount(Integer articleId); 65 | 66 | 67 | 68 | /** 69 | * 根据用户id查询被订阅的文章 70 | * 71 | * @param userId 72 | * @return 73 | */ 74 | List queryCollectArticle(Integer userId); 75 | 76 | /** 77 | * 根据关键字搜索文章 78 | * 79 | * @param keyWord 80 | * @return 81 | */ 82 | List queryArticleByWord(String keyWord); 83 | 84 | /** 85 | * 查询回复次数 86 | * 87 | * @param articleId 88 | * @return 89 | */ 90 | int queryReplyCount(Integer articleId); 91 | 92 | /** 93 | * 查询所有文章 94 | * @return 95 | */ 96 | List queryAllArticle(); 97 | 98 | /** 99 | * 查询热门文章 100 | * @return 101 | */ 102 | List queryHotArticle(); 103 | } 104 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service; 2 | 3 | import com.nuc.calvin.ssm.entity.User; 4 | import com.nuc.calvin.ssm.entity.UserCustom; 5 | import com.nuc.calvin.ssm.entity.UserVo; 6 | import org.springframework.transaction.annotation.Transactional; 7 | 8 | import java.util.List; 9 | 10 | /** 11 | * @author Calvin 12 | * @Description: 13 | */ 14 | public interface UserService { 15 | /** 16 | * 用户登录 17 | * 18 | * @param userVo 19 | * @return 20 | */ 21 | List doUserLogin(UserVo userVo); 22 | 23 | /** 24 | * 根据用户id查询用户所有信息 25 | * 26 | * @param id 27 | * @return 28 | */ 29 | UserCustom queryInfoByUserId(Integer id); 30 | 31 | /** 32 | * 修改用户信息 33 | * 34 | * @param userVo 35 | */ 36 | void updateUserInfo(UserVo userVo); 37 | 38 | /** 39 | * 根据用户id查询用户所有的文章数量 40 | * 41 | * @param userId 42 | * @return 43 | */ 44 | int queryArticleCount(Integer userId); 45 | 46 | /** 47 | * 根据用户id查询用户的关注数 48 | * 49 | * @param userId 50 | * @return 51 | */ 52 | int queryFollowCount(Integer userId); 53 | 54 | /** 55 | * 根据用户id查询用户的粉丝数 56 | * 57 | * @param userId 58 | * @return 59 | */ 60 | int queryFansCount(Integer userId); 61 | 62 | 63 | /** 64 | * 注册用户 65 | * 66 | * @param user 67 | */ 68 | void singUpUser(User user); 69 | 70 | /** 71 | * 根据用户id查询关注列表 72 | * 73 | * @param userId 74 | * @return 75 | */ 76 | List queryFollowList(Integer userId); 77 | 78 | /** 79 | * 根据用户id查询粉丝列表 80 | * 81 | * @param userId 82 | * @return 83 | */ 84 | List queryFansList(Integer userId); 85 | 86 | /** 87 | * 修改密码 88 | * 89 | * @param user 90 | */ 91 | void updatePassword(User user); 92 | 93 | /** 94 | * 模糊查询用户 95 | * 96 | * @param keyWord 97 | * @return 98 | */ 99 | List queryUserByWord(String keyWord); 100 | 101 | UserCustom getEmail(String email); 102 | 103 | List queryAllUser(); 104 | 105 | List queryUserExSelf(Integer userId); 106 | 107 | } 108 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/entity/ArticleCustom.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.entity; 2 | 3 | /** 4 | * @author Calvin 5 | * @Description: 6 | */ 7 | public class ArticleCustom extends Article { 8 | /** 9 | * 扩展user 10 | */ 11 | private User user; 12 | /** 13 | * 广告文章 14 | */ 15 | private ArticleCustom bannerArticle; 16 | /** 17 | * 是否广告 1-是 0-否 18 | */ 19 | private int isAdvertorial; 20 | 21 | /** 22 | * 赞 0-否 1-是 23 | */ 24 | private int likes; 25 | /** 26 | * 收藏 0-否 1-是 27 | */ 28 | private int collect; 29 | /** 30 | * 被评论次数 31 | */ 32 | private int commentCount; 33 | /** 34 | * 被点赞数 35 | */ 36 | private int likeCount; 37 | 38 | private int collectCount; 39 | 40 | 41 | public int getCollectCount() { 42 | return collectCount; 43 | } 44 | 45 | public void setCollectCount(int collectCount) { 46 | this.collectCount = collectCount; 47 | } 48 | 49 | public User getUser() { 50 | return user; 51 | } 52 | 53 | public void setUser(User user) { 54 | this.user = user; 55 | } 56 | 57 | public ArticleCustom getBannerArticle() { 58 | return bannerArticle; 59 | } 60 | 61 | public void setBannerArticle(ArticleCustom bannerArticle) { 62 | this.bannerArticle = bannerArticle; 63 | } 64 | 65 | public int getIsAdvertorial() { 66 | return isAdvertorial; 67 | } 68 | 69 | public void setIsAdvertorial(int isAdvertorial) { 70 | this.isAdvertorial = isAdvertorial; 71 | } 72 | 73 | public int getLikes() { 74 | return likes; 75 | } 76 | 77 | public void setLikes(int likes) { 78 | this.likes = likes; 79 | } 80 | 81 | public int getCollect() { 82 | return collect; 83 | } 84 | 85 | public void setCollect(int collect) { 86 | this.collect = collect; 87 | } 88 | 89 | public int getCommentCount() { 90 | return commentCount; 91 | } 92 | 93 | public void setCommentCount(int commentCount) { 94 | this.commentCount = commentCount; 95 | } 96 | 97 | public int getLikeCount() { 98 | return likeCount; 99 | } 100 | 101 | public void setLikeCount(int likeCount) { 102 | this.likeCount = likeCount; 103 | } 104 | } 105 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/web/RelationController.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.web; 2 | 3 | import com.nuc.calvin.ssm.entity.Relation; 4 | import com.nuc.calvin.ssm.entity.UserCustom; 5 | import com.nuc.calvin.ssm.service.RelationService; 6 | import com.nuc.calvin.ssm.service.UserService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Controller; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import javax.servlet.http.HttpServletRequest; 13 | import java.util.List; 14 | 15 | /** 16 | * @author Calvin 17 | * @Description: 18 | */ 19 | @Controller("relationController") 20 | @RequestMapping("/relation") 21 | public class RelationController { 22 | 23 | @Autowired 24 | private RelationService relationService; 25 | 26 | @Autowired 27 | private UserService userService; 28 | 29 | /** 30 | * 关注 flag=1 为陌生 flag=2为对方已关注自己 31 | * 32 | * @param request 33 | */ 34 | @ResponseBody 35 | @RequestMapping("/follow") 36 | public void follow(HttpServletRequest request) { 37 | Integer userId = Integer.valueOf(request.getParameter("userId")); 38 | Integer myId = Integer.valueOf(request.getParameter("myId")); 39 | int flag = Integer.parseInt(request.getParameter("flag")); 40 | Relation relation = new Relation(); 41 | relation.setUserId(myId); 42 | relation.setFollowId(userId); 43 | relationService.follow(relation, flag); 44 | } 45 | 46 | @ResponseBody 47 | @RequestMapping("/unFollow") 48 | public void unFollow(HttpServletRequest request) { 49 | int flagId = Integer.parseInt(request.getParameter("flag")); 50 | Integer user_id = Integer.valueOf(request.getParameter("userId")); 51 | Integer my_id = Integer.valueOf(request.getParameter("myId")); 52 | Relation relation = new Relation(); 53 | relation.setUserId(my_id); 54 | relation.setFollowId(user_id); 55 | relationService.unFollow(relation, flagId); 56 | } 57 | 58 | 59 | @ResponseBody 60 | @RequestMapping("/listFollow") 61 | public List listFollow(HttpServletRequest request) { 62 | Integer userId = Integer.valueOf(request.getParameter("userId")); 63 | List followlist = userService.queryFollowList(userId); 64 | return followlist; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /target/classes/spring/spring-dao.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/main/resources/spring/spring-dao.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/spring/spring-dao.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /target/classes/mapper/UserDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | delete from user where userId =#{userId,jdbcType=INTEGER} 29 | 30 | 31 | 32 | 33 | update user 34 | 35 | username=#{username,jdbcType=VARCHAR} 36 | email=#{email,jdbcType=VARCHAR} 37 | email=#{password,jdbcType=VARCHAR} 38 | signature=#{signature,jdbcType=VARCHAR} 39 | headImg=#{headImg,jdbcType=VARCHAR} 40 | sex=#{sex,jdbcType=INTEGER} 41 | 42 | where userId=#{userId,jdbcType=INTEGER} 43 | 44 | 45 | 46 | 48 | insert into user(username,email,password) 49 | values (#{username,jdbcType=VARCHAR} ,#{email,jdbcType=VARCHAR} ,#{password,jdbcType=VARCHAR}) 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/main/resources/mapper/UserDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | delete from user where userId =#{userId,jdbcType=INTEGER} 29 | 30 | 31 | 32 | 33 | update user 34 | 35 | username=#{username,jdbcType=VARCHAR} 36 | email=#{email,jdbcType=VARCHAR} 37 | email=#{password,jdbcType=VARCHAR} 38 | signature=#{signature,jdbcType=VARCHAR} 39 | headImg=#{headImg,jdbcType=VARCHAR} 40 | sex=#{sex,jdbcType=INTEGER} 41 | 42 | where userId=#{userId,jdbcType=INTEGER} 43 | 44 | 45 | 46 | 48 | insert into user(username,email,password) 49 | values (#{username,jdbcType=VARCHAR} ,#{email,jdbcType=VARCHAR} ,#{password,jdbcType=VARCHAR}) 50 | 51 | 52 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/classes/mapper/UserDao.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | delete from user where userId =#{userId,jdbcType=INTEGER} 29 | 30 | 31 | 32 | 33 | update user 34 | 35 | username=#{username,jdbcType=VARCHAR} 36 | email=#{email,jdbcType=VARCHAR} 37 | email=#{password,jdbcType=VARCHAR} 38 | signature=#{signature,jdbcType=VARCHAR} 39 | headImg=#{headImg,jdbcType=VARCHAR} 40 | sex=#{sex,jdbcType=INTEGER} 41 | 42 | where userId=#{userId,jdbcType=INTEGER} 43 | 44 | 45 | 46 | 48 | insert into user(username,email,password) 49 | values (#{username,jdbcType=VARCHAR} ,#{email,jdbcType=VARCHAR} ,#{password,jdbcType=VARCHAR}) 50 | 51 | 52 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/article.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 首页 6 | 7 | 8 | 9 | 10 | 11 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 12 | <%@ taglib prefix="C" uri="http://java.sun.com/jsp/jstl/core" %> 13 | 14 | 15 | 16 |

欢迎使用IT头条信息管理系统

17 |
18 |
19 |
20 | 21 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 56 | 57 | 58 | 59 |
文章信息管理
文章id作者id文章标题文章url被评论次数被点赞次数操作
53 | 删除 54 | 更改 55 |
60 |
61 |
62 |
63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/jsp/article.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 首页 6 | 7 | 8 | 9 | 10 | 11 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 12 | <%@ taglib prefix="C" uri="http://java.sun.com/jsp/jstl/core" %> 13 | 14 | 15 | 16 |

欢迎使用IT头条信息管理系统

17 |
18 |
19 |
20 | 21 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 56 | 57 | 58 | 59 |
文章信息管理
文章id作者id文章标题文章url被评论次数被点赞次数操作
53 | 删除 54 | 更改 55 |
60 |
61 |
62 |
63 |
64 | 65 | 66 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/web/CollectController.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.web; 2 | 3 | import com.nuc.calvin.ssm.entity.ArticleCustom; 4 | import com.nuc.calvin.ssm.entity.CollectCustom; 5 | import com.nuc.calvin.ssm.service.ArticleService; 6 | import com.nuc.calvin.ssm.service.CollectService; 7 | import com.nuc.calvin.ssm.utils.DateConvert; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | import org.springframework.web.bind.annotation.ResponseBody; 12 | 13 | import javax.servlet.http.HttpServletRequest; 14 | import java.util.ArrayList; 15 | import java.util.Date; 16 | import java.util.List; 17 | 18 | /** 19 | * @author Calvin 20 | * @Description: 21 | */ 22 | @Controller("collectController") 23 | @RequestMapping("/collection") 24 | public class CollectController { 25 | 26 | @Autowired 27 | private CollectService collectService; 28 | 29 | @Autowired 30 | private ArticleService articleService; 31 | 32 | @ResponseBody 33 | @RequestMapping("/collect") 34 | public void collect(HttpServletRequest request) { 35 | Integer articleId = Integer.valueOf(request.getParameter("articleId")); 36 | Integer userId = Integer.valueOf(request.getParameter("userId")); 37 | CollectCustom collection = new CollectCustom(); 38 | collection.setUserId(userId); 39 | collection.setArticleId(articleId); 40 | 41 | Date time = new java.sql.Date(new java.util.Date().getTime()); 42 | collection.setCollectTime(time); 43 | collectService.collect(collection); 44 | } 45 | 46 | @ResponseBody 47 | @RequestMapping("/unCollect") 48 | public void unCollect(HttpServletRequest request) { 49 | Integer articleId = Integer.valueOf(request.getParameter("articleId")); 50 | Integer userId = Integer.parseInt(request.getParameter("userId")); 51 | CollectCustom collectCustom = new CollectCustom(); 52 | collectCustom.setUserId(userId); 53 | collectCustom.setArticleId(articleId); 54 | collectService.unCollect(collectCustom); 55 | } 56 | 57 | @ResponseBody 58 | @RequestMapping("/queryAllCollection") 59 | public List queryAllCollection(HttpServletRequest request) { 60 | Integer userId = Integer.valueOf(request.getParameter("userId")); 61 | List list = collectService.queryMyCollection(userId); 62 | for (CollectCustom collectCustom : list) { 63 | collectCustom.setDate(DateConvert.convert2json(collectCustom.getCollectTime().getTime())); 64 | } 65 | return list; 66 | 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/main/java/com/nuc/calvin/ssm/service/impl/LikesServiveImp.java: -------------------------------------------------------------------------------- 1 | package com.nuc.calvin.ssm.service.impl; 2 | 3 | import ch.qos.logback.classic.pattern.DateConverter; 4 | import com.nuc.calvin.ssm.dao.LikesCustomDao; 5 | import com.nuc.calvin.ssm.entity.LikesCustom; 6 | import com.nuc.calvin.ssm.service.LikesService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | import org.springframework.transaction.annotation.Transactional; 10 | 11 | import java.util.ArrayList; 12 | import java.util.Date; 13 | import java.util.List; 14 | 15 | /** 16 | * @author Calvin 17 | * @Description: 18 | */ 19 | @Transactional(rollbackFor = Exception.class) 20 | @Service("likesService") 21 | public class LikesServiveImp implements LikesService { 22 | 23 | @Autowired 24 | private LikesCustomDao likesCustomDao; 25 | /** 26 | * date格式化工具 27 | */ 28 | private DateConverter dateConverter; 29 | 30 | /** 31 | * 赞 32 | * 33 | * @param articleId 34 | * @param userId 35 | */ 36 | @Override 37 | public void like(Integer articleId, Integer userId) { 38 | LikesCustom likes = new LikesCustom(); 39 | likes.setUserId(userId); 40 | likes.setArticleId(articleId); 41 | Date likeTime = new Date(); 42 | likes.setLikeTime(likeTime); 43 | likesCustomDao.like(likes); 44 | } 45 | 46 | /** 47 | * 取消赞 48 | * 49 | * @param articleId 50 | * @param userId 51 | */ 52 | @Override 53 | public void unLike(Integer articleId, Integer userId) { 54 | LikesCustom likes = new LikesCustom(); 55 | likes.setUserId(userId); 56 | likes.setArticleId(articleId); 57 | likesCustomDao.unLike(likes); 58 | } 59 | 60 | /** 61 | * 是否赞 62 | * 63 | * @param userId 64 | * @param articleId 65 | * @return 66 | */ 67 | @Override 68 | public int isLike(Integer userId, Integer articleId) { 69 | LikesCustom likes = new LikesCustom(); 70 | likes.setUserId(userId); 71 | likes.setArticleId(articleId); 72 | List likesList = likesCustomDao.queryIsLike(likes); 73 | if (likesList.size() != 0) { 74 | /** 75 | * 存在记录,点赞 76 | */ 77 | return 1; 78 | } else { 79 | /** 80 | * 无记录 81 | */ 82 | return 0; 83 | } 84 | } 85 | 86 | /** 87 | * 查询用户被赞过信息 88 | * 89 | * @param userId 90 | * @return 91 | */ 92 | @Override 93 | public List queryLikesByUserId(Integer userId) { 94 | List likesCustomList = likesCustomDao.queryLikesByUserId(userId); 95 | return likesCustomList; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/jsp/main.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 首页 6 | 7 | 8 | 9 | 10 | 11 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 12 | <%@ taglib prefix="C" uri="http://java.sun.com/jsp/jstl/core" %> 13 | 14 | 15 | 16 |

欢迎使用IT头条信息管理系统

17 |
18 |
19 |
20 | 21 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 63 | 64 | 65 | 66 |
用户信息管理
用户id用户名邮箱密码个性签名性别文章数关注数粉丝数操作
60 | 删除 61 | 更改 62 |
67 | 68 |
69 | 70 |
71 |
72 |
73 | 74 | 75 | -------------------------------------------------------------------------------- /target/headline/WEB-INF/jsp/main.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 首页 6 | 7 | 8 | 9 | 10 | 11 | <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 12 | <%@ taglib prefix="C" uri="http://java.sun.com/jsp/jstl/core" %> 13 | 14 | 15 | 16 |

欢迎使用IT头条信息管理系统

17 |
18 |
19 |
20 | 21 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 63 | 64 | 65 | 66 |
用户信息管理
用户id用户名邮箱密码个性签名性别文章数关注数粉丝数操作
60 | 删除 61 | 更改 62 |
67 | 68 |
69 | 70 |
71 |
72 |
73 | 74 | 75 | --------------------------------------------------------------------------------