├── README.md ├── bilibili.sql └── bilibili ├── .classpath ├── .idea ├── artifacts │ └── bilibili_war_exploded.xml ├── compiler.xml ├── libraries │ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_9.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml │ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_1.xml │ ├── Maven__com_google_code_gson_gson_2_3_1.xml │ ├── Maven__com_mchange_c3p0_0_9_5_2.xml │ ├── Maven__com_mchange_mchange_commons_java_0_2_11.xml │ ├── Maven__commons_beanutils_commons_beanutils_1_8_0.xml │ ├── Maven__commons_collections_commons_collections_3_2_1.xml │ ├── Maven__commons_fileupload_commons_fileupload_1_2_1.xml │ ├── Maven__commons_io_commons_io_2_5.xml │ ├── Maven__commons_lang_commons_lang_2_5.xml │ ├── Maven__commons_logging_commons_logging_1_1_1.xml │ ├── Maven__javax_servlet_javax_servlet_api_3_1_0.xml │ ├── Maven__javax_servlet_jstl_1_2.xml │ ├── Maven__junit_junit_3_8_1.xml │ ├── Maven__mysql_mysql_connector_java_5_1_17.xml │ ├── Maven__net_sf_ezmorph_ezmorph_1_0_6.xml │ ├── Maven__net_sf_json_lib_json_lib_jdk15_2_4.xml │ ├── Maven__org_codehaus_jackson_jackson_core_asl_1_9_13.xml │ ├── Maven__org_codehaus_jackson_jackson_mapper_asl_1_9_13.xml │ ├── Maven__org_springframework_spring_aop_4_3_2_RELEASE.xml │ ├── Maven__org_springframework_spring_beans_4_3_2_RELEASE.xml │ ├── Maven__org_springframework_spring_context_4_3_2_RELEASE.xml │ ├── Maven__org_springframework_spring_core_4_3_2_RELEASE.xml │ ├── Maven__org_springframework_spring_expression_4_3_2_RELEASE.xml │ ├── Maven__org_springframework_spring_jdbc_4_3_9_RELEASE.xml │ ├── Maven__org_springframework_spring_tx_4_3_2_RELEASE.xml │ ├── Maven__org_springframework_spring_web_4_3_2_RELEASE.xml │ └── Maven__org_springframework_spring_webmvc_4_3_2_RELEASE.xml ├── misc.xml ├── modules.xml └── workspace.xml ├── .project ├── .settings ├── .jsdtscope ├── org.eclipse.core.resources.prefs ├── org.eclipse.jdt.core.prefs ├── org.eclipse.m2e.core.prefs ├── org.eclipse.wst.common.component ├── org.eclipse.wst.common.project.facet.core.xml ├── org.eclipse.wst.jsdt.ui.superType.container ├── org.eclipse.wst.jsdt.ui.superType.name ├── org.eclipse.wst.validation.prefs └── org.eclipse.wst.ws.service.policy.prefs ├── bilibili.iml ├── pom.xml ├── src └── main │ ├── java │ └── com │ │ └── sf │ │ ├── Maping │ │ ├── T.java │ │ └── T2.java │ │ ├── chaxun │ │ ├── Callingmethod.java │ │ └── TestMain.java │ │ ├── dao │ │ ├── DanmuDao.java │ │ ├── LoginDao.java │ │ ├── MessageDao.java │ │ ├── RegisterDao.java │ │ ├── Update_login_password_Dao.java │ │ ├── UserListDao.java │ │ ├── VideoDao.java │ │ └── impl │ │ │ ├── DanmuDaoimpl.java │ │ │ ├── LoginDaoimpl.java │ │ │ ├── MessageImpl.java │ │ │ ├── RegisterImpl.java │ │ │ ├── Update_login_password_Impl.java │ │ │ ├── UserListDaoImpl.java │ │ │ └── VideoDaoimpl.java │ │ ├── db │ │ └── Data_jdbcTemplate.java │ │ ├── entity │ │ ├── Danmu.java │ │ ├── JsonDanmu.java │ │ ├── ShoppingCart.java │ │ ├── forumEntity.java │ │ ├── forumreplyEntity.java │ │ ├── gridsEntity.java │ │ ├── messageEntity.java │ │ ├── ordertableEntity.java │ │ ├── userEntity.java │ │ ├── videoEntity.java │ │ └── videoTopEntity.java │ │ ├── jingtai │ │ └── JspToHtml.java │ │ ├── lanjieqi │ │ ├── Auth.java │ │ └── AuthInterceptor.java │ │ ├── request │ │ ├── LoginRequest.java │ │ ├── MessageRequest.java │ │ └── RegisterRequest.java │ │ ├── service │ │ ├── Addservice.java │ │ ├── Danmuservice.java │ │ ├── LoginService.java │ │ ├── MessageService.java │ │ ├── RegisterService.java │ │ ├── Update_login_password_Service.java │ │ ├── UserListService.java │ │ ├── Videoservice.java │ │ └── impl │ │ │ ├── Addserviceimpl.java │ │ │ ├── DanmuServiceimpl.java │ │ │ ├── LoginServiceImpl.java │ │ │ ├── MessageServiceImpl.java │ │ │ ├── RegisterServiceImpl.java │ │ │ ├── Update_login_password_Service_Impl.java │ │ │ ├── UserListServiceImpl.java │ │ │ └── Videoserviceimpl.java │ │ ├── servlet │ │ ├── ProDto.java │ │ ├── ProServlet.java │ │ ├── UploadServlet.java │ │ └── one.java │ │ └── tool │ │ ├── DanmuRowMapperEntity.java │ │ ├── GetDataTime.java │ │ ├── GetUUID.java │ │ ├── GridsRowMapperEntity.java │ │ ├── Html_guolv.java │ │ ├── RowMapperEntity.java │ │ ├── RowMapperVideoEntity.java │ │ ├── ShoppingCartRowMapperEntity.java │ │ ├── VideoRowMapperEntity.java │ │ ├── forumEntityRowMapper.java │ │ ├── forumreplyEntityRowMapper.java │ │ └── ordertableRowMapperEntity.java │ ├── resources │ ├── jdbc.properties │ ├── spring-mvc.xml │ └── springcontext.xml │ └── webapp │ ├── Shangchuan.jsp │ ├── WEB-INF │ ├── lib │ │ ├── commons-fileupload-1.2.1.jar │ │ ├── commons-io-2.5.jar │ │ ├── jave-1.0.2.jar │ │ └── jstl-1.2.jar │ ├── web-jsp │ │ ├── AdminBL.jsp │ │ ├── Adminbackgroundshipment.jsp │ │ ├── Bank_Card.jsp │ │ ├── Completedorder.jsp │ │ ├── Confirmorder.jsp │ │ ├── DeletOrder.jsp │ │ ├── Delivery_address.jsp │ │ ├── DisplayVideo.jsp │ │ ├── Forum.jsp │ │ ├── ForumReply.jsp │ │ ├── Forumindex.jsp │ │ ├── Houtai.jsp │ │ ├── Information.jsp │ │ ├── Inquiryorder.jsp │ │ ├── Order.jsp │ │ ├── Returngoods.jsp │ │ ├── Shipmentpending.jsp │ │ ├── Shopping.jsp │ │ ├── Shoppingnew.jsp │ │ ├── Update_PayPassword.jsp │ │ ├── Update_Phone.jsp │ │ ├── Update_email.jsp │ │ ├── Update_login_password.jsp │ │ ├── User_full_information.jsp │ │ ├── Video.jsp │ │ ├── details.jsp │ │ ├── gouwuche.jsp │ │ ├── gridspay.jsp │ │ ├── index.jsp │ │ ├── jsp │ │ ├── loginnew.jsp │ │ ├── videoFileTop.jsp │ │ ├── xiaoheiwu.jsp │ │ ├── zhuce.jsp │ │ └── 用户信息JSP │ └── web.xml │ └── index2.jsp └── userHand └── upload └── 初中.jpg /README.md: -------------------------------------------------------------------------------- 1 | # mybilibili 2 | 基于SSM框架高仿B站弹幕视频网站 3 | 4 | 最新未失效静态文件链接:链接:链接:链接:https://pan.baidu.com/s/12EXwvzfjKEaORWtIX59sZQ 5 | 提取码:gh1n 6 | 解压密码:bilibili 7 | 8 | 下载后解压放于webapp目录下,注意不要解压出两个static路径 9 | 数据库密码修改在bilibili\src\main\resources\jdbc.properties 和 bilibili\src\main\java\com\sf\chaxun\Callingmethod.java 下 10 | tomcat 的deployment 面板下的application context 改为 /bilibili 不然文件路径会找不到 11 | 视频上传主意事项 12 | 上传的文件要马上可以查找到需要将tomcat 的启动方式改为热启动并且project structrue选择的为bilibili::war exploded; 13 | 上传的保存路径需要修改 在:bilibili\src\main\java\com\sf\Maping\T.java 文件的904 和906行。 改成你正确的bilibili\out\artifacts\bilibili_war_exploded\static\videolook和bilibili\out\artifacts\bilibili_war_exploded\static\videolook\videolookimg\ 的路径。 14 | 账号:admin 密码: 123321aaa 15 | 16 | 17 | 18 | 19 | 20 | 21 | 效果视频演示B站链接https://www.bilibili.com/video/BV1a7411g7pD 22 | 基于Dplayer + ajax+ springmvc 实现弹幕功能 23 | 包含登录,注册,上传视频,留言,弹幕等功能 24 | ## 效果 25 | 26 | ## 弹幕效果 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /bilibili/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 25 | 26 | 27 | 29 | 30 | 31 | 33 | 34 | 35 | 36 | 37 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /bilibili/.idea/artifacts/bilibili_war_exploded.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | $PROJECT_DIR$/out/artifacts/bilibili_war_exploded 4 | 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 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /bilibili/.idea/compiler.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_9_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_9_9.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_9_9_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__com_google_code_gson_gson_2_3_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__com_mchange_c3p0_0_9_5_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__com_mchange_mchange_commons_java_0_2_11.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__commons_beanutils_commons_beanutils_1_8_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__commons_collections_commons_collections_3_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_2_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__commons_io_commons_io_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__commons_lang_commons_lang_2_5.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__commons_logging_commons_logging_1_1_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__javax_servlet_javax_servlet_api_3_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__javax_servlet_jstl_1_2.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__junit_junit_3_8_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_17.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__net_sf_ezmorph_ezmorph_1_0_6.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__net_sf_json_lib_json_lib_jdk15_2_4.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__org_codehaus_jackson_jackson_core_asl_1_9_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__org_codehaus_jackson_jackson_mapper_asl_1_9_13.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__org_springframework_spring_aop_4_3_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__org_springframework_spring_beans_4_3_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__org_springframework_spring_context_4_3_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__org_springframework_spring_core_4_3_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__org_springframework_spring_expression_4_3_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__org_springframework_spring_jdbc_4_3_9_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__org_springframework_spring_tx_4_3_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__org_springframework_spring_web_4_3_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/libraries/Maven__org_springframework_spring_webmvc_4_3_2_RELEASE.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /bilibili/.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /bilibili/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /bilibili/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | bilibili 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.wst.jsdt.core.javascriptValidator 10 | 11 | 12 | 13 | 14 | org.eclipse.jdt.core.javabuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.wst.common.project.facet.core.builder 20 | 21 | 22 | 23 | 24 | org.eclipse.wst.validation.validationbuilder 25 | 26 | 27 | 28 | 29 | org.eclipse.m2e.core.maven2Builder 30 | 31 | 32 | 33 | 34 | 35 | org.eclipse.jem.workbench.JavaEMFNature 36 | org.eclipse.wst.common.modulecore.ModuleCoreNature 37 | org.eclipse.jdt.core.javanature 38 | org.eclipse.m2e.core.maven2Nature 39 | org.eclipse.wst.common.project.facet.core.nature 40 | org.eclipse.wst.jsdt.core.jsNature 41 | 42 | 43 | -------------------------------------------------------------------------------- /bilibili/.settings/.jsdtscope: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 8 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /bilibili/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/webapp/WEB-INF/web-jsp/DisplayVideo.jsp=UTF-8 3 | encoding//src/main/webapp/WEB-INF/web-jsp/Video.jsp=UTF-8 4 | encoding//src/main/webapp/WEB-INF/web-jsp/videoFileTop.jsp=UTF-8 5 | encoding//src/main/webapp/index2.jsp=UTF-8 6 | encoding//src/main/webapp/static/videoTop.jsp=UTF-8 7 | encoding/=UTF-8 8 | -------------------------------------------------------------------------------- /bilibili/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.compliance=1.8 5 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 6 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 7 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 8 | org.eclipse.jdt.core.compiler.source=1.8 9 | -------------------------------------------------------------------------------- /bilibili/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /bilibili/.settings/org.eclipse.wst.common.component: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /bilibili/.settings/org.eclipse.wst.common.project.facet.core.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /bilibili/.settings/org.eclipse.wst.jsdt.ui.superType.container: -------------------------------------------------------------------------------- 1 | org.eclipse.wst.jsdt.launching.baseBrowserLibrary -------------------------------------------------------------------------------- /bilibili/.settings/org.eclipse.wst.jsdt.ui.superType.name: -------------------------------------------------------------------------------- 1 | Window -------------------------------------------------------------------------------- /bilibili/.settings/org.eclipse.wst.validation.prefs: -------------------------------------------------------------------------------- 1 | disabled=06target 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /bilibili/.settings/org.eclipse.wst.ws.service.policy.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.wst.ws.service.policy.projectEnabled=false 3 | -------------------------------------------------------------------------------- /bilibili/bilibili.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 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 | 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 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /bilibili/pom.xml: -------------------------------------------------------------------------------- 1 | 3 | 4.0.0 4 | com.sf.bilibili 5 | bilibili 6 | war 7 | 0.0.1-SNAPSHOT 8 | bilibili Maven Webapp 9 | http://maven.apache.org 10 | 11 | 14 | 15 | 16 | 17 | 4.3.2.RELEASE 18 | 19 | 20 | 21 | 22 | junit 23 | junit 24 | 3.8.1 25 | test 26 | 27 | 28 | 29 | 30 | 31 | org.springframework 32 | spring-webmvc 33 | ${spring.version} 34 | 35 | 36 | 37 | org.springframework 38 | spring-tx 39 | ${spring.version} 40 | 41 | 42 | 43 | org.springframework 44 | spring-jdbc 45 | ${spring.version} 46 | 47 | 48 | 49 | 50 | commons-io 51 | commons-io 52 | 2.5 53 | 54 | 55 | 56 | commons-fileupload 57 | commons-fileupload 58 | 1.2.1 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | org.springframework 67 | spring-jdbc 68 | 4.3.9.RELEASE 69 | 70 | 71 | 72 | 73 | com.mchange 74 | c3p0 75 | 0.9.5.2 76 | 77 | 78 | 79 | 80 | mysql 81 | mysql-connector-java 82 | 5.1.17 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | com.fasterxml.jackson.core 91 | jackson-databind 92 | 2.9.9.1 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | com.fasterxml.jackson.core 103 | jackson-annotations 104 | 2.9.9 105 | 106 | 107 | 108 | net.sf.json-lib 109 | json-lib 110 | 2.4 111 | jdk15 112 | 113 | 114 | 115 | 116 | org.codehaus.jackson 117 | jackson-core-asl 118 | 1.9.13 119 | 120 | 121 | 122 | org.codehaus.jackson 123 | jackson-mapper-asl 124 | 1.9.13 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | com.google.code.gson 139 | gson 140 | 2.3.1 141 | 142 | 143 | 144 | 145 | 146 | javax.servlet 147 | javax.servlet-api 148 | 3.1.0 149 | provided 150 | 151 | 152 | 153 | 154 | javax.servlet 155 | jstl 156 | 1.2 157 | 158 | 159 | 160 | 161 | bilibili 162 | 163 | 164 | 165 | org.apache.maven.plugins 166 | maven-compiler-plugin 167 | 2.3.2 168 | 169 | 1.8 170 | 1.8 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/Maping/T2.java: -------------------------------------------------------------------------------- 1 | package com.sf.Maping; 2 | 3 | import javax.servlet.http.HttpServletResponse; 4 | 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.RequestMethod; 9 | 10 | import com.sf.entity.userEntity; 11 | import com.sf.service.impl.RegisterServiceImpl; 12 | 13 | @Controller 14 | public class T2 { 15 | 16 | @Autowired 17 | RegisterServiceImpl registerService; 18 | 19 | @RequestMapping("registertest.sf") 20 | public String web3(){ 21 | 22 | System.out.println("测试是否进入此方法"); 23 | userEntity user = new userEntity(); 24 | user.setUserID("1238"); 25 | user.setUserName("123123"); 26 | user.setUserMingzi("123123"); 27 | user.setUserState("1"); 28 | user.setUserPhone("123123"); 29 | user.setPassWord("123"); 30 | 31 | boolean bl=registerService.RegisterService(user); 32 | if(bl){ 33 | System.out.println("注册成功"); 34 | }else{ 35 | System.out.println("注册失败"); 36 | } 37 | 38 | 39 | return "login"; 40 | 41 | } 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | } 65 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/chaxun/Callingmethod.java: -------------------------------------------------------------------------------- 1 | package com.sf.chaxun; 2 | import java.sql.Connection; 3 | import java.sql.DriverManager; 4 | import java.sql.ResultSet; 5 | import java.sql.SQLException; 6 | import java.sql.Statement; 7 | import java.util.TimerTask; 8 | 9 | import javax.servlet.http.HttpServletRequest; 10 | 11 | import com.sf.jingtai.JspToHtml; 12 | 13 | 14 | 15 | public class Callingmethod extends TimerTask { 16 | 17 | public static int count=0; //总共多少个用户 18 | public static int messacount=0;//总共有多少条帖子论坛 19 | public static int onedaycount=0;//今天一共有多少帖子 20 | public static int yessdaycount=0;//昨日一共有多少帖子 21 | public static int servedatcount=0;//7天内 22 | /* System.out.println("htp"+Callingmethod.count);*/ 23 | 24 | @Override 25 | public void run(){ 26 | //查询出有多少用户 每隔2分钟查询一次 27 | // System.out.println("我的查询方法!"); 28 | //int num = userListService.counttable(""); 29 | // System.out.println(num); 30 | try { 31 | 32 | 33 | /* JspToHtml StaticHtml = new JspToHtml(); 34 | StaticHtml.main(null); 35 | System.out.println("我在被调用 静态html 测试时间");*/ 36 | 37 | //System.out.println("count="+count); 38 | //加载数据库驱动,注册到去送管理器 0- 39 | Class.forName("com.mysql.jdbc.Driver"); 40 | 41 | String url = "jdbc:mysql://127.0.0.1:3306/bilibili?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&failOverReadOnly=false"; 42 | 43 | String username = "root"; 44 | 45 | String password = "123456"; 46 | 47 | Connection conn = DriverManager.getConnection(url , username , password); 48 | 49 | if (conn != null) { 50 | 51 | // System.out.println("数据库连接成功!"); 52 | /*******************************************************************/ 53 | //有多少用户 54 | /*******************************************************************/ 55 | Statement stmt = conn.createStatement(); //创建Statement对象 56 | String sql = "SELECT count(*) FROM user"; //要执行的SQL 57 | ResultSet rs = stmt.executeQuery(sql); 58 | while (rs.next()) { 59 | // System.out.println(rs.getInt(1)); 60 | count=rs.getInt(1);//得到有多少条数据 61 | //HttpServletRequest.class.getServletContext().setAttribute("count", rs.getInt(1)); 62 | //request.getServletContext().setAttribute("getUserName",user.getUserName()); 63 | } 64 | 65 | /*******************************************************************/ 66 | //有多少帖子 67 | /*******************************************************************/ 68 | String sql2 = "SELECT count(*) FROM forum"; //要执行的SQL 69 | ResultSet rs2 = stmt.executeQuery(sql2); 70 | while (rs2.next()) { 71 | messacount=rs2.getInt(1); 72 | } 73 | 74 | /*******************************************************************/ 75 | //今日发布了多少帖子 76 | /*******************************************************************/ 77 | String sql3 = "SELECT count(*) from forum where TO_DAYS(NOW()) - TO_DAYS(forumTime) <=1"; //要执行的SQL 78 | ResultSet rs3 = stmt.executeQuery(sql3); 79 | while (rs3.next()) { 80 | onedaycount=rs3.getInt(1); 81 | } 82 | /*******************************************************************/ 83 | //昨日发布了多少帖子 84 | /*******************************************************************/ 85 | String sql4 = "SELECT count(*) from forum where TO_DAYS(forumTime)=TO_DAYS(NOW())"; //要执行的SQL 86 | ResultSet rs4 = stmt.executeQuery(sql4); 87 | while (rs4.next()) { 88 | yessdaycount=rs4.getInt(1); 89 | } 90 | 91 | /*******************************************************************/ 92 | //7天内发布了多少帖子 93 | /*******************************************************************/ 94 | String sql5 = "SELECT count(*) from forum where DATE_SUB(CURDATE(),INTERVAL 7 DAY) <=(forumTime)"; //要执行的SQL 95 | ResultSet rs5 = stmt.executeQuery(sql5); 96 | while (rs5.next()) { 97 | servedatcount=rs5.getInt(1); 98 | } 99 | 100 | 101 | 102 | 103 | //SELECT * from forum where TO_DAYS(NOW()) - TO_DAYS(forumTime) <=1 今天的所有帖子 104 | //SELECT * from forum where TO_DAYS(forumTime)=TO_DAYS(NOW()) 昨日的帖子数量 105 | //SELECT * from forum where DATE_SUB(CURDATE(),INTERVAL 7 DAY) <=(forumTime) 7天内的所有帖子数量 106 | 107 | 108 | 109 | 110 | //System.out.println("一共"+num); 111 | } 112 | else { 113 | 114 | System.out.println("数据库连接失败!"); 115 | 116 | //完成后记得关闭数据库连接 117 | 118 | conn.close(); 119 | } 120 | 121 | } catch (ClassNotFoundException e) { 122 | 123 | e.printStackTrace(); 124 | 125 | } catch (SQLException e) { 126 | // TODO Auto-generated catch block 127 | e.printStackTrace(); 128 | } 129 | } 130 | } 131 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/chaxun/TestMain.java: -------------------------------------------------------------------------------- 1 | package com.sf.chaxun; 2 | 3 | import java.util.Timer; 4 | 5 | 6 | public class TestMain { 7 | public static void main(String[] args) { 8 | Timer timer = new Timer(); 9 | 10 | timer.schedule(new Callingmethod(), 1000, 120000); 11 | //查询出有多少用户 每隔2分钟查询一次 12 | 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/DanmuDao.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao; 2 | 3 | import com.sf.entity.Danmu; 4 | 5 | import java.util.List; 6 | 7 | public interface DanmuDao { 8 | 9 | public boolean InsertDanmu(Danmu danmu); 10 | public List selectDanmu_by_vid(int vid); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/LoginDao.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao; 2 | 3 | import java.util.List; 4 | 5 | import com.sf.entity.ordertableEntity; 6 | import com.sf.entity.userEntity; 7 | 8 | public interface LoginDao { 9 | public int login(String userName,String passWord); 10 | 11 | 12 | /** 13 | * 查看支付密码是否正确 14 | * @param userName 15 | * @param pass 16 | * @return 17 | */ 18 | public int paypassword(String userName,String pass); 19 | 20 | 21 | /** 22 | * 如果支付密码正确. 则可以修改用户余额 23 | * @param userName 24 | * @param userRMB 25 | * @return 26 | */ 27 | public int updateRMB(String userRMB,String userName); 28 | 29 | 30 | /** 31 | * 用户下单之后 将订单存储到数据库 32 | * @param ordertable 33 | * @return 34 | */ 35 | 36 | public int ordertable(ordertableEntity ordertable); 37 | 38 | 39 | 40 | /** 41 | * 根据商品ID 确认收货 42 | * @param orderID 43 | * @return 44 | */ 45 | public int Confirmorder(String orderID); 46 | 47 | 48 | 49 | /** 50 | * 根据商品ID 取消订单 51 | * @param orderID 52 | * @return 53 | */ 54 | public int Cancellationoforder(String orderID); 55 | 56 | 57 | /** 58 | * 根据商品ID 删除订单 59 | * @param orderID 60 | * @return 61 | */ 62 | public int delordertable(String orderID); 63 | 64 | 65 | /** 66 | * 根据商品ID 立即发货 67 | * @param orderID 68 | * @return 69 | */ 70 | public int Delivergoods(String OrderStat,String orderID); 71 | } 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/MessageDao.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao; 2 | 3 | import com.sf.entity.ShoppingCart; 4 | import com.sf.entity.forumEntity; 5 | import com.sf.entity.forumreplyEntity; 6 | import com.sf.entity.messageEntity; 7 | import com.sf.entity.ordertableEntity; 8 | 9 | public interface MessageDao { 10 | /** 11 | * 直接保存用户留言信息到留言表 12 | * @param message 13 | * @return 14 | */ 15 | public int message(messageEntity message); 16 | 17 | 18 | 19 | public int Shoppingcart(ShoppingCart shoppingCart); 20 | 21 | 22 | /** 23 | * 直接保存论坛帖子 24 | * @param forument 25 | * @return 26 | */ 27 | public int forumfuck(forumEntity forument); 28 | 29 | /** 30 | * 直接保存回复的帖子内容 31 | * @param forument 32 | * @return 33 | */ 34 | public int forumreply(forumreplyEntity forumreply); 35 | 36 | 37 | } 38 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/RegisterDao.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao; 2 | 3 | import com.sf.entity.userEntity; 4 | 5 | public interface RegisterDao { 6 | 7 | /** 8 | * 注册接口 9 | * 10 | * 先根据用户名查询出是否有此用户 11 | * 如果没有 即可注册 12 | * @return 13 | */ 14 | public int Register(userEntity user ); 15 | } 16 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/Update_login_password_Dao.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao; 2 | 3 | import com.sf.entity.userEntity; 4 | 5 | public interface Update_login_password_Dao { 6 | 7 | /** 8 | * 根据用户名查询出用户密码 如果正确则再去修改密码 9 | * @param userName 10 | * @param passWord 11 | * @param newpassWord 12 | * @return 13 | */ 14 | public int Update_login_password(String userName,String passWord,String newpassWord); 15 | 16 | 17 | /** 18 | * 修改用户地址 19 | * @param userName 20 | * @param passWord 21 | * @param newpassWord 22 | * @return 23 | */ 24 | public int Update_Addred(String sessionName,String dizhi,String xingming,String phone); 25 | 26 | 27 | 28 | /** 29 | * 根据用户名查询出用户邮箱 如果正确则再去修改邮箱 30 | * @param userName 31 | * @param passWord 32 | * @param newpassWord 33 | * @return 34 | */ 35 | public int Update_login_Emial(String userName,String emial,String newemial); 36 | 37 | 38 | /** 39 | * 根据用户名查询出用户手机 如果正确则再去修改手机号码 40 | * @param userName 41 | * @param passWord 42 | * @param newpassWord 43 | * @return 44 | */ 45 | public int Update_login_Phone(String userName,String userPhone,String newuserPhone); 46 | 47 | 48 | /** 49 | * 根据用户名查询出用户支付密码 如果正确则再去修改支付密码 50 | * @param userName 51 | * @param passWord 52 | * @param newpassWord 53 | * @return 54 | */ 55 | public int Update_login_payPassword(String userName,String paypassword,String newpaypassword); 56 | 57 | 58 | /** 59 | * 根据用户名查询出用户头像 如果正确则再去修改头像地址 60 | * @param userName 61 | * @param passWord 62 | * @param newpassWord 63 | * @return 64 | */ 65 | public int Update_login_hand(String userName,String userHand,String newuserHand); 66 | 67 | 68 | 69 | /** 70 | * 修改用户的全部信息 71 | * @param user 72 | * @return 73 | */ 74 | public int Update_user(userEntity user); 75 | 76 | 77 | /** 78 | * 根据ID删除对应的购物车 79 | * 80 | * @param cartID 81 | * @return 82 | */ 83 | public int delectcartID (String cartID); 84 | 85 | 86 | } 87 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/UserListDao.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao; 2 | 3 | 4 | 5 | import java.util.List; 6 | 7 | import com.sf.entity.ShoppingCart; 8 | import com.sf.entity.forumEntity; 9 | import com.sf.entity.forumreplyEntity; 10 | import com.sf.entity.gridsEntity; 11 | import com.sf.entity.messageEntity; 12 | import com.sf.entity.ordertableEntity; 13 | import com.sf.entity.userEntity; 14 | import com.sf.entity.videoEntity; 15 | 16 | public interface UserListDao { 17 | 18 | /** 19 | * 根据用户的名字 查询出用户的所有信息 20 | * @return 21 | */ 22 | public userEntity userlist(String userName); 23 | 24 | /** 25 | * 根据ID查询出此条论坛的全部信息 26 | * @param forumID 27 | * @return 28 | */ 29 | public forumEntity forumentitymmp(String forumID); 30 | 31 | /** 32 | * 将video 全部信息全部查询出来 33 | * 34 | */ 35 | public List userlistUserName(String userName); 36 | 37 | 38 | 39 | /** 40 | * 将video 全部信息全部查询出来 41 | * 42 | */ 43 | public List videolist(String videocAtegory); 44 | 45 | 46 | /** 47 | * 随机在video 里面查询出5条记录 48 | * @return 49 | */ 50 | public List videolistimit7(); 51 | 52 | /** 53 | * 随机在video 里面查询出5条记录 54 | * @return 55 | */ 56 | public List videolistimit5MAD(); 57 | 58 | /** 59 | * 随机在video 里面查询出6条记录 60 | * @return 61 | */ 62 | public List videolistimit6MAD(); 63 | 64 | /** 65 | * 根据ID查询出当前视频的所有留言 66 | * @return 67 | */ 68 | public List forumreply(String forumreplyID); 69 | 70 | 71 | /** 72 | * 根据ID查询这条帖子所有的回复 73 | * @return 74 | */ 75 | public List messagelist(String videoID); 76 | 77 | 78 | /** 79 | * 将用户表里面所有的用户只查询出15条. 到时候方便分页 80 | * @return 81 | */ 82 | public List userlistpage(int pageInt); 83 | 84 | 85 | /** 86 | * 根据用户输入的内容 进行模糊查询出所得 87 | * @return 88 | * 89 | */ 90 | public List listmohu(String usermohu); 91 | 92 | /** 93 | * 根据用户输入的手机号 进行模糊查询出所得 94 | * @return 95 | * 96 | */ 97 | public List userPhone(String userPhone); 98 | 99 | 100 | /** 101 | * 根据ID查询出用户的所有信息 102 | * @return 103 | * 104 | */ 105 | public List userID(String userID); 106 | 107 | 108 | 109 | /** 110 | * 根据用户的状态 查询出用户的所有信息 111 | * @return 112 | */ 113 | public List xiaoheiwu(String userStat); 114 | 115 | /** 116 | * 根据当前页查询出6条记录 117 | * @param dangqianye 页面传过来的当前页 118 | * @param State 需要查询的视频列别 119 | * @param meiyexianshiduoshaoge 每页显示多少个视频 120 | * @return 121 | */ 122 | public List Pagevideolist(String State,int dangqianye,int meiyexianshiduoshaoge); 123 | 124 | 125 | 126 | /** 127 | * 根据标记 查询出一共有多少条记录 128 | * @param countvideo 129 | * @return 130 | */ 131 | public int videocoun(String countvideo); 132 | 133 | 134 | /** 135 | * 将商品全部信息查询出来 136 | * @return 137 | */ 138 | public List gridslist(); 139 | 140 | 141 | /** 142 | * 根据商品ID查询出商品信息 143 | * @param gridsID 144 | * @return 145 | */ 146 | public gridsEntity gridsIDlist(String gridsID); 147 | 148 | 149 | /** 150 | * 根据登录的用户名 查询出购物车里面的商品 151 | * @param userName 152 | * @return 153 | */ 154 | public List shoppingcart(String userName); 155 | 156 | 157 | 158 | /** 159 | * 根据论坛类型查询出符合条件的论坛 160 | * @param forumliebie 161 | * @return 162 | */ 163 | public List forumEnt(String forumliebie); 164 | 165 | 166 | 167 | /** 168 | * 根据用户名查询出所有的订单 169 | * 170 | */ 171 | public List ordertable(String userName); 172 | 173 | 174 | /** 175 | * 查询出所有的订单 176 | * 177 | */ 178 | public List ordertablelist(); 179 | 180 | 181 | /** 182 | * 查询出标记的订单 183 | * 184 | */ 185 | public List orderStat(String orderStat); 186 | 187 | 188 | /** 189 | * 查询出订单表里面有多少条记录 190 | * @return 191 | */ 192 | public int countordertable(); 193 | 194 | 195 | /** 196 | * 根据表名查询出有多少记录 197 | * @param tableName 198 | * @return 199 | */ 200 | public int counttable(String tableName); 201 | 202 | 203 | } 204 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/VideoDao.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao; 2 | 3 | 4 | 5 | import com.sf.entity.videoEntity; 6 | 7 | import java.util.List; 8 | 9 | public interface VideoDao { 10 | public boolean InsertVideo(videoEntity video); 11 | public List selectVideo_by_vid(int vid); 12 | } 13 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/impl/DanmuDaoimpl.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao.impl; 2 | 3 | import com.sf.dao.DanmuDao; 4 | import com.sf.db.Data_jdbcTemplate; 5 | import com.sf.entity.Danmu; 6 | import com.sf.tool.DanmuRowMapperEntity; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Component; 9 | 10 | import java.util.List; 11 | 12 | @Component 13 | public class DanmuDaoimpl implements DanmuDao { 14 | 15 | @Autowired 16 | Data_jdbcTemplate jdbcTemplate; 17 | 18 | 19 | @Override 20 | public boolean InsertDanmu(Danmu danmu) { 21 | String insert_sql="insert into danmu(vid,content,dsize,color,dtime,position) values(?,?,?,?,?,?)"; 22 | int result=jdbcTemplate.getJdbcTemplate().update(insert_sql,new Object[]{danmu.getVid(),danmu.getContent(),danmu.getDsize(),danmu.getColor(),danmu.getDtime(),danmu.getPosition()}); 23 | if(result==0)return false; 24 | return true; 25 | } 26 | 27 | @Override 28 | public List selectDanmu_by_vid(int vid) { 29 | 30 | String select_sql="select * from danmu where vid=?"; 31 | List danmuList=jdbcTemplate.getJdbcTemplate().query(select_sql,new Object[]{vid},new DanmuRowMapperEntity()); 32 | 33 | return danmuList; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/impl/LoginDaoimpl.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Component; 5 | 6 | import com.sf.dao.LoginDao; 7 | import com.sf.db.Data_jdbcTemplate; 8 | import com.sf.entity.ordertableEntity; 9 | 10 | @Component 11 | public class LoginDaoimpl implements LoginDao { 12 | 13 | @Autowired 14 | Data_jdbcTemplate jdbcTemplate; 15 | 16 | public int login(String userName,String passWord) { 17 | //添加一条数据 18 | //String chaxunSql="insert into sda(sda) values('张三')"; 19 | //int num=jdbcTemplate.getJdbcTemplate().update(chaxunSql); 20 | 21 | //根据用户名查询 22 | //String sql = "SELECT count(*) FROM user WHERE userName = ?"; 23 | //int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[] { "12312" },Integer.class); 24 | 25 | //添加数据 26 | //String chaxunSql="insert into user(userID,userName,passWrod,userPhone,userState) values(?,?,?,?,?)"; 27 | //int num=jdbcTemplate.getJdbcTemplate().update(chaxunSql,new Object[]{"张三1","爱仕达","123","123","测试"}); 28 | 29 | //select * from user where userName="admin" and `passWord`="123321aaa"; 30 | 31 | String sql="select count(*) from user where userName = ? and passWord = ?"; 32 | int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,passWord},Integer.class); 33 | //jdbcTemplate.getJdbcTemplate().queryf 34 | return num; 35 | } 36 | 37 | @Override 38 | public int paypassword(String userName,String pass) { 39 | // SELECT * from `user` where userName="admin" and `passWord`="123321aaa" 40 | String sql = "select count(*) from user where userName=? and userPaypassword=?"; 41 | int num = jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,pass},Integer.class); 42 | 43 | return num; 44 | } 45 | 46 | @Override 47 | public int updateRMB(String userRMB, String userName) { 48 | String update="update user set userRMB=? where userName=?"; 49 | int num = jdbcTemplate.getJdbcTemplate().update(update,new Object[]{userRMB,userName}); 50 | return num; 51 | } 52 | 53 | @Override 54 | public int ordertable(ordertableEntity ordertable) { 55 | String sql = "insert into ordertable (OrderID,OrderuserName,OrderIgridsName,OrdergridsImg,OrderzongRMB,OrderStat,OrderTime,OrderAddr) values(?,?,?,?,?,?,?,?)"; 56 | int num = jdbcTemplate.getJdbcTemplate().update(sql,new Object[]{ordertable.getOrderID(),ordertable.getOrderuserName(),ordertable.getOrderIgridsName(),ordertable.getOrdergridsImg(),ordertable.getOrderzongRMB(),ordertable.getOrderStat(),ordertable.getOrderTime(),ordertable.getOrderAddr()}); 57 | return num; 58 | } 59 | 60 | @Override 61 | public int Confirmorder(String orderID) { 62 | int b = 0; 63 | //根据ID查询出是否存在这个订单 是否为发货状态 64 | String sql = "select count(*) from ordertable where OrderID = ? and OrderStat = 2";//是否有这个商品 并且是代发货状态 65 | int num = jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{orderID},Integer.class); 66 | if(num>0){ 67 | //有此订单.. 代发货状态 68 | String sql2 = "update ordertable set OrderStat=4 where OrderID=?";//更改为收货 69 | b= jdbcTemplate.getJdbcTemplate().update(sql2,new Object[]{orderID}); 70 | }else{ 71 | b=0;//查不到此订单 72 | } 73 | return b; 74 | } 75 | 76 | 77 | @Override 78 | public int Cancellationoforder(String orderID) { 79 | String sql2 = "update ordertable set OrderStat=3 where OrderID=?";//更改为待取消订单 80 | int num = jdbcTemplate.getJdbcTemplate().update(sql2,new Object[]{orderID}); 81 | return num; 82 | } 83 | 84 | @Override 85 | public int delordertable(String orderID) { 86 | String sql2 = "update ordertable set OrderStat=5 where OrderID=?";//更改为待取消订单 87 | int num = jdbcTemplate.getJdbcTemplate().update(sql2,new Object[]{orderID}); 88 | return num; 89 | } 90 | 91 | @Override 92 | public int Delivergoods(String OrderStat,String orderID) { 93 | String sql2 = "update ordertable set OrderStat=? where OrderID=?";//立即发货 94 | int num = jdbcTemplate.getJdbcTemplate().update(sql2,new Object[]{OrderStat,orderID}); 95 | return num; 96 | } 97 | 98 | } 99 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/impl/MessageImpl.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Component; 5 | 6 | import com.sf.dao.MessageDao; 7 | import com.sf.db.Data_jdbcTemplate; 8 | import com.sf.entity.ShoppingCart; 9 | import com.sf.entity.forumEntity; 10 | import com.sf.entity.forumreplyEntity; 11 | import com.sf.entity.messageEntity; 12 | import com.sf.entity.ordertableEntity; 13 | 14 | 15 | @Component 16 | public class MessageImpl implements MessageDao { 17 | 18 | @Autowired 19 | Data_jdbcTemplate jdbcTemplate;//得到模板 20 | 21 | 22 | public int message(messageEntity message) { 23 | //String chaxunSql="insert into user(userID,userName,passWord,userPhone,userState,userEmial,userHand,userPaypassword) values(?,?,?,?,?,?,?,?)"; 24 | 25 | String sql="insert into message(messageID,messagevideoID," 26 | + "messageuserID,messageuserName,message," 27 | + "messageTime,messageHand) values(?,?,?,?,?,?,?)"; 28 | int num = jdbcTemplate.getJdbcTemplate().update(sql, new Object[]{message.getMessageID(), 29 | message.getMessagevideoID(),message.getMessageuserID() 30 | ,message.getMessageuserName(), 31 | message.getMessage(),message.getMessageTime(),message.getMessageHand()}); 32 | 33 | 34 | return num; 35 | } 36 | 37 | 38 | @Override 39 | public int Shoppingcart(ShoppingCart shoppingCart) { 40 | String sql = "insert into shoppingcart(cartID,userName,shoopingID,shoopingName,shoopingImg,shoopingjiage) values (?,?,?,?,?,?)"; 41 | int num = jdbcTemplate.getJdbcTemplate().update(sql,new Object[]{shoppingCart.getCartID(),shoppingCart.getUserName(),shoppingCart.getShoopingID(),shoppingCart.getShoopingName(),shoppingCart.getShoopingImg(),shoppingCart.getShoopingjiage()}); 42 | return num; 43 | } 44 | 45 | 46 | @Override 47 | public int forumfuck(forumEntity forument) { 48 | String sql = "insert into forum(forumID,forumBT,forummessage,forumuserName,forumTime,forumliebie,forumAmount,firumhand) values (?,?,?,?,?,?,?,?)"; 49 | int num = jdbcTemplate.getJdbcTemplate().update(sql,new Object[]{forument.getForumID(),forument.getForumBT(),forument.getForummessage(),forument.getForumuserName(),forument.getForumTime(),forument.getForumliebie(),forument.getForumAmount(),forument.getFirumhand()}); 50 | return num; 51 | } 52 | 53 | 54 | @Override 55 | public int forumreply(forumreplyEntity forumreply) {/* 56 | public String replyid;//回复ID 57 | public String replyneirong;//回帖内容 58 | public String replytime;//回帖时间 59 | public String replyhand;//回帖人头像 60 | public String replytieziid;//回复帖子的ID 61 | */ 62 | String sql = "insert into forumreply (replyid,replyneirong,replytime,replyhand,replytieziid,replyname) values (?,?,?,?,?,?)"; 63 | 64 | int num = jdbcTemplate.getJdbcTemplate().update(sql,new Object[]{forumreply.getReplyid(),forumreply.getReplyneirong(),forumreply.getReplytime(),forumreply.getReplyhand(),forumreply.getReplytieziid(),forumreply.getReplyname()}); 65 | return num; 66 | } 67 | 68 | 69 | 70 | 71 | } 72 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/impl/RegisterImpl.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Component; 5 | 6 | import com.sf.dao.RegisterDao; 7 | import com.sf.db.Data_jdbcTemplate; 8 | import com.sf.entity.userEntity; 9 | 10 | @Component 11 | public class RegisterImpl implements RegisterDao { 12 | 13 | @Autowired 14 | Data_jdbcTemplate jdbcTemplate; 15 | 16 | 17 | 18 | public int Register(userEntity user) { 19 | //默认为0 20 | int register=0; 21 | //SELECT count(*) FROM user WHERE userName="admin" and `passWord`="123321aaa"; 22 | //先根据用户名查询 23 | String sql = "SELECT count(*) FROM user WHERE userName = ?"; 24 | int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[] {user.getUserName()},Integer.class); 25 | if(num>0){ 26 | System.out.println("此用户被注册"); 27 | }else{ 28 | //开始注册 29 | String chaxunSql="insert into user(userID,userName,passWord,userPhone,userState,userEmial,userHand,userPaypassword) values(?,?,?,?,?,?,?,?)"; 30 | register=jdbcTemplate.getJdbcTemplate().update(chaxunSql,new Object[]{user.getUserID(),user.getUserName(),user.getPassWord(),user.getUserPhone(),user.getUserState(),user.getUserEmial(),user.getUserHand(),user.getUserPaypassword()}); 31 | 32 | } 33 | return register; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/impl/Update_login_password_Impl.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Component; 5 | 6 | import com.sf.dao.Update_login_password_Dao; 7 | import com.sf.db.Data_jdbcTemplate; 8 | import com.sf.entity.userEntity; 9 | 10 | @Component 11 | public class Update_login_password_Impl implements Update_login_password_Dao { 12 | 13 | @Autowired 14 | Data_jdbcTemplate jdbcTemplate; 15 | //SELECT count(*) FROM user WHERE userName="admin" and `passWord`="123321aaa"; 16 | 17 | public int Update_login_password(String userName, String passWord, String newpassWord) { 18 | int what=0; 19 | //先查询出用户名和密码是否匹配 才能更改密码 20 | String sql="select count(*) from user where userName=? and passWord=?"; 21 | int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,passWord},Integer.class); 22 | if(num>0){ 23 | //UPDATE user set `newpassWord`="111" where userName="admin"; 24 | //此用户存在 并且密码匹配 可以进行修改密码 25 | String update="update user set passWord=? where userName=?"; 26 | what=jdbcTemplate.getJdbcTemplate().update(update,new Object[]{newpassWord,userName}); 27 | }else{ 28 | return what; 29 | } 30 | return what; 31 | } 32 | 33 | public int Update_login_Emial(String userName, String emial, String newemial) { 34 | int what=0; 35 | //先查询出用户名和密码是否匹配 才能更改密码 36 | String sql="select count(*) from user where userName=? and userEmial=?"; 37 | int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,emial},Integer.class); 38 | if(num>0){ 39 | //UPDATE user set `newpassWord`="111" where userName="admin"; 40 | //此用户存在 并且密码匹配 可以进行修改密码 41 | String update="update user set userEmial=? where userName=?"; 42 | what=jdbcTemplate.getJdbcTemplate().update(update,new Object[]{newemial,userName}); 43 | }else{ 44 | return what; 45 | } 46 | return what; 47 | } 48 | 49 | public int Update_login_Phone(String userName, String userPhone, String newuserPhone) { 50 | 51 | int what=0; 52 | //先查询出用户名和密码是否匹配 才能更改密码 53 | String sql="select count(*) from user where userName=? and userPhone=?"; 54 | int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,userPhone},Integer.class); 55 | if(num>0){ 56 | //UPDATE user set `newpassWord`="111" where userName="admin"; 57 | //此用户存在 并且密码匹配 可以进行修改密码 58 | String update="update user set userPhone=? where userName=?"; 59 | what=jdbcTemplate.getJdbcTemplate().update(update,new Object[]{newuserPhone,userName}); 60 | }else{ 61 | return what; 62 | } 63 | return what; 64 | } 65 | 66 | 67 | public int Update_login_payPassword(String userName, String paypassword, String newpaypassword) { 68 | int what=0; 69 | //先查询出用户名和密码是否匹配 才能更改密码 70 | String sql="select count(*) from user where userName=? and userPaypassword=?"; 71 | int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,paypassword},Integer.class); 72 | if(num>0){ 73 | //UPDATE user set `newpassWord`="111" where userName="admin"; 74 | //此用户存在 并且密码匹配 可以进行修改密码 75 | String update="update user set userPaypassword=? where userName=?"; 76 | what=jdbcTemplate.getJdbcTemplate().update(update,new Object[]{newpaypassword,userName}); 77 | }else{ 78 | return what; 79 | } 80 | return what; 81 | } 82 | 83 | @Override 84 | public int Update_login_hand(String userName, String userHand, String newuserHand) { 85 | 86 | int what=0; 87 | //先查询出用户名和密码是否匹配 才能更改密码 88 | String sql="select count(*) from user where userName=? and userHand=?"; 89 | int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,userHand},Integer.class); 90 | if(num>0){ 91 | //UPDATE user set `newpassWord`="111" where userName="admin"; 92 | //此用户存在 并且密码匹配 可以进行修改密码 93 | String update="update user set userHand=? where userName=?"; 94 | what=jdbcTemplate.getJdbcTemplate().update(update,new Object[]{newuserHand,userName}); 95 | }else{ 96 | return what; 97 | } 98 | return what; 99 | } 100 | 101 | @Override 102 | public int Update_user(userEntity user) { 103 | 104 | //update user set userName = "admin" , 105 | //userMingzi = "佘峰T" ,usersex = "男" , 106 | //passWord = "123321aaa" , userAddress = "四川省遂宁" , 107 | //userPhone = "17583108191" , userQQ = "794799102" , 108 | //userEmial = "794799102@qq.com" where 109 | //userID = "004bcfc8d4bd407bb1a114785539006f" 110 | /* System.out.println(user.getUserID()); 111 | System.out.println(user.getPassWord()); 112 | System.out.println(user.getUserMingzi()); 113 | System.out.println(user.getUsersex()); 114 | System.out.println(user.getUserPhone()); 115 | System.out.println(user.getUserQQ()); 116 | System.out.println(user.getUserEmial()); 117 | System.out.println(user.getUserAddress()); 118 | System.out.println(user.getUserName());*/ 119 | 120 | String sql="update user set userName = ? , userMingzi = ? ,usersex = ? , passWord = ? , userAddress = ? ,userPhone = ? , userQQ = ? , userEmial = ? where userID = ?"; 121 | int bl = jdbcTemplate.getJdbcTemplate().update(sql,new Object[]{user.getUserName(),user.getUserMingzi(),user.getUsersex(),user.getPassWord(),user.getUserAddress(),user.getUserPhone(),user.getUserQQ(),user.getUserEmial(),user.getUserID()}); 122 | return bl; 123 | } 124 | 125 | @Override 126 | public int Update_Addred(String sessionName, String dizhi, String xingming, String phone) { 127 | //此用户存在 并且密码匹配 可以进行修改密码 128 | String update="update user set userMingzi=?,userPhone=?,userAddress=? where userName=?"; 129 | int i =jdbcTemplate.getJdbcTemplate().update(update,new Object[]{xingming,phone,dizhi,sessionName}); 130 | return i; 131 | } 132 | 133 | @Override 134 | public int delectcartID(String cartID) { 135 | String sql = "delete from shoppingcart where cartID = ?"; 136 | int num = jdbcTemplate.getJdbcTemplate().update(sql,new Object[]{cartID}); 137 | return num; 138 | } 139 | 140 | 141 | 142 | } 143 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/dao/impl/VideoDaoimpl.java: -------------------------------------------------------------------------------- 1 | package com.sf.dao.impl; 2 | 3 | import com.sf.dao.VideoDao; 4 | import com.sf.entity.videoEntity; 5 | import com.sf.db.Data_jdbcTemplate; 6 | import com.sf.tool.VideoRowMapperEntity; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Component; 9 | 10 | import java.util.List; 11 | @Component 12 | public class VideoDaoimpl implements VideoDao { 13 | @Override 14 | public boolean InsertVideo(videoEntity video) { 15 | String insert_sql="insert into video(videoName,videoImage,videoAddress,videocAtegory) values(?,?,?,?)"; 16 | int result=jdbcTemplate.getJdbcTemplate().update(insert_sql,new Object[]{video.getVideoName(),video.getVideoImage(),video.getVideoAddress(),video.getVideocAtegory()}); 17 | if(result==0)return false; 18 | return true; 19 | 20 | 21 | } 22 | 23 | @Autowired 24 | Data_jdbcTemplate jdbcTemplate; 25 | @Override 26 | public List selectVideo_by_vid(int vid) { 27 | String select_sql="select * from video where videoID=?"; 28 | List danmuList=jdbcTemplate.getJdbcTemplate().query(select_sql,new Object[]{vid},new VideoRowMapperEntity()); 29 | 30 | return danmuList; 31 | // return null; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/db/Data_jdbcTemplate.java: -------------------------------------------------------------------------------- 1 | package com.sf.db; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Repository; 5 | 6 | @Repository 7 | public class Data_jdbcTemplate { 8 | @Autowired 9 | org.springframework.jdbc.core.JdbcTemplate jdbcTemplate; 10 | 11 | //得到spring注入的模板 12 | public org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate() { 13 | return jdbcTemplate; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/entity/Danmu.java: -------------------------------------------------------------------------------- 1 | package com.sf.entity; 2 | 3 | public class Danmu { 4 | 5 | int vid; 6 | String content; 7 | int dsize; 8 | int color; 9 | float dtime; 10 | int position; 11 | 12 | 13 | 14 | public void setVid(int vid) { 15 | this.vid = vid; 16 | } 17 | 18 | public void setContent(String content) { 19 | this.content = content; 20 | } 21 | 22 | public void setDsize(int dsize) { 23 | this.dsize = dsize; 24 | } 25 | 26 | public void setColor(int color) { 27 | this.color = color; 28 | } 29 | 30 | public void setDtime(float dtime) { 31 | this.dtime = dtime; 32 | } 33 | 34 | public void setPosition(int position) { 35 | this.position = position; 36 | } 37 | 38 | 39 | 40 | public int getVid() { 41 | return vid; 42 | } 43 | 44 | public String getContent() { 45 | return content; 46 | } 47 | 48 | public int getDsize() { 49 | return dsize; 50 | } 51 | 52 | public int getColor() { 53 | return color; 54 | } 55 | 56 | public float getDtime() { 57 | return dtime; 58 | } 59 | 60 | public int getPosition() { 61 | return position; 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/entity/JsonDanmu.java: -------------------------------------------------------------------------------- 1 | package com.sf.entity; 2 | 3 | public class JsonDanmu { 4 | String author; 5 | 6 | public void setAuthor(String author) { 7 | this.author = author; 8 | } 9 | 10 | public void setId(String id) { 11 | this.id = id; 12 | } 13 | 14 | public void setText(String text) { 15 | this.text = text; 16 | } 17 | 18 | public void setColor(int color) { 19 | this.color = color; 20 | } 21 | 22 | public void setType(int type) { 23 | this.type = type; 24 | } 25 | 26 | public void setTime(float time) { 27 | this.time = time; 28 | } 29 | 30 | String id ; 31 | String text; 32 | 33 | public String getAuthor() { 34 | return author; 35 | } 36 | 37 | public String getId() { 38 | return id; 39 | } 40 | 41 | public String getText() { 42 | return text; 43 | } 44 | 45 | public int getColor() { 46 | return color; 47 | } 48 | 49 | public int getType() { 50 | return type; 51 | } 52 | 53 | public float getTime() { 54 | return time; 55 | } 56 | 57 | int color; 58 | int type; 59 | float time; 60 | 61 | 62 | 63 | } 64 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/entity/ShoppingCart.java: -------------------------------------------------------------------------------- 1 | package com.sf.entity; 2 | 3 | //商品实体表 4 | public class ShoppingCart { 5 | public String cartID; //购物车ID 6 | public String userName;//购物人名字(账号) 7 | public String shoopingID;//商品ID 8 | public String shoopingName;//商品名字 9 | public String shoopingImg;//商品图片地址 10 | public String shoopingjiage;//商品价格 11 | 12 | public String getCartID() { 13 | return cartID; 14 | } 15 | public void setCartID(String cartID) { 16 | this.cartID = cartID; 17 | } 18 | public String getUserName() { 19 | return userName; 20 | } 21 | public void setUserName(String userName) { 22 | this.userName = userName; 23 | } 24 | public String getShoopingID() { 25 | return shoopingID; 26 | } 27 | public void setShoopingID(String shoopingID) { 28 | this.shoopingID = shoopingID; 29 | } 30 | public String getShoopingName() { 31 | return shoopingName; 32 | } 33 | public void setShoopingName(String shoopingName) { 34 | this.shoopingName = shoopingName; 35 | } 36 | public String getShoopingImg() { 37 | return shoopingImg; 38 | } 39 | public void setShoopingImg(String shoopingImg) { 40 | this.shoopingImg = shoopingImg; 41 | } 42 | public String getShoopingjiage() { 43 | return shoopingjiage; 44 | } 45 | public void setShoopingjiage(String shoopingjiage) { 46 | this.shoopingjiage = shoopingjiage; 47 | } 48 | 49 | 50 | 51 | 52 | } 53 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/entity/forumEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.entity; 2 | 3 | //帖子实体表 4 | public class forumEntity { 5 | public String forumID;//文章ID 6 | public String forumBT;//文章标题 7 | public String forummessage;//文章内容 8 | public String forumuserName;//发布人名字 9 | public String forumTime;//发布时间 10 | public String forumliebie;//发布类别 11 | public String forumAmount;//帖子浏览量 12 | public String firumhand;//头像 13 | 14 | 15 | 16 | public String getFirumhand() { 17 | return firumhand; 18 | } 19 | public void setFirumhand(String firumhand) { 20 | this.firumhand = firumhand; 21 | } 22 | public String getForumID() { 23 | return forumID; 24 | } 25 | public void setForumID(String forumID) { 26 | this.forumID = forumID; 27 | } 28 | public String getForumBT() { 29 | return forumBT; 30 | } 31 | public void setForumBT(String forumBT) { 32 | this.forumBT = forumBT; 33 | } 34 | public String getForummessage() { 35 | return forummessage; 36 | } 37 | public void setForummessage(String forummessage) { 38 | this.forummessage = forummessage; 39 | } 40 | public String getForumuserName() { 41 | return forumuserName; 42 | } 43 | public void setForumuserName(String forumuserName) { 44 | this.forumuserName = forumuserName; 45 | } 46 | public String getForumTime() { 47 | return forumTime; 48 | } 49 | public void setForumTime(String forumTime) { 50 | this.forumTime = forumTime; 51 | } 52 | public String getForumliebie() { 53 | return forumliebie; 54 | } 55 | public void setForumliebie(String forumliebie) { 56 | this.forumliebie = forumliebie; 57 | } 58 | public String getForumAmount() { 59 | return forumAmount; 60 | } 61 | public void setForumAmount(String forumAmount) { 62 | this.forumAmount = forumAmount; 63 | } 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | } 73 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/entity/forumreplyEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.entity; 2 | 3 | 4 | //回帖实体表 5 | public class forumreplyEntity { 6 | public String replyid;//回复ID 7 | public String replyneirong;//回帖内容 8 | public String replytime;//回帖时间 9 | public String replyhand;//回帖人头像 10 | public String replytieziid;//回复帖子的ID 11 | public String replyname;//回复人的名字 12 | public String getReplyid() { 13 | return replyid; 14 | } 15 | public void setReplyid(String replyid) { 16 | this.replyid = replyid; 17 | } 18 | public String getReplyneirong() { 19 | return replyneirong; 20 | } 21 | public void setReplyneirong(String replyneirong) { 22 | this.replyneirong = replyneirong; 23 | } 24 | public String getReplytime() { 25 | return replytime; 26 | } 27 | public void setReplytime(String replytime) { 28 | this.replytime = replytime; 29 | } 30 | public String getReplyhand() { 31 | return replyhand; 32 | } 33 | public void setReplyhand(String replyhand) { 34 | this.replyhand = replyhand; 35 | } 36 | public String getReplytieziid() { 37 | return replytieziid; 38 | } 39 | public void setReplytieziid(String replytieziid) { 40 | this.replytieziid = replytieziid; 41 | } 42 | public String getReplyname() { 43 | return replyname; 44 | } 45 | public void setReplyname(String replyname) { 46 | this.replyname = replyname; 47 | } 48 | 49 | 50 | 51 | 52 | 53 | } 54 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/entity/gridsEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.entity; 2 | 3 | 4 | //商品实体表 5 | public class gridsEntity { 6 | public String gridsID;//商品ID 7 | public String girdsName;//商品名字 8 | public String girdsjiage;//商品价格 9 | public String girdsimg;//商品图片地址 10 | public int girdskucun;//商品库存 11 | public String getGridsID() { 12 | return gridsID; 13 | } 14 | public void setGridsID(String gridsID) { 15 | this.gridsID = gridsID; 16 | } 17 | public String getGirdsName() { 18 | return girdsName; 19 | } 20 | public void setGirdsName(String girdsName) { 21 | this.girdsName = girdsName; 22 | } 23 | public String getGirdsjiage() { 24 | return girdsjiage; 25 | } 26 | public void setGirdsjiage(String girdsjiage) { 27 | this.girdsjiage = girdsjiage; 28 | } 29 | public String getGirdsimg() { 30 | return girdsimg; 31 | } 32 | public void setGirdsimg(String girdsimg) { 33 | this.girdsimg = girdsimg; 34 | } 35 | public int getGirdskucun() { 36 | return girdskucun; 37 | } 38 | public void setGirdskucun(int girdskucun) { 39 | this.girdskucun = girdskucun; 40 | } 41 | 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/entity/messageEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.entity; 2 | 3 | //留言实体表 4 | public class messageEntity { 5 | 6 | /* messageID varchar(32) not null, 7 | messagevideoID varchar(32) not null, 8 | messageuserID varchar(32) not null, 9 | messageuserName varchar(32) not null, 10 | message text not null, 11 | messageTime varchar(0) not null, 12 | primary key (messageID)*/ 13 | 14 | private String messageID; //留言ID 15 | private String messagevideoID;//留言视频ID 16 | private String messageuserID;//留言用户ID 17 | private String messageuserName;//留言用户名字 18 | private String message;//留言内容 19 | private String messageTime;//留言时间 20 | private String messageHand;//用户头像 21 | public String getMessageID() { 22 | return messageID; 23 | } 24 | public void setMessageID(String messageID) { 25 | this.messageID = messageID; 26 | } 27 | public String getMessagevideoID() { 28 | return messagevideoID; 29 | } 30 | public void setMessagevideoID(String messagevideoID) { 31 | this.messagevideoID = messagevideoID; 32 | } 33 | public String getMessageuserID() { 34 | return messageuserID; 35 | } 36 | public void setMessageuserID(String messageuserID) { 37 | this.messageuserID = messageuserID; 38 | } 39 | public String getMessageuserName() { 40 | return messageuserName; 41 | } 42 | public void setMessageuserName(String messageuserName) { 43 | this.messageuserName = messageuserName; 44 | } 45 | public String getMessage() { 46 | return message; 47 | } 48 | public void setMessage(String message) { 49 | this.message = message; 50 | } 51 | public String getMessageTime() { 52 | return messageTime; 53 | } 54 | public void setMessageTime(String messageTime) { 55 | this.messageTime = messageTime; 56 | } 57 | public String getMessageHand() { 58 | return messageHand; 59 | } 60 | public void setMessageHand(String messageHand) { 61 | this.messageHand = messageHand; 62 | } 63 | 64 | 65 | 66 | 67 | 68 | 69 | } 70 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/entity/ordertableEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.entity; 2 | 3 | 4 | //订单实体表 5 | public class ordertableEntity { 6 | 7 | 8 | /* 9 | 订单状态: 10 | 1 为: 代发货 11 | 2 为: 已发货 12 | 3 为: 退货中 13 | 4 为: 订单取消*/ 14 | 15 | 16 | public String orderID;//订单ID 17 | public String orderuserName;//订单人名字 18 | public String orderIgridsName;//订单商品名字 19 | public String ordergridsImg;//订单商品图片 20 | public String orderzongRMB;//订单总价格 21 | public String orderStat;//订单状态 22 | public String orderTime;//订单时间 23 | public String orderAddr;//订单收货地址 24 | public String getOrderID() { 25 | return orderID; 26 | } 27 | public void setOrderID(String orderID) { 28 | this.orderID = orderID; 29 | } 30 | public String getOrderuserName() { 31 | return orderuserName; 32 | } 33 | public void setOrderuserName(String orderuserName) { 34 | this.orderuserName = orderuserName; 35 | } 36 | public String getOrderIgridsName() { 37 | return orderIgridsName; 38 | } 39 | public void setOrderIgridsName(String orderIgridsName) { 40 | this.orderIgridsName = orderIgridsName; 41 | } 42 | public String getOrdergridsImg() { 43 | return ordergridsImg; 44 | } 45 | public void setOrdergridsImg(String ordergridsImg) { 46 | this.ordergridsImg = ordergridsImg; 47 | } 48 | public String getOrderzongRMB() { 49 | return orderzongRMB; 50 | } 51 | public void setOrderzongRMB(String orderzongRMB) { 52 | this.orderzongRMB = orderzongRMB; 53 | } 54 | public String getOrderStat() { 55 | return orderStat; 56 | } 57 | public void setOrderStat(String orderStat) { 58 | this.orderStat = orderStat; 59 | } 60 | public String getOrderTime() { 61 | return orderTime; 62 | } 63 | public void setOrderTime(String orderTime) { 64 | this.orderTime = orderTime; 65 | } 66 | public String getOrderAddr() { 67 | return orderAddr; 68 | } 69 | public void setOrderAddr(String orderAddr) { 70 | this.orderAddr = orderAddr; 71 | } 72 | 73 | 74 | 75 | 76 | 77 | } 78 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/entity/userEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.entity; 2 | 3 | public class userEntity { 4 | private String userID;//用户ID 5 | private String userMingzi;//用户真实名字 6 | private String userName;//用户名 7 | private String passWord;//密码 8 | private String useryinghangka;//银行卡号 9 | private String usersex;//性别 10 | private String userHand;//头像 11 | private String userAddress;//地址 12 | private String userPhone;//手机 13 | private String userQQ;//qq 14 | private String userEmial;//邮箱 15 | private String userCollection;//收藏 16 | private String userState;//状态 17 | private String userLoginTime;//最后登录时间 18 | private String userIP;//登录IP地址 19 | private String userPaypassword;//支付密码 20 | private String userRMB;//用户余额 21 | 22 | 23 | 24 | public String getUserRMB() { 25 | return userRMB; 26 | } 27 | public void setUserRMB(String userRMB) { 28 | this.userRMB = userRMB; 29 | } 30 | public String getUserID() { 31 | return userID; 32 | } 33 | public void setUserID(String userID) { 34 | this.userID = userID; 35 | } 36 | public String getUserMingzi() { 37 | return userMingzi; 38 | } 39 | public void setUserMingzi(String userMingzi) { 40 | this.userMingzi = userMingzi; 41 | } 42 | public String getUserName() { 43 | return userName; 44 | } 45 | public void setUserName(String userName) { 46 | this.userName = userName; 47 | } 48 | public String getPassWord() { 49 | return passWord; 50 | } 51 | public void setPassWord(String passWord) { 52 | this.passWord = passWord; 53 | } 54 | public String getUseryinghangka() { 55 | return useryinghangka; 56 | } 57 | public void setUseryinghangka(String useryinghangka) { 58 | this.useryinghangka = useryinghangka; 59 | } 60 | public String getUsersex() { 61 | return usersex; 62 | } 63 | public void setUsersex(String usersex) { 64 | this.usersex = usersex; 65 | } 66 | public String getUserHand() { 67 | return userHand; 68 | } 69 | public void setUserHand(String userHand) { 70 | this.userHand = userHand; 71 | } 72 | public String getUserAddress() { 73 | return userAddress; 74 | } 75 | public void setUserAddress(String userAddress) { 76 | this.userAddress = userAddress; 77 | } 78 | public String getUserPhone() { 79 | return userPhone; 80 | } 81 | public void setUserPhone(String userPhone) { 82 | this.userPhone = userPhone; 83 | } 84 | public String getUserQQ() { 85 | return userQQ; 86 | } 87 | public void setUserQQ(String userQQ) { 88 | this.userQQ = userQQ; 89 | } 90 | public String getUserEmial() { 91 | return userEmial; 92 | } 93 | public void setUserEmial(String userEmial) { 94 | this.userEmial = userEmial; 95 | } 96 | public String getUserCollection() { 97 | return userCollection; 98 | } 99 | public void setUserCollection(String userCollection) { 100 | this.userCollection = userCollection; 101 | } 102 | public String getUserState() { 103 | return userState; 104 | } 105 | public void setUserState(String userState) { 106 | this.userState = userState; 107 | } 108 | public String getUserLoginTime() { 109 | return userLoginTime; 110 | } 111 | public void setUserLoginTime(String userLoginTime) { 112 | this.userLoginTime = userLoginTime; 113 | } 114 | public String getUserIP() { 115 | return userIP; 116 | } 117 | public void setUserIP(String userIP) { 118 | this.userIP = userIP; 119 | } 120 | public String getUserPaypassword() { 121 | return userPaypassword; 122 | } 123 | public void setUserPaypassword(String userPaypassword) { 124 | this.userPaypassword = userPaypassword; 125 | } 126 | 127 | 128 | } 129 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/entity/videoEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.entity; 2 | 3 | public class videoEntity { 4 | 5 | private String videoID; //视频ID 6 | private String videoName;//视频名字 7 | private String videoImage;//视频图片 8 | private String videoAddress;//视频地址 9 | private String videolookTime;//视频时长 10 | private String videoCollection;//收藏 11 | private String videoLeaving;//视频留言 12 | private String videoTime;//视频上传时间 13 | private String videoState;//视频状态 14 | private String videocAtegory;//视频类别 15 | 16 | 17 | 18 | public String getVideoID() { 19 | return videoID; 20 | } 21 | public void setVideoID(String videoID) { 22 | this.videoID = videoID; 23 | } 24 | public String getVideoName() { 25 | return videoName; 26 | } 27 | public void setVideoName(String videoName) { 28 | this.videoName = videoName; 29 | } 30 | public String getVideoImage() { 31 | return videoImage; 32 | } 33 | public void setVideoImage(String videoImage) { 34 | this.videoImage = videoImage; 35 | } 36 | public String getVideoAddress() { 37 | return videoAddress; 38 | } 39 | public void setVideoAddress(String videoAddress) { 40 | this.videoAddress = videoAddress; 41 | } 42 | public String getVideolookTime() { 43 | return videolookTime; 44 | } 45 | public void setVideolookTime(String videolookTime) { 46 | this.videolookTime = videolookTime; 47 | } 48 | public String getVideoCollection() { 49 | return videoCollection; 50 | } 51 | public void setVideoCollection(String videoCollection) { 52 | this.videoCollection = videoCollection; 53 | } 54 | public String getVideoLeaving() { 55 | return videoLeaving; 56 | } 57 | public void setVideoLeaving(String videoLeaving) { 58 | this.videoLeaving = videoLeaving; 59 | } 60 | public String getVideoTime() { 61 | return videoTime; 62 | } 63 | public void setVideoTime(String videoTime) { 64 | this.videoTime = videoTime; 65 | } 66 | public String getVideoState() { 67 | return videoState; 68 | } 69 | public void setVideoState(String videoState) { 70 | this.videoState = videoState; 71 | } 72 | public String getVideocAtegory() { 73 | return videocAtegory; 74 | } 75 | public void setVideocAtegory(String videocAtegory) { 76 | this.videocAtegory = videocAtegory; 77 | } 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | } 86 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/entity/videoTopEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.entity; 2 | 3 | public class videoTopEntity { 4 | private String Filename;// 文件名字 5 | 6 | private long FileSize;// 文件总大小 7 | 8 | private long FileSY;// 文件上传 剩余的 9 | 10 | private int tag=0;//如果大于0就是上传完成 11 | 12 | private int baifenbi=0;//百分比 13 | 14 | public String getFilename() { 15 | return Filename; 16 | } 17 | 18 | public void setFilename(String filename) { 19 | Filename = filename; 20 | } 21 | 22 | public long getFileSize() { 23 | return FileSize; 24 | } 25 | 26 | public void setFileSize(long fileSize) { 27 | FileSize = fileSize; 28 | } 29 | 30 | public long getFileSY() { 31 | return FileSY; 32 | } 33 | 34 | public void setFileSY(long fileSY) { 35 | FileSY = fileSY; 36 | } 37 | 38 | public int getTag() { 39 | return tag; 40 | } 41 | 42 | public void setTag(int tag) { 43 | this.tag = tag; 44 | } 45 | 46 | public int getBaifenbi() { 47 | return baifenbi; 48 | } 49 | 50 | public void setBaifenbi(int baifenbi) { 51 | this.baifenbi = baifenbi; 52 | } 53 | 54 | 55 | 56 | } 57 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/jingtai/JspToHtml.java: -------------------------------------------------------------------------------- 1 | package com.sf.jingtai; 2 | 3 | import java.io.BufferedReader; 4 | import java.io.FileOutputStream; 5 | import java.io.InputStream; 6 | import java.io.InputStreamReader; 7 | import java.io.OutputStreamWriter; 8 | import java.net.HttpURLConnection; 9 | import java.net.URL; 10 | import java.util.Date; 11 | 12 | public class JspToHtml { 13 | private static long star = 0; 14 | private static long end = 0; 15 | private static long ttime = 0; 16 | 17 | // 返回html代码 18 | public static String getHtmlCode(String httpUrl, String bianma) { 19 | Date before = new Date(); 20 | star = before.getTime(); 21 | String htmlCode = ""; 22 | try { 23 | InputStream in; 24 | URL url = new java.net.URL(httpUrl); 25 | HttpURLConnection connection = (HttpURLConnection) url.openConnection(); 26 | connection = (HttpURLConnection) url.openConnection(); 27 | connection.setRequestProperty("User-Agent", "Mozilla/4.0"); 28 | connection.connect(); 29 | in = connection.getInputStream(); 30 | java.io.BufferedReader breader = new BufferedReader(new InputStreamReader(in, bianma)); 31 | String currentLine; 32 | while ((currentLine = breader.readLine()) != null) { 33 | htmlCode += currentLine; 34 | } 35 | } catch (Exception e) { 36 | e.printStackTrace(); 37 | } finally { 38 | //Date after = new Date(); 39 | //end = after.getTime(); 40 | //ttime = end - star; 41 | // System.out.println("执行时间:"+ttime +"秒"); 42 | } 43 | return htmlCode; 44 | } 45 | // 存储文件 46 | public static synchronized void writeHtml(String filePath, String info) { 47 | try { 48 | OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(filePath), "UTF-8"); 49 | out.write(info); 50 | out.flush(); 51 | } catch (Exception ex) { 52 | ex.getMessage(); 53 | } 54 | } 55 | 56 | //main调用 57 | public static void main(String[] args) { 58 | //http://127.0.0.1:888/bilibili/static/adminjs/index.html 59 | //http://119.23.216.18:8080/bilibili/logoone.sf 60 | //http://127.0.0.1:888/bilibili/logoone.sf 61 | String url = "http://127.0.0.1:888/bilibili/logoone.sf"; 62 | writeHtml("X:/Users/F-she-father/Workspaces/Eclipse IDE/bilibili/src/main/webapp/static/adminjs/index.html",getHtmlCode(url,"utf-8")); 63 | //c:/1/html/index.html 64 | //X:\Users\F-she-father\Workspaces\ 65 | //Eclipse IDE\bilibili\src\main\webapp\static\adminjs 66 | long tmp = Long.parseLong("0"); 67 | java.util.Date before = new java.util.Date(); 68 | long currtime = before.getTime(); 69 | System.out.println(currtime - tmp); 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/lanjieqi/Auth.java: -------------------------------------------------------------------------------- 1 | package com.sf.lanjieqi; 2 | 3 | import java.lang.annotation.Documented; 4 | import java.lang.annotation.ElementType; 5 | import java.lang.annotation.Inherited; 6 | import java.lang.annotation.Retention; 7 | import java.lang.annotation.RetentionPolicy; 8 | import java.lang.annotation.Target; 9 | 10 | @Documented 11 | @Inherited 12 | @Target(ElementType.METHOD) 13 | @Retention(RetentionPolicy.RUNTIME) 14 | 15 | public @interface Auth { 16 | boolean validate() default true; 17 | } 18 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/lanjieqi/AuthInterceptor.java: -------------------------------------------------------------------------------- 1 | package com.sf.lanjieqi; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | 6 | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; 7 | 8 | public class AuthInterceptor extends HandlerInterceptorAdapter{ 9 | 10 | @Override 11 | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) 12 | throws Exception { 13 | 14 | //判断用户是否登录 访问了不该访问的页面 15 | String userName = (String) request.getSession().getAttribute("userName"); 16 | if(userName!=null){ 17 | return true; 18 | } 19 | //访问的用户没有登录... 20 | //跳转页面 21 | String addr = ""; 22 | 23 | if(request.getQueryString()!=null){ 24 | //这个是带参数的! 25 | addr = request.getRequestURI()+"?"+request.getQueryString(); 26 | }else{ 27 | //这个是不带参数的 28 | addr = request.getRequestURI(); 29 | } 30 | String jiequ = addr.substring(9); 31 | // jiequ 这个地址是用户想访问的地址 32 | request.getSession().setAttribute("jiequ", jiequ); 33 | 34 | response.sendRedirect("login.sf"); 35 | return false; 36 | 37 | } 38 | 39 | } -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/request/MessageRequest.java: -------------------------------------------------------------------------------- 1 | package com.sf.request; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | import java.io.UnsupportedEncodingException; 6 | import java.util.List; 7 | 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | 11 | import org.springframework.beans.factory.annotation.Autowired; 12 | import org.springframework.stereotype.Controller; 13 | import org.springframework.web.bind.annotation.RequestMapping; 14 | import org.springframework.web.bind.annotation.RequestMethod; 15 | import org.springframework.web.bind.annotation.ResponseBody; 16 | 17 | import com.google.gson.Gson; 18 | import com.sf.entity.messageEntity; 19 | import com.sf.entity.userEntity; 20 | import com.sf.entity.videoEntity; 21 | import com.sf.service.impl.LoginServiceImpl; 22 | import com.sf.service.impl.MessageServiceImpl; 23 | import com.sf.service.impl.UserListServiceImpl; 24 | import com.sf.tool.GetDataTime; 25 | import com.sf.tool.GetUUID; 26 | 27 | @Controller 28 | public class MessageRequest { 29 | 30 | @Autowired 31 | LoginServiceImpl loginServiceImpl; 32 | 33 | @Autowired 34 | UserListServiceImpl userListServiceImpl; 35 | 36 | @Autowired 37 | MessageServiceImpl messageServiceImpl; 38 | 39 | @RequestMapping(value = "messageuser.sf", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") 40 | public @ResponseBody void web3(String message, HttpServletRequest request, HttpServletResponse response, 41 | String shipingID) throws IOException { 42 | String userName = (String) request.getSession().getAttribute("userName");// 得到用户登录的用户名 43 | // 如果Session 里面的用户名存在 就相当于用户已经登录 可以留言 否则不能 44 | // 设置编码 45 | // System.out.println("ajax 进入了 发表留言里面"); 46 | response.setCharacterEncoding("UTF-8"); 47 | request.setCharacterEncoding("UTF-8"); 48 | PrintWriter out = response.getWriter(); 49 | String tishi = ""; 50 | Gson gson = new Gson(); 51 | if (userName != null) { 52 | 53 | // 随机生成一个留言表ID 54 | String messageID = GetUUID.getUUID(); 55 | // 获得当前时间 56 | String dataTime = GetDataTime.DQtime(); 57 | // System.out.println(message);//得到留言内容 58 | // System.out.println(shipingID);//得到视频ID 59 | // String 60 | userEntity user = userListServiceImpl.userlist(userName); 61 | // 得到用户ID 62 | String userID = user.getUserID(); 63 | String userHand = user.getUserHand(); 64 | 65 | // 将留言类容过滤掉 html 标签 66 | message = message.replaceAll("<[^<]+>//s*|/t|/r|/n| ", ""); 67 | //留言内容不能超过150个字 68 | if (message.length() < 150) { 69 | 70 | // new 一个用户实体 71 | messageEntity messageent = new messageEntity(); 72 | messageent.setMessage(message); 73 | messageent.setMessageID(messageID); 74 | messageent.setMessageTime(dataTime); 75 | messageent.setMessageuserID(userID); 76 | messageent.setMessageuserName(userName); 77 | messageent.setMessagevideoID(shipingID); 78 | messageent.setMessageHand(userHand);// 将用户留言头像地址存放的留言表 79 | boolean bl = messageServiceImpl.message(messageent); 80 | if (bl) { 81 | // 留言成功 82 | // System.out.println("向这个视频留言成功"); 83 | tishi = "留言成功"; 84 | } else { 85 | // 留言失败 86 | // System.out.println("留言失败"); 87 | tishi = "留言失败"; 88 | } 89 | }else{ 90 | System.out.println(message.length()); 91 | tishi="对不起,留言内容过长"; 92 | } 93 | } else { 94 | // 说明用户没有登录 就在留言 95 | // System.out.println("用户没有登录"); 96 | tishi = "请登录之后留言"; 97 | } 98 | // redirect:/messageuser.sf 99 | String t1 = gson.toJson(tishi); 100 | out.write(t1); 101 | 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/request/RegisterRequest.java: -------------------------------------------------------------------------------- 1 | package com.sf.request; 2 | 3 | import java.util.regex.Matcher; 4 | import java.util.regex.Pattern; 5 | 6 | import javax.servlet.http.HttpServletRequest; 7 | 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.web.bind.annotation.RequestMapping; 11 | 12 | import com.sf.entity.userEntity; 13 | import com.sf.service.impl.RegisterServiceImpl; 14 | import com.sf.tool.GetUUID; 15 | 16 | @Controller 17 | public class RegisterRequest { 18 | @Autowired 19 | RegisterServiceImpl registerService; 20 | 21 | @RequestMapping("register.sf") 22 | public String web3(userEntity user, HttpServletRequest request,String yanzheng) { 23 | // System.out.println(user.getUserEmial()); 24 | // System.out.println("测试是否进入此方法"); 25 | 26 | // 设置一个默认的用户ID UUID 27 | user.setUserID(GetUUID.getUUID()); 28 | // 设置用户注册时 默认状态 29 | user.setUserState("正常");// 状态为0为正常用户 30 | // 设置注册用户的默认支付密码; (一开始忘记了) 31 | user.setUserPaypassword("123456"); 32 | // 设置注册用户的默认头像 33 | user.setUserHand("/static/userHand_Top/upload/MyHand.png"); 34 | 35 | // 手机号码 正则表达式 36 | String phone = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9])|(18[1,5-9])|(17[7,5-9]))\\d{8}$"; 37 | Pattern regex = Pattern.compile(phone); 38 | Matcher matcher = regex.matcher(user.getUserPhone()); 39 | boolean pho = matcher.matches(); 40 | // 邮箱 正则表达式 41 | String email = "[a-zA-Z0-9_\\-\\.]+@(sina|qq|163)+(\\.(com|cn|org|edu|hk))"; 42 | Pattern regexemail = Pattern.compile(email); 43 | Matcher matcheremial = regexemail.matcher(user.getUserEmial()); 44 | boolean emial = matcheremial.matches(); 45 | //验证用户账号 46 | String userNmae= "^[a-zA-Z]\\w{5,17}$"; 47 | Pattern regexuserNmae = Pattern.compile(userNmae); 48 | Matcher matcheruserName = regexuserNmae.matcher(user.getUserName()); 49 | boolean username = matcheruserName.matches(); 50 | 51 | //获得验证码.....我是放入到session里的 52 | String yan=(String) request.getSession().getAttribute("yanzhengma"); 53 | 54 | 55 | if(yanzheng.equals(yan)){ 56 | if (pho) { 57 | if (emial) { 58 | if(username){ 59 | boolean bl = registerService.RegisterService(user); 60 | if (bl) { 61 | // 这里是注册成功 62 | request.getServletContext().setAttribute("getUserName",user.getUserName()); 63 | } else { 64 | request.setAttribute("fail", "注册失败,此用户已经被注册"); 65 | return "forward:/zhuce.sf"; 66 | } 67 | }else{ 68 | request.setAttribute("fail", "注册失败,用户名输入错误"); 69 | return "forward:/zhuce.sf"; 70 | } 71 | } else { 72 | request.setAttribute("fail", "注册失败,邮箱地址错误"); 73 | return "forward:/zhuce.sf"; 74 | } 75 | return "forward:/login.sf"; 76 | 77 | } else { 78 | request.setAttribute("fail", "注册失败,手机号码错误"); 79 | } 80 | }else{ 81 | request.setAttribute("fail", "注册失败,验证码错误"); 82 | return "forward:/zhuce.sf"; 83 | } 84 | return "forward:/zhuce.sf"; 85 | } 86 | 87 | } 88 | 89 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/Addservice.java: -------------------------------------------------------------------------------- 1 | package com.sf.service; 2 | 3 | public interface Addservice { 4 | public boolean login(); 5 | } 6 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/Danmuservice.java: -------------------------------------------------------------------------------- 1 | package com.sf.service; 2 | 3 | import com.sf.entity.Danmu; 4 | 5 | import java.util.List; 6 | 7 | public interface Danmuservice { 8 | public boolean sendDanmu(Danmu danmu); 9 | public List readDanmuByVid(int vid); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/LoginService.java: -------------------------------------------------------------------------------- 1 | package com.sf.service; 2 | 3 | import com.sf.entity.ordertableEntity; 4 | 5 | public interface LoginService { 6 | public boolean loginuser(String userName,String passWord); 7 | 8 | 9 | 10 | 11 | /** 12 | * 查看支付密码是否正确 13 | * @param userName 14 | * @param pass 15 | * @return 16 | */ 17 | public boolean paypassword(String userName,String pass); 18 | 19 | 20 | /** 21 | * 如果支付密码正确. 则可以修改用户余额 22 | * @param userName 23 | * @param userRMB 24 | * @return 25 | */ 26 | public boolean updateRMB(String userRMB,String userName); 27 | 28 | 29 | 30 | 31 | /** 32 | * 用户下单之后 将订单存储到数据库 33 | * @param ordertable 34 | * @return 35 | */ 36 | 37 | public boolean ordertable(ordertableEntity ordertable); 38 | 39 | 40 | 41 | /** 42 | * 根据商品ID 确认收货 43 | * @param orderID 44 | * @return 45 | */ 46 | public boolean Confirmorder(String orderID); 47 | 48 | 49 | 50 | /** 51 | * 根据商品ID 取消订单 52 | * @param orderID 53 | * @return 54 | */ 55 | public boolean Cancellationoforder(String orderID); 56 | 57 | 58 | 59 | /** 60 | * 根据商品ID 删除订单 61 | * @param orderID 62 | * @return 63 | */ 64 | public boolean delordertable(String orderID); 65 | 66 | 67 | 68 | 69 | /** 70 | * 根据商品ID 立即发货 71 | * @param orderID 72 | * @return 73 | */ 74 | public boolean Delivergoods(String OrderStat,String orderID); 75 | } 76 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/MessageService.java: -------------------------------------------------------------------------------- 1 | package com.sf.service; 2 | 3 | import com.sf.entity.ShoppingCart; 4 | import com.sf.entity.forumEntity; 5 | import com.sf.entity.forumreplyEntity; 6 | import com.sf.entity.messageEntity; 7 | 8 | public interface MessageService { 9 | 10 | 11 | 12 | /** 13 | * 直接保存用户留言信息到留言表 14 | * @param message 15 | * @return 16 | */ 17 | public boolean message(messageEntity message); 18 | 19 | 20 | /** 21 | * 直接保存 22 | * @param shoppingCart 23 | * @return 24 | */ 25 | public boolean Shoppingcart(ShoppingCart shoppingCart); 26 | 27 | 28 | /** 29 | * 直接保存论坛帖子 30 | * @param forument 31 | * @return 32 | */ 33 | public boolean forumfuck(forumEntity forument); 34 | 35 | 36 | 37 | /** 38 | * 直接保存回复的帖子内容 39 | * @param forument 40 | * @return 41 | */ 42 | public boolean forumreply(forumreplyEntity forumreply); 43 | } 44 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/RegisterService.java: -------------------------------------------------------------------------------- 1 | package com.sf.service; 2 | 3 | import com.sf.entity.userEntity; 4 | 5 | public interface RegisterService { 6 | 7 | public boolean RegisterService(userEntity user); 8 | 9 | 10 | } 11 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/Update_login_password_Service.java: -------------------------------------------------------------------------------- 1 | package com.sf.service; 2 | 3 | import com.sf.entity.userEntity; 4 | 5 | public interface Update_login_password_Service { 6 | 7 | public boolean Update_login_password(String userName,String passWord,String newpassWord); 8 | 9 | 10 | /** 11 | * 根据用户名查询出用户邮箱 如果正确则再去修改邮箱 12 | * @param userName 13 | * @param passWord 14 | * @param newpassWord 15 | * @return 16 | */ 17 | public boolean Update_login_Emial(String userName,String emial,String newemial); 18 | 19 | 20 | 21 | /** 22 | * 根据用户名查询出用户手机 如果正确则再去修改手机号码 23 | * @param userName 24 | * @param passWord 25 | * @param newpassWord 26 | * @return 27 | */ 28 | public boolean Update_login_Phone(String userName,String userPhone,String newuserPhone); 29 | 30 | 31 | 32 | /** 33 | * 根据用户名查询出用户支付密码 如果正确则再去修改支付密码 34 | * @param userName 35 | * @param passWord 36 | * @param newpassWord 37 | * @return 38 | */ 39 | public boolean Update_login_payPassword(String userName,String paypassword,String newpaypassword); 40 | 41 | 42 | 43 | /** 44 | * 根据用户名查询出用户头像 如果正确则再去修改头像地址 45 | * @param userName 46 | * @param passWord 47 | * @param newpassWord 48 | * @return 49 | */ 50 | public boolean Update_login_hand(String userName,String userHand,String newuserHand); 51 | 52 | 53 | /** 54 | * 修改用户的全部信息 55 | * @param user 56 | * @return 57 | */ 58 | public boolean Update_user(userEntity user); 59 | 60 | 61 | /** 62 | * 修改用户地址 63 | * @param userName 64 | * @param passWord 65 | * @param newpassWord 66 | * @return 67 | */ 68 | public boolean Update_Addred(String sessionName,String dizhi,String xingming,String phone); 69 | 70 | 71 | /** 72 | * 根据ID删除对应的购物车 73 | * 74 | * @param cartID 75 | * @return 76 | */ 77 | public boolean delectcartID (String cartID); 78 | } 79 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/UserListService.java: -------------------------------------------------------------------------------- 1 | package com.sf.service; 2 | 3 | import java.util.List; 4 | 5 | import com.sf.entity.ShoppingCart; 6 | import com.sf.entity.forumEntity; 7 | import com.sf.entity.forumreplyEntity; 8 | import com.sf.entity.gridsEntity; 9 | import com.sf.entity.messageEntity; 10 | import com.sf.entity.ordertableEntity; 11 | import com.sf.entity.userEntity; 12 | import com.sf.entity.videoEntity; 13 | 14 | public interface UserListService { 15 | 16 | /** 17 | * 根据用户的名字 查询出用户的所有信息 18 | * @return 19 | */ 20 | public userEntity userlist(String userName); 21 | /** 22 | * 将video 全部信息全部查询出来 23 | * 24 | */ 25 | public List userlistUserName(String userName); 26 | 27 | 28 | /** 29 | * 根据ID查询出此条论坛的全部信息 30 | * @param forumID 31 | * @return 32 | */ 33 | public forumEntity forumentitymmp(String forumID); 34 | 35 | /** 36 | * 根据ID查询出当前视频的所有留言 37 | * @return 38 | */ 39 | public List forumreply(String forumreplyID); 40 | 41 | /** 42 | * 将video 全部信息全部查询出来 43 | * 44 | */ 45 | public List videolist(String videocAtegory); 46 | 47 | 48 | /** 49 | * 随机在video 里面查询出5条记录 50 | * @return 51 | */ 52 | public List videolistimit7(); 53 | 54 | /** 55 | * 随机在video 里面查询出6条记录 56 | * @return 57 | */ 58 | public List videolistimit6MAD(); 59 | 60 | 61 | /** 62 | * 随机在video 里面查询出5条记录 63 | * @return 64 | */ 65 | public List videolistimit5MAD(); 66 | 67 | 68 | /** 69 | * 根据ID查询出当前视频的所有留言 70 | * @return 71 | */ 72 | public List messagelist(String videoID); 73 | 74 | 75 | 76 | /** 77 | * 将用户表里面所有的用户只查询出15条. 到时候方便分页 78 | * @return 79 | */ 80 | public List userlistpage(int pageInt); 81 | 82 | 83 | /** 84 | * 根据用户输入的内容 进行模糊查询出所得 85 | * @return 86 | * 87 | */ 88 | public List listmohu(String usermohu); 89 | 90 | 91 | /** 92 | * 根据用户输入的手机号 进行模糊查询出所得 93 | * @return 94 | * 95 | */ 96 | public List userPhone(String userPhone); 97 | 98 | 99 | /** 100 | * 根据ID查询出用户的所有信息 101 | * @return 102 | * 103 | */ 104 | public List userID(String userID); 105 | 106 | /** 107 | * 根据用户的状态 查询出用户的所有信息 108 | * @return 109 | */ 110 | public List xiaoheiwu(String userStat); 111 | 112 | 113 | /** 114 | * 根据当前页查询出6条记录 115 | * @param dangqianye 页面传过来的当前页 116 | * @param State 需要查询的视频列别 117 | * @param meiyexianshiduoshaoge 每页显示多少个视频 118 | * @return 119 | */ 120 | public List Pagevideolist(String State,int dangqianye,int meiyexianshiduoshaoge); 121 | 122 | 123 | /** 124 | * 根据标记 查询出一共有多少条记录 125 | * @param countvideo 126 | * @return 127 | */ 128 | public int videocoun(String countvideo); 129 | 130 | /** 131 | * 将商品全部信息查询出来 132 | * @return 133 | */ 134 | public List gridslist(); 135 | 136 | 137 | 138 | /** 139 | * 根据商品ID查询出商品信息 140 | * @param gridsID 141 | * @return 142 | */ 143 | public gridsEntity gridsIDlist(String gridsID); 144 | 145 | 146 | /** 147 | * 根据登录的用户名 查询出购物车里面的商品 148 | * @param userName 149 | * @return 150 | */ 151 | public List shoppingcart(String userName); 152 | 153 | 154 | 155 | 156 | /** 157 | * 根据用户名查询出所有的订单 158 | * 159 | */ 160 | public List ordertable(String userName); 161 | 162 | 163 | 164 | 165 | /** 166 | * 查询出所有的订单 167 | * 168 | */ 169 | public List ordertablelist(); 170 | 171 | 172 | 173 | 174 | /** 175 | * 查询出标记的订单 176 | * 177 | */ 178 | public List orderStat(String orderStat); 179 | 180 | 181 | 182 | /** 183 | * 查询出订单表里面有多少条记录 184 | * @return 185 | */ 186 | public int countordertable(); 187 | 188 | 189 | /** 190 | * 根据论坛类型查询出符合条件的论坛 191 | * @param forumliebie 192 | * @return 193 | */ 194 | public List forumEnt(String forumliebie); 195 | 196 | 197 | 198 | /** 199 | * 根据表名查询出有多少记录 200 | * @param tableName 201 | * @return 202 | */ 203 | public int counttable(String tableName); 204 | } 205 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/Videoservice.java: -------------------------------------------------------------------------------- 1 | package com.sf.service; 2 | 3 | 4 | 5 | import com.sf.entity.videoEntity; 6 | 7 | import java.util.List; 8 | 9 | public interface Videoservice { 10 | public boolean insertVideo(videoEntity video); 11 | public List readVideoByVid(int vid); 12 | } 13 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/impl/Addserviceimpl.java: -------------------------------------------------------------------------------- 1 | package com.sf.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Component; 5 | 6 | import com.sf.dao.impl.LoginDaoimpl; 7 | import com.sf.service.Addservice; 8 | @Component 9 | public class Addserviceimpl implements Addservice { 10 | 11 | @Autowired 12 | LoginDaoimpl login; 13 | 14 | @Override 15 | public boolean login() { 16 | int num=login.login("1", "1"); 17 | if(num>0){ 18 | return true; 19 | } 20 | return false; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/impl/DanmuServiceimpl.java: -------------------------------------------------------------------------------- 1 | package com.sf.service.impl; 2 | 3 | import com.sf.dao.impl.DanmuDaoimpl; 4 | import com.sf.entity.Danmu; 5 | import com.sf.service.Danmuservice; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.List; 10 | 11 | @Service 12 | public class DanmuServiceimpl implements Danmuservice { 13 | @Autowired 14 | DanmuDaoimpl danmuDaoimpl; 15 | @Override 16 | public boolean sendDanmu(Danmu danmu) { 17 | boolean result= danmuDaoimpl.InsertDanmu(danmu); 18 | return result; 19 | } 20 | 21 | @Override 22 | public List readDanmuByVid(int vid) { 23 | List danmuList= danmuDaoimpl.selectDanmu_by_vid(vid); 24 | return danmuList; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/impl/LoginServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.sf.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import com.sf.dao.impl.LoginDaoimpl; 7 | import com.sf.entity.ordertableEntity; 8 | import com.sf.service.LoginService; 9 | 10 | @Service 11 | public class LoginServiceImpl implements LoginService { 12 | 13 | @Autowired 14 | LoginDaoimpl loginService; 15 | 16 | public boolean loginuser(String userName, String passWord) { 17 | int num=loginService.login(userName, passWord); 18 | if(num>0){ 19 | return true; 20 | } 21 | return false; 22 | } 23 | 24 | @Override 25 | public boolean paypassword(String userName, String pass) { 26 | int num = loginService.paypassword(userName, pass); 27 | if(num>0){ 28 | return true; 29 | } 30 | return false; 31 | } 32 | 33 | @Override 34 | public boolean updateRMB(String userRMB, String userName) { 35 | int num = loginService.updateRMB(userRMB, userName); 36 | if(num>0){ 37 | return true; 38 | } 39 | return false; 40 | } 41 | 42 | @Override 43 | public boolean ordertable(ordertableEntity ordertable) { 44 | int num = loginService.ordertable(ordertable); 45 | if(num>0){ 46 | return true; 47 | } 48 | return false; 49 | } 50 | 51 | @Override 52 | public boolean Confirmorder(String orderID) { 53 | int num = loginService.Confirmorder(orderID); 54 | if(num>0){ 55 | return true; 56 | } 57 | return false; 58 | } 59 | 60 | @Override 61 | public boolean Cancellationoforder(String orderID) { 62 | int num = loginService.Cancellationoforder(orderID); 63 | if(num>0){ 64 | return true; 65 | } 66 | return false; 67 | } 68 | 69 | @Override 70 | public boolean delordertable(String orderID) { 71 | int num = loginService.delordertable(orderID); 72 | if(num>0){ 73 | return true; 74 | } 75 | return false; 76 | } 77 | 78 | @Override 79 | public boolean Delivergoods(String OrderStat,String orderID) { 80 | int num = loginService.Delivergoods(OrderStat,orderID); 81 | if(num>0){ 82 | return true; 83 | } 84 | return false; 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/impl/MessageServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.sf.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import com.sf.dao.impl.MessageImpl; 7 | import com.sf.entity.ShoppingCart; 8 | import com.sf.entity.forumEntity; 9 | import com.sf.entity.forumreplyEntity; 10 | import com.sf.entity.messageEntity; 11 | import com.sf.service.MessageService; 12 | 13 | @Service 14 | public class MessageServiceImpl implements MessageService { 15 | 16 | @Autowired 17 | MessageImpl messageImpl; 18 | 19 | public boolean message(messageEntity message) { 20 | int bl = messageImpl.message(message); 21 | if(bl>0){ 22 | return true; 23 | } 24 | return false; 25 | } 26 | 27 | @Override 28 | public boolean Shoppingcart(ShoppingCart shoppingCart) { 29 | int bl = messageImpl.Shoppingcart(shoppingCart); 30 | if(bl>0){ 31 | return true; 32 | } 33 | return false; 34 | } 35 | 36 | @Override 37 | public boolean forumfuck(forumEntity forument) { 38 | int bl = messageImpl.forumfuck(forument); 39 | if(bl>0){ 40 | return true; 41 | } 42 | return false; 43 | } 44 | 45 | @Override 46 | public boolean forumreply(forumreplyEntity forumreply) { 47 | int bl = messageImpl.forumreply(forumreply); 48 | if(bl>0){ 49 | return true; 50 | } 51 | return false; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/impl/RegisterServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.sf.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Service; 5 | 6 | import com.sf.dao.impl.RegisterImpl; 7 | import com.sf.entity.userEntity; 8 | import com.sf.service.RegisterService; 9 | 10 | @Service 11 | public class RegisterServiceImpl implements RegisterService { 12 | 13 | @Autowired 14 | RegisterImpl registerImpl; 15 | 16 | public boolean RegisterService(userEntity user) { 17 | int num=registerImpl.Register(user); 18 | if(num>0){ 19 | //注册成功 20 | return true; 21 | } 22 | return false; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/impl/Update_login_password_Service_Impl.java: -------------------------------------------------------------------------------- 1 | package com.sf.service.impl; 2 | 3 | import org.springframework.beans.factory.annotation.Autowired; 4 | import org.springframework.stereotype.Component; 5 | 6 | import com.sf.dao.impl.Update_login_password_Impl; 7 | import com.sf.entity.userEntity; 8 | import com.sf.service.Update_login_password_Service; 9 | 10 | @Component 11 | public class Update_login_password_Service_Impl implements Update_login_password_Service { 12 | 13 | @Autowired 14 | Update_login_password_Impl update_login_password_Impl; 15 | 16 | public boolean Update_login_password(String userName, String passWord, String newpassWord) { 17 | int num=update_login_password_Impl.Update_login_password(userName, passWord, newpassWord); 18 | if(num>0){ 19 | return true; 20 | } 21 | return false; 22 | } 23 | 24 | public boolean Update_login_Emial(String userName, String emial, String newemial) { 25 | 26 | int num=update_login_password_Impl.Update_login_Emial(userName, emial, newemial); 27 | if(num>0){ 28 | return true; 29 | } 30 | return false; 31 | } 32 | 33 | @Override 34 | public boolean Update_login_Phone(String userName, String userPhone, String newuserPhone) { 35 | int num = update_login_password_Impl.Update_login_Phone(userName, userPhone, newuserPhone); 36 | if(num>0){ 37 | return true; 38 | } 39 | return false; 40 | } 41 | 42 | @Override 43 | public boolean Update_login_payPassword(String userName, String paypassword, String newpaypassword) { 44 | int num = update_login_password_Impl.Update_login_payPassword(userName, paypassword, newpaypassword); 45 | if(num>0){ 46 | return true; 47 | } 48 | return false; 49 | } 50 | 51 | @Override 52 | public boolean Update_login_hand(String userName, String userHand, String newuserHand) { 53 | int num = update_login_password_Impl.Update_login_hand(userName, userHand, newuserHand); 54 | if(num>0){ 55 | return true; 56 | } 57 | return false; 58 | } 59 | 60 | @Override 61 | public boolean Update_user(userEntity user) { 62 | int num = update_login_password_Impl.Update_user(user); 63 | if(num>0){ 64 | return true; 65 | } 66 | return false; 67 | } 68 | 69 | @Override 70 | public boolean Update_Addred(String sessionName, String dizhi, String xingming, String phone) { 71 | int i = update_login_password_Impl.Update_Addred(sessionName, dizhi, xingming, phone); 72 | if(i>0){ 73 | return true; 74 | } 75 | return false; 76 | } 77 | 78 | @Override 79 | public boolean delectcartID(String cartID) { 80 | int num = update_login_password_Impl.delectcartID(cartID); 81 | if(num>0){ 82 | return true; 83 | } 84 | return false; 85 | } 86 | 87 | } 88 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/impl/UserListServiceImpl.java: -------------------------------------------------------------------------------- 1 | package com.sf.service.impl; 2 | 3 | import java.util.List; 4 | 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Service; 7 | 8 | import com.sf.dao.impl.UserListDaoImpl; 9 | import com.sf.entity.ShoppingCart; 10 | import com.sf.entity.forumEntity; 11 | import com.sf.entity.forumreplyEntity; 12 | import com.sf.entity.gridsEntity; 13 | import com.sf.entity.messageEntity; 14 | import com.sf.entity.ordertableEntity; 15 | import com.sf.entity.userEntity; 16 | import com.sf.entity.videoEntity; 17 | import com.sf.service.UserListService; 18 | 19 | @Service 20 | public class UserListServiceImpl implements UserListService { 21 | 22 | @Autowired 23 | UserListDaoImpl userListDaoImpl; 24 | 25 | public userEntity userlist(String userName) { 26 | userEntity user=userListDaoImpl.userlist(userName); 27 | return user; 28 | } 29 | 30 | @Override 31 | public List videolist(String videocAtegory) { 32 | List list=userListDaoImpl.videolist(videocAtegory); 33 | return list; 34 | } 35 | 36 | @Override 37 | public List videolistimit7() { 38 | List list = userListDaoImpl.videolistimit7(); 39 | return list; 40 | } 41 | 42 | @Override 43 | public List videolistimit5MAD() { 44 | List list = userListDaoImpl.videolistimit5MAD(); 45 | return list; 46 | } 47 | 48 | @Override 49 | public List messagelist(String videoID) { 50 | List list= null; 51 | list=userListDaoImpl.messagelist(videoID); 52 | return list; 53 | } 54 | 55 | @Override 56 | public List userlistpage(int pageInt) { 57 | List list= null; 58 | list = userListDaoImpl.userlistpage(pageInt); 59 | return list; 60 | } 61 | 62 | @Override 63 | public List listmohu(String usermohu) { 64 | List list = userListDaoImpl.listmohu(usermohu); 65 | return list; 66 | } 67 | 68 | @Override 69 | public List userPhone(String userPhone) { 70 | List list = userListDaoImpl.userPhone(userPhone); 71 | return list; 72 | } 73 | 74 | @Override 75 | public List userID(String userID) { 76 | 77 | List list = userListDaoImpl.userID(userID); 78 | return list; 79 | } 80 | 81 | @Override 82 | public List xiaoheiwu(String userStat) { 83 | List user=userListDaoImpl.xiaoheiwu(userStat); 84 | return user; 85 | } 86 | 87 | @Override 88 | public List Pagevideolist(String State, int dangqianye,int meiyexianshiduoshaoge) { 89 | List list = userListDaoImpl.Pagevideolist(State, dangqianye,meiyexianshiduoshaoge); 90 | return list; 91 | } 92 | 93 | @Override 94 | public int videocoun(String countvideo) { 95 | int num = userListDaoImpl.videocoun(countvideo); 96 | return num; 97 | } 98 | 99 | @Override 100 | public List gridslist() { 101 | List gridslist = userListDaoImpl.gridslist(); 102 | return gridslist; 103 | } 104 | 105 | @Override 106 | public gridsEntity gridsIDlist(String gridsID) { 107 | gridsEntity gridslist = userListDaoImpl.gridsIDlist(gridsID); 108 | return gridslist; 109 | } 110 | 111 | @Override 112 | public List userlistUserName(String userName) { 113 | List user = userListDaoImpl.userlistUserName(userName); 114 | return user; 115 | } 116 | 117 | @Override 118 | public List shoppingcart(String userName) { 119 | List user = userListDaoImpl.shoppingcart(userName); 120 | return user; 121 | } 122 | 123 | @Override 124 | public List videolistimit6MAD() { 125 | List list = userListDaoImpl.videolistimit6MAD(); 126 | return list; 127 | } 128 | 129 | @Override 130 | public List ordertable(String userName) { 131 | List ordertable = userListDaoImpl.ordertable(userName); 132 | return ordertable; 133 | } 134 | 135 | @Override 136 | public List ordertablelist() { 137 | List ordertable = userListDaoImpl.ordertablelist(); 138 | return ordertable; 139 | } 140 | 141 | @Override 142 | public List orderStat(String orderStat) { 143 | List ordertable = userListDaoImpl.orderStat(orderStat); 144 | return ordertable; 145 | } 146 | 147 | @Override 148 | public int countordertable() { 149 | int count = userListDaoImpl.countordertable(); 150 | return count; 151 | } 152 | 153 | @Override 154 | public List forumEnt(String forumliebie) { 155 | List forumEnt = userListDaoImpl.forumEnt(forumliebie); 156 | return forumEnt; 157 | } 158 | 159 | @Override 160 | public forumEntity forumentitymmp(String forumID) { 161 | forumEntity user = userListDaoImpl.forumentitymmp(forumID); 162 | return user; 163 | } 164 | 165 | @Override 166 | public int counttable(String tableName) { 167 | int num = userListDaoImpl.counttable(tableName); 168 | return num; 169 | } 170 | 171 | @Override 172 | public List forumreply(String forumreplyID) { 173 | List forumre =userListDaoImpl.forumreply(forumreplyID); 174 | return forumre; 175 | } 176 | 177 | 178 | } 179 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/service/impl/Videoserviceimpl.java: -------------------------------------------------------------------------------- 1 | package com.sf.service.impl; 2 | 3 | import com.sf.dao.impl.VideoDaoimpl; 4 | import com.sf.entity.videoEntity; 5 | import com.sf.service.Videoservice; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | import java.util.List; 10 | @Service 11 | public class Videoserviceimpl implements Videoservice{ 12 | @Autowired 13 | VideoDaoimpl videoDaoimpl; 14 | 15 | @Override 16 | public boolean insertVideo(videoEntity video) { 17 | boolean result= videoDaoimpl.InsertVideo(video); 18 | return result; 19 | 20 | } 21 | 22 | @Override 23 | public List readVideoByVid(int vid) { 24 | List videoList= videoDaoimpl.selectVideo_by_vid(vid); 25 | return videoList; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/servlet/ProDto.java: -------------------------------------------------------------------------------- 1 | package com.sf.servlet; 2 | 3 | public class ProDto { 4 | private String fileName;// 上传的文件名 5 | private long max;// 最大值 6 | private long other;// 剩余值 7 | private int Test; 8 | 9 | 10 | 11 | public int getTest() { 12 | return Test; 13 | } 14 | 15 | public void setTest(int test) { 16 | Test = test; 17 | } 18 | 19 | private int endTag=0;//结束标记,为1代表结束 20 | 21 | 22 | public int getEndTag() { 23 | return endTag; 24 | } 25 | 26 | public void setEndTag(int endTag) { 27 | this.endTag = endTag; 28 | } 29 | 30 | public String getFileName() { 31 | return fileName; 32 | } 33 | 34 | public void setFileName(String fileName) { 35 | this.fileName = fileName; 36 | } 37 | 38 | public long getMax() { 39 | return max; 40 | } 41 | 42 | public void setMax(long max) { 43 | this.max = max; 44 | } 45 | 46 | public long getOther() { 47 | return other; 48 | } 49 | 50 | public void setOther(long other) { 51 | this.other = other; 52 | } 53 | } 54 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/servlet/ProServlet.java: -------------------------------------------------------------------------------- 1 | package com.sf.servlet; 2 | 3 | import java.io.IOException; 4 | import java.io.PrintWriter; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.http.HttpServlet; 8 | import javax.servlet.http.HttpServletRequest; 9 | import javax.servlet.http.HttpServletResponse; 10 | 11 | import com.google.gson.Gson; 12 | 13 | /** 14 | * Servlet implementation class ProServlet 15 | */ 16 | public class ProServlet extends HttpServlet { 17 | private static final long serialVersionUID = 1L; 18 | 19 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 20 | this.doPost(request, response); 21 | } 22 | 23 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 24 | response.setContentType("text/html"); 25 | PrintWriter out = response.getWriter(); 26 | //得到session里面的上传数据 27 | ProDto dto=(ProDto)request.getSession().getAttribute("dto"); 28 | Gson gs=new Gson(); 29 | String json=gs.toJson(dto); 30 | out.println(json); 31 | out.flush(); 32 | out.close(); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/servlet/one.java: -------------------------------------------------------------------------------- 1 | package com.sf.servlet; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | import javax.servlet.http.HttpServlet; 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.context.support.ClassPathXmlApplicationContext; 11 | import org.springframework.stereotype.Controller; 12 | 13 | import com.sf.lanjieqi.Auth; 14 | import com.sf.service.UserListService; 15 | 16 | /** 17 | * Servlet implementation class one 18 | */ 19 | 20 | public class one extends HttpServlet { 21 | private static final long serialVersionUID = 1L; 22 | 23 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 24 | this.doPost(request, response); 25 | } 26 | 27 | //使用初始化 功能 28 | 29 | /* 30 | @Override 31 | public void init() throws ServletException { 32 | System.out.println("我只会被执行一次"); 33 | //每次进来的时候就调用方法 让程序每1分钟就执行一次 查询有多少 用户 多少帖子 还有今日昨日的 34 | // int num = userListService.counttable("user"); 35 | // System.out.println(num);//看中间有多少条记录 36 | super.init(); 37 | }*/ 38 | 39 | 40 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 41 | //System.out.println("11"); 42 | 43 | //request.getRequestDispatcher("http://127.0.0.1:888/bilibili/static/adminjs/index.html").forward(request,response); 44 | //System.out.println("测试"); 45 | request.getRequestDispatcher("logoone.sf").forward(request, response); 46 | } 47 | 48 | 49 | } 50 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/tool/DanmuRowMapperEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.tool; 2 | 3 | import com.sf.entity.Danmu; 4 | 5 | import org.springframework.jdbc.core.RowMapper; 6 | 7 | import java.sql.ResultSet; 8 | import java.sql.SQLException; 9 | 10 | 11 | public class DanmuRowMapperEntity implements RowMapper { 12 | 13 | @Override 14 | public Danmu mapRow(ResultSet resultSet, int i) throws SQLException { 15 | Danmu danmu =new Danmu(); 16 | danmu.setVid( resultSet.getInt("vid")); 17 | danmu.setContent(resultSet.getString("content")); 18 | danmu.setColor(resultSet.getInt("color")); 19 | danmu.setDsize(resultSet.getInt("dsize")); 20 | danmu.setPosition(resultSet.getInt("position")); 21 | danmu.setDtime(resultSet.getInt("dtime")); 22 | return danmu; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/tool/GetDataTime.java: -------------------------------------------------------------------------------- 1 | package com.sf.tool; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | 6 | public class GetDataTime { 7 | public static String DQtime(){ 8 | /************ 获取当前时间 ***********/ 9 | // 得到long类型当前时间 10 | long l = System.currentTimeMillis(); 11 | // new日期对象 12 | Date date = new Date(l); 13 | // 转换提日期输出格式 14 | SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); 15 | 16 | String time = dateFormat.format(date); 17 | /************ 获取当前时间 *************/ 18 | System.out.println(time); 19 | return time; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/tool/GetUUID.java: -------------------------------------------------------------------------------- 1 | package com.sf.tool; 2 | 3 | import java.util.Random; 4 | import java.util.UUID; 5 | 6 | public class GetUUID { 7 | public static String getUUID(){ 8 | String uuid=""; 9 | uuid= UUID.randomUUID().toString().replaceAll("-",""); 10 | return uuid; 11 | } 12 | 13 | 14 | public static int yanzma(){ 15 | int x; 16 | Random xs= new Random(); 17 | x = xs.nextInt(9999-1000+1)+100000; 18 | return x; 19 | 20 | } 21 | 22 | 23 | } 24 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/tool/GridsRowMapperEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.tool; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | import java.util.List; 6 | 7 | import org.springframework.jdbc.core.RowMapper; 8 | 9 | import com.sf.entity.gridsEntity; 10 | import com.sf.entity.userEntity; 11 | 12 | 13 | //用户表 14 | public class GridsRowMapperEntity implements RowMapper{ 15 | 16 | @Override 17 | public gridsEntity mapRow(ResultSet arg0, int arg1) throws SQLException { 18 | gridsEntity grids = new gridsEntity(); 19 | //user.setUseryinghangka(arg0.getString("useryinghangka")); 20 | grids.setGridsID(arg0.getString("gridsID")); 21 | 22 | grids.setGirdsName(arg0.getString("girdsName")); 23 | grids.setGirdskucun(arg0.getInt("girdskucun")); 24 | grids.setGirdsjiage(arg0.getString("girdsjiage")); 25 | grids.setGirdsimg(arg0.getString("girdsimg")); 26 | return grids; 27 | } 28 | 29 | 30 | 31 | } 32 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/tool/Html_guolv.java: -------------------------------------------------------------------------------- 1 | package com.sf.tool; 2 | 3 | 4 | public class Html_guolv { 5 | /* String content = "文章内容"; 6 | // 过滤文章内容中的html 7 | content = content.replaceAll("<[^<]+>", ""); 8 | // 去除字符串中的空格 回车 换行符 制表符 等 9 | content = content.replaceAll("\\s*|\t|\r|\n", ""); 10 | // 去除空格 11 | content = content.replaceAll(" ", ""); 12 | // 去掉其他一些字符 13 | content = content.replaceAll("\", ""); 14 | 后面的如果有特殊字符,根据自己需要进行过滤。*/ 15 | 16 | 17 | public static void main(String[] args) { 18 | String content = "asdjasdjkzxc爱仕达技术的{/r}123i12撒客户端"; 19 | content = content.replaceAll("<[^<]+>//s*|/t|/r|/n| ", ""); 20 | System.out.println(content); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/tool/RowMapperEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.tool; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | import java.util.List; 6 | 7 | import org.springframework.jdbc.core.RowMapper; 8 | 9 | import com.sf.entity.userEntity; 10 | 11 | 12 | //用户表 13 | public class RowMapperEntity implements RowMapper{ 14 | 15 | @Override 16 | public userEntity mapRow(ResultSet arg0, int arg1) throws SQLException { 17 | userEntity user=new userEntity(); 18 | 19 | user.setPassWord(arg0.getString("passWord")); 20 | user.setUsersex(arg0.getString("usersex")); 21 | user.setUserAddress(arg0.getString("userAddress")); 22 | user.setUserCollection(arg0.getString("userCollection")); 23 | user.setUserEmial(arg0.getString("userEmial")); 24 | user.setUserHand(arg0.getString("userHand")); 25 | user.setUserID(arg0.getString("userID")); 26 | user.setUserIP(arg0.getString("userIP")); 27 | user.setUserLoginTime(arg0.getString("userLoginTime")); 28 | user.setUserMingzi(arg0.getString("userMingzi")); 29 | user.setUserName(arg0.getString("userName")); 30 | user.setUserPaypassword(arg0.getString("userPaypassword")); 31 | user.setUserPhone(arg0.getString("userPhone")); 32 | user.setUserQQ(arg0.getString("userQQ")); 33 | user.setUserState(arg0.getString("userState")); 34 | user.setUseryinghangka(arg0.getString("useryinghangka")); 35 | user.setUserRMB(arg0.getString("userRMB")); 36 | return user; 37 | } 38 | 39 | 40 | 41 | } 42 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/tool/RowMapperVideoEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.tool; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | 6 | import org.springframework.jdbc.core.RowMapper; 7 | 8 | import com.sf.entity.messageEntity; 9 | import com.sf.entity.userEntity; 10 | 11 | //留言表 12 | public class RowMapperVideoEntity implements RowMapper{ 13 | 14 | @Override 15 | public messageEntity mapRow(ResultSet arg0, int arg1) throws SQLException { 16 | messageEntity message = new messageEntity(); 17 | message.setMessage(arg0.getString("message")); 18 | message.setMessageID(arg0.getString("messageID")); 19 | message.setMessageTime(arg0.getString("messageTime")); 20 | message.setMessageuserID(arg0.getString("messageuserID")); 21 | message.setMessageuserName(arg0.getString("messageuserName")); 22 | message.setMessagevideoID(arg0.getString("messagevideoID")); 23 | message.setMessageHand(arg0.getString("messageHand")); 24 | return message; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/tool/ShoppingCartRowMapperEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.tool; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | import java.util.List; 6 | 7 | import org.springframework.jdbc.core.RowMapper; 8 | 9 | import com.sf.entity.ShoppingCart; 10 | import com.sf.entity.gridsEntity; 11 | import com.sf.entity.userEntity; 12 | 13 | 14 | //用户表 15 | public class ShoppingCartRowMapperEntity implements RowMapper{ 16 | 17 | @Override 18 | public ShoppingCart mapRow(ResultSet arg0, int arg1) throws SQLException { 19 | //gridsEntity grids = new gridsEntity(); 20 | //user.setUseryinghangka(arg0.getString("useryinghangka")); 21 | ShoppingCart shoopingCart = new ShoppingCart(); 22 | shoopingCart.setCartID(arg0.getString("cartID")); 23 | shoopingCart.setShoopingID(arg0.getString("shoopingID")); 24 | shoopingCart.setShoopingImg(arg0.getString("shoopingImg")); 25 | shoopingCart.setShoopingjiage(arg0.getString("shoopingjiage")); 26 | shoopingCart.setShoopingName(arg0.getString("shoopingName")); 27 | shoopingCart.setUserName(arg0.getString("userName")); 28 | return shoopingCart; 29 | } 30 | 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/tool/VideoRowMapperEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.tool; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | 6 | import org.springframework.jdbc.core.RowMapper; 7 | 8 | import com.sf.entity.videoEntity; 9 | 10 | //视频ID区 11 | public class VideoRowMapperEntity implements RowMapper{ 12 | 13 | @Override 14 | public videoEntity mapRow(ResultSet arg0, int arg1) throws SQLException { 15 | videoEntity video = new videoEntity(); 16 | 17 | video.setVideoAddress(arg0.getString("videoAddress")); 18 | video.setVideoCollection(arg0.getString("videoCollection")); 19 | video.setVideoID(arg0.getString("videoID")); 20 | video.setVideoImage(arg0.getString("videoImage")); 21 | video.setVideoLeaving(arg0.getString("videoLeaving")); 22 | video.setVideoName(arg0.getString("videoName")); 23 | video.setVideolookTime(arg0.getString("videolookTime")); 24 | video.setVideoState(arg0.getString("videoState")); 25 | video.setVideoTime(arg0.getString("videoTime")); 26 | 27 | return video; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/tool/forumEntityRowMapper.java: -------------------------------------------------------------------------------- 1 | package com.sf.tool; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | 6 | import org.springframework.jdbc.core.RowMapper; 7 | 8 | import com.sf.entity.forumEntity; 9 | 10 | //论坛表实体 11 | public class forumEntityRowMapper implements RowMapper{ 12 | 13 | @Override 14 | public forumEntity mapRow(ResultSet arg0, int arg1) throws SQLException { 15 | forumEntity forumEntity = new forumEntity(); 16 | //user.setUseryinghangka(arg0.getString("useryinghangka")); 17 | /*grids.setGridsID(arg0.getString("gridsID"));*/ 18 | forumEntity.setForumID(arg0.getString("forumID")); 19 | forumEntity.setForumAmount(arg0.getString("forumAmount")); 20 | forumEntity.setForumBT(arg0.getString("forumBT")); 21 | forumEntity.setForumliebie(arg0.getString("forumliebie")); 22 | forumEntity.setForummessage(arg0.getString("forummessage")); 23 | forumEntity.setForumTime(arg0.getString("forumTime")); 24 | forumEntity.setForumuserName(arg0.getString("forumuserName")); 25 | forumEntity.setFirumhand(arg0.getString("firumhand")); 26 | 27 | return forumEntity; 28 | } 29 | 30 | } -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/tool/forumreplyEntityRowMapper.java: -------------------------------------------------------------------------------- 1 | package com.sf.tool; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | 6 | import org.springframework.jdbc.core.RowMapper; 7 | 8 | import com.sf.entity.forumreplyEntity; 9 | 10 | public class forumreplyEntityRowMapper implements RowMapper{ 11 | 12 | @Override 13 | public forumreplyEntity mapRow(ResultSet arg0, int arg1) throws SQLException { 14 | // TODO Auto-generated method stub 15 | forumreplyEntity u = new forumreplyEntity(); 16 | u.setReplyhand(arg0.getString("replyhand")); 17 | u.setReplyid(arg0.getString("replyid")); 18 | u.setReplyneirong(arg0.getString("replyneirong")); 19 | u.setReplytieziid(arg0.getString("replytieziid")); 20 | u.setReplytime(arg0.getString("replytime")); 21 | u.setReplyname(arg0.getString("replyname")); 22 | return u; 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /bilibili/src/main/java/com/sf/tool/ordertableRowMapperEntity.java: -------------------------------------------------------------------------------- 1 | package com.sf.tool; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.SQLException; 5 | import java.util.List; 6 | 7 | import org.springframework.jdbc.core.RowMapper; 8 | 9 | import com.sf.entity.ordertableEntity; 10 | 11 | 12 | 13 | //用户表 14 | public class ordertableRowMapperEntity implements RowMapper{ 15 | 16 | @Override 17 | public ordertableEntity mapRow(ResultSet arg0, int arg1) throws SQLException { 18 | ordertableEntity ordertable = new ordertableEntity(); 19 | //user.setUseryinghangka(arg0.getString("useryinghangka")); 20 | //grids.setGridsID(arg0.getString("gridsID")); 21 | ordertable.setOrderID(arg0.getString("orderID")); 22 | ordertable.setOrdergridsImg(arg0.getString("ordergridsImg")); 23 | ordertable.setOrderIgridsName(arg0.getString("orderIgridsName")); 24 | ordertable.setOrderStat(arg0.getString("orderStat")); 25 | ordertable.setOrderTime(arg0.getString("orderTime")); 26 | ordertable.setOrderuserName(arg0.getString("orderuserName")); 27 | ordertable.setOrderzongRMB(arg0.getString("orderzongRMB")); 28 | ordertable.setOrderAddr(arg0.getString("orderAddr")); 29 | return ordertable; 30 | } 31 | 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /bilibili/src/main/resources/jdbc.properties: -------------------------------------------------------------------------------- 1 | url=jdbc:mysql://127.0.0.1:3306/bilibili?useUnicode=true&characterEncoding=utf-8 2 | datasource.connection.username=root 3 | password=123456 4 | driverClassName=com.mysql.jdbc.Driver -------------------------------------------------------------------------------- /bilibili/src/main/resources/spring-mvc.xml: -------------------------------------------------------------------------------- 1 | 2 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 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 | 55 | 56 | 57 | 58 | 59 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | -------------------------------------------------------------------------------- /bilibili/src/main/resources/springcontext.xml: -------------------------------------------------------------------------------- 1 | 2 | 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 | 39 | 40 | 41 | 42 | 43 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/Shangchuan.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 上传头像界面 13 | 14 | 17 | 18 | 20 | 22 | 23 | 24 | 25 | 26 | 55 | 56 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/lib/commons-fileupload-1.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyongzhe/mybilibili/1a97271c81109ed85dd19449f4c8b82f16391487/bilibili/src/main/webapp/WEB-INF/lib/commons-fileupload-1.2.1.jar -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/lib/commons-io-2.5.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyongzhe/mybilibili/1a97271c81109ed85dd19449f4c8b82f16391487/bilibili/src/main/webapp/WEB-INF/lib/commons-io-2.5.jar -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/lib/jave-1.0.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyongzhe/mybilibili/1a97271c81109ed85dd19449f4c8b82f16391487/bilibili/src/main/webapp/WEB-INF/lib/jave-1.0.2.jar -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/lib/jstl-1.2.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyongzhe/mybilibili/1a97271c81109ed85dd19449f4c8b82f16391487/bilibili/src/main/webapp/WEB-INF/lib/jstl-1.2.jar -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/AdminBL.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 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 | 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 | 62 | 63 | 65 | 66 | 100 | 101 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/Completedorder.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <% 5 | String path = request.getContextPath(); 6 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 7 | %> 8 | 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 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 订单时间 62 | 订单商品名字 63 | 购买者用户名 64 | 订单价格 65 | 状态 66 | 67 | 68 | 69 | ${ordertable.orderTime} 70 | ${ordertable.orderIgridsName} 71 | 72 | ${ordertable.orderuserName} 73 | ${ordertable.orderzongRMB} 74 | 订单完成 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 88 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/Inquiryorder.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <% 5 | String path = request.getContextPath(); 6 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 7 | %> 8 | 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 | 51 | 52 | 53 | 关键字: 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 订单时间 71 | 订单商品名字 72 | 购买者用户名 73 | 订单价格 74 | 状态 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 92 | 93 | 94 | 95 | 134 | 135 | 136 | 137 | 138 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/Returngoods.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <% 5 | String path = request.getContextPath(); 6 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 7 | %> 8 | 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 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 订单时间 63 | 订单商品名字 64 | 购买者用户名 65 | 订单价格 66 | 状态 67 | 68 | 69 | 70 | ${ordertable.orderTime} 71 | ${ordertable.orderIgridsName} 72 | 73 | ${ordertable.orderuserName} 74 | ${ordertable.orderzongRMB} 75 | 76 | 77 | 立即退货 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/Shipmentpending.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <% 5 | String path = request.getContextPath(); 6 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 7 | %> 8 | 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 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 订单时间 63 | 订单商品名字 64 | 购买者用户名 65 | 订单价格 66 | 状态 67 | 68 | 69 | 70 | ${ordertable.orderTime} 71 | ${ordertable.orderIgridsName} 72 | 73 | ${ordertable.orderuserName} 74 | ${ordertable.orderzongRMB} 75 | 76 | 77 | 立即发货 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/Shoppingnew.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <% 5 | String path = request.getContextPath(); 6 | String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() 7 | + path + "/"; 8 | %> 9 | 10 | 11 | 12 | 13 | 14 | 屄哩屄哩-周边商品 15 | 16 | 18 | 20 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | <% 30 | if (request.getSession().getAttribute("userName") == null) { 31 | %> 32 | 34 | 登录 36 | 37 | 38 | 39 | 注册 42 | 43 | <% 44 | } else { 45 | %> 46 | 47 | 49 | 51 | 欢迎你的登录: <%=request.getSession().getAttribute("userName")%> 52 | 53 | 54 | 55 | 56 | 57 | <% 58 | } 59 | %> 60 | 61 | 62 | 63 | 64 | 66 | 查看购物车 67 | 68 | 返回首页 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 89 | 90 | 91 | 92 | ${gridslist.girdsName} 93 | 94 | 95 | $ ${gridslist.girdsjiage} 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/Update_login_password.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 13 | 16 | 19 | 22 | 25 | 26 | 27 | 29 | 31 | 33 | 34 | 35 | 36 | 37 | 38 | 屄哩屄哩-登录密码修改 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 首页 视频收藏 周边 51 | 小黑屋 52 | 53 | 54 | 55 | 65 | 66 | 67 | 当前位置:首页>个人中心 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | " /> 80 | 您好,<%=request.getSession().getAttribute("userName")%> (下方可修改资料~喵) 82 | 83 | 84 | 85 | 86 | 88 | 会员中心 89 | 90 | 91 | 92 | 94 | 资料管理 95 | 96 | 信息资料 97 | 银行卡管理 收货地址管理 99 | 100 | 101 | 102 | 104 | 订单管理 105 | 106 | 我的订单 107 | 已删除订单 订单投诉 109 | 110 | 111 | 112 | <%-- 113 | 114 | 116 | 收藏管理 117 | 118 | 店铺收藏 119 | 菜品收藏 120 | --%> 121 | 122 | 123 | 130 | 131 | 132 | 133 | 134 | 登录密码修改 135 | 136 | 137 | 138 | 1.请牢记登录密码 139 | 2.如果丢失密码,可以通过绑定的手机或邮箱找到 140 | 141 | 142 | 143 | 144 | 145 | 原密码: 147 | 148 | 149 | 新的密码: 151 | 152 | 153 | 确认密码: 155 | 156 | 157 | <%if(request.getAttribute("PassWordErro")!=null){ %> 158 | 159 | 160 | <%=request.getAttribute("PassWordErro") %> 161 | 162 | <%} %> 163 | 164 | 165 | 166 | 167 | 168 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/details.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 哔哩哔哩-商品详情 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/gouwuche.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <% 5 | String path = request.getContextPath(); 6 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 7 | %> 8 | 9 | 10 | 11 | 12 | 13 | 哔哩哔哩-用户购物车 14 | 16 | 17 | 19 | 20 | 21 | 22 | 23 | 33 | 34 | 35 | 36 | 37 | 38 | 全选 39 | 商品 40 | 单价 41 | 数量 42 | 小计 43 | 操作 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | ${user.shoopingName} 54 | ${user.shoopingjiage} 55 | 56 | - 57 | 58 | + 59 | 60 | ${user.shoopingjiage} 61 | 62 | 删除 63 | 64 | <%-- ${user.cartID} --%> 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | .. 76 | 77 | 78 | 91 | 101 | 102 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | Insert title here 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/loginnew.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 6 | %> 7 | 8 | 9 | 10 | 11 | 12 | 屄哩屄哩-登录 13 | 15 | 17 | 18 | 19 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 用户登录 34 | 35 | 36 | 用户名 37 | 38 | 39 | 40 | 密 码 41 | 42 | <%if(request.getAttribute("PHO")!=null){ %> 43 | <%= request.getAttribute("PHO") %> 44 | <%} %> 45 | 46 | 47 | 忘记密码 ? 立即注册? 48 | 49 | 返回首页 50 | 51 | 52 | 53 | 54 | 55 | 56 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/xiaoheiwu.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <% 5 | String path = request.getContextPath(); 6 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 7 | %> 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 18 | 19 | 20 | 哔哩哔哩-小黑屋 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 用户名 33 | 34 | 用户性别 35 | 36 | 原因 37 | 42 | 43 | 44 | 45 | 46 | ${user.userName} 47 | ${user.usersex} 48 | ${user.userState} 49 | 50 | 51 | 52 | 53 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web-jsp/用户信息JSP: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <% 4 | String path = request.getContextPath(); 5 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 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 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 10 | 12 | 13 | bilibili 14 | 15 | 16 | 17 | 18 | 19 | CharacterEncodingFilter 20 | org.springframework.web.filter.CharacterEncodingFilter 21 | 22 | encoding 23 | utf-8 24 | 25 | 26 | 27 | CharacterEncodingFilter 28 | /* 29 | 30 | 31 | 32 | 33 | default 34 | *.css 35 | 36 | 37 | default 38 | *.gif 39 | 40 | 41 | default 42 | *.jpg 43 | 44 | 45 | default 46 | *.mp4 47 | 48 | 49 | default 50 | *.png 51 | 52 | 53 | default 54 | *.js 55 | 56 | 57 | default 58 | *.html 59 | 60 | 61 | default 62 | *.webp 63 | 64 | 65 | default 66 | *.svg 67 | 68 | 69 | default 70 | *.eot 71 | 72 | 73 | default 74 | *.ttf 75 | 76 | 86 | 87 | 88 | 89 | org.springframework.web.context.ContextLoaderListener 90 | 91 | 92 | 93 | 94 | contextConfigLocation 95 | classpath:springcontext.xml 96 | 97 | 98 | 99 | 100 | 101 | spring-mvc 102 | org.springframework.web.servlet.DispatcherServlet 103 | 104 | 105 | 106 | contextConfigLocation 107 | classpath:spring-mvc.xml 108 | 109 | 1 110 | 111 | 112 | 113 | 114 | UploadServlet 115 | UploadServlet 116 | com.sf.servlet.UploadServlet 117 | 118 | 119 | 120 | 121 | ProServlet 122 | ProServlet 123 | com.sf.servlet.ProServlet 124 | 125 | 126 | 127 | 128 | one 129 | one 130 | com.sf.servlet.one 131 | 132 | 133 | 134 | spring-mvc 135 | / 136 | 137 | 138 | UploadServlet 139 | /UploadServlet 140 | 141 | 142 | ProServlet 143 | /ProServlet 144 | 145 | 146 | one 147 | /one 148 | 149 | 150 | 151 | 152 | 153 | one 154 | 155 | 156 | 157 | 158 | -------------------------------------------------------------------------------- /bilibili/src/main/webapp/index2.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | 首页 11 | 12 | 登录 13 | 14 | 15 | 注册 16 | 17 | -------------------------------------------------------------------------------- /bilibili/userHand/upload/初中.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chenyongzhe/mybilibili/1a97271c81109ed85dd19449f4c8b82f16391487/bilibili/userHand/upload/初中.jpg --------------------------------------------------------------------------------
145 | 原密码: 147 |
149 | 新的密码: 151 |
153 | 确认密码: 155 |
160 | <%=request.getAttribute("PassWordErro") %> 161 |