diff --git a/.classpath b/.classpath new file mode 100644 index 0000000..bbbd97d --- /dev/null +++ b/.classpath @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/.idea/artifacts/bilibili_war.xml b/.idea/artifacts/bilibili_war.xml new file mode 100644 index 0000000..abddef6 --- /dev/null +++ b/.idea/artifacts/bilibili_war.xml @@ -0,0 +1,8 @@ + + + $PROJECT_DIR$/target + + + + + \ No newline at end of file diff --git a/.idea/artifacts/bilibili_war_exploded.xml b/.idea/artifacts/bilibili_war_exploded.xml new file mode 100644 index 0000000..579372c --- /dev/null +++ b/.idea/artifacts/bilibili_war_exploded.xml @@ -0,0 +1,35 @@ + + + $PROJECT_DIR$/target/bilibili + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..3dadff3 --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_code_gson_gson_2_3_1.xml b/.idea/libraries/Maven__com_google_code_gson_gson_2_3_1.xml new file mode 100644 index 0000000..d7b5038 --- /dev/null +++ b/.idea/libraries/Maven__com_google_code_gson_gson_2_3_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mchange_c3p0_0_9_5_2.xml b/.idea/libraries/Maven__com_mchange_c3p0_0_9_5_2.xml new file mode 100644 index 0000000..35cfbfb --- /dev/null +++ b/.idea/libraries/Maven__com_mchange_c3p0_0_9_5_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__com_mchange_mchange_commons_java_0_2_11.xml b/.idea/libraries/Maven__com_mchange_mchange_commons_java_0_2_11.xml new file mode 100644 index 0000000..dbd8483 --- /dev/null +++ b/.idea/libraries/Maven__com_mchange_mchange_commons_java_0_2_11.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_2_1.xml b/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_2_1.xml new file mode 100644 index 0000000..e59b3ef --- /dev/null +++ b/.idea/libraries/Maven__commons_fileupload_commons_fileupload_1_2_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_io_commons_io_2_5.xml b/.idea/libraries/Maven__commons_io_commons_io_2_5.xml new file mode 100644 index 0000000..67c2ad2 --- /dev/null +++ b/.idea/libraries/Maven__commons_io_commons_io_2_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml b/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml new file mode 100644 index 0000000..eab40b3 --- /dev/null +++ b/.idea/libraries/Maven__commons_logging_commons_logging_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_servlet_javax_servlet_api_3_1_0.xml b/.idea/libraries/Maven__javax_servlet_javax_servlet_api_3_1_0.xml new file mode 100644 index 0000000..c24f7e3 --- /dev/null +++ b/.idea/libraries/Maven__javax_servlet_javax_servlet_api_3_1_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__javax_servlet_jstl_1_2.xml b/.idea/libraries/Maven__javax_servlet_jstl_1_2.xml new file mode 100644 index 0000000..f329893 --- /dev/null +++ b/.idea/libraries/Maven__javax_servlet_jstl_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__junit_junit_3_8_1.xml b/.idea/libraries/Maven__junit_junit_3_8_1.xml new file mode 100644 index 0000000..71b2993 --- /dev/null +++ b/.idea/libraries/Maven__junit_junit_3_8_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_17.xml b/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_17.xml new file mode 100644 index 0000000..c3b7f46 --- /dev/null +++ b/.idea/libraries/Maven__mysql_mysql_connector_java_5_1_17.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_aop_4_3_2_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_aop_4_3_2_RELEASE.xml new file mode 100644 index 0000000..4508a6b --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_aop_4_3_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_beans_4_3_2_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_beans_4_3_2_RELEASE.xml new file mode 100644 index 0000000..d650bb8 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_beans_4_3_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_context_4_3_2_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_context_4_3_2_RELEASE.xml new file mode 100644 index 0000000..b497541 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_context_4_3_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_core_4_3_2_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_core_4_3_2_RELEASE.xml new file mode 100644 index 0000000..aca549b --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_core_4_3_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_expression_4_3_2_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_expression_4_3_2_RELEASE.xml new file mode 100644 index 0000000..e802cd8 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_expression_4_3_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_jdbc_4_3_9_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_jdbc_4_3_9_RELEASE.xml new file mode 100644 index 0000000..baa00d7 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_jdbc_4_3_9_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_tx_4_3_2_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_tx_4_3_2_RELEASE.xml new file mode 100644 index 0000000..0254b40 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_tx_4_3_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_web_4_3_2_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_web_4_3_2_RELEASE.xml new file mode 100644 index 0000000..2b7b1d4 --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_web_4_3_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/libraries/Maven__org_springframework_spring_webmvc_4_3_2_RELEASE.xml b/.idea/libraries/Maven__org_springframework_spring_webmvc_4_3_2_RELEASE.xml new file mode 100644 index 0000000..e4b70bb --- /dev/null +++ b/.idea/libraries/Maven__org_springframework_spring_webmvc_4_3_2_RELEASE.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..5f61bad --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..a824ecf --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..5a92451 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,757 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + DEFINITION_ORDER + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + project + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1505994427343 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + bilibili:war + + + + + + + + Spring + + + + + + + + + + + + + + + 1.7 + + + + + + + + bilibili + + + + + + + + + + + + + + + Maven: com.google.code.gson:gson:2.3.1 + + + + + + + + \ No newline at end of file diff --git a/.mymetadata b/.mymetadata new file mode 100644 index 0000000..a78ddb6 --- /dev/null +++ b/.mymetadata @@ -0,0 +1,13 @@ + + + + + + + diff --git a/.project b/.project new file mode 100644 index 0000000..8ff869c --- /dev/null +++ b/.project @@ -0,0 +1,64 @@ + + + bilibili + + + + + + com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator + + + + + com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator + + + + + org.eclipse.wst.jsdt.core.javascriptValidator + + + + + org.eclipse.wst.common.project.facet.core.builder + + + + + org.eclipse.wst.validation.validationbuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder + + + + + + com.genuitec.eclipse.ast.deploy.core.deploymentnature + com.genuitec.eclipse.j2eedt.core.webnature + org.eclipse.jem.workbench.JavaEMFNature + org.eclipse.wst.common.modulecore.ModuleCoreNature + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + org.eclipse.wst.common.project.facet.core.nature + org.eclipse.wst.jsdt.core.jsNature + + diff --git a/bilibili.iml b/bilibili.iml new file mode 100644 index 0000000..a3a65c7 --- /dev/null +++ b/bilibili.iml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git "a/bilibili/\351\241\271\347\233\256/\344\270\213\345\215\225.png" "b/bilibili/\351\241\271\347\233\256/\344\270\213\345\215\225.png" new file mode 100644 index 0000000..30045c4 Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\344\270\213\345\215\225.png" differ diff --git "a/bilibili/\351\241\271\347\233\256/\344\270\252\344\272\272\345\220\216\345\217\260.png" "b/bilibili/\351\241\271\347\233\256/\344\270\252\344\272\272\345\220\216\345\217\260.png" new file mode 100644 index 0000000..ee81e0a Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\344\270\252\344\272\272\345\220\216\345\217\260.png" differ diff --git "a/bilibili/\351\241\271\347\233\256/\344\270\273\351\241\265.png" "b/bilibili/\351\241\271\347\233\256/\344\270\273\351\241\265.png" new file mode 100644 index 0000000..7f79d6b Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\344\270\273\351\241\265.png" differ diff --git "a/bilibili/\351\241\271\347\233\256/\344\270\273\351\241\265\344\270\213\346\226\271.png" "b/bilibili/\351\241\271\347\233\256/\344\270\273\351\241\265\344\270\213\346\226\271.png" new file mode 100644 index 0000000..86a7287 Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\344\270\273\351\241\265\344\270\213\346\226\271.png" differ diff --git "a/bilibili/\351\241\271\347\233\256/\345\217\221\345\270\226.png" "b/bilibili/\351\241\271\347\233\256/\345\217\221\345\270\226.png" new file mode 100644 index 0000000..10f8f14 Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\345\217\221\345\270\226.png" differ diff --git "a/bilibili/\351\241\271\347\233\256/\345\233\236\345\244\215.png" "b/bilibili/\351\241\271\347\233\256/\345\233\236\345\244\215.png" new file mode 100644 index 0000000..ae4fb6d Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\345\233\236\345\244\215.png" differ diff --git "a/bilibili/\351\241\271\347\233\256/\346\212\225\347\250\277.png" "b/bilibili/\351\241\271\347\233\256/\346\212\225\347\250\277.png" new file mode 100644 index 0000000..a9f0097 Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\346\212\225\347\250\277.png" differ diff --git "a/bilibili/\351\241\271\347\233\256/\346\225\260\346\215\256\345\272\223\345\244\207\344\273\275/170829092701.psc" "b/bilibili/\351\241\271\347\233\256/\346\225\260\346\215\256\345\272\223\345\244\207\344\273\275/170829092701.psc" new file mode 100644 index 0000000..0657c17 Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\346\225\260\346\215\256\345\272\223\345\244\207\344\273\275/170829092701.psc" differ diff --git "a/bilibili/\351\241\271\347\233\256/\346\225\260\346\215\256\345\272\223\345\244\207\344\273\275/bilibili.npb" "b/bilibili/\351\241\271\347\233\256/\346\225\260\346\215\256\345\272\223\345\244\207\344\273\275/bilibili.npb" new file mode 100644 index 0000000..7a08f04 --- /dev/null +++ "b/bilibili/\351\241\271\347\233\256/\346\225\260\346\215\256\345\272\223\345\244\207\344\273\275/bilibili.npb" @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git "a/bilibili/\351\241\271\347\233\256/\346\263\250\345\206\214\347\224\250\346\210\267.png" "b/bilibili/\351\241\271\347\233\256/\346\263\250\345\206\214\347\224\250\346\210\267.png" new file mode 100644 index 0000000..044e806 Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\346\263\250\345\206\214\347\224\250\346\210\267.png" differ diff --git "a/bilibili/\351\241\271\347\233\256/\347\233\256\345\275\225.png" "b/bilibili/\351\241\271\347\233\256/\347\233\256\345\275\225.png" new file mode 100644 index 0000000..e5929d6 Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\347\233\256\345\275\225.png" differ diff --git "a/bilibili/\351\241\271\347\233\256/\350\256\242\345\215\225.png" "b/bilibili/\351\241\271\347\233\256/\350\256\242\345\215\225.png" new file mode 100644 index 0000000..c9b8948 Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\350\256\242\345\215\225.png" differ diff --git "a/bilibili/\351\241\271\347\233\256/\350\256\242\345\215\225\345\220\216\345\217\260.png" "b/bilibili/\351\241\271\347\233\256/\350\256\242\345\215\225\345\220\216\345\217\260.png" new file mode 100644 index 0000000..2b896f0 Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\350\256\242\345\215\225\345\220\216\345\217\260.png" differ diff --git "a/bilibili/\351\241\271\347\233\256/\350\256\272\345\235\233.png" "b/bilibili/\351\241\271\347\233\256/\350\256\272\345\235\233.png" new file mode 100644 index 0000000..967ff44 Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\350\256\272\345\235\233.png" differ diff --git "a/bilibili/\351\241\271\347\233\256/\350\264\255\347\211\251.png" "b/bilibili/\351\241\271\347\233\256/\350\264\255\347\211\251.png" new file mode 100644 index 0000000..6efbdee Binary files /dev/null and "b/bilibili/\351\241\271\347\233\256/\350\264\255\347\211\251.png" differ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..c542062 --- /dev/null +++ b/pom.xml @@ -0,0 +1,131 @@ + + 4.0.0 + com.sf.bilibili + bilibili + war + 0.0.1-SNAPSHOT + bilibili Maven Webapp + http://maven.apache.org + + + + + + 4.3.2.RELEASE + + + + + junit + junit + 3.8.1 + test + + + + + + org.springframework + spring-webmvc + ${spring.version} + + + + org.springframework + spring-tx + ${spring.version} + + + + org.springframework + spring-jdbc + ${spring.version} + + + + + commons-io + commons-io + 2.5 + + + + commons-fileupload + commons-fileupload + 1.2.1 + + + + + + + + org.springframework + spring-jdbc + 4.3.9.RELEASE + + + + + com.mchange + c3p0 + 0.9.5.2 + + + + + mysql + mysql-connector-java + 5.1.17 + + + + + com.google.code.gson + gson + 2.3.1 + + + + + + javax.servlet + javax.servlet-api + 3.1.0 + provided + + + + + javax.servlet + jstl + 1.2 + + + + + bilibili + + + + org.apache.maven.plugins + maven-compiler-plugin + 2.3.2 + + 1.8 + 1.8 + + + + + + + + + + + + diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..78b3e69 --- /dev/null +++ b/readme.md @@ -0,0 +1,33 @@ +开发环境:Eclipse ,JDK 1.8 ,Tomcat7 + +(论坛/购物/网页/后台) + +直接部署到tomcat 下面就可以执行 + +![image](url) + + +运行步骤: + +建立数据库,导入sql文件 +更改数据源db.properties设置 +启动Tomcat +浏览器访问:http://localhost:8080 + +项目流程: 下载数据库备份 →→下载static静态文件放到webapp下面→→视频可下载可不下载(重要:static这个文件一定要放在webapp下面 这样项目才可以访问) + +百度网盘地址 + +(数据库备份 项目截图 源码) + +链接: https://pan.baidu.com/s/1pMwc7vt 密码: kjud + +(Static 静态文件 这个文件直接放到webapp下面 直接用) + +链接: https://pan.baidu.com/s/1eTj3EX8 密码: xabt + +视频连接地址 + +链接: https://pan.baidu.com/s/1c3gjVPY 密码: rwym + +↑ ↑ 视频的地址放到 webapp/static/videolook 这个目录下面 \ No newline at end of file diff --git a/src/main/java/com/sf/Maping/T.java b/src/main/java/com/sf/Maping/T.java new file mode 100644 index 0000000..945d0ab --- /dev/null +++ b/src/main/java/com/sf/Maping/T.java @@ -0,0 +1,1137 @@ +package com.sf.Maping; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.annotation.PostConstruct; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.HttpRequest; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.multipart.MultipartFile; +import org.springframework.web.servlet.ModelAndView; + +import com.google.gson.Gson; +import com.sf.chaxun.Callingmethod; +import com.sf.chaxun.TestMain; +import com.sf.entity.ShoppingCart; +import com.sf.entity.forumEntity; +import com.sf.entity.forumreplyEntity; +import com.sf.entity.gridsEntity; +import com.sf.entity.messageEntity; +import com.sf.entity.ordertableEntity; +import com.sf.entity.userEntity; +import com.sf.entity.videoEntity; +import com.sf.entity.videoTopEntity; +import com.sf.jingtai.JspToHtml; +import com.sf.lanjieqi.Auth; +import com.sf.service.MessageService; +import com.sf.service.UserListService; +import com.sf.service.impl.Addserviceimpl; +import com.sf.service.impl.LoginServiceImpl; +import com.sf.service.impl.MessageServiceImpl; +import com.sf.service.impl.Update_login_password_Service_Impl; +import com.sf.service.impl.UserListServiceImpl; +import com.sf.tool.GetDataTime; +import com.sf.tool.GetUUID; + +@Controller +public class T { + + @Autowired + Addserviceimpl addserviceimpl; + + @Autowired + UserListService userListService; + + @Autowired + MessageServiceImpl messageServiceImpl; + + @PostConstruct + public void init(){ + System.out.println("我只会被调用一次"); + // new JspToHtml().main(null);//这个是静态页面 + TestMain sf = new TestMain(); + sf.main(null); + //int num = Callingmethod.count; + + } + + + @RequestMapping("index.sf") + public String test() { + return "forward:/logoone.sf"; + + //return "redirect:/abc/default.html"; //跳转 + //return "forward:/abc/default.html"; //前进 + } + + + + // 将数据库里面所有的视频查询出来 发送到首页面 + @RequestMapping("logoone.sf") + public ModelAndView logoone(HttpServletRequest request,HttpServletResponse response) { + + List list = userListServiceImpl.videolist("1");// 1 为动画mad + Map model = new HashMap(); + model.put("list", list); + List list2 = userListServiceImpl.videolist("2");// 2 + model.put("list2", list2); + List list3 = userListServiceImpl.videolist("3");// 3 + model.put("list3", list3); + // 随机查6条数据出来 + List fuck = userListServiceImpl.videolistimit6MAD(); + model.put("fuck", fuck); + /* + * List test = userListServiceImpl.videolistimit5(); + * for(videoEntity ts:test){ System.out.println("测试是否查询出来"); + * System.out.println(ts.getVideoName()); + * System.out.println(ts.getVideoTime()); } 可以查询出这么多条记录 + */ + /* System.out.println("测试"); */ +/* + try { + request.getRequestDispatcher("/static/adminjs/index.html").forward(request,response); + } catch (ServletException | IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + }*/ + + return new ModelAndView("index", model); + + } + + // AJAX 提交 + @RequestMapping(value = "ajaxTuiJian", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void ajaxTuiJian(HttpServletRequest request, HttpServletResponse response) throws IOException { + List list = userListServiceImpl.videolistimit7(); + // 设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(list); + out.write(sbb); + } + + // AJAX 提交 + @RequestMapping(value = "ajaxTuiJian2", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void webajax2(HttpServletRequest request, HttpServletResponse response) throws IOException { + List list = userListServiceImpl.videolistimit5MAD(); + + // 设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(list); + out.write(sbb); + } + // querendingdan.sf + + @RequestMapping(value = "querendingdan1.sf", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void querendingdan(HttpServletRequest request, HttpServletResponse response) + throws IOException { + String userName = (String) request.getSession().getAttribute("userName"); + List user = userListServiceImpl.userlistUserName(userName); + // user.getUserID(); + // 设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(user); + out.write(sbb); + } + + @RequestMapping(value = "testsf.sf", method = RequestMethod.GET, produces = "text/html;charset=UTF-8") + public String testsf(HttpServletResponse res) { + boolean bl = addserviceimpl.login(); + if (bl) { + System.out.println("成功"); + } else { + System.out.println("失败"); + } + + return "shouye"; + + } + + @RequestMapping("zhuce.sf") + public String zhuce(HttpServletRequest request) { + // 随机生成一个4位数验证码 + int num = GetUUID.yanzma(); + // 将int 转换为 String + String yanzheng = ""; + yanzheng = String.valueOf(num); + // 将验证码放入到session里面....暂时想不到其他办法 + request.getSession().setAttribute("yanzhengma", yanzheng); + return "zhuce"; + + } + + @Auth(validate = false) + @RequestMapping("login.sf") + public String login() { + return "loginnew"; + + } + + // 修改支付密码界面 + @RequestMapping("Tiaozhuanshouye.sf") + public String Tiaozhuanshouye() { + + return "shouye"; + + } + + // 信息修改界面 + @RequestMapping("User_full_information.sf") + public ModelAndView User_full_information(HttpServletRequest request) { + + // 得到登录用户的名字 + String userName = (String) request.getSession().getAttribute("userName"); + userEntity user = userListServiceImpl.userlist(userName); + Map model = new HashMap(); + + model.put("user", user);// userlist是个Arraylist之类的 + // System.out.println(user.getUserRMB()); + + // return "User_full_information"; + return new ModelAndView("User_full_information", model); + + } + + @Autowired + Update_login_password_Service_Impl update_login_password_Service_Impl; + + // 修改登录密码界面 + @RequestMapping("Update_login_password.sf") + public String Update_login_password(String passWord, String newpassWord, String newpassWord2, + HttpServletRequest request) { + String userName = (String) request.getSession().getAttribute("userName"); + if (passWord != null || newpassWord != null || newpassWord2 != null) { + if (newpassWord.equals(newpassWord2)) { + boolean bl = update_login_password_Service_Impl.Update_login_password(userName, passWord, newpassWord); + if (bl) { + return "User_full_information"; + } else { + request.setAttribute("PassWordErro", "对不起,旧密码输入有误!"); + } + } else { + request.setAttribute("PassWordErro", "两次密码输入有误!"); + } + } + return "Update_login_password"; + + } + + // 修改邮箱界面 + @RequestMapping("Update_email.sf") + public String Update_email(HttpServletRequest request, String emial, String newemial) { + String userName = (String) request.getSession().getAttribute("userName"); + if (userName != null || emial != null || newemial != null) { + boolean bl = update_login_password_Service_Impl.Update_login_Emial(userName, emial, newemial); + if (bl) { + return "User_full_information"; + } else { + request.setAttribute("PassWordErro2", "对不起,原邮箱输入错误!"); + } + } else { + request.setAttribute("PassWordErro", "输入不能为空!"); + } + + return "Update_email"; + + } + + // 修改手机界面 + @RequestMapping("Update_Phone.sf") + public String Update_Phone(HttpServletRequest request, String userPhone, String newuserPhone) { + // 得到session里面的用户名 + String userName = (String) request.getSession().getAttribute("userName"); + if (userName != null || userPhone != null || newuserPhone != null) { + boolean bl = update_login_password_Service_Impl.Update_login_Phone(userName, userPhone, newuserPhone); + if (bl) { + return "User_full_information"; + } else { + request.setAttribute("PassWordErro3", "对不起,原手机号码错误!"); + } + } else { + request.setAttribute("PassWordErro3", "输入不能为空!"); + } + return "Update_Phone";// User_full_information.sf + + } + + // 修改支付密码界面 + @RequestMapping("Update_PayPassword.sf") + public String Update_PayPassword(String paypassword, String newpaypassword, String newpaypassword2, + HttpServletRequest request) { + String userName = (String) request.getSession().getAttribute("userName"); + if (paypassword != null || newpaypassword != null || newpaypassword2 != null) { + if (newpaypassword.equals(newpaypassword2)) { + boolean bl = update_login_password_Service_Impl.Update_login_payPassword(userName, paypassword, + newpaypassword); + if (bl) { + return "User_full_information"; + } else { + request.setAttribute("PassWordErro5", "对不起,旧密码输入有误!"); + } + } else { + request.setAttribute("PassWordErro5", "两次密码输入有误!"); + } + } + return "Update_PayPassword"; + + } + + @Autowired + UserListServiceImpl userListServiceImpl; + + // 用户查看所有信息界面 + @RequestMapping("Information.sf") + public ModelAndView Information(HttpServletRequest request) { + // 得到登录用户的名字 + String userName = (String) request.getSession().getAttribute("userName"); + userEntity user = userListServiceImpl.userlist(userName); + Map model = new HashMap(); + + model.put("user", user);// userlist是个Arraylist之类的 + + return new ModelAndView("Information", model); + + } + + // 用户银行卡界面 + @RequestMapping("Bank_Card.sf") + public String Bank_Card() { + // System.out.println("测试是否进入此方法"); + return "Bank_Card"; + + } + + // 收货地址jsp界面 + @RequestMapping("Delivery_address.sf") + public String Delivery_address() { + // System.out.println("测试是否进入此方法"); + + return "Delivery_address"; + + } + + // String usermingzi,String userPhone,String userAddress + // 修改收货地址 + @RequestMapping("updateDelivery_address.sf") + public String updateDelivery_address(String usermingzi, String userPhone, String userAddress, + HttpServletRequest request) { + /* + * System.out.println(usermingzi); System.out.println(userPhone); + * System.out.println(userAddress); + */ + String sessionName = (String) request.getSession().getAttribute("userName"); + boolean bl = update_login_password_Service_Impl.Update_Addred(sessionName, userAddress, usermingzi, userPhone); + String tishi = ""; + if (bl) { + tishi = "修改成功"; + request.setAttribute("tishi", tishi); + } else { + tishi = "修改失败...请检查是否输入正确"; + request.setAttribute("tishi", tishi); + } + return "Delivery_address"; + + } + + @RequestMapping("userHand.sf") + public String userHand(HttpServletRequest request) { + String userName = (String) request.getSession().getAttribute("userName"); + String path2 = (String) request.getSession().getAttribute("fuckyou"); + userEntity user = userListServiceImpl.userlist(userName); + + // System.out.println(user.getUserHand()); + String userHand = user.getUserHand(); + String newuserHand = path2; + + // System.out.println(userName+newuserHand); + + boolean bl = update_login_password_Service_Impl.Update_login_hand(userName, userHand, newuserHand); + + if (bl) { + System.out.println("成功"); + } else { + System.out.println("失败"); + } + return "User_full_information"; + + } + + @RequestMapping("video.sf") + public ModelAndView video(String dizhi, HttpServletRequest request, String shipingID) { + /* + * System.out.println(dizhi); + * System.out.println("==============================="); + */ + // 获得地址 + request.setAttribute("dizhi", dizhi); + + // System.out.println("==============================="); + Map model = new HashMap(); + + // System.out.println(shipingID);//拿到视频地址 + request.setAttribute("shipingID", shipingID); + // 根据视频ID查询出 此视频的所有留言 + List messagelist = userListService.messagelist(shipingID); + + for (messageEntity message : messagelist) { + message.getMessageuserName();// 得到用户名 + // 根据每个用户名查询出每个用户对应的头像地址 + // userEntity userent = + // userListService.userlist(message.getMessageuserName()); + // System.out.println(userent.getUserName()); + // model.put("userent",userent);//userlist是个Arraylist之类的 + model.put("messagelist", messagelist);// userlist是个Arraylist之类的 + } + + return new ModelAndView("Video", model); + + // return "Video"; + + } + + @Autowired + MessageService messageService; + + // 留言- - 测试 + @RequestMapping("test.sf") + public String Test() { + + messageEntity user = new messageEntity(); + user.setMessage("1"); + user.setMessageID("1"); + user.setMessageTime("1"); + user.setMessageuserID("1"); + user.setMessageuserName("1"); + user.setMessagevideoID("1"); + + boolean bl = messageService.message(user); + if (bl) { + System.out.println("可以使用留言"); + } else { + System.out.println("不可以使用留言"); + } + return ""; + + } + + // 留言- - 测试 + /* + * @RequestMapping("test2.sf") public String Test2() { List + * list=userListService.messagelist("11"); for(messageEntity li:list){ + * System.out.println(li.getMessageuserName()); } return ""; + * + * } + */ + + // 切换账号 + @RequestMapping("exect.sf") + public String exect(HttpServletRequest request) { + + // System.out.println("切换账号"); + // 将session里面的用户信息全部清空 + request.getSession().removeAttribute("userName"); + return "loginnew"; + + } + + @RequestMapping("Houtai.sf") + public ModelAndView Houtai(HttpServletRequest request) { + // 设置一个默认从第一条开始查询 只查询出15条记录 + String pageInt = "0"; + int test = Integer.valueOf(pageInt).intValue(); + List list = userListServiceImpl.userlistpage(test); + + /* + * for(userEntity lis:list){ System.out.println(lis.getUserName()); } + */ + + Map model = new HashMap(); + model.put("list", list); + + return new ModelAndView("Houtai", model); + + } + + // AJAX 提交 根据用户名查询 + @RequestMapping(value = "userchaxunmessage1", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void userchaxunmessage1(HttpServletRequest request, HttpServletResponse response, + String message) throws IOException { + String shuaige = message; + // 得到内容 ajax提交进来 + List list = userListServiceImpl.listmohu("%" + shuaige + "%"); + + // 设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(list); + if (list.size() == 0) { + sbb = "0"; + } + out.write(sbb); + } + + // AJAX 提交 根据用户名查询 + @RequestMapping(value = "userchaxunmessage2", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void userchaxunmessage2(HttpServletRequest request, HttpServletResponse response, + String message) throws IOException { + String shuaige = message; + // 得到内容 ajax提交进来 + List list = userListServiceImpl.userPhone("%" + shuaige + "%"); + + // 设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(list); + if (list.size() == 0) { + sbb = "0"; + } + out.write(sbb); + } + + // AJAX 提交 根据ID查询 + @RequestMapping(value = "userID.sf", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void userID(HttpServletRequest request, HttpServletResponse response, String userID) + throws IOException { + // 得到内容 ajax提交进来 + List list = userListServiceImpl.userID(userID); + + // 设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(list); + if (list.size() == 0) { + sbb = "0"; + } + out.write(sbb); + } + // AJAX 提交 修改用户数据 + + @RequestMapping("updateuser.sf") + public String updateuser(String userID, String userName, String userzhenshiName, String userSex, String passWord, + String addr, String userPhone, String userQQ, String userEmial, HttpServletRequest request, + HttpServletResponse response) throws IOException { + + String echo = ""; + // 得到内容 ajax提交进来 + /* + * System.out.println(userID); System.out.println(userName); + * System.out.println(userzhenshiName); System.out.println(userSex); + * System.out.println(passWord); System.out.println(addr); + * System.out.println(userPhone); System.out.println(userQQ); + */ + + // update user set userName = "admin" , + // userMingzi = "佘峰T" ,usersex = "男" , + // passWord = "123321aaa" , userAddress = "四川省遂宁" , + // userPhone = "17583108191" , userQQ = "794799102" , + // userEmial = "794799102@qq.com" where + // userID = "004bcfc8d4bd407bb1a114785539006f" + + userEntity user = new userEntity(); + // 设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + + user.setUserName(userName); + user.setUserMingzi(userzhenshiName); + user.setUsersex(userSex); + user.setPassWord(passWord); + user.setUserAddress(addr); + user.setUserPhone(userPhone); + user.setUserQQ(userQQ); + user.setUserEmial(userEmial); + user.setUserID(userID); + boolean bl = update_login_password_Service_Impl.Update_user(user); + if (bl) { + echo = "修改成功"; + System.out.println("成功"); + } else { + echo = "修改失败,请联系管理员"; + } + request.setAttribute("echo", echo); + return "forward:/Houtai.sf"; + + } + + // 跳转到小黑屋界面.... 测试 + @RequestMapping("xiaoheiwu.sf") + public ModelAndView xiaoheiwu(HttpServletRequest request) { + // 将用户表里面被拉黑的用户全部查询出来 + List user = userListServiceImpl.xiaoheiwu("异常"); + Map model = new HashMap(); + model.put("user", user); + return new ModelAndView("xiaoheiwu", model); + + } + + // 将数据库里面所有的视频查询出来 发送到首页面 + @RequestMapping("testshabi.sf") + public String testshabi(HttpServletRequest request) { + + /* + * dangqianye= "0"; int dangqianye2 = Integer.parseInt(dangqianye); + * List list=userListServiceImpl.Pagevideolist("1", + * dangqianye2); Map model =new HashMap(); model.put("list", list); + */ + // request.setAttribute("test", "测试"); + int tag1 = userListServiceImpl.videocoun("1"); + // System.out.println("视频一共有"+tag1); + request.setAttribute("tag1", tag1); + + int tag4 = 12; + // 每页显示多少 + request.setAttribute("tag4", tag4); + + return "DisplayVideo"; + + } + + // AJAX 提交 + @RequestMapping(value = "ajaxtijiao1.sf", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void ajaxtijiao(HttpServletRequest request, HttpServletResponse response, String State, + String dangqianye, int meiyexianshiduoshaoge) throws IOException { + /* List list = userListServiceImpl.videolistimit5(); */ + int dangqianye2 = Integer.parseInt(dangqianye); + List list = userListServiceImpl.Pagevideolist(State, dangqianye2, meiyexianshiduoshaoge);// State + // 标记 + + // 设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(list); + out.write(sbb); + } + + // AJAX 提交 + @RequestMapping(value = "gouwuchet.sf", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void gouwuche(HttpServletRequest request, HttpServletResponse response, String userName, + String girdsName, String girdsimg, String girdsjiage, String girdsID) throws IOException { + /* + * System.out.println(girdsID);System.out.println(userName);System.out. + * println(girdsName);System.out.println(girdsimg);System.out.println( + * girdsjiage); + */ + ShoppingCart shoppingCart = new ShoppingCart(); + shoppingCart.setCartID(GetUUID.getUUID()); + shoppingCart.setShoopingID(girdsID); + shoppingCart.setShoopingImg(girdsimg); + shoppingCart.setShoopingjiage(girdsjiage); + shoppingCart.setShoopingName(girdsName); + shoppingCart.setUserName(userName); + boolean bl = messageServiceImpl.Shoppingcart(shoppingCart); + + String list = ""; + if (bl) { + list = "添加成功"; + } else { + list = "添加失败"; + } + + // 设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(list); + out.write(sbb); + } + + // 商品详情页面 请求 + @RequestMapping("gridspay.sf") + public String gridspay(HttpServletRequest request, String girdsID) { + gridsEntity gridslist = userListServiceImpl.gridsIDlist(girdsID); + request.setAttribute("gridslist", gridslist); + + return "gridspay"; + + } + + // 确认订单界面 + // Confirmorder.jsp + @RequestMapping("Confirmorder.sf") + public String Confirmorder(HttpServletRequest request, String girdsID, String gridsName, int gridskucun, + String gridsjiage, String gridsimg) { + // 乱码问题 + try { + gridsName = new String(gridsName.getBytes("ISO-8859-1"), "utf-8"); + + } catch (UnsupportedEncodingException e) { + // TODO Auto-generated catch block + System.out.println("Confirmorder.sf" + "这里的乱码解决失败"); + } + + gridsEntity grids = new gridsEntity(); + grids.setGridsID(girdsID); + grids.setGirdsimg(gridsimg); + grids.setGirdsjiage(gridsjiage); + grids.setGirdsName(gridsName); + grids.setGirdskucun(gridskucun); + // System.out.println(grids.getGirdsName()); + + request.setAttribute("grids", grids); + + return "Confirmorder"; + } + + @RequestMapping("gouwuche.sf") + public String gouwuche(HttpServletRequest request) { + String userName = (String) request.getSession().getAttribute("userName"); + List user = userListServiceImpl.shoppingcart(userName); + + request.setAttribute("user", user); + return "gouwuche"; + + } + + // AJAX 提交 + @RequestMapping(value = "delectgouwuche.sf", method = RequestMethod.GET, produces = "text/html;charset=UTF-8") + public String delectgouwuche(HttpServletRequest request, HttpServletResponse response, String cartID) + throws IOException { + // System.out.println(cartID); + boolean bl = update_login_password_Service_Impl.delectcartID(cartID); + String tishi = ""; + if (bl) { + // System.out.println("删除成功"); + tishi = "删除成功"; + request.setAttribute("tishi", tishi); + } else { + // System.out.println("删除失败"); + tishi = "已经删除,查找不到此商品"; + request.setAttribute("tishi", tishi); + } + return "forward:/gouwuche.sf"; + + } + + @RequestMapping("Shopping.sf") + public ModelAndView Shopping(HttpServletRequest request) { + List gridslist = userListServiceImpl.gridslist(); + + Map model = new HashMap(); + model.put("gridslist", gridslist); + + return new ModelAndView("Shoppingnew", model); + + } + + @RequestMapping("Order.sf") + public ModelAndView Order(HttpServletRequest request) { + String userName = (String) request.getSession().getAttribute("userName"); + // 根据名字查询出所有的订单 + List ordertable = userListServiceImpl.ordertable(userName); + + Map model = new HashMap(); + model.put("ordertable", ordertable); + + return new ModelAndView("Order", model); + + } + + // 全部订单 + @RequestMapping("Adminbackgroundshipment") + public ModelAndView admin(HttpServletRequest request) { + List ordertable = userListServiceImpl.ordertablelist(); + Map model = new HashMap(); + model.put("ordertable", ordertable); + return new ModelAndView("Adminbackgroundshipment", model); + } + + // 待发货 + @RequestMapping("Shipmentpending") + public ModelAndView Shipmentpending(HttpServletRequest request) { + List ordertable = userListServiceImpl.orderStat("1"); + Map model = new HashMap(); + model.put("ordertable", ordertable); + return new ModelAndView("Shipmentpending", model); + } + + // 已完成订单 + @RequestMapping("Completedorder") + public ModelAndView Completedorder(HttpServletRequest request) { + List ordertable = userListServiceImpl.orderStat("4"); + Map model = new HashMap(); + model.put("ordertable", ordertable); + return new ModelAndView("Completedorder", model); + } + + // 待会退的 + @RequestMapping("Returngoods") + public ModelAndView Returngoods(HttpServletRequest request) { + List ordertable = userListServiceImpl.orderStat("3"); + Map model = new HashMap(); + model.put("ordertable", ordertable); + return new ModelAndView("Returngoods", model); + } + + @RequestMapping("DeletOrder") + public ModelAndView DeletOrder(HttpServletRequest request) { + List ordertable = userListServiceImpl.orderStat("5"); + Map model = new HashMap(); + model.put("ordertable", ordertable); + return new ModelAndView("DeletOrder", model); + } + + // 跳转到查询界面 + @RequestMapping("Inquiryorder") + public String Inquiryorder(HttpServletRequest request) { + + return "Inquiryorder"; + } + + // AJAX 查询用户订单 + @RequestMapping(value = "AJAXinquiryorder", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void AJAXinquiryorder(HttpServletRequest request, HttpServletResponse response, String val) + throws IOException { + // 根据用户名查询出此用户下单 String val//这个为用户名 + List ordertable = userListServiceImpl.ordertable(val); + // user.getUserID(); + // 设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(ordertable); + out.write(sbb); + } + + public static int a = 0; + + // 查询出订单表一共多少条记录 + @RequestMapping(value = "countordertable", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void countordertable(HttpServletRequest request, HttpServletResponse response) + throws IOException { + String tishi = ""; + // 根据用户名查询出此用户下单 String val//这个为用户名 + int ordertable = userListServiceImpl.countordertable(); + + if (a == ordertable) { + tishi = "无新订单"; + } else { + a = ordertable; + tishi = "新订单"; + } + // 设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(tishi); + out.write(sbb); + } + + @RequestMapping("AdminBL") + public String AdminBL(HttpServletRequest request) { + + return "AdminBL"; + + } + + /************************ 文件上传 ****************************************/ + @RequestMapping("videoFileTop") + public String videoFileTop(HttpServletRequest request) { + + return "videoFileTop"; + + } + + /*** + * 保存文件 + * + * @param file + * @return + */ + private boolean saveFile(MultipartFile file) { + + return false; + } + + @RequestMapping("videoFileTop.sf") + public String videoFileTop(@RequestParam("files") MultipartFile[] files, HttpServletRequest request, String biaoti, + String Fruit) { + System.out.println("用户输入的标题为:" + biaoti + Fruit); + if (files != null && files.length > 0) { + // 循环获取file数组中得文件 + for (int i = 0; i < files.length; i++) { + MultipartFile file = files[i]; + // 保存文件 + System.out.println("正在调用保存方法"); + // saveFile(file); + // 判断文件是否为空 + if (!file.isEmpty()) { + try { + + // new 出一个实体 + videoTopEntity video = new videoTopEntity(); + // 放入session中 + request.getSession().setAttribute("video", video);// 放入到session中 + + System.out.println("文件总大小" + file.getSize()); + // 文件保存路径 + String filePath = "C:/videotest/" + file.getOriginalFilename(); + System.out.println(filePath); + /******************** 测试 **************************/ + File storeFile = new File(filePath); + // 得到输入流 + InputStream in = file.getInputStream(); + // 得到文件的输出流 + OutputStream out = new FileOutputStream(storeFile); + // 文件总大小 + long max = file.getSize(); + video.setFileSize(max); + video.setFilename(file.getOriginalFilename()); + // 剩余大小 + long other = max; + int len = 0;// 读取写入长度 + // 读写缓冲 + byte[] b = new byte[300]; + // 循环从输入流写入到输出流,结束循环是len==-1 + while ((len = in.read(b)) != -1) { + out.write(b, 0, len); + other -= len; + video.setFileSY(other); + // System.out.println("剩余大小:"+other); + // 给DTO设置other + // dto.setOther(other); + // System.out.println("总大小="+max+"剩余大小="+other); + // z总 max + // 剩余 other + // 传了 max-other + float zong = (float) (Integer.parseInt(String.valueOf(max))); + int shengxia = Integer.parseInt(String.valueOf(other)); + float ii3 = (float) zong - shengxia;// 传了多少 + if (shengxia != 0) { + int baifenbi = (int) ((ii3 / zong) * 100); + video.setBaifenbi(baifenbi); + // request.getSession().setAttribute("baifenbi", + // baifenbi); + // sSystem.out.println(baifenbi); + } + } + out.flush();// 刷新 + out.close();// 关闭 + in.close();// 关闭 + video.setTag(1);// 标记为1的时候表示上传成功 + System.out.println("上传成功"); + // 开始存储数据库 - - 这个好像好麻烦的说 + + } catch (Exception e) { + e.printStackTrace(); + } + /************************* + * 我尼玛!这里 + *********************************/ + + } + } + } + System.out.println("上传结束"); + + return "videoFileTop"; + + } + + /************************* 这里写个百分比的AJAX *******************************/ + @RequestMapping(value = "baifenbiAJAX", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void baifenbiAJAX(HttpServletRequest request, HttpServletResponse response) + throws IOException { + if (request.getSession().getAttribute("video") == null) { + // new 出一个实体 + videoTopEntity video = new videoTopEntity(); + video.setBaifenbi(0); + video.setFilename("请稍后.."); + video.setFileSize(0); + video.setFileSY(0); + video.setTag(0); + // 放入session中 + request.getSession().setAttribute("video", video);// 放入到session中 + + // - -想不到办法....就先让线程休息3秒在往下跑吧 + /* + * try { Thread.sleep(3000); } catch (InterruptedException e) { + * System.out.println("线程休息出错"); e.printStackTrace(); } + */ + } else { + videoTopEntity video = (videoTopEntity) request.getSession().getAttribute("video"); + // 设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(video); + out.write(sbb); + } + + } + + + +/* // 全部订单 + @RequestMapping("Adminbackgroundshipment") + public ModelAndView admin(HttpServletRequest request) { + List ordertable = userListServiceImpl.ordertablelist(); + Map model = new HashMap(); + model.put("ordertable", ordertable); + return new ModelAndView("Adminbackgroundshipment", model); + }*/ + + + //论坛首页 + @RequestMapping("forum.sf") + public String forum(HttpServletRequest request) { + // System.out.println("论坛"+Callingmethod.count);//得到注册用户的总数量 + + //将所有的论坛全部查询出来 + String a = (String) request.getServletContext().getAttribute("getUserName"); + request.setAttribute("userNamemessage", a);//最新注册的用户 + request.setAttribute("usercount", Callingmethod.count);//用户总数 + request.setAttribute("messacount", Callingmethod.messacount);//帖子总数 + request.setAttribute("onedaycount", Callingmethod.onedaycount);//今日总帖子数量 + request.setAttribute("yessdaycount", Callingmethod.yessdaycount);//昨日总帖子数量 + request.setAttribute("servedatcount", Callingmethod.servedatcount);//7天总帖子数量 + return "Forumindex"; + } + + @RequestMapping("Forum") + public ModelAndView Forum(HttpServletRequest request) { + //将所有的论坛全部查询出来 + List list = userListServiceImpl.forumEnt("1"); + Map model = new HashMap(); + model.put("list", list); + return new ModelAndView("Forum", model); + } + // + //论坛帖子详细 + @RequestMapping("forumReply.sf") + public ModelAndView forumReply(HttpServletRequest request,String forumID) { + //将所有的论坛全部查询出来 + forumEntity user = userListServiceImpl.forumentitymmp(forumID); + //在根据此ID查询出所有的回复 + List forumre = userListServiceImpl.forumreply(forumID); + Map model = new HashMap(); + model.put("user", user); + model.put("forumre", forumre); + return new ModelAndView("ForumReply", model); + } + + + //发布文章AJAX + @RequestMapping(value = "forummessage.sf", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void forummessage(HttpServletRequest request,HttpServletResponse response,String biaoti , String neirong) throws IOException { + forumEntity forument = new forumEntity(); + //给实体设值 + forument.setForumID(GetUUID.getUUID()); + forument.setForumBT(biaoti); + forument.setForummessage(neirong); + forument.setForumuserName((String) request.getSession().getAttribute("userName")); + forument.setForumTime(GetDataTime.DQtime()); + forument.setForumliebie("1");//类别也默认为1吧 + forument.setForumAmount("0"); + forument.setFirumhand((String) request.getSession().getAttribute("userHand")); + String list=""; + + //调用保存方法 + boolean bl = messageService.forumfuck(forument); + if(bl){ + list="发表成功"; + }else { + list="发表失败"; + } + + + // 设置编码 + response.setCharacterEncoding("UTF-8"); + try { + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(list); + out.write(sbb); + } catch (UnsupportedEncodingException e) { + System.out.println("发布论坛文章这里出错了"); + } + + } + + /****************************************************************/ + + //发布文章AJAX + @RequestMapping(value = "forumreply.sf", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void forumreply(HttpServletRequest request,HttpServletResponse response,String neirong , String id) throws IOException { + + // 设置编码 + response.setCharacterEncoding("UTF-8"); + try { + String listecho = ""; + forumreplyEntity forumreply = new forumreplyEntity(); + forumreply.setReplyhand((String) request.getSession().getAttribute("userHand")); + forumreply.setReplyid(GetUUID.getUUID()); + forumreply.setReplyneirong(neirong); + forumreply.setReplytieziid(id); + forumreply.setReplytime(GetDataTime.DQtime()); + forumreply.setReplyname((String) request.getSession().getAttribute("userName")); + //调用方法 + boolean bl = messageServiceImpl.forumreply(forumreply); + if(bl){ + listecho="回复成功"; + }else{ + listecho="回复失败,请联系管理员"; + } + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson = new Gson(); + String sbb = gson.toJson(listecho); + out.write(sbb); + } catch (UnsupportedEncodingException e) { + System.out.println("回复论坛帖子这里出错了"); + } + + } + + + + /* + * + * //所有测试页面都进这 + * + * @RequestMapping("testshabi.sf") public String + * testshabi(HttpServletRequest request) { + * + * return "DisplayVideo"; + * + * } + */ + +} diff --git a/src/main/java/com/sf/Maping/T2.java b/src/main/java/com/sf/Maping/T2.java new file mode 100644 index 0000000..33965a4 --- /dev/null +++ b/src/main/java/com/sf/Maping/T2.java @@ -0,0 +1,64 @@ +package com.sf.Maping; + +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; + +import com.sf.entity.userEntity; +import com.sf.service.impl.RegisterServiceImpl; + +@Controller +public class T2 { + + @Autowired + RegisterServiceImpl registerService; + + @RequestMapping("registertest.sf") + public String web3(){ + + System.out.println("测试是否进入此方法"); + userEntity user = new userEntity(); + user.setUserID("1238"); + user.setUserName("123123"); + user.setUserMingzi("123123"); + user.setUserState("1"); + user.setUserPhone("123123"); + user.setPassWord("123"); + + boolean bl=registerService.RegisterService(user); + if(bl){ + System.out.println("注册成功"); + }else{ + System.out.println("注册失败"); + } + + + return "login"; + + } + + + + + + + + + + + + + + + + + + + + + + +} diff --git a/src/main/java/com/sf/chaxun/Callingmethod.java b/src/main/java/com/sf/chaxun/Callingmethod.java new file mode 100644 index 0000000..26b607b --- /dev/null +++ b/src/main/java/com/sf/chaxun/Callingmethod.java @@ -0,0 +1,130 @@ +package com.sf.chaxun; +import java.sql.Connection; +import java.sql.DriverManager; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.sql.Statement; +import java.util.TimerTask; + +import javax.servlet.http.HttpServletRequest; + +import com.sf.jingtai.JspToHtml; + + + +public class Callingmethod extends TimerTask { + + public static int count=0; //总共多少个用户 + public static int messacount=0;//总共有多少条帖子论坛 + public static int onedaycount=0;//今天一共有多少帖子 + public static int yessdaycount=0;//昨日一共有多少帖子 + public static int servedatcount=0;//7天内 +/* System.out.println("htp"+Callingmethod.count);*/ + + @Override + public void run(){ + //查询出有多少用户 每隔2分钟查询一次 + // System.out.println("我的查询方法!"); + //int num = userListService.counttable(""); + // System.out.println(num); + try { + + + /* JspToHtml StaticHtml = new JspToHtml(); + StaticHtml.main(null); + System.out.println("我在被调用 静态html 测试时间");*/ + + //System.out.println("count="+count); + //加载数据库驱动,注册到去送管理器 0- + Class.forName("com.mysql.jdbc.Driver"); + + String url = "jdbc:mysql://127.0.0.1:3306/bilibili?useUnicode=true&characterEncoding=utf-8&autoReconnect=true&failOverReadOnly=false"; + + String username = "root"; + + String password = "root"; + + Connection conn = DriverManager.getConnection(url , username , password); + + if (conn != null) { + + // System.out.println("数据库连接成功!"); + /*******************************************************************/ + //有多少用户 + /*******************************************************************/ + Statement stmt = conn.createStatement(); //创建Statement对象 + String sql = "SELECT count(*) FROM user"; //要执行的SQL + ResultSet rs = stmt.executeQuery(sql); + while (rs.next()) { + // System.out.println(rs.getInt(1)); + count=rs.getInt(1);//得到有多少条数据 + //HttpServletRequest.class.getServletContext().setAttribute("count", rs.getInt(1)); + //request.getServletContext().setAttribute("getUserName",user.getUserName()); + } + + /*******************************************************************/ + //有多少帖子 + /*******************************************************************/ + String sql2 = "SELECT count(*) FROM forum"; //要执行的SQL + ResultSet rs2 = stmt.executeQuery(sql2); + while (rs2.next()) { + messacount=rs2.getInt(1); + } + + /*******************************************************************/ + //今日发布了多少帖子 + /*******************************************************************/ + String sql3 = "SELECT count(*) from forum where TO_DAYS(NOW()) - TO_DAYS(forumTime) <=1"; //要执行的SQL + ResultSet rs3 = stmt.executeQuery(sql3); + while (rs3.next()) { + onedaycount=rs3.getInt(1); + } + /*******************************************************************/ + //昨日发布了多少帖子 + /*******************************************************************/ + String sql4 = "SELECT count(*) from forum where TO_DAYS(forumTime)=TO_DAYS(NOW())"; //要执行的SQL + ResultSet rs4 = stmt.executeQuery(sql4); + while (rs4.next()) { + yessdaycount=rs4.getInt(1); + } + + /*******************************************************************/ + //7天内发布了多少帖子 + /*******************************************************************/ + String sql5 = "SELECT count(*) from forum where DATE_SUB(CURDATE(),INTERVAL 7 DAY) <=(forumTime)"; //要执行的SQL + ResultSet rs5 = stmt.executeQuery(sql5); + while (rs5.next()) { + servedatcount=rs5.getInt(1); + } + + + + + //SELECT * from forum where TO_DAYS(NOW()) - TO_DAYS(forumTime) <=1 今天的所有帖子 + //SELECT * from forum where TO_DAYS(forumTime)=TO_DAYS(NOW()) 昨日的帖子数量 + //SELECT * from forum where DATE_SUB(CURDATE(),INTERVAL 7 DAY) <=(forumTime) 7天内的所有帖子数量 + + + + + //System.out.println("一共"+num); + } + else { + + System.out.println("数据库连接失败!"); + + //完成后记得关闭数据库连接 + + conn.close(); + } + + } catch (ClassNotFoundException e) { + + e.printStackTrace(); + + } catch (SQLException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/sf/chaxun/TestMain.java b/src/main/java/com/sf/chaxun/TestMain.java new file mode 100644 index 0000000..edffab1 --- /dev/null +++ b/src/main/java/com/sf/chaxun/TestMain.java @@ -0,0 +1,15 @@ +package com.sf.chaxun; + +import java.util.Timer; + + +public class TestMain { + public static void main(String[] args) { + Timer timer = new Timer(); + + timer.schedule(new Callingmethod(), 1000, 120000); + //查询出有多少用户 每隔2分钟查询一次 + + } + +} diff --git a/src/main/java/com/sf/dao/LoginDao.java b/src/main/java/com/sf/dao/LoginDao.java new file mode 100644 index 0000000..4cc31ce --- /dev/null +++ b/src/main/java/com/sf/dao/LoginDao.java @@ -0,0 +1,74 @@ +package com.sf.dao; + +import java.util.List; + +import com.sf.entity.ordertableEntity; +import com.sf.entity.userEntity; + +public interface LoginDao { + public int login(String userName,String passWord); + + + /** + * 查看支付密码是否正确 + * @param userName + * @param pass + * @return + */ + public int paypassword(String userName,String pass); + + + /** + * 如果支付密码正确. 则可以修改用户余额 + * @param userName + * @param userRMB + * @return + */ + public int updateRMB(String userRMB,String userName); + + + /** + * 用户下单之后 将订单存储到数据库 + * @param ordertable + * @return + */ + + public int ordertable(ordertableEntity ordertable); + + + + /** + * 根据商品ID 确认收货 + * @param orderID + * @return + */ + public int Confirmorder(String orderID); + + + + /** + * 根据商品ID 取消订单 + * @param orderID + * @return + */ + public int Cancellationoforder(String orderID); + + + /** + * 根据商品ID 删除订单 + * @param orderID + * @return + */ + public int delordertable(String orderID); + + + /** + * 根据商品ID 立即发货 + * @param orderID + * @return + */ + public int Delivergoods(String OrderStat,String orderID); +} + + + diff --git a/src/main/java/com/sf/dao/MessageDao.java b/src/main/java/com/sf/dao/MessageDao.java new file mode 100644 index 0000000..6a086e2 --- /dev/null +++ b/src/main/java/com/sf/dao/MessageDao.java @@ -0,0 +1,37 @@ +package com.sf.dao; + +import com.sf.entity.ShoppingCart; +import com.sf.entity.forumEntity; +import com.sf.entity.forumreplyEntity; +import com.sf.entity.messageEntity; +import com.sf.entity.ordertableEntity; + +public interface MessageDao { + /** + * 直接保存用户留言信息到留言表 + * @param message + * @return + */ + public int message(messageEntity message); + + + + public int Shoppingcart(ShoppingCart shoppingCart); + + + /** + * 直接保存论坛帖子 + * @param forument + * @return + */ + public int forumfuck(forumEntity forument); + + /** + * 直接保存回复的帖子内容 + * @param forument + * @return + */ + public int forumreply(forumreplyEntity forumreply); + + +} diff --git a/src/main/java/com/sf/dao/RegisterDao.java b/src/main/java/com/sf/dao/RegisterDao.java new file mode 100644 index 0000000..d370484 --- /dev/null +++ b/src/main/java/com/sf/dao/RegisterDao.java @@ -0,0 +1,15 @@ +package com.sf.dao; + +import com.sf.entity.userEntity; + +public interface RegisterDao { + + /** + * 注册接口 + * + * 先根据用户名查询出是否有此用户 + * 如果没有 即可注册 + * @return + */ + public int Register(userEntity user ); +} diff --git a/src/main/java/com/sf/dao/Update_login_password_Dao.java b/src/main/java/com/sf/dao/Update_login_password_Dao.java new file mode 100644 index 0000000..ac295a1 --- /dev/null +++ b/src/main/java/com/sf/dao/Update_login_password_Dao.java @@ -0,0 +1,86 @@ +package com.sf.dao; + +import com.sf.entity.userEntity; + +public interface Update_login_password_Dao { + + /** + * 根据用户名查询出用户密码 如果正确则再去修改密码 + * @param userName + * @param passWord + * @param newpassWord + * @return + */ + public int Update_login_password(String userName,String passWord,String newpassWord); + + + /** + * 修改用户地址 + * @param userName + * @param passWord + * @param newpassWord + * @return + */ + public int Update_Addred(String sessionName,String dizhi,String xingming,String phone); + + + + /** + * 根据用户名查询出用户邮箱 如果正确则再去修改邮箱 + * @param userName + * @param passWord + * @param newpassWord + * @return + */ + public int Update_login_Emial(String userName,String emial,String newemial); + + + /** + * 根据用户名查询出用户手机 如果正确则再去修改手机号码 + * @param userName + * @param passWord + * @param newpassWord + * @return + */ + public int Update_login_Phone(String userName,String userPhone,String newuserPhone); + + + /** + * 根据用户名查询出用户支付密码 如果正确则再去修改支付密码 + * @param userName + * @param passWord + * @param newpassWord + * @return + */ + public int Update_login_payPassword(String userName,String paypassword,String newpaypassword); + + + /** + * 根据用户名查询出用户头像 如果正确则再去修改头像地址 + * @param userName + * @param passWord + * @param newpassWord + * @return + */ + public int Update_login_hand(String userName,String userHand,String newuserHand); + + + + /** + * 修改用户的全部信息 + * @param user + * @return + */ + public int Update_user(userEntity user); + + + /** + * 根据ID删除对应的购物车 + * + * @param cartID + * @return + */ + public int delectcartID (String cartID); + + +} diff --git a/src/main/java/com/sf/dao/UserListDao.java b/src/main/java/com/sf/dao/UserListDao.java new file mode 100644 index 0000000..c7e7f5a --- /dev/null +++ b/src/main/java/com/sf/dao/UserListDao.java @@ -0,0 +1,203 @@ +package com.sf.dao; + + + +import java.util.List; + +import com.sf.entity.ShoppingCart; +import com.sf.entity.forumEntity; +import com.sf.entity.forumreplyEntity; +import com.sf.entity.gridsEntity; +import com.sf.entity.messageEntity; +import com.sf.entity.ordertableEntity; +import com.sf.entity.userEntity; +import com.sf.entity.videoEntity; + +public interface UserListDao { + + /** + * 根据用户的名字 查询出用户的所有信息 + * @return + */ + public userEntity userlist(String userName); + + /** + * 根据ID查询出此条论坛的全部信息 + * @param forumID + * @return + */ + public forumEntity forumentitymmp(String forumID); + + /** + * 将video 全部信息全部查询出来 + * + */ + public List userlistUserName(String userName); + + + + /** + * 将video 全部信息全部查询出来 + * + */ + public List videolist(String videocAtegory); + + + /** + * 随机在video 里面查询出5条记录 + * @return + */ + public List videolistimit7(); + + /** + * 随机在video 里面查询出5条记录 + * @return + */ + public List videolistimit5MAD(); + + /** + * 随机在video 里面查询出6条记录 + * @return + */ + public List videolistimit6MAD(); + + /** + * 根据ID查询出当前视频的所有留言 + * @return + */ + public List forumreply(String forumreplyID); + + + /** + * 根据ID查询这条帖子所有的回复 + * @return + */ + public List messagelist(String videoID); + + + /** + * 将用户表里面所有的用户只查询出15条. 到时候方便分页 + * @return + */ + public List userlistpage(int pageInt); + + + /** + * 根据用户输入的内容 进行模糊查询出所得 + * @return + * + */ + public List listmohu(String usermohu); + + /** + * 根据用户输入的手机号 进行模糊查询出所得 + * @return + * + */ + public List userPhone(String userPhone); + + + /** + * 根据ID查询出用户的所有信息 + * @return + * + */ + public List userID(String userID); + + + + /** + * 根据用户的状态 查询出用户的所有信息 + * @return + */ + public List xiaoheiwu(String userStat); + + /** + * 根据当前页查询出6条记录 + * @param dangqianye 页面传过来的当前页 + * @param State 需要查询的视频列别 + * @param meiyexianshiduoshaoge 每页显示多少个视频 + * @return + */ + public List Pagevideolist(String State,int dangqianye,int meiyexianshiduoshaoge); + + + + /** + * 根据标记 查询出一共有多少条记录 + * @param countvideo + * @return + */ + public int videocoun(String countvideo); + + + /** + * 将商品全部信息查询出来 + * @return + */ + public List gridslist(); + + + /** + * 根据商品ID查询出商品信息 + * @param gridsID + * @return + */ + public gridsEntity gridsIDlist(String gridsID); + + + /** + * 根据登录的用户名 查询出购物车里面的商品 + * @param userName + * @return + */ + public List shoppingcart(String userName); + + + + /** + * 根据论坛类型查询出符合条件的论坛 + * @param forumliebie + * @return + */ + public List forumEnt(String forumliebie); + + + + /** + * 根据用户名查询出所有的订单 + * + */ + public List ordertable(String userName); + + + /** + * 查询出所有的订单 + * + */ + public List ordertablelist(); + + + /** + * 查询出标记的订单 + * + */ + public List orderStat(String orderStat); + + + /** + * 查询出订单表里面有多少条记录 + * @return + */ + public int countordertable(); + + + /** + * 根据表名查询出有多少记录 + * @param tableName + * @return + */ + public int counttable(String tableName); + + +} diff --git a/src/main/java/com/sf/dao/impl/LoginDaoimpl.java b/src/main/java/com/sf/dao/impl/LoginDaoimpl.java new file mode 100644 index 0000000..6c02531 --- /dev/null +++ b/src/main/java/com/sf/dao/impl/LoginDaoimpl.java @@ -0,0 +1,91 @@ +package com.sf.dao.impl; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.sf.dao.LoginDao; +import com.sf.db.Data_jdbcTemplate; +import com.sf.entity.ordertableEntity; + +@Component +public class LoginDaoimpl implements LoginDao { + + @Autowired + Data_jdbcTemplate jdbcTemplate; + + public int login(String userName,String passWord) { + //添加一条数据 + //String chaxunSql="insert into sda(sda) values('张三')"; + //int num=jdbcTemplate.getJdbcTemplate().update(chaxunSql); + + //根据用户名查询 + //String sql = "SELECT count(*) FROM user WHERE userName = ?"; + //int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[] { "12312" },Integer.class); + + //添加数据 + //String chaxunSql="insert into user(userID,userName,passWrod,userPhone,userState) values(?,?,?,?,?)"; + //int num=jdbcTemplate.getJdbcTemplate().update(chaxunSql,new Object[]{"张三1","爱仕达","123","123","测试"}); + + //select * from user where userName="admin" and `passWord`="123321aaa"; + + String sql="select count(*) from user where userName = ? and passWord = ?"; + int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,passWord},Integer.class); + //jdbcTemplate.getJdbcTemplate().queryf + return num; + } + + public int paypassword(String userName,String pass) { + // SELECT * from `user` where userName="admin" and `passWord`="123321aaa" + String sql = "select count(*) from user where userName=? and userPaypassword=?"; + int num = jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,pass},Integer.class); + + return num; + } + + public int updateRMB(String userRMB, String userName) { + String update="update user set userRMB=? where userName=?"; + int num = jdbcTemplate.getJdbcTemplate().update(update,new Object[]{userRMB,userName}); + return num; + } + + public int ordertable(ordertableEntity ordertable) { + String sql = "insert into ordertable (OrderID,OrderuserName,OrderIgridsName,OrdergridsImg,OrderzongRMB,OrderStat,OrderTime,OrderAddr) values(?,?,?,?,?,?,?,?)"; + int num = jdbcTemplate.getJdbcTemplate().update(sql,new Object[]{ordertable.getOrderID(),ordertable.getOrderuserName(),ordertable.getOrderIgridsName(),ordertable.getOrdergridsImg(),ordertable.getOrderzongRMB(),ordertable.getOrderStat(),ordertable.getOrderTime(),ordertable.getOrderAddr()}); + return num; + } + + public int Confirmorder(String orderID) { + int b = 0; + //根据ID查询出是否存在这个订单 是否为发货状态 + String sql = "select count(*) from ordertable where OrderID = ? and OrderStat = 2";//是否有这个商品 并且是代发货状态 + int num = jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{orderID},Integer.class); + if(num>0){ + //有此订单.. 代发货状态 + String sql2 = "update ordertable set OrderStat=4 where OrderID=?";//更改为收货 + b= jdbcTemplate.getJdbcTemplate().update(sql2,new Object[]{orderID}); + }else{ + b=0;//查不到此订单 + } + return b; + } + + + public int Cancellationoforder(String orderID) { + String sql2 = "update ordertable set OrderStat=3 where OrderID=?";//更改为待取消订单 + int num = jdbcTemplate.getJdbcTemplate().update(sql2,new Object[]{orderID}); + return num; + } + + public int delordertable(String orderID) { + String sql2 = "update ordertable set OrderStat=5 where OrderID=?";//更改为待取消订单 + int num = jdbcTemplate.getJdbcTemplate().update(sql2,new Object[]{orderID}); + return num; + } + + public int Delivergoods(String OrderStat,String orderID) { + String sql2 = "update ordertable set OrderStat=? where OrderID=?";//立即发货 + int num = jdbcTemplate.getJdbcTemplate().update(sql2,new Object[]{OrderStat,orderID}); + return num; + } + +} diff --git a/src/main/java/com/sf/dao/impl/MessageImpl.java b/src/main/java/com/sf/dao/impl/MessageImpl.java new file mode 100644 index 0000000..274c970 --- /dev/null +++ b/src/main/java/com/sf/dao/impl/MessageImpl.java @@ -0,0 +1,68 @@ +package com.sf.dao.impl; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.sf.dao.MessageDao; +import com.sf.db.Data_jdbcTemplate; +import com.sf.entity.ShoppingCart; +import com.sf.entity.forumEntity; +import com.sf.entity.forumreplyEntity; +import com.sf.entity.messageEntity; +import com.sf.entity.ordertableEntity; + + +@Component +public class MessageImpl implements MessageDao { + + @Autowired + Data_jdbcTemplate jdbcTemplate;//得到模板 + + + public int message(messageEntity message) { + //String chaxunSql="insert into user(userID,userName,passWord,userPhone,userState,userEmial,userHand,userPaypassword) values(?,?,?,?,?,?,?,?)"; + + String sql="insert into message(messageID,messagevideoID," + + "messageuserID,messageuserName,message," + + "messageTime,messageHand) values(?,?,?,?,?,?,?)"; + int num = jdbcTemplate.getJdbcTemplate().update(sql, new Object[]{message.getMessageID(), + message.getMessagevideoID(),message.getMessageuserID() + ,message.getMessageuserName(), + message.getMessage(),message.getMessageTime(),message.getMessageHand()}); + + + return num; + } + + + public int Shoppingcart(ShoppingCart shoppingCart) { + String sql = "insert into shoppingcart(cartID,userName,shoopingID,shoopingName,shoopingImg,shoopingjiage) values (?,?,?,?,?,?)"; + int num = jdbcTemplate.getJdbcTemplate().update(sql,new Object[]{shoppingCart.getCartID(),shoppingCart.getUserName(),shoppingCart.getShoopingID(),shoppingCart.getShoopingName(),shoppingCart.getShoopingImg(),shoppingCart.getShoopingjiage()}); + return num; + } + + + public int forumfuck(forumEntity forument) { + String sql = "insert into forum(forumID,forumBT,forummessage,forumuserName,forumTime,forumliebie,forumAmount,firumhand) values (?,?,?,?,?,?,?,?)"; + int num = jdbcTemplate.getJdbcTemplate().update(sql,new Object[]{forument.getForumID(),forument.getForumBT(),forument.getForummessage(),forument.getForumuserName(),forument.getForumTime(),forument.getForumliebie(),forument.getForumAmount(),forument.getFirumhand()}); + return num; + } + + + public int forumreply(forumreplyEntity forumreply) {/* + public String replyid;//回复ID + public String replyneirong;//回帖内容 + public String replytime;//回帖时间 + public String replyhand;//回帖人头像 + public String replytieziid;//回复帖子的ID + */ + String sql = "insert into forumreply (replyid,replyneirong,replytime,replyhand,replytieziid,replyname) values (?,?,?,?,?,?)"; + + int num = jdbcTemplate.getJdbcTemplate().update(sql,new Object[]{forumreply.getReplyid(),forumreply.getReplyneirong(),forumreply.getReplytime(),forumreply.getReplyhand(),forumreply.getReplytieziid(),forumreply.getReplyname()}); + return num; + } + + + + +} diff --git a/src/main/java/com/sf/dao/impl/RegisterImpl.java b/src/main/java/com/sf/dao/impl/RegisterImpl.java new file mode 100644 index 0000000..d109e66 --- /dev/null +++ b/src/main/java/com/sf/dao/impl/RegisterImpl.java @@ -0,0 +1,36 @@ +package com.sf.dao.impl; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.sf.dao.RegisterDao; +import com.sf.db.Data_jdbcTemplate; +import com.sf.entity.userEntity; + +@Component +public class RegisterImpl implements RegisterDao { + + @Autowired + Data_jdbcTemplate jdbcTemplate; + + + + public int Register(userEntity user) { + //默认为0 + int register=0; + //SELECT count(*) FROM user WHERE userName="admin" and `passWord`="123321aaa"; + //先根据用户名查询 + String sql = "SELECT count(*) FROM user WHERE userName = ?"; + int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[] {user.getUserName()},Integer.class); + if(num>0){ + System.out.println("此用户被注册"); + }else{ + //开始注册 + String chaxunSql="insert into user(userID,userName,passWord,userPhone,userState,userEmial,userHand,userPaypassword) values(?,?,?,?,?,?,?,?)"; + register=jdbcTemplate.getJdbcTemplate().update(chaxunSql,new Object[]{user.getUserID(),user.getUserName(),user.getPassWord(),user.getUserPhone(),user.getUserState(),user.getUserEmial(),user.getUserHand(),user.getUserPaypassword()}); + + } + return register; + } + +} diff --git a/src/main/java/com/sf/dao/impl/Update_login_password_Impl.java b/src/main/java/com/sf/dao/impl/Update_login_password_Impl.java new file mode 100644 index 0000000..5aa5e5f --- /dev/null +++ b/src/main/java/com/sf/dao/impl/Update_login_password_Impl.java @@ -0,0 +1,138 @@ +package com.sf.dao.impl; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.sf.dao.Update_login_password_Dao; +import com.sf.db.Data_jdbcTemplate; +import com.sf.entity.userEntity; + +@Component +public class Update_login_password_Impl implements Update_login_password_Dao { + + @Autowired + Data_jdbcTemplate jdbcTemplate; + //SELECT count(*) FROM user WHERE userName="admin" and `passWord`="123321aaa"; + + public int Update_login_password(String userName, String passWord, String newpassWord) { + int what=0; + //先查询出用户名和密码是否匹配 才能更改密码 + String sql="select count(*) from user where userName=? and passWord=?"; + int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,passWord},Integer.class); + if(num>0){ + //UPDATE user set `newpassWord`="111" where userName="admin"; + //此用户存在 并且密码匹配 可以进行修改密码 + String update="update user set passWord=? where userName=?"; + what=jdbcTemplate.getJdbcTemplate().update(update,new Object[]{newpassWord,userName}); + }else{ + return what; + } + return what; + } + + public int Update_login_Emial(String userName, String emial, String newemial) { + int what=0; + //先查询出用户名和密码是否匹配 才能更改密码 + String sql="select count(*) from user where userName=? and userEmial=?"; + int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,emial},Integer.class); + if(num>0){ + //UPDATE user set `newpassWord`="111" where userName="admin"; + //此用户存在 并且密码匹配 可以进行修改密码 + String update="update user set userEmial=? where userName=?"; + what=jdbcTemplate.getJdbcTemplate().update(update,new Object[]{newemial,userName}); + }else{ + return what; + } + return what; + } + + public int Update_login_Phone(String userName, String userPhone, String newuserPhone) { + + int what=0; + //先查询出用户名和密码是否匹配 才能更改密码 + String sql="select count(*) from user where userName=? and userPhone=?"; + int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,userPhone},Integer.class); + if(num>0){ + //UPDATE user set `newpassWord`="111" where userName="admin"; + //此用户存在 并且密码匹配 可以进行修改密码 + String update="update user set userPhone=? where userName=?"; + what=jdbcTemplate.getJdbcTemplate().update(update,new Object[]{newuserPhone,userName}); + }else{ + return what; + } + return what; + } + + + public int Update_login_payPassword(String userName, String paypassword, String newpaypassword) { + int what=0; + //先查询出用户名和密码是否匹配 才能更改密码 + String sql="select count(*) from user where userName=? and userPaypassword=?"; + int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,paypassword},Integer.class); + if(num>0){ + //UPDATE user set `newpassWord`="111" where userName="admin"; + //此用户存在 并且密码匹配 可以进行修改密码 + String update="update user set userPaypassword=? where userName=?"; + what=jdbcTemplate.getJdbcTemplate().update(update,new Object[]{newpaypassword,userName}); + }else{ + return what; + } + return what; + } + + public int Update_login_hand(String userName, String userHand, String newuserHand) { + + int what=0; + //先查询出用户名和密码是否匹配 才能更改密码 + String sql="select count(*) from user where userName=? and userHand=?"; + int num=jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{userName,userHand},Integer.class); + if(num>0){ + //UPDATE user set `newpassWord`="111" where userName="admin"; + //此用户存在 并且密码匹配 可以进行修改密码 + String update="update user set userHand=? where userName=?"; + what=jdbcTemplate.getJdbcTemplate().update(update,new Object[]{newuserHand,userName}); + }else{ + return what; + } + return what; + } + + public int Update_user(userEntity user) { + + //update user set userName = "admin" , + //userMingzi = "佘峰T" ,usersex = "男" , + //passWord = "123321aaa" , userAddress = "四川省遂宁" , + //userPhone = "17583108191" , userQQ = "794799102" , + //userEmial = "794799102@qq.com" where + //userID = "004bcfc8d4bd407bb1a114785539006f" +/* System.out.println(user.getUserID()); + System.out.println(user.getPassWord()); + System.out.println(user.getUserMingzi()); + System.out.println(user.getUsersex()); + System.out.println(user.getUserPhone()); + System.out.println(user.getUserQQ()); + System.out.println(user.getUserEmial()); + System.out.println(user.getUserAddress()); + System.out.println(user.getUserName());*/ + + String sql="update user set userName = ? , userMingzi = ? ,usersex = ? , passWord = ? , userAddress = ? ,userPhone = ? , userQQ = ? , userEmial = ? where userID = ?"; + 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()}); + return bl; + } + + public int Update_Addred(String sessionName, String dizhi, String xingming, String phone) { + //此用户存在 并且密码匹配 可以进行修改密码 + String update="update user set userMingzi=?,userPhone=?,userAddress=? where userName=?"; + int i =jdbcTemplate.getJdbcTemplate().update(update,new Object[]{xingming,phone,dizhi,sessionName}); + return i; + } + + public int delectcartID(String cartID) { + String sql = "delete from shoppingcart where cartID = ?"; + int num = jdbcTemplate.getJdbcTemplate().update(sql,new Object[]{cartID}); + return num; + } + + + +} diff --git a/src/main/java/com/sf/dao/impl/UserListDaoImpl.java b/src/main/java/com/sf/dao/impl/UserListDaoImpl.java new file mode 100644 index 0000000..0addec0 --- /dev/null +++ b/src/main/java/com/sf/dao/impl/UserListDaoImpl.java @@ -0,0 +1,256 @@ +package com.sf.dao.impl; + + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.sf.dao.UserListDao; +import com.sf.db.Data_jdbcTemplate; +import com.sf.entity.ShoppingCart; +import com.sf.entity.forumEntity; +import com.sf.entity.forumreplyEntity; +import com.sf.entity.gridsEntity; +import com.sf.entity.messageEntity; +import com.sf.entity.ordertableEntity; +import com.sf.entity.userEntity; +import com.sf.entity.videoEntity; +import com.sf.tool.GridsRowMapperEntity; +import com.sf.tool.RowMapperEntity; +import com.sf.tool.RowMapperVideoEntity; +import com.sf.tool.ShoppingCartRowMapperEntity; +import com.sf.tool.VideoRowMapperEntity; +import com.sf.tool.forumEntityRowMapper; +import com.sf.tool.forumreplyEntityRowMapper; +import com.sf.tool.ordertableRowMapperEntity; + +@Component +public class UserListDaoImpl implements UserListDao { + + @Autowired + Data_jdbcTemplate jdbcTemplate; + + public userEntity userlist(String userName) { + //根据名字查询出用户对象. - - + String sql="select * from user where userName=?"; + userEntity user=jdbcTemplate.getJdbcTemplate().queryForObject(sql,new Object[]{userName},new RowMapperEntity()); + return user; + } + + + public List videolist(String videocAtegory) { + //将全部视频查询出来 + String sql="select * from video where videocAtegory=? order by rand() limit 8";//将视频标记为1的正常视频全部查询出 + List list=jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{videocAtegory} ,new VideoRowMapperEntity()); + + return list; + } + + + //SELECT * from video ORDER BY RAND() LIMIT 5;随机在数据库里面查询出5条记录 + + public List videolistimit7() { + String sql="select * from video order by rand() limit 7"; + List list=jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{} ,new VideoRowMapperEntity()); + + return list; + } + + + public List videolistimit5MAD() { + String sql="select * from video order by rand() limit 5 "; + List list=jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{} ,new VideoRowMapperEntity()); + + return list; + } + + + public List messagelist(String videoID) { + List list=null; + //根据用户传过来的ID 查询出当前视频的所有留言 + //根据名字查询出用户对象. - - + String sql="select * from message WHERE messagevideoID=? order by STR_TO_DATE(messageTime,'%m/%d/%Y %h:%i:%s %p') desc"; + //select * from message WHERE messagevideoID="1" order by STR_TO_DATE(messageTime,'%m/%d/%Y %h:%i:%s %p') desc; + list=jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{videoID},new RowMapperVideoEntity()); + //将查询出来的所有结果全部放入到list集合当中 + return list; + + } + + + public List userlistpage(int pageInt) { + List user=null; + /*limit arg1,arg2 arg1指定查询记录的起始位置;arg2用于指定查询数据所返回的记录数 + select * from tablename limit 0,1 + 即取出第一条记录。 + select * from tablename limit 1,1 + 第二条记录 + select * from tablename limit 10,20 + 从第11条到31条(共计20条) + select * from tablename limit 0,2 + 取出2条数据 第一条和第二条 + 这个 limit 是实现分页的关键,每次取出数据库的内容,分页在页面上怎么去操作实现的,这好像很麻烦,要是每次数据库取出特定页的数据就好了,limit 实现这样的功能,对数据升序或降序排序后,利用 SQL 取出特定页的数据,直接显示就行了 + + 比如数据库返回的数据是 + */ + + String sql="SELECT * FROM user LIMIT ?,15"; + user=jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{pageInt},new RowMapperEntity()); + return user; + } + + + public List listmohu(String usermohu) { + //SELECT * FROM user where userMingzi LIKE '%爱仕达%'; + //模糊查询 根据输入的名字查询 + String sql="select * from user where userMingzi LIKE ?"; + List list = jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{usermohu},new RowMapperEntity()); + return list; + } + + + public List userPhone(String userPhone) { + //模糊查询 根据输入的名字查询 + String sql="select * from user where userPhone LIKE ? order by rand() limit 3"; + List list = jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{userPhone},new RowMapperEntity()); + return list; + } + + + public List userID(String userID) { + String sql="select * from user where userID=?"; + List list = jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{userID},new RowMapperEntity()); + return list; + } + + + public List xiaoheiwu(String userStat) { + //根据名字查询出用户对象. - - + String sql="select * from user where userState=?"; + //System.out.println("进来了"); + List list=jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{userStat},new RowMapperEntity()); + return list; + } + + + public List Pagevideolist(String State, int dangqianye,int meiyexianshiduoshaoge) { + //SELECT * FROM video WHERE videoID<=5 LIMIT 0,6 + String sql="SELECT * FROM video WHERE videocAtegory = ? LIMIT ?,?"; + List list=jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{State,dangqianye,meiyexianshiduoshaoge} ,new VideoRowMapperEntity()); + return list; + } + + + public int videocoun(String countvideo) { + //根据标记查询出对应的条数 + String sql="select count(*) from video";// where videocAtegory = ? + int num = jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{},Integer.class); + return num; + } + + + public List gridslist() { + String sql="select * from grids"; + List gridslist = jdbcTemplate.getJdbcTemplate().query(sql,new GridsRowMapperEntity()); + + return gridslist; + } + + + public gridsEntity gridsIDlist(String gridsID) { + String sql="select * from grids where gridsID = ?"; + gridsEntity gridsIDlist = (gridsEntity) jdbcTemplate.getJdbcTemplate().queryForObject(sql,new Object[]{gridsID} ,new GridsRowMapperEntity()); + return gridsIDlist; + } + + + public List userlistUserName(String userName) { + //根据名字查询出用户对象. - - + String sql="select * from user where userName=?"; + List user=jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{userName},new RowMapperEntity()); + return user; + } + + + public List shoppingcart(String userName) { + String sql = "select * from shoppingcart where userName = ?"; + List user = jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{userName},new ShoppingCartRowMapperEntity()); + + return user; + } + + + public List videolistimit6MAD() { + String sql="select * from video order by rand() limit 6"; + List list=jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{} ,new VideoRowMapperEntity()); + + return list; + } + + + public List ordertable(String userName) { + String sql = "select * from ordertable where OrderuserName=?"; + List ordertable = jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{userName} ,new ordertableRowMapperEntity()); + + return ordertable; + } + + + public List ordertablelist() { + String sql = "select * from ordertable"; + List ordertable = jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{} ,new ordertableRowMapperEntity()); + return ordertable; + } + + + public List orderStat(String orderStat) { + String sql = "select * from ordertable where orderStat = ?"; + List ordertable = jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{orderStat} ,new ordertableRowMapperEntity()); + return ordertable; + } + + + public int countordertable() { + String sql = "SELECT count(*) FROM ordertable"; + int num = jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{},Integer.class); + return num; + } + + + public List forumEnt(String forumliebie) { + //select * from forum where forumliebie = "1" Order By forumTime Desc + String sql = "select * from forum where forumliebie = ? Order By forumTime Desc"; + List forum = jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{forumliebie} ,new forumEntityRowMapper()); + //将查询出来的全部信息保存的List当中 + return forum; + } + + + public forumEntity forumentitymmp(String forumID) { + //根ID查询出帖子内容 + String sql="select * from forum where forumID=?"; + forumEntity user=jdbcTemplate.getJdbcTemplate().queryForObject(sql,new Object[]{forumID},new forumEntityRowMapper()); + return user; + } + + + public int counttable(String tableName) { + String sql = "SELECT count(*) FROM user"; + int num = jdbcTemplate.getJdbcTemplate().queryForObject(sql, new Object[]{},Integer.class); + return num; + } + + + public List forumreply(String forumreplyID) { + //select * from forum where forumliebie = "1" Order By forumTime Desc + String sql = "select * from forumreply where replytieziid = ? Order By replytime Desc"; + List forum = jdbcTemplate.getJdbcTemplate().query(sql,new Object[]{forumreplyID} ,new forumreplyEntityRowMapper()); + //将查询出来的全部信息保存的List当中 + return forum; + } + + + + +} diff --git a/src/main/java/com/sf/db/Data_jdbcTemplate.java b/src/main/java/com/sf/db/Data_jdbcTemplate.java new file mode 100644 index 0000000..b590717 --- /dev/null +++ b/src/main/java/com/sf/db/Data_jdbcTemplate.java @@ -0,0 +1,16 @@ +package com.sf.db; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Repository; + +@Repository +public class Data_jdbcTemplate { + @Autowired + org.springframework.jdbc.core.JdbcTemplate jdbcTemplate; + + //得到spring注入的模板 + public org.springframework.jdbc.core.JdbcTemplate getJdbcTemplate() { + return jdbcTemplate; + } + +} diff --git a/src/main/java/com/sf/entity/ShoppingCart.java b/src/main/java/com/sf/entity/ShoppingCart.java new file mode 100644 index 0000000..890d0f0 --- /dev/null +++ b/src/main/java/com/sf/entity/ShoppingCart.java @@ -0,0 +1,52 @@ +package com.sf.entity; + +//商品实体表 +public class ShoppingCart { + public String cartID; //购物车ID + public String userName;//购物人名字(账号) + public String shoopingID;//商品ID + public String shoopingName;//商品名字 + public String shoopingImg;//商品图片地址 + public String shoopingjiage;//商品价格 + + public String getCartID() { + return cartID; + } + public void setCartID(String cartID) { + this.cartID = cartID; + } + public String getUserName() { + return userName; + } + public void setUserName(String userName) { + this.userName = userName; + } + public String getShoopingID() { + return shoopingID; + } + public void setShoopingID(String shoopingID) { + this.shoopingID = shoopingID; + } + public String getShoopingName() { + return shoopingName; + } + public void setShoopingName(String shoopingName) { + this.shoopingName = shoopingName; + } + public String getShoopingImg() { + return shoopingImg; + } + public void setShoopingImg(String shoopingImg) { + this.shoopingImg = shoopingImg; + } + public String getShoopingjiage() { + return shoopingjiage; + } + public void setShoopingjiage(String shoopingjiage) { + this.shoopingjiage = shoopingjiage; + } + + + + +} diff --git a/src/main/java/com/sf/entity/forumEntity.java b/src/main/java/com/sf/entity/forumEntity.java new file mode 100644 index 0000000..c617156 --- /dev/null +++ b/src/main/java/com/sf/entity/forumEntity.java @@ -0,0 +1,72 @@ +package com.sf.entity; + +//帖子实体表 +public class forumEntity { + public String forumID;//文章ID + public String forumBT;//文章标题 + public String forummessage;//文章内容 + public String forumuserName;//发布人名字 + public String forumTime;//发布时间 + public String forumliebie;//发布类别 + public String forumAmount;//帖子浏览量 + public String firumhand;//头像 + + + + public String getFirumhand() { + return firumhand; + } + public void setFirumhand(String firumhand) { + this.firumhand = firumhand; + } + public String getForumID() { + return forumID; + } + public void setForumID(String forumID) { + this.forumID = forumID; + } + public String getForumBT() { + return forumBT; + } + public void setForumBT(String forumBT) { + this.forumBT = forumBT; + } + public String getForummessage() { + return forummessage; + } + public void setForummessage(String forummessage) { + this.forummessage = forummessage; + } + public String getForumuserName() { + return forumuserName; + } + public void setForumuserName(String forumuserName) { + this.forumuserName = forumuserName; + } + public String getForumTime() { + return forumTime; + } + public void setForumTime(String forumTime) { + this.forumTime = forumTime; + } + public String getForumliebie() { + return forumliebie; + } + public void setForumliebie(String forumliebie) { + this.forumliebie = forumliebie; + } + public String getForumAmount() { + return forumAmount; + } + public void setForumAmount(String forumAmount) { + this.forumAmount = forumAmount; + } + + + + + + + + +} diff --git a/src/main/java/com/sf/entity/forumreplyEntity.java b/src/main/java/com/sf/entity/forumreplyEntity.java new file mode 100644 index 0000000..bb8532f --- /dev/null +++ b/src/main/java/com/sf/entity/forumreplyEntity.java @@ -0,0 +1,53 @@ +package com.sf.entity; + + +//回帖实体表 +public class forumreplyEntity { + public String replyid;//回复ID + public String replyneirong;//回帖内容 + public String replytime;//回帖时间 + public String replyhand;//回帖人头像 + public String replytieziid;//回复帖子的ID + public String replyname;//回复人的名字 + public String getReplyid() { + return replyid; + } + public void setReplyid(String replyid) { + this.replyid = replyid; + } + public String getReplyneirong() { + return replyneirong; + } + public void setReplyneirong(String replyneirong) { + this.replyneirong = replyneirong; + } + public String getReplytime() { + return replytime; + } + public void setReplytime(String replytime) { + this.replytime = replytime; + } + public String getReplyhand() { + return replyhand; + } + public void setReplyhand(String replyhand) { + this.replyhand = replyhand; + } + public String getReplytieziid() { + return replytieziid; + } + public void setReplytieziid(String replytieziid) { + this.replytieziid = replytieziid; + } + public String getReplyname() { + return replyname; + } + public void setReplyname(String replyname) { + this.replyname = replyname; + } + + + + + +} diff --git a/src/main/java/com/sf/entity/gridsEntity.java b/src/main/java/com/sf/entity/gridsEntity.java new file mode 100644 index 0000000..8b15a79 --- /dev/null +++ b/src/main/java/com/sf/entity/gridsEntity.java @@ -0,0 +1,44 @@ +package com.sf.entity; + + +//商品实体表 +public class gridsEntity { + public String gridsID;//商品ID + public String girdsName;//商品名字 + public String girdsjiage;//商品价格 + public String girdsimg;//商品图片地址 + public int girdskucun;//商品库存 + public String getGridsID() { + return gridsID; + } + public void setGridsID(String gridsID) { + this.gridsID = gridsID; + } + public String getGirdsName() { + return girdsName; + } + public void setGirdsName(String girdsName) { + this.girdsName = girdsName; + } + public String getGirdsjiage() { + return girdsjiage; + } + public void setGirdsjiage(String girdsjiage) { + this.girdsjiage = girdsjiage; + } + public String getGirdsimg() { + return girdsimg; + } + public void setGirdsimg(String girdsimg) { + this.girdsimg = girdsimg; + } + public int getGirdskucun() { + return girdskucun; + } + public void setGirdskucun(int girdskucun) { + this.girdskucun = girdskucun; + } + + + +} diff --git a/src/main/java/com/sf/entity/messageEntity.java b/src/main/java/com/sf/entity/messageEntity.java new file mode 100644 index 0000000..5025c24 --- /dev/null +++ b/src/main/java/com/sf/entity/messageEntity.java @@ -0,0 +1,69 @@ +package com.sf.entity; + +//留言实体表 +public class messageEntity { + + /* messageID varchar(32) not null, + messagevideoID varchar(32) not null, + messageuserID varchar(32) not null, + messageuserName varchar(32) not null, + message text not null, + messageTime varchar(0) not null, + primary key (messageID)*/ + + private String messageID; //留言ID + private String messagevideoID;//留言视频ID + private String messageuserID;//留言用户ID + private String messageuserName;//留言用户名字 + private String message;//留言内容 + private String messageTime;//留言时间 + private String messageHand;//用户头像 + public String getMessageID() { + return messageID; + } + public void setMessageID(String messageID) { + this.messageID = messageID; + } + public String getMessagevideoID() { + return messagevideoID; + } + public void setMessagevideoID(String messagevideoID) { + this.messagevideoID = messagevideoID; + } + public String getMessageuserID() { + return messageuserID; + } + public void setMessageuserID(String messageuserID) { + this.messageuserID = messageuserID; + } + public String getMessageuserName() { + return messageuserName; + } + public void setMessageuserName(String messageuserName) { + this.messageuserName = messageuserName; + } + public String getMessage() { + return message; + } + public void setMessage(String message) { + this.message = message; + } + public String getMessageTime() { + return messageTime; + } + public void setMessageTime(String messageTime) { + this.messageTime = messageTime; + } + public String getMessageHand() { + return messageHand; + } + public void setMessageHand(String messageHand) { + this.messageHand = messageHand; + } + + + + + + +} diff --git a/src/main/java/com/sf/entity/ordertableEntity.java b/src/main/java/com/sf/entity/ordertableEntity.java new file mode 100644 index 0000000..76271d8 --- /dev/null +++ b/src/main/java/com/sf/entity/ordertableEntity.java @@ -0,0 +1,77 @@ +package com.sf.entity; + + +//订单实体表 +public class ordertableEntity { + + + /* + 订单状态: + 1 为: 代发货 + 2 为: 已发货 + 3 为: 退货中 + 4 为: 订单取消*/ + + + public String orderID;//订单ID + public String orderuserName;//订单人名字 + public String orderIgridsName;//订单商品名字 + public String ordergridsImg;//订单商品图片 + public String orderzongRMB;//订单总价格 + public String orderStat;//订单状态 + public String orderTime;//订单时间 + public String orderAddr;//订单收货地址 + public String getOrderID() { + return orderID; + } + public void setOrderID(String orderID) { + this.orderID = orderID; + } + public String getOrderuserName() { + return orderuserName; + } + public void setOrderuserName(String orderuserName) { + this.orderuserName = orderuserName; + } + public String getOrderIgridsName() { + return orderIgridsName; + } + public void setOrderIgridsName(String orderIgridsName) { + this.orderIgridsName = orderIgridsName; + } + public String getOrdergridsImg() { + return ordergridsImg; + } + public void setOrdergridsImg(String ordergridsImg) { + this.ordergridsImg = ordergridsImg; + } + public String getOrderzongRMB() { + return orderzongRMB; + } + public void setOrderzongRMB(String orderzongRMB) { + this.orderzongRMB = orderzongRMB; + } + public String getOrderStat() { + return orderStat; + } + public void setOrderStat(String orderStat) { + this.orderStat = orderStat; + } + public String getOrderTime() { + return orderTime; + } + public void setOrderTime(String orderTime) { + this.orderTime = orderTime; + } + public String getOrderAddr() { + return orderAddr; + } + public void setOrderAddr(String orderAddr) { + this.orderAddr = orderAddr; + } + + + + + +} diff --git a/src/main/java/com/sf/entity/userEntity.java b/src/main/java/com/sf/entity/userEntity.java new file mode 100644 index 0000000..ced5838 --- /dev/null +++ b/src/main/java/com/sf/entity/userEntity.java @@ -0,0 +1,128 @@ +package com.sf.entity; + +public class userEntity { + private String userID;//用户ID + private String userMingzi;//用户真实名字 + private String userName;//用户名 + private String passWord;//密码 + private String useryinghangka;//银行卡号 + private String usersex;//性别 + private String userHand;//头像 + private String userAddress;//地址 + private String userPhone;//手机 + private String userQQ;//qq + private String userEmial;//邮箱 + private String userCollection;//收藏 + private String userState;//状态 + private String userLoginTime;//最后登录时间 + private String userIP;//登录IP地址 + private String userPaypassword;//支付密码 + private String userRMB;//用户余额 + + + + public String getUserRMB() { + return userRMB; + } + public void setUserRMB(String userRMB) { + this.userRMB = userRMB; + } + public String getUserID() { + return userID; + } + public void setUserID(String userID) { + this.userID = userID; + } + public String getUserMingzi() { + return userMingzi; + } + public void setUserMingzi(String userMingzi) { + this.userMingzi = userMingzi; + } + public String getUserName() { + return userName; + } + public void setUserName(String userName) { + this.userName = userName; + } + public String getPassWord() { + return passWord; + } + public void setPassWord(String passWord) { + this.passWord = passWord; + } + public String getUseryinghangka() { + return useryinghangka; + } + public void setUseryinghangka(String useryinghangka) { + this.useryinghangka = useryinghangka; + } + public String getUsersex() { + return usersex; + } + public void setUsersex(String usersex) { + this.usersex = usersex; + } + public String getUserHand() { + return userHand; + } + public void setUserHand(String userHand) { + this.userHand = userHand; + } + public String getUserAddress() { + return userAddress; + } + public void setUserAddress(String userAddress) { + this.userAddress = userAddress; + } + public String getUserPhone() { + return userPhone; + } + public void setUserPhone(String userPhone) { + this.userPhone = userPhone; + } + public String getUserQQ() { + return userQQ; + } + public void setUserQQ(String userQQ) { + this.userQQ = userQQ; + } + public String getUserEmial() { + return userEmial; + } + public void setUserEmial(String userEmial) { + this.userEmial = userEmial; + } + public String getUserCollection() { + return userCollection; + } + public void setUserCollection(String userCollection) { + this.userCollection = userCollection; + } + public String getUserState() { + return userState; + } + public void setUserState(String userState) { + this.userState = userState; + } + public String getUserLoginTime() { + return userLoginTime; + } + public void setUserLoginTime(String userLoginTime) { + this.userLoginTime = userLoginTime; + } + public String getUserIP() { + return userIP; + } + public void setUserIP(String userIP) { + this.userIP = userIP; + } + public String getUserPaypassword() { + return userPaypassword; + } + public void setUserPaypassword(String userPaypassword) { + this.userPaypassword = userPaypassword; + } + + +} diff --git a/src/main/java/com/sf/entity/videoEntity.java b/src/main/java/com/sf/entity/videoEntity.java new file mode 100644 index 0000000..df760a3 --- /dev/null +++ b/src/main/java/com/sf/entity/videoEntity.java @@ -0,0 +1,85 @@ +package com.sf.entity; + +public class videoEntity { + + private String videoID; //视频ID + private String videoName;//视频名字 + private String videoImage;//视频图片 + private String videoAddress;//视频地址 + private String videolookTime;//视频时长 + private String videoCollection;//收藏 + private String videoLeaving;//视频留言 + private String videoTime;//视频上传时间 + private String videoState;//视频状态 + private String videocAtegory;//视频类别 + + + + public String getVideoID() { + return videoID; + } + public void setVideoID(String videoID) { + this.videoID = videoID; + } + public String getVideoName() { + return videoName; + } + public void setVideoName(String videoName) { + this.videoName = videoName; + } + public String getVideoImage() { + return videoImage; + } + public void setVideoImage(String videoImage) { + this.videoImage = videoImage; + } + public String getVideoAddress() { + return videoAddress; + } + public void setVideoAddress(String videoAddress) { + this.videoAddress = videoAddress; + } + public String getVideolookTime() { + return videolookTime; + } + public void setVideolookTime(String videolookTime) { + this.videolookTime = videolookTime; + } + public String getVideoCollection() { + return videoCollection; + } + public void setVideoCollection(String videoCollection) { + this.videoCollection = videoCollection; + } + public String getVideoLeaving() { + return videoLeaving; + } + public void setVideoLeaving(String videoLeaving) { + this.videoLeaving = videoLeaving; + } + public String getVideoTime() { + return videoTime; + } + public void setVideoTime(String videoTime) { + this.videoTime = videoTime; + } + public String getVideoState() { + return videoState; + } + public void setVideoState(String videoState) { + this.videoState = videoState; + } + public String getVideocAtegory() { + return videocAtegory; + } + public void setVideocAtegory(String videocAtegory) { + this.videocAtegory = videocAtegory; + } + + + + + + + +} diff --git a/src/main/java/com/sf/entity/videoTopEntity.java b/src/main/java/com/sf/entity/videoTopEntity.java new file mode 100644 index 0000000..0fd5a3c --- /dev/null +++ b/src/main/java/com/sf/entity/videoTopEntity.java @@ -0,0 +1,56 @@ +package com.sf.entity; + +public class videoTopEntity { + private String Filename;// 文件名字 + + private long FileSize;// 文件总大小 + + private long FileSY;// 文件上传 剩余的 + + private int tag=0;//如果大于0就是上传完成 + + private int baifenbi=0;//百分比 + + public String getFilename() { + return Filename; + } + + public void setFilename(String filename) { + Filename = filename; + } + + public long getFileSize() { + return FileSize; + } + + public void setFileSize(long fileSize) { + FileSize = fileSize; + } + + public long getFileSY() { + return FileSY; + } + + public void setFileSY(long fileSY) { + FileSY = fileSY; + } + + public int getTag() { + return tag; + } + + public void setTag(int tag) { + this.tag = tag; + } + + public int getBaifenbi() { + return baifenbi; + } + + public void setBaifenbi(int baifenbi) { + this.baifenbi = baifenbi; + } + + + +} diff --git a/src/main/java/com/sf/jingtai/JspToHtml.java b/src/main/java/com/sf/jingtai/JspToHtml.java new file mode 100644 index 0000000..6122c74 --- /dev/null +++ b/src/main/java/com/sf/jingtai/JspToHtml.java @@ -0,0 +1,72 @@ +package com.sf.jingtai; + +import java.io.BufferedReader; +import java.io.FileOutputStream; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStreamWriter; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.Date; + +// 静态 +public class JspToHtml { + private static long star = 0; + private static long end = 0; + private static long ttime = 0; + + // 返回html代码 + public static String getHtmlCode(String httpUrl, String bianma) { + Date before = new Date(); + star = before.getTime(); + String htmlCode = ""; + try { + InputStream in; + URL url = new java.net.URL(httpUrl); + HttpURLConnection connection = (HttpURLConnection) url.openConnection(); + connection = (HttpURLConnection) url.openConnection(); + connection.setRequestProperty("User-Agent", "Mozilla/4.0"); + connection.connect(); + in = connection.getInputStream(); + java.io.BufferedReader breader = new BufferedReader(new InputStreamReader(in, bianma)); + String currentLine; + while ((currentLine = breader.readLine()) != null) { + htmlCode += currentLine; + } + } catch (Exception e) { + e.printStackTrace(); + } finally { + //Date after = new Date(); + //end = after.getTime(); + //ttime = end - star; + // System.out.println("执行时间:"+ttime +"秒"); + } + return htmlCode; + } + // 存储文件 + public static synchronized void writeHtml(String filePath, String info) { + try { + OutputStreamWriter out = new OutputStreamWriter(new FileOutputStream(filePath), "UTF-8"); + out.write(info); + out.flush(); + } catch (Exception ex) { + ex.getMessage(); + } + } + + //main调用 + public static void main(String[] args) { + //http://127.0.0.1:888/bilibili/static/adminjs/index.html + //http://119.23.216.18:8080/bilibili/logoone.sf + //http://127.0.0.1:888/bilibili/logoone.sf + String url = "http://127.0.0.1:888/bilibili/logoone.sf"; + writeHtml("X:/Users/F-she-father/Workspaces/Eclipse IDE/bilibili/src/main/webapp/static/adminjs/index.html",getHtmlCode(url,"utf-8")); + //c:/1/html/index.html + //X:\Users\F-she-father\Workspaces\ + //Eclipse IDE\bilibili\src\main\webapp\static\adminjs + long tmp = Long.parseLong("0"); + java.util.Date before = new java.util.Date(); + long currtime = before.getTime(); + System.out.println(currtime - tmp); + } +} diff --git a/src/main/java/com/sf/lanjieqi/Auth.java b/src/main/java/com/sf/lanjieqi/Auth.java new file mode 100644 index 0000000..e730e4c --- /dev/null +++ b/src/main/java/com/sf/lanjieqi/Auth.java @@ -0,0 +1,17 @@ +package com.sf.lanjieqi; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Documented +@Inherited +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) + +public @interface Auth { + boolean validate() default true; +} diff --git a/src/main/java/com/sf/lanjieqi/AuthInterceptor.java b/src/main/java/com/sf/lanjieqi/AuthInterceptor.java new file mode 100644 index 0000000..e08ec3f --- /dev/null +++ b/src/main/java/com/sf/lanjieqi/AuthInterceptor.java @@ -0,0 +1,39 @@ +package com.sf.lanjieqi; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; + +public class AuthInterceptor extends HandlerInterceptorAdapter{ + + @Override + public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) + throws Exception { + + //判断用户是否登录 访问了不该访问的页面 + String userName = (String) request.getSession().getAttribute("userName"); + if(userName!=null){ + return true; + } + //访问的用户没有登录... + //跳转页面 + String addr = ""; + + if(request.getQueryString()!=null){ + //这个是带参数的! + addr = request.getRequestURI()+"?"+request.getQueryString(); + }else{ + //这个是不带参数的 + addr = request.getRequestURI(); + } + String jiequ = addr.substring(9); + // jiequ 这个地址是用户想访问的地址 + request.getSession().setAttribute("jiequ", jiequ); + + response.sendRedirect("login.sf"); + return false; + + } + +} \ No newline at end of file diff --git a/src/main/java/com/sf/request/LoginRequest.java b/src/main/java/com/sf/request/LoginRequest.java new file mode 100644 index 0000000..bd20501 --- /dev/null +++ b/src/main/java/com/sf/request/LoginRequest.java @@ -0,0 +1,241 @@ +package com.sf.request; + +import java.io.IOException; +import java.io.PrintWriter; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.google.gson.Gson; +import com.sf.entity.ordertableEntity; +import com.sf.entity.userEntity; +import com.sf.service.impl.LoginServiceImpl; +import com.sf.service.impl.UserListServiceImpl; +import com.sf.tool.GetDataTime; +import com.sf.tool.GetUUID; + +@Controller +public class LoginRequest { + + @Autowired + LoginServiceImpl loginServiceImpl; + + @Autowired + UserListServiceImpl userListServiceImpl; + + @RequestMapping("loginservice.sf") + public String web3(String userName,String passWord,HttpServletRequest request){ + boolean bl= loginServiceImpl.loginuser(userName, passWord); + if(bl){ + //将用户的全部信息查询出来 + userEntity list = userListServiceImpl.userlist(userName); + //request.setAttribute("userlist", list); + //成功 + //将用户ID放到session里面 + request.getSession().setAttribute("userID", list.getUserID()); + request.getSession().setAttribute("userName", userName); + request.getSession().setAttribute("userHand", list.getUserHand()); + String mamaipi = "logoone.sf"; + + if(request.getSession().getAttribute("jiequ")!=null){ + + //说明这个地址是用户想访问的地址 但是没用登录 + String ceshidizhi=(String) request.getSession().getAttribute("jiequ"); + //重置为空 + String jiequ = ""; + request.getSession().setAttribute("jiequ", jiequ); + + //赋值 + mamaipi = ceshidizhi; + + } + + return "redirect:/"+mamaipi; + }else{ + //失败 + request.setAttribute("PHO", "用户名或密码错误!"); + + } + + return "loginnew"; + } + + + + + + //AJAX 提交 + @RequestMapping(value="yanzhengpass.sf",method=RequestMethod.POST,produces="text/html;charset=UTF-8") + public @ResponseBody void yanzhengpass(HttpServletRequest request,HttpServletResponse response + ,String pass,String zong,String shangpingmingzi,String shangpingtupiao,String dizhi) throws IOException{ + //System.out.println(pass);"shangpingmingzi":shangpingmingzi,"shangpingtupiao":shangpingtupiao,"dizhi":dizhi + //System.out.println(zong);//拿到物品的所有价格 + + String userName = (String) request.getSession().getAttribute("userName"); + + String list = ""; + boolean bl = loginServiceImpl.paypassword(userName, pass); + if(bl){ + //拿到数据库里面的全部金额 + userEntity user=userListServiceImpl.userlist(userName); + //金额 + String RMB=user.getUserRMB(); + int shangpingjiage= 0; + shangpingjiage=Integer.valueOf(zong).intValue();//商品价格 + int sqljiage= 0; + sqljiage=Integer.valueOf(RMB).intValue();//用户的钱 + int yuer=sqljiage-shangpingjiage; + if(yuer<0){ + list="对不起,您的余额不足"; + }else{ + //将yuer转换为字符串然后保存数据库 + String userRMB=""; + userRMB=String.valueOf(yuer); + + //支付成功之后 将数据库里面的价格修改 + boolean b = loginServiceImpl.updateRMB(userRMB, userName); + if(b){ + //得到下单时间 + String Time = GetDataTime.DQtime(); + //将订单存到数据库 + ordertableEntity ordertable = new ordertableEntity(); + ordertable.setOrderID(GetUUID.getUUID()); + ordertable.setOrderuserName(userName); + ordertable.setOrderIgridsName(shangpingmingzi); + ordertable.setOrdergridsImg(shangpingtupiao); + ordertable.setOrderzongRMB(zong); + ordertable.setOrderStat("1"); + ordertable.setOrderTime(Time); + ordertable.setOrderAddr(dizhi); + boolean yes= loginServiceImpl.ordertable(ordertable); + if(yes){ + list="下单成功"; + }else{ + list="服务器错误...请联系管理员!"; + } + }else{ + list="服务器错误...请联系管理员!"; + } + } + }else{ + list="对不起,您输入的支付密码有误!"; + } + + + + //设置编码 + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + Gson gson=new Gson(); + String sbb=gson.toJson(list); + out.write(sbb); + } + + + + + //这里是确认收货 + @RequestMapping("querendingdan.sf") + public String querendingdan(HttpServletRequest request,String orderID) { + boolean bl = loginServiceImpl.Confirmorder(orderID); + if(bl){ + //收货成功 + //System.out.println("成功"); + }else{ + //收货失败 + //System.out.println("失败"); + } + return "forward:/Order.sf"; + + } + + + + //这里是待取消订单 + @RequestMapping("Cancellationoforder.sf") + public String Cancellationoforder(HttpServletRequest request,String orderID) { + boolean bl = loginServiceImpl.Cancellationoforder(orderID); + if(bl){ + //收货成功 + //System.out.println("待取消成功"); + }else{ + //收货失败 + //System.out.println("待取消失败"); + } + return "forward:/Order.sf"; + + } + + + + //这里是用户删除的订单 + @RequestMapping("delordertable.sf") + public String delordertable(HttpServletRequest request,String orderID) { + boolean bl = loginServiceImpl.delordertable(orderID); + if(bl){ + //收货成功 + //System.out.println("删除成功"); + }else{ + //收货失败 + //System.out.println("删除失败"); + } + return "forward:/Order.sf"; + + } + + + + //这里是立即发货 + @RequestMapping("Delivergoods.sf") + public String Delivergoods(HttpServletRequest request,String orderID) { + boolean bl = loginServiceImpl.Delivergoods("2",orderID); + if(bl){ + + }else{ + + } + return "forward:/Shipmentpending"; + + } + + //这里是立即退货 + @RequestMapping("Returngoods.sf") + public String Returngoods(HttpServletRequest request,String orderID) { + boolean bl = loginServiceImpl.Delivergoods("5",orderID); + if(bl){ + + }else{ + + } + return "forward:/Returngoods"; + + } + + @RequestMapping("loginforum.sf") + public String loginforum(String username,String password,HttpServletRequest request){ + boolean bl= loginServiceImpl.loginuser(username, password); + String sb = ""; + if(bl){ + //将用户的全部信息查询出来 + userEntity list = userListServiceImpl.userlist(username); + request.setAttribute("登录成功", sb); + //成功 + //将用户ID放到session里面 + request.getSession().setAttribute("userID", list.getUserID()); + request.getSession().setAttribute("userName", username); + request.getSession().setAttribute("userHand", list.getUserHand()); + }else{ + request.setAttribute("登录失败", sb); + return "forward:/forum.sf"; + } + return "forward:/forum.sf"; + } +} diff --git a/src/main/java/com/sf/request/MessageRequest.java b/src/main/java/com/sf/request/MessageRequest.java new file mode 100644 index 0000000..8498e25 --- /dev/null +++ b/src/main/java/com/sf/request/MessageRequest.java @@ -0,0 +1,103 @@ +package com.sf.request; + +import java.io.IOException; +import java.io.PrintWriter; +import java.io.UnsupportedEncodingException; +import java.util.List; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +import com.google.gson.Gson; +import com.sf.entity.messageEntity; +import com.sf.entity.userEntity; +import com.sf.entity.videoEntity; +import com.sf.service.impl.LoginServiceImpl; +import com.sf.service.impl.MessageServiceImpl; +import com.sf.service.impl.UserListServiceImpl; +import com.sf.tool.GetDataTime; +import com.sf.tool.GetUUID; + +@Controller +public class MessageRequest { + + @Autowired + LoginServiceImpl loginServiceImpl; + + @Autowired + UserListServiceImpl userListServiceImpl; + + @Autowired + MessageServiceImpl messageServiceImpl; + + @RequestMapping(value = "messageuser.sf", method = RequestMethod.POST, produces = "text/html;charset=UTF-8") + public @ResponseBody void web3(String message, HttpServletRequest request, HttpServletResponse response, + String shipingID) throws IOException { + String userName = (String) request.getSession().getAttribute("userName");// 得到用户登录的用户名 + // 如果Session 里面的用户名存在 就相当于用户已经登录 可以留言 否则不能 + // 设置编码 + // System.out.println("ajax 进入了 发表留言里面"); + response.setCharacterEncoding("UTF-8"); + request.setCharacterEncoding("UTF-8"); + PrintWriter out = response.getWriter(); + String tishi = ""; + Gson gson = new Gson(); + if (userName != null) { + + // 随机生成一个留言表ID + String messageID = GetUUID.getUUID(); + // 获得当前时间 + String dataTime = GetDataTime.DQtime(); + // System.out.println(message);//得到留言内容 + // System.out.println(shipingID);//得到视频ID + // String + userEntity user = userListServiceImpl.userlist(userName); + // 得到用户ID + String userID = user.getUserID(); + String userHand = user.getUserHand(); + + // 将留言类容过滤掉 html 标签 + message = message.replaceAll("<[^<]+>//s*|/t|/r|/n| ", ""); + //留言内容不能超过150个字 + if (message.length() < 150) { + + // new 一个用户实体 + messageEntity messageent = new messageEntity(); + messageent.setMessage(message); + messageent.setMessageID(messageID); + messageent.setMessageTime(dataTime); + messageent.setMessageuserID(userID); + messageent.setMessageuserName(userName); + messageent.setMessagevideoID(shipingID); + messageent.setMessageHand(userHand);// 将用户留言头像地址存放的留言表 + boolean bl = messageServiceImpl.message(messageent); + if (bl) { + // 留言成功 + // System.out.println("向这个视频留言成功"); + tishi = "留言成功"; + } else { + // 留言失败 + // System.out.println("留言失败"); + tishi = "留言失败"; + } + }else{ + System.out.println(message.length()); + tishi="对不起,留言内容过长"; + } + } else { + // 说明用户没有登录 就在留言 + // System.out.println("用户没有登录"); + tishi = "请登录之后留言"; + } + // redirect:/messageuser.sf + String t1 = gson.toJson(tishi); + out.write(t1); + + } +} diff --git a/src/main/java/com/sf/request/RegisterRequest.java b/src/main/java/com/sf/request/RegisterRequest.java new file mode 100644 index 0000000..f925021 --- /dev/null +++ b/src/main/java/com/sf/request/RegisterRequest.java @@ -0,0 +1,88 @@ +package com.sf.request; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.servlet.http.HttpServletRequest; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; + +import com.sf.entity.userEntity; +import com.sf.service.impl.RegisterServiceImpl; +import com.sf.tool.GetUUID; + +@Controller +public class RegisterRequest { + @Autowired + RegisterServiceImpl registerService; + + @RequestMapping("register.sf") + public String web3(userEntity user, HttpServletRequest request,String yanzheng) { + // System.out.println(user.getUserEmial()); + // System.out.println("测试是否进入此方法"); + + // 设置一个默认的用户ID UUID + user.setUserID(GetUUID.getUUID()); + // 设置用户注册时 默认状态 + user.setUserState("正常");// 状态为0为正常用户 + // 设置注册用户的默认支付密码; (一开始忘记了) + user.setUserPaypassword("123456"); + // 设置注册用户的默认头像 + user.setUserHand("/static/userHand_Top/upload/MyHand.png"); + + // 手机号码 正则表达式 + 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}$"; + Pattern regex = Pattern.compile(phone); + Matcher matcher = regex.matcher(user.getUserPhone()); + boolean pho = matcher.matches(); + // 邮箱 正则表达式 + String email = "[a-zA-Z0-9_\\-\\.]+@(sina|qq|163)+(\\.(com|cn|org|edu|hk))"; + Pattern regexemail = Pattern.compile(email); + Matcher matcheremial = regexemail.matcher(user.getUserEmial()); + boolean emial = matcheremial.matches(); + //验证用户账号 + String userNmae= "^[a-zA-Z]\\w{5,17}$"; + Pattern regexuserNmae = Pattern.compile(userNmae); + Matcher matcheruserName = regexuserNmae.matcher(user.getUserName()); + boolean username = matcheruserName.matches(); + + //获得验证码.....我是放入到session里的 + String yan=(String) request.getSession().getAttribute("yanzhengma"); + + + if(yanzheng.equals(yan)){ + if (pho) { + if (emial) { + if(username){ + boolean bl = registerService.RegisterService(user); + if (bl) { + // 这里是注册成功 + request.getServletContext().setAttribute("getUserName",user.getUserName()); + } else { + request.setAttribute("fail", "注册失败,此用户已经被注册"); + return "forward:/zhuce.sf"; + } + }else{ + request.setAttribute("fail", "注册失败,用户名输入错误"); + return "forward:/zhuce.sf"; + } + } else { + request.setAttribute("fail", "注册失败,邮箱地址错误"); + return "forward:/zhuce.sf"; + } + return "forward:/login.sf"; + + } else { + request.setAttribute("fail", "注册失败,手机号码错误"); + } + }else{ + request.setAttribute("fail", "注册失败,验证码错误"); + return "forward:/zhuce.sf"; + } + return "forward:/zhuce.sf"; + } + +} + diff --git a/src/main/java/com/sf/service/Addservice.java b/src/main/java/com/sf/service/Addservice.java new file mode 100644 index 0000000..2420463 --- /dev/null +++ b/src/main/java/com/sf/service/Addservice.java @@ -0,0 +1,5 @@ +package com.sf.service; + +public interface Addservice { + public boolean login(); +} diff --git a/src/main/java/com/sf/service/LoginService.java b/src/main/java/com/sf/service/LoginService.java new file mode 100644 index 0000000..f3b2801 --- /dev/null +++ b/src/main/java/com/sf/service/LoginService.java @@ -0,0 +1,75 @@ +package com.sf.service; + +import com.sf.entity.ordertableEntity; + +public interface LoginService { + public boolean loginuser(String userName,String passWord); + + + + + /** + * 查看支付密码是否正确 + * @param userName + * @param pass + * @return + */ + public boolean paypassword(String userName,String pass); + + + /** + * 如果支付密码正确. 则可以修改用户余额 + * @param userName + * @param userRMB + * @return + */ + public boolean updateRMB(String userRMB,String userName); + + + + + /** + * 用户下单之后 将订单存储到数据库 + * @param ordertable + * @return + */ + + public boolean ordertable(ordertableEntity ordertable); + + + + /** + * 根据商品ID 确认收货 + * @param orderID + * @return + */ + public boolean Confirmorder(String orderID); + + + + /** + * 根据商品ID 取消订单 + * @param orderID + * @return + */ + public boolean Cancellationoforder(String orderID); + + + + /** + * 根据商品ID 删除订单 + * @param orderID + * @return + */ + public boolean delordertable(String orderID); + + + + + /** + * 根据商品ID 立即发货 + * @param orderID + * @return + */ + public boolean Delivergoods(String OrderStat,String orderID); +} diff --git a/src/main/java/com/sf/service/MessageService.java b/src/main/java/com/sf/service/MessageService.java new file mode 100644 index 0000000..e1595eb --- /dev/null +++ b/src/main/java/com/sf/service/MessageService.java @@ -0,0 +1,43 @@ +package com.sf.service; + +import com.sf.entity.ShoppingCart; +import com.sf.entity.forumEntity; +import com.sf.entity.forumreplyEntity; +import com.sf.entity.messageEntity; + +public interface MessageService { + + + + /** + * 直接保存用户留言信息到留言表 + * @param message + * @return + */ + public boolean message(messageEntity message); + + + /** + * 直接保存 + * @param shoppingCart + * @return + */ + public boolean Shoppingcart(ShoppingCart shoppingCart); + + + /** + * 直接保存论坛帖子 + * @param forument + * @return + */ + public boolean forumfuck(forumEntity forument); + + + + /** + * 直接保存回复的帖子内容 + * @param forument + * @return + */ + public boolean forumreply(forumreplyEntity forumreply); +} diff --git a/src/main/java/com/sf/service/RegisterService.java b/src/main/java/com/sf/service/RegisterService.java new file mode 100644 index 0000000..a615452 --- /dev/null +++ b/src/main/java/com/sf/service/RegisterService.java @@ -0,0 +1,10 @@ +package com.sf.service; + +import com.sf.entity.userEntity; + +public interface RegisterService { + + public boolean RegisterService(userEntity user); + + +} diff --git a/src/main/java/com/sf/service/Update_login_password_Service.java b/src/main/java/com/sf/service/Update_login_password_Service.java new file mode 100644 index 0000000..98075c3 --- /dev/null +++ b/src/main/java/com/sf/service/Update_login_password_Service.java @@ -0,0 +1,78 @@ +package com.sf.service; + +import com.sf.entity.userEntity; + +public interface Update_login_password_Service { + + public boolean Update_login_password(String userName,String passWord,String newpassWord); + + + /** + * 根据用户名查询出用户邮箱 如果正确则再去修改邮箱 + * @param userName + * @param passWord + * @param newpassWord + * @return + */ + public boolean Update_login_Emial(String userName,String emial,String newemial); + + + + /** + * 根据用户名查询出用户手机 如果正确则再去修改手机号码 + * @param userName + * @param passWord + * @param newpassWord + * @return + */ + public boolean Update_login_Phone(String userName,String userPhone,String newuserPhone); + + + + /** + * 根据用户名查询出用户支付密码 如果正确则再去修改支付密码 + * @param userName + * @param passWord + * @param newpassWord + * @return + */ + public boolean Update_login_payPassword(String userName,String paypassword,String newpaypassword); + + + + /** + * 根据用户名查询出用户头像 如果正确则再去修改头像地址 + * @param userName + * @param passWord + * @param newpassWord + * @return + */ + public boolean Update_login_hand(String userName,String userHand,String newuserHand); + + + /** + * 修改用户的全部信息 + * @param user + * @return + */ + public boolean Update_user(userEntity user); + + + /** + * 修改用户地址 + * @param userName + * @param passWord + * @param newpassWord + * @return + */ + public boolean Update_Addred(String sessionName,String dizhi,String xingming,String phone); + + + /** + * 根据ID删除对应的购物车 + * + * @param cartID + * @return + */ + public boolean delectcartID (String cartID); +} diff --git a/src/main/java/com/sf/service/UserListService.java b/src/main/java/com/sf/service/UserListService.java new file mode 100644 index 0000000..8e12eac --- /dev/null +++ b/src/main/java/com/sf/service/UserListService.java @@ -0,0 +1,204 @@ +package com.sf.service; + +import java.util.List; + +import com.sf.entity.ShoppingCart; +import com.sf.entity.forumEntity; +import com.sf.entity.forumreplyEntity; +import com.sf.entity.gridsEntity; +import com.sf.entity.messageEntity; +import com.sf.entity.ordertableEntity; +import com.sf.entity.userEntity; +import com.sf.entity.videoEntity; + +public interface UserListService { + + /** + * 根据用户的名字 查询出用户的所有信息 + * @return + */ + public userEntity userlist(String userName); + /** + * 将video 全部信息全部查询出来 + * + */ + public List userlistUserName(String userName); + + + /** + * 根据ID查询出此条论坛的全部信息 + * @param forumID + * @return + */ + public forumEntity forumentitymmp(String forumID); + + /** + * 根据ID查询出当前视频的所有留言 + * @return + */ + public List forumreply(String forumreplyID); + + /** + * 将video 全部信息全部查询出来 + * + */ + public List videolist(String videocAtegory); + + + /** + * 随机在video 里面查询出5条记录 + * @return + */ + public List videolistimit7(); + + /** + * 随机在video 里面查询出6条记录 + * @return + */ + public List videolistimit6MAD(); + + + /** + * 随机在video 里面查询出5条记录 + * @return + */ + public List videolistimit5MAD(); + + + /** + * 根据ID查询出当前视频的所有留言 + * @return + */ + public List messagelist(String videoID); + + + + /** + * 将用户表里面所有的用户只查询出15条. 到时候方便分页 + * @return + */ + public List userlistpage(int pageInt); + + + /** + * 根据用户输入的内容 进行模糊查询出所得 + * @return + * + */ + public List listmohu(String usermohu); + + + /** + * 根据用户输入的手机号 进行模糊查询出所得 + * @return + * + */ + public List userPhone(String userPhone); + + + /** + * 根据ID查询出用户的所有信息 + * @return + * + */ + public List userID(String userID); + + /** + * 根据用户的状态 查询出用户的所有信息 + * @return + */ + public List xiaoheiwu(String userStat); + + + /** + * 根据当前页查询出6条记录 + * @param dangqianye 页面传过来的当前页 + * @param State 需要查询的视频列别 + * @param meiyexianshiduoshaoge 每页显示多少个视频 + * @return + */ + public List Pagevideolist(String State,int dangqianye,int meiyexianshiduoshaoge); + + + /** + * 根据标记 查询出一共有多少条记录 + * @param countvideo + * @return + */ + public int videocoun(String countvideo); + + /** + * 将商品全部信息查询出来 + * @return + */ + public List gridslist(); + + + + /** + * 根据商品ID查询出商品信息 + * @param gridsID + * @return + */ + public gridsEntity gridsIDlist(String gridsID); + + + /** + * 根据登录的用户名 查询出购物车里面的商品 + * @param userName + * @return + */ + public List shoppingcart(String userName); + + + + + /** + * 根据用户名查询出所有的订单 + * + */ + public List ordertable(String userName); + + + + + /** + * 查询出所有的订单 + * + */ + public List ordertablelist(); + + + + + /** + * 查询出标记的订单 + * + */ + public List orderStat(String orderStat); + + + + /** + * 查询出订单表里面有多少条记录 + * @return + */ + public int countordertable(); + + + /** + * 根据论坛类型查询出符合条件的论坛 + * @param forumliebie + * @return + */ + public List forumEnt(String forumliebie); + + + + /** + * 根据表名查询出有多少记录 + * @param tableName + * @return + */ + public int counttable(String tableName); +} diff --git a/src/main/java/com/sf/service/impl/Addserviceimpl.java b/src/main/java/com/sf/service/impl/Addserviceimpl.java new file mode 100644 index 0000000..c3af6ab --- /dev/null +++ b/src/main/java/com/sf/service/impl/Addserviceimpl.java @@ -0,0 +1,22 @@ +package com.sf.service.impl; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.sf.dao.impl.LoginDaoimpl; +import com.sf.service.Addservice; +@Component +public class Addserviceimpl implements Addservice { + + @Autowired + LoginDaoimpl login; + + public boolean login() { + int num=login.login("1", "1"); + if(num>0){ + return true; + } + return false; + } + +} diff --git a/src/main/java/com/sf/service/impl/LoginServiceImpl.java b/src/main/java/com/sf/service/impl/LoginServiceImpl.java new file mode 100644 index 0000000..c35d520 --- /dev/null +++ b/src/main/java/com/sf/service/impl/LoginServiceImpl.java @@ -0,0 +1,80 @@ +package com.sf.service.impl; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.sf.dao.impl.LoginDaoimpl; +import com.sf.entity.ordertableEntity; +import com.sf.service.LoginService; + +@Service +public class LoginServiceImpl implements LoginService { + + @Autowired + LoginDaoimpl loginService; + + public boolean loginuser(String userName, String passWord) { + int num=loginService.login(userName, passWord); + if(num>0){ + return true; + } + return false; + } + + public boolean paypassword(String userName, String pass) { + int num = loginService.paypassword(userName, pass); + if(num>0){ + return true; + } + return false; + } + + public boolean updateRMB(String userRMB, String userName) { + int num = loginService.updateRMB(userRMB, userName); + if(num>0){ + return true; + } + return false; + } + + public boolean ordertable(ordertableEntity ordertable) { + int num = loginService.ordertable(ordertable); + if(num>0){ + return true; + } + return false; + } + + public boolean Confirmorder(String orderID) { + int num = loginService.Confirmorder(orderID); + if(num>0){ + return true; + } + return false; + } + + public boolean Cancellationoforder(String orderID) { + int num = loginService.Cancellationoforder(orderID); + if(num>0){ + return true; + } + return false; + } + + public boolean delordertable(String orderID) { + int num = loginService.delordertable(orderID); + if(num>0){ + return true; + } + return false; + } + + public boolean Delivergoods(String OrderStat,String orderID) { + int num = loginService.Delivergoods(OrderStat,orderID); + if(num>0){ + return true; + } + return false; + } + +} diff --git a/src/main/java/com/sf/service/impl/MessageServiceImpl.java b/src/main/java/com/sf/service/impl/MessageServiceImpl.java new file mode 100644 index 0000000..6a36849 --- /dev/null +++ b/src/main/java/com/sf/service/impl/MessageServiceImpl.java @@ -0,0 +1,51 @@ +package com.sf.service.impl; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.sf.dao.impl.MessageImpl; +import com.sf.entity.ShoppingCart; +import com.sf.entity.forumEntity; +import com.sf.entity.forumreplyEntity; +import com.sf.entity.messageEntity; +import com.sf.service.MessageService; + +@Service +public class MessageServiceImpl implements MessageService { + + @Autowired + MessageImpl messageImpl; + + public boolean message(messageEntity message) { + int bl = messageImpl.message(message); + if(bl>0){ + return true; + } + return false; + } + + public boolean Shoppingcart(ShoppingCart shoppingCart) { + int bl = messageImpl.Shoppingcart(shoppingCart); + if(bl>0){ + return true; + } + return false; + } + + public boolean forumfuck(forumEntity forument) { + int bl = messageImpl.forumfuck(forument); + if(bl>0){ + return true; + } + return false; + } + + public boolean forumreply(forumreplyEntity forumreply) { + int bl = messageImpl.forumreply(forumreply); + if(bl>0){ + return true; + } + return false; + } + +} diff --git a/src/main/java/com/sf/service/impl/RegisterServiceImpl.java b/src/main/java/com/sf/service/impl/RegisterServiceImpl.java new file mode 100644 index 0000000..528d647 --- /dev/null +++ b/src/main/java/com/sf/service/impl/RegisterServiceImpl.java @@ -0,0 +1,25 @@ +package com.sf.service.impl; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.sf.dao.impl.RegisterImpl; +import com.sf.entity.userEntity; +import com.sf.service.RegisterService; + +@Service +public class RegisterServiceImpl implements RegisterService { + + @Autowired + RegisterImpl registerImpl; + + public boolean RegisterService(userEntity user) { + int num=registerImpl.Register(user); + if(num>0){ + //注册成功 + return true; + } + return false; + } + +} diff --git a/src/main/java/com/sf/service/impl/Update_login_password_Service_Impl.java b/src/main/java/com/sf/service/impl/Update_login_password_Service_Impl.java new file mode 100644 index 0000000..fe4b476 --- /dev/null +++ b/src/main/java/com/sf/service/impl/Update_login_password_Service_Impl.java @@ -0,0 +1,81 @@ +package com.sf.service.impl; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import com.sf.dao.impl.Update_login_password_Impl; +import com.sf.entity.userEntity; +import com.sf.service.Update_login_password_Service; + +@Component +public class Update_login_password_Service_Impl implements Update_login_password_Service { + + @Autowired + Update_login_password_Impl update_login_password_Impl; + + public boolean Update_login_password(String userName, String passWord, String newpassWord) { + int num=update_login_password_Impl.Update_login_password(userName, passWord, newpassWord); + if(num>0){ + return true; + } + return false; + } + + public boolean Update_login_Emial(String userName, String emial, String newemial) { + + int num=update_login_password_Impl.Update_login_Emial(userName, emial, newemial); + if(num>0){ + return true; + } + return false; + } + + public boolean Update_login_Phone(String userName, String userPhone, String newuserPhone) { + int num = update_login_password_Impl.Update_login_Phone(userName, userPhone, newuserPhone); + if(num>0){ + return true; + } + return false; + } + + public boolean Update_login_payPassword(String userName, String paypassword, String newpaypassword) { + int num = update_login_password_Impl.Update_login_payPassword(userName, paypassword, newpaypassword); + if(num>0){ + return true; + } + return false; + } + + public boolean Update_login_hand(String userName, String userHand, String newuserHand) { + int num = update_login_password_Impl.Update_login_hand(userName, userHand, newuserHand); + if(num>0){ + return true; + } + return false; + } + + public boolean Update_user(userEntity user) { + int num = update_login_password_Impl.Update_user(user); + if(num>0){ + return true; + } + return false; + } + + public boolean Update_Addred(String sessionName, String dizhi, String xingming, String phone) { + int i = update_login_password_Impl.Update_Addred(sessionName, dizhi, xingming, phone); + if(i>0){ + return true; + } + return false; + } + + public boolean delectcartID(String cartID) { + int num = update_login_password_Impl.delectcartID(cartID); + if(num>0){ + return true; + } + return false; + } + +} diff --git a/src/main/java/com/sf/service/impl/UserListServiceImpl.java b/src/main/java/com/sf/service/impl/UserListServiceImpl.java new file mode 100644 index 0000000..e673f48 --- /dev/null +++ b/src/main/java/com/sf/service/impl/UserListServiceImpl.java @@ -0,0 +1,154 @@ +package com.sf.service.impl; + +import java.util.List; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import com.sf.dao.impl.UserListDaoImpl; +import com.sf.entity.ShoppingCart; +import com.sf.entity.forumEntity; +import com.sf.entity.forumreplyEntity; +import com.sf.entity.gridsEntity; +import com.sf.entity.messageEntity; +import com.sf.entity.ordertableEntity; +import com.sf.entity.userEntity; +import com.sf.entity.videoEntity; +import com.sf.service.UserListService; + +@Service +public class UserListServiceImpl implements UserListService { + + @Autowired + UserListDaoImpl userListDaoImpl; + + public userEntity userlist(String userName) { + userEntity user=userListDaoImpl.userlist(userName); + return user; + } + + public List videolist(String videocAtegory) { + List list=userListDaoImpl.videolist(videocAtegory); + return list; + } + + public List videolistimit7() { + List list = userListDaoImpl.videolistimit7(); + return list; + } + + public List videolistimit5MAD() { + List list = userListDaoImpl.videolistimit5MAD(); + return list; + } + + public List messagelist(String videoID) { + List list= null; + list=userListDaoImpl.messagelist(videoID); + return list; + } + + public List userlistpage(int pageInt) { + List list= null; + list = userListDaoImpl.userlistpage(pageInt); + return list; + } + + public List listmohu(String usermohu) { + List list = userListDaoImpl.listmohu(usermohu); + return list; + } + + public List userPhone(String userPhone) { + List list = userListDaoImpl.userPhone(userPhone); + return list; + } + + public List userID(String userID) { + + List list = userListDaoImpl.userID(userID); + return list; + } + + public List xiaoheiwu(String userStat) { + List user=userListDaoImpl.xiaoheiwu(userStat); + return user; + } + + public List Pagevideolist(String State, int dangqianye,int meiyexianshiduoshaoge) { + List list = userListDaoImpl.Pagevideolist(State, dangqianye,meiyexianshiduoshaoge); + return list; + } + + public int videocoun(String countvideo) { + int num = userListDaoImpl.videocoun(countvideo); + return num; + } + + public List gridslist() { + List gridslist = userListDaoImpl.gridslist(); + return gridslist; + } + + public gridsEntity gridsIDlist(String gridsID) { + gridsEntity gridslist = userListDaoImpl.gridsIDlist(gridsID); + return gridslist; + } + + public List userlistUserName(String userName) { + List user = userListDaoImpl.userlistUserName(userName); + return user; + } + + public List shoppingcart(String userName) { + List user = userListDaoImpl.shoppingcart(userName); + return user; + } + + public List videolistimit6MAD() { + List list = userListDaoImpl.videolistimit6MAD(); + return list; + } + + public List ordertable(String userName) { + List ordertable = userListDaoImpl.ordertable(userName); + return ordertable; + } + + public List ordertablelist() { + List ordertable = userListDaoImpl.ordertablelist(); + return ordertable; + } + + public List orderStat(String orderStat) { + List ordertable = userListDaoImpl.orderStat(orderStat); + return ordertable; + } + + public int countordertable() { + int count = userListDaoImpl.countordertable(); + return count; + } + + public List forumEnt(String forumliebie) { + List forumEnt = userListDaoImpl.forumEnt(forumliebie); + return forumEnt; + } + + public forumEntity forumentitymmp(String forumID) { + forumEntity user = userListDaoImpl.forumentitymmp(forumID); + return user; + } + + public int counttable(String tableName) { + int num = userListDaoImpl.counttable(tableName); + return num; + } + + public List forumreply(String forumreplyID) { + List forumre =userListDaoImpl.forumreply(forumreplyID); + return forumre; + } + + +} diff --git a/src/main/java/com/sf/servlet/ProDto.java b/src/main/java/com/sf/servlet/ProDto.java new file mode 100644 index 0000000..34c744a --- /dev/null +++ b/src/main/java/com/sf/servlet/ProDto.java @@ -0,0 +1,53 @@ +package com.sf.servlet; + +public class ProDto { + private String fileName;// 上传的文件名 + private long max;// 最大值 + private long other;// 剩余值 + private int Test; + + + + public int getTest() { + return Test; + } + + public void setTest(int test) { + Test = test; + } + + private int endTag=0;//结束标记,为1代表结束 + + + public int getEndTag() { + return endTag; + } + + public void setEndTag(int endTag) { + this.endTag = endTag; + } + + public String getFileName() { + return fileName; + } + + public void setFileName(String fileName) { + this.fileName = fileName; + } + + public long getMax() { + return max; + } + + public void setMax(long max) { + this.max = max; + } + + public long getOther() { + return other; + } + + public void setOther(long other) { + this.other = other; + } +} diff --git a/src/main/java/com/sf/servlet/ProServlet.java b/src/main/java/com/sf/servlet/ProServlet.java new file mode 100644 index 0000000..3bc7233 --- /dev/null +++ b/src/main/java/com/sf/servlet/ProServlet.java @@ -0,0 +1,35 @@ +package com.sf.servlet; + +import java.io.IOException; +import java.io.PrintWriter; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import com.google.gson.Gson; + +/** + * Servlet implementation class ProServlet + */ +public class ProServlet extends HttpServlet { + private static final long serialVersionUID = 1L; + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + this.doPost(request, response); + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + response.setContentType("text/html"); + PrintWriter out = response.getWriter(); + //得到session里面的上传数据 + ProDto dto=(ProDto)request.getSession().getAttribute("dto"); + Gson gs=new Gson(); + String json=gs.toJson(dto); + out.println(json); + out.flush(); + out.close(); + } + +} diff --git a/src/main/java/com/sf/servlet/UploadServlet.java b/src/main/java/com/sf/servlet/UploadServlet.java new file mode 100644 index 0000000..dc1b8be --- /dev/null +++ b/src/main/java/com/sf/servlet/UploadServlet.java @@ -0,0 +1,214 @@ +package com.sf.servlet; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.io.PrintWriter; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.apache.commons.fileupload.FileItem; +import org.apache.commons.fileupload.disk.DiskFileItemFactory; +import org.apache.commons.fileupload.servlet.ServletFileUpload; + + + + + +/** + * Servlet implementation class UploadServlet + */ +public class UploadServlet extends HttpServlet { + + + + private static final long serialVersionUID = 1L; + + + // 上传文件存储目录 + private static final String UPLOAD_DIRECTORY = "upload"; + + // 上传配置 + private static final int MEMORY_THRESHOLD = 1024 * 1024 * 30; // 3MB + private static final int MAX_FILE_SIZE = 1024 * 1024 * 400; // 40MB + private static final int MAX_REQUEST_SIZE = 1024 * 1024 * 500; // 50MB + + + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + this.doPost(request, response); + } + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + + + String userName=(String) request.getSession().getAttribute("userName");//得到当前登录用户的用户名 + /* UserListService sevice=new UserListServiceImpl(); + userEntity user=sevice.userlist(userName); + System.out.println(user.getUserHand()); + + */ + + // 检测是否为多媒体上传 + if (!ServletFileUpload.isMultipartContent(request)) { + // 如果不是则停止 + PrintWriter writer = response.getWriter(); + writer.println("Error: 表单必须包含 enctype=multipart/form-data"); + writer.flush(); + return; + } + + // 配置上传参数 + DiskFileItemFactory factory = new DiskFileItemFactory(); + // 设置内存临界值 - 超过后将产生临时文件并存储于临时目录中 + factory.setSizeThreshold(MEMORY_THRESHOLD); + // 设置临时存储目录 + factory.setRepository(new File(System.getProperty("java.io.tmpdir"))); + + ServletFileUpload upload = new ServletFileUpload(factory); + + // 设置最大文件上传值 + upload.setFileSizeMax(MAX_FILE_SIZE); + + // 设置最大请求值 (包含文件和表单数据) + upload.setSizeMax(MAX_REQUEST_SIZE); + + // 构造临时路径来存储上传的文件 + // 这个路径相对当前应用的目录 + // 图片路径存放到 服务器 webapp下面 + String path="X:/Users/F-she-father/Workspaces/Eclipse IDE/bilibili/src/main/webapp"; + + String dizhi= File.separator + UPLOAD_DIRECTORY; + dizhi = dizhi.replace("\\","/"); + + String path3="/static/userHand_Top" + dizhi; + + /* System.out.println("**************************"); + System.out.println(path3);*/ + + + String uploadPath =path + path3; + //uploadPath 这个路径是存放到数据库里面的 + + // 如果目录不存在则创建 + File uploadDir = new File(uploadPath); + if (!uploadDir.exists()) { + uploadDir.mkdir(); + } + + try { + // 解析请求的内容提取文件数据 + @SuppressWarnings("unchecked") + List formItems = upload.parseRequest(request); + + if (formItems != null && formItems.size() > 0) { + // 迭代表单数据 + for (FileItem item : formItems) { + //创建进度条DTO + ProDto dto=new ProDto(); + //把dto放入到session + request.getSession().setAttribute("dto",dto); + // 处理不在表单中的字段 + if (!item.isFormField()) { + //得到上传文件的名字 + String fileName = new File(item.getName()).getName(); + // System.out.println(fileName); + String reg = "[\u4e00-\u9fa5]"; + Pattern pat = Pattern.compile(reg); + Matcher mat = pat.matcher(fileName); + fileName = mat.replaceAll(""); + + + String filePath = uploadPath + File.separator + fileName; + filePath = filePath.replace("\\","/"); + + String fuckyou=path3+"/"+fileName; + //用户上传图片的地址保存的数据库 + // System.out.println(fuckyou); + + /*System.out.println(fuckyou); + System.out.println("**************************"); + */ + + + request.getSession().setAttribute("fuckyou", fuckyou); + + File storeFile = new File(filePath); + // 在控制台输出文件的上传路径 + // System.out.println(filePath); + //得到输入流 + InputStream in= item.getInputStream(); + //得到文件的输出流 + OutputStream out=new FileOutputStream(storeFile); + //文件总大小 + long max=item.getSize(); + //剩余大小 + long other=max; + int len=0;//读取写入长度 + //读写缓冲 + byte[] b=new byte[300]; + //给DTO设置 + dto.setFileName("fileName"); + dto.setMax(max); + //循环从输入流写入到输出流,结束循环是len==-1 + while((len=in.read(b))!=-1){ + out.write(b,0,len); + other-=len; + //给DTO设置other + dto.setOther(other); + // System.out.println("总大小="+max+"剩余大小="+other); + //z总 max + //剩余 other + //传了 max-other + float zong =(float) (Integer.parseInt(String.valueOf(max))); + int shengxia = Integer.parseInt(String.valueOf(other)); + float ii3=(float)zong-shengxia;//传了多少 + if(shengxia!=0){ + //System.out.println(); + int t=(int)((ii3/zong)*100); + //System.out.println(t+"%"); + dto.setTest(t); + + //System.out.println(dto.getTest()); + } + + + } + dto.setEndTag(1);//添加结束标记 + out.flush(); + out.close(); + in.close(); + + // 保存文件到硬盘 + //item.write(storeFile); + request.setAttribute("message", + "文件上传成功!"); + + + }else{ + String f= item.getFieldName(); + String v=item.getString("UTF-8"); + + } + } + } + } catch (Exception ex) { +// request.setAttribute("message", +// "错误信息: " + ex.getMessage()); + ex.printStackTrace(); + } + // 跳转 + getServletContext().getRequestDispatcher("/userHand.sf").forward( + request, response); + } + } + + diff --git a/src/main/java/com/sf/servlet/one.java b/src/main/java/com/sf/servlet/one.java new file mode 100644 index 0000000..decb164 --- /dev/null +++ b/src/main/java/com/sf/servlet/one.java @@ -0,0 +1,49 @@ +package com.sf.servlet; + +import java.io.IOException; +import javax.servlet.ServletException; +import javax.servlet.http.HttpServlet; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; + +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.stereotype.Controller; + +import com.sf.lanjieqi.Auth; +import com.sf.service.UserListService; + +/** + * Servlet implementation class one + */ + +public class one extends HttpServlet { + private static final long serialVersionUID = 1L; + + protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + this.doPost(request, response); + } + + //使用初始化 功能 + +/* + @Override + public void init() throws ServletException { + System.out.println("我只会被执行一次"); + //每次进来的时候就调用方法 让程序每1分钟就执行一次 查询有多少 用户 多少帖子 还有今日昨日的 + // int num = userListService.counttable("user"); + // System.out.println(num);//看中间有多少条记录 + super.init(); + }*/ + + + protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { + //System.out.println("11"); + + //request.getRequestDispatcher("http://127.0.0.1:888/bilibili/static/adminjs/index.html").forward(request,response); + //System.out.println("测试"); + request.getRequestDispatcher("logoone.sf").forward(request, response); + } + + +} diff --git a/src/main/java/com/sf/tool/GetDataTime.java b/src/main/java/com/sf/tool/GetDataTime.java new file mode 100644 index 0000000..1860dad --- /dev/null +++ b/src/main/java/com/sf/tool/GetDataTime.java @@ -0,0 +1,21 @@ +package com.sf.tool; + +import java.text.SimpleDateFormat; +import java.util.Date; + +public class GetDataTime { + public static String DQtime(){ + /************ 获取当前时间 ***********/ + // 得到long类型当前时间 + long l = System.currentTimeMillis(); + // new日期对象 + Date date = new Date(l); + // 转换提日期输出格式 + SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + String time = dateFormat.format(date); + /************ 获取当前时间 *************/ + System.out.println(time); + return time; + } +} diff --git a/src/main/java/com/sf/tool/GetUUID.java b/src/main/java/com/sf/tool/GetUUID.java new file mode 100644 index 0000000..c62971b --- /dev/null +++ b/src/main/java/com/sf/tool/GetUUID.java @@ -0,0 +1,23 @@ +package com.sf.tool; + +import java.util.Random; +import java.util.UUID; + +public class GetUUID { + public static String getUUID(){ + String uuid=""; + uuid= UUID.randomUUID().toString().replaceAll("-",""); + return uuid; + } + + + public static int yanzma(){ + int x; + Random xs= new Random(); + x = xs.nextInt(9999-1000+1)+100000; + return x; + + } + + +} diff --git a/src/main/java/com/sf/tool/GridsRowMapperEntity.java b/src/main/java/com/sf/tool/GridsRowMapperEntity.java new file mode 100644 index 0000000..672caa2 --- /dev/null +++ b/src/main/java/com/sf/tool/GridsRowMapperEntity.java @@ -0,0 +1,30 @@ +package com.sf.tool; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; + +import org.springframework.jdbc.core.RowMapper; + +import com.sf.entity.gridsEntity; +import com.sf.entity.userEntity; + + +//用户表 +public class GridsRowMapperEntity implements RowMapper{ + + public gridsEntity mapRow(ResultSet arg0, int arg1) throws SQLException { + gridsEntity grids = new gridsEntity(); + //user.setUseryinghangka(arg0.getString("useryinghangka")); + grids.setGridsID(arg0.getString("gridsID")); + + grids.setGirdsName(arg0.getString("girdsName")); + grids.setGirdskucun(arg0.getInt("girdskucun")); + grids.setGirdsjiage(arg0.getString("girdsjiage")); + grids.setGirdsimg(arg0.getString("girdsimg")); + return grids; + } + + + +} diff --git a/src/main/java/com/sf/tool/Html_guolv.java b/src/main/java/com/sf/tool/Html_guolv.java new file mode 100644 index 0000000..648f90d --- /dev/null +++ b/src/main/java/com/sf/tool/Html_guolv.java @@ -0,0 +1,22 @@ +package com.sf.tool; + + +public class Html_guolv { +/* String content = "文章内容"; + // 过滤文章内容中的html + content = content.replaceAll("<[^<]+>", ""); + // 去除字符串中的空格 回车 换行符 制表符 等 + content = content.replaceAll("\\s*|\t|\r|\n", ""); + // 去除空格 + content = content.replaceAll(" ", ""); + // 去掉其他一些字符 + content = content.replaceAll("\", ""); + 后面的如果有特殊字符,根据自己需要进行过滤。*/ + + + public static void main(String[] args) { + String content = "asdjasdjkzxc爱仕达技术的{/r}123i12撒客户端"; + content = content.replaceAll("<[^<]+>//s*|/t|/r|/n| ", ""); + System.out.println(content); + } +} diff --git a/src/main/java/com/sf/tool/RowMapperEntity.java b/src/main/java/com/sf/tool/RowMapperEntity.java new file mode 100644 index 0000000..8277672 --- /dev/null +++ b/src/main/java/com/sf/tool/RowMapperEntity.java @@ -0,0 +1,40 @@ +package com.sf.tool; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; + +import org.springframework.jdbc.core.RowMapper; + +import com.sf.entity.userEntity; + + +//用户表 +public class RowMapperEntity implements RowMapper{ + + public userEntity mapRow(ResultSet arg0, int arg1) throws SQLException { + userEntity user=new userEntity(); + + user.setPassWord(arg0.getString("passWord")); + user.setUsersex(arg0.getString("usersex")); + user.setUserAddress(arg0.getString("userAddress")); + user.setUserCollection(arg0.getString("userCollection")); + user.setUserEmial(arg0.getString("userEmial")); + user.setUserHand(arg0.getString("userHand")); + user.setUserID(arg0.getString("userID")); + user.setUserIP(arg0.getString("userIP")); + user.setUserLoginTime(arg0.getString("userLoginTime")); + user.setUserMingzi(arg0.getString("userMingzi")); + user.setUserName(arg0.getString("userName")); + user.setUserPaypassword(arg0.getString("userPaypassword")); + user.setUserPhone(arg0.getString("userPhone")); + user.setUserQQ(arg0.getString("userQQ")); + user.setUserState(arg0.getString("userState")); + user.setUseryinghangka(arg0.getString("useryinghangka")); + user.setUserRMB(arg0.getString("userRMB")); + return user; + } + + + +} diff --git a/src/main/java/com/sf/tool/RowMapperVideoEntity.java b/src/main/java/com/sf/tool/RowMapperVideoEntity.java new file mode 100644 index 0000000..e2be69d --- /dev/null +++ b/src/main/java/com/sf/tool/RowMapperVideoEntity.java @@ -0,0 +1,26 @@ +package com.sf.tool; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.springframework.jdbc.core.RowMapper; + +import com.sf.entity.messageEntity; +import com.sf.entity.userEntity; + +//留言表 +public class RowMapperVideoEntity implements RowMapper{ + + public messageEntity mapRow(ResultSet arg0, int arg1) throws SQLException { + messageEntity message = new messageEntity(); + message.setMessage(arg0.getString("message")); + message.setMessageID(arg0.getString("messageID")); + message.setMessageTime(arg0.getString("messageTime")); + message.setMessageuserID(arg0.getString("messageuserID")); + message.setMessageuserName(arg0.getString("messageuserName")); + message.setMessagevideoID(arg0.getString("messagevideoID")); + message.setMessageHand(arg0.getString("messageHand")); + return message; + } + +} diff --git a/src/main/java/com/sf/tool/ShoppingCartRowMapperEntity.java b/src/main/java/com/sf/tool/ShoppingCartRowMapperEntity.java new file mode 100644 index 0000000..45d1892 --- /dev/null +++ b/src/main/java/com/sf/tool/ShoppingCartRowMapperEntity.java @@ -0,0 +1,32 @@ +package com.sf.tool; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; + +import org.springframework.jdbc.core.RowMapper; + +import com.sf.entity.ShoppingCart; +import com.sf.entity.gridsEntity; +import com.sf.entity.userEntity; + + +//用户表 +public class ShoppingCartRowMapperEntity implements RowMapper{ + + public ShoppingCart mapRow(ResultSet arg0, int arg1) throws SQLException { + //gridsEntity grids = new gridsEntity(); + //user.setUseryinghangka(arg0.getString("useryinghangka")); + ShoppingCart shoopingCart = new ShoppingCart(); + shoopingCart.setCartID(arg0.getString("cartID")); + shoopingCart.setShoopingID(arg0.getString("shoopingID")); + shoopingCart.setShoopingImg(arg0.getString("shoopingImg")); + shoopingCart.setShoopingjiage(arg0.getString("shoopingjiage")); + shoopingCart.setShoopingName(arg0.getString("shoopingName")); + shoopingCart.setUserName(arg0.getString("userName")); + return shoopingCart; + } + + + +} diff --git a/src/main/java/com/sf/tool/VideoRowMapperEntity.java b/src/main/java/com/sf/tool/VideoRowMapperEntity.java new file mode 100644 index 0000000..c035967 --- /dev/null +++ b/src/main/java/com/sf/tool/VideoRowMapperEntity.java @@ -0,0 +1,29 @@ +package com.sf.tool; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.springframework.jdbc.core.RowMapper; + +import com.sf.entity.videoEntity; + +//视频ID区 +public class VideoRowMapperEntity implements RowMapper{ + + public videoEntity mapRow(ResultSet arg0, int arg1) throws SQLException { + videoEntity video = new videoEntity(); + + video.setVideoAddress(arg0.getString("videoAddress")); + video.setVideoCollection(arg0.getString("videoCollection")); + video.setVideoID(arg0.getString("videoID")); + video.setVideoImage(arg0.getString("videoImage")); + video.setVideoLeaving(arg0.getString("videoLeaving")); + video.setVideoName(arg0.getString("videoName")); + video.setVideolookTime(arg0.getString("videolookTime")); + video.setVideoState(arg0.getString("videoState")); + video.setVideoTime(arg0.getString("videoTime")); + + return video; + } + +} diff --git a/src/main/java/com/sf/tool/forumEntityRowMapper.java b/src/main/java/com/sf/tool/forumEntityRowMapper.java new file mode 100644 index 0000000..cb5a141 --- /dev/null +++ b/src/main/java/com/sf/tool/forumEntityRowMapper.java @@ -0,0 +1,29 @@ +package com.sf.tool; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.springframework.jdbc.core.RowMapper; + +import com.sf.entity.forumEntity; + +//论坛表实体 +public class forumEntityRowMapper implements RowMapper{ + + public forumEntity mapRow(ResultSet arg0, int arg1) throws SQLException { + forumEntity forumEntity = new forumEntity(); + //user.setUseryinghangka(arg0.getString("useryinghangka")); + /*grids.setGridsID(arg0.getString("gridsID"));*/ + forumEntity.setForumID(arg0.getString("forumID")); + forumEntity.setForumAmount(arg0.getString("forumAmount")); + forumEntity.setForumBT(arg0.getString("forumBT")); + forumEntity.setForumliebie(arg0.getString("forumliebie")); + forumEntity.setForummessage(arg0.getString("forummessage")); + forumEntity.setForumTime(arg0.getString("forumTime")); + forumEntity.setForumuserName(arg0.getString("forumuserName")); + forumEntity.setFirumhand(arg0.getString("firumhand")); + + return forumEntity; + } + +} \ No newline at end of file diff --git a/src/main/java/com/sf/tool/forumreplyEntityRowMapper.java b/src/main/java/com/sf/tool/forumreplyEntityRowMapper.java new file mode 100644 index 0000000..620ad03 --- /dev/null +++ b/src/main/java/com/sf/tool/forumreplyEntityRowMapper.java @@ -0,0 +1,24 @@ +package com.sf.tool; + +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.springframework.jdbc.core.RowMapper; + +import com.sf.entity.forumreplyEntity; + +public class forumreplyEntityRowMapper implements RowMapper{ + + public forumreplyEntity mapRow(ResultSet arg0, int arg1) throws SQLException { + // TODO Auto-generated method stub + forumreplyEntity u = new forumreplyEntity(); + u.setReplyhand(arg0.getString("replyhand")); + u.setReplyid(arg0.getString("replyid")); + u.setReplyneirong(arg0.getString("replyneirong")); + u.setReplytieziid(arg0.getString("replytieziid")); + u.setReplytime(arg0.getString("replytime")); + u.setReplyname(arg0.getString("replyname")); + return u; + } + +} diff --git a/src/main/java/com/sf/tool/ordertableRowMapperEntity.java b/src/main/java/com/sf/tool/ordertableRowMapperEntity.java new file mode 100644 index 0000000..65570f2 --- /dev/null +++ b/src/main/java/com/sf/tool/ordertableRowMapperEntity.java @@ -0,0 +1,33 @@ +package com.sf.tool; + +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.List; + +import org.springframework.jdbc.core.RowMapper; + +import com.sf.entity.ordertableEntity; + + + +//用户表 +public class ordertableRowMapperEntity implements RowMapper{ + + public ordertableEntity mapRow(ResultSet arg0, int arg1) throws SQLException { + ordertableEntity ordertable = new ordertableEntity(); + //user.setUseryinghangka(arg0.getString("useryinghangka")); + //grids.setGridsID(arg0.getString("gridsID")); + ordertable.setOrderID(arg0.getString("orderID")); + ordertable.setOrdergridsImg(arg0.getString("ordergridsImg")); + ordertable.setOrderIgridsName(arg0.getString("orderIgridsName")); + ordertable.setOrderStat(arg0.getString("orderStat")); + ordertable.setOrderTime(arg0.getString("orderTime")); + ordertable.setOrderuserName(arg0.getString("orderuserName")); + ordertable.setOrderzongRMB(arg0.getString("orderzongRMB")); + ordertable.setOrderAddr(arg0.getString("orderAddr")); + return ordertable; + } + + + +} diff --git a/src/main/resources/jdbc.properties b/src/main/resources/jdbc.properties new file mode 100644 index 0000000..bf1eef9 --- /dev/null +++ b/src/main/resources/jdbc.properties @@ -0,0 +1,4 @@ +url=jdbc:mysql://127.0.0.1:3306/bilibili?useUnicode=true&characterEncoding=utf-8 +username=root +password=root +driverClassName=com.mysql.jdbc.Driver \ No newline at end of file diff --git a/src/main/resources/spring-mvc.xml b/src/main/resources/spring-mvc.xml new file mode 100644 index 0000000..334fb0c --- /dev/null +++ b/src/main/resources/spring-mvc.xml @@ -0,0 +1,111 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/springcontext.xml b/src/main/resources/springcontext.xml new file mode 100644 index 0000000..1ee2d94 --- /dev/null +++ b/src/main/resources/springcontext.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/META-INF/MANIFEST.MF b/src/main/webapp/META-INF/MANIFEST.MF new file mode 100644 index 0000000..254272e --- /dev/null +++ b/src/main/webapp/META-INF/MANIFEST.MF @@ -0,0 +1,3 @@ +Manifest-Version: 1.0 +Class-Path: + diff --git a/src/main/webapp/Shangchuan.jsp b/src/main/webapp/Shangchuan.jsp new file mode 100644 index 0000000..016d491 --- /dev/null +++ b/src/main/webapp/Shangchuan.jsp @@ -0,0 +1,56 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +上传头像界面 + + + + + + + + +
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/lib/commons-fileupload-1.2.1.jar b/src/main/webapp/WEB-INF/lib/commons-fileupload-1.2.1.jar new file mode 100644 index 0000000..7db423e Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-fileupload-1.2.1.jar differ diff --git a/src/main/webapp/WEB-INF/lib/commons-io-2.5.jar b/src/main/webapp/WEB-INF/lib/commons-io-2.5.jar new file mode 100644 index 0000000..1234918 Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/commons-io-2.5.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jave-1.0.2.jar b/src/main/webapp/WEB-INF/lib/jave-1.0.2.jar new file mode 100644 index 0000000..a00a3db Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jave-1.0.2.jar differ diff --git a/src/main/webapp/WEB-INF/lib/jstl-1.2.jar b/src/main/webapp/WEB-INF/lib/jstl-1.2.jar new file mode 100644 index 0000000..0fd275e Binary files /dev/null and b/src/main/webapp/WEB-INF/lib/jstl-1.2.jar differ diff --git a/src/main/webapp/WEB-INF/web-jsp/AdminBL.jsp b/src/main/webapp/WEB-INF/web-jsp/AdminBL.jsp new file mode 100644 index 0000000..28c654b --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/AdminBL.jsp @@ -0,0 +1,101 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + +订单物流后台管理 + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Adminbackgroundshipment.jsp b/src/main/webapp/WEB-INF/web-jsp/Adminbackgroundshipment.jsp new file mode 100644 index 0000000..d0375ec --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Adminbackgroundshipment.jsp @@ -0,0 +1,140 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +订单 + + + + + + + + +
+ 有瓜皮下单了! 点击立即查看 + +
+
+ + +
+ +
+
首页>订单查询
+
+
+
+ +
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + +
订单时间订单商品名字购买者用户名订单价格状态
${ordertable.orderTime} ${ordertable.orderIgridsName} + ${ordertable.orderuserName} ${ordertable.orderzongRMB} + 用户下单,未发货 + 已发货 + 待退货 + 订单完成 + 退货完成 + +
+ +
+
+
+
+ + +
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Bank_Card.jsp b/src/main/webapp/WEB-INF/web-jsp/Bank_Card.jsp new file mode 100644 index 0000000..20c5273 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Bank_Card.jsp @@ -0,0 +1,186 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + + + + + + +屄哩屄哩-登录密码修改 + + +
+ + + + +
+ + +
+ 当前位置:首页>个人中心 +
+ +
+ +
+ +
+ +
+ " /> + 您好,<%=request.getSession().getAttribute("userName")%> (下方可修改资料~喵) +
+ +
+
+ + 会员中心 +
+ +
+ + 资料管理 +
+ 信息资料 银行卡管理 收货地址管理 + + +
+ + 订单管理 +
+ 我的订单 + 已删除订单 订单投诉 + + +<%-- +
+ + 收藏管理 +
+ 店铺收藏 + 菜品收藏 + --%> + +
+ +
+ +
+
银行卡绑定
+ +
+
    +
  • 1.银行卡信息必须与账户信息一致
  • +
  • 2.为了您的方便,请尽量填写您常用的银行卡账号
  • +
+
+
+

+ 您当前的银行账号:您还未设置银行卡信息 +

+

+ 银行名称: +

+

+ 户主姓名: +

+

+ 银行卡号: +

+

+ 确认卡号: +

+

+ 开户银行银行地点: +

+ +

+ 请输入手机验证码: + 发送 注:若未绑定手机号码,请前往账户安全页面进行绑定 +

+ 添加银行卡 +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Completedorder.jsp b/src/main/webapp/WEB-INF/web-jsp/Completedorder.jsp new file mode 100644 index 0000000..ed4b3eb --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Completedorder.jsp @@ -0,0 +1,92 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +订单 + + + + + + +
+ + +
+ +
+
首页>订单查询
+
+
+
+ +
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + +
订单时间订单商品名字购买者用户名订单价格状态
${ordertable.orderTime} ${ordertable.orderIgridsName} + ${ordertable.orderuserName} ${ordertable.orderzongRMB} 订单完成
+ +
+
+
+
+ + +
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Confirmorder.jsp b/src/main/webapp/WEB-INF/web-jsp/Confirmorder.jsp new file mode 100644 index 0000000..bf1b4e0 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Confirmorder.jsp @@ -0,0 +1,420 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +屄哩屄哩-确认订单 + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+

确认收货地址 + + 修改收货地址 + +

+
    +
  • + + 寄送至 +
    + 修改本地址 + + + + +
    + + + + + +
  • +
+
+ +
+

确认订单信息

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
统一下单订单信息区域
店铺宝贝
单价(元)
数量
优惠方式(元)
小计(元)
+ 店铺:bilibili + 卖家:bilibili + + + +
+
    +
+
+
+ + ${grids.girdsName } + +
+ + + + +
+ + + +
+ 卖家承诺72小时内发货 +
+
+ + + ${grids.girdsjiage} + + + + 1 + + +
无优惠
+
+ + + ${grids.girdsjiage} + + +
+
    + +
  • + +
    +
      +
    • 店铺优惠:
    • +
    • +
    • + -0.00 + +
    • +
    +
    + +
    + +
    +
      +
    • 运送方式:
    • +
    • + + + + + + +
    • +
    • + + +
    • +
    +
    +
    +
      +
    • 发货时间:
    • +
    • 卖家承诺订单在买家付款后,72小时内发货
    • +
    +
    + + +
  • +
+
店铺合计(含运费): + + ¥ + + + +
+ +
+
+
+
+
+
+ + 实付款: + ¥ + +
+ +
    + +
+
+
+ + + + + 返回购物车 + 提交订单 + +
+
+ +
+ +
+ + +
+

若价格变动,请在提交订单后联系卖家改价,并查看已买到的宝贝

+
+
+
+
+ +
+
+ + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/DeletOrder.jsp b/src/main/webapp/WEB-INF/web-jsp/DeletOrder.jsp new file mode 100644 index 0000000..b429e21 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/DeletOrder.jsp @@ -0,0 +1,219 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + + path + "/"; +%> + + + + + +屄哩屄哩-我的订单 + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ 当前位置:首页>个人中心 +
+ +
+ +
+ +
+ +
+ " /> + 您好,<%=request.getSession().getAttribute("userName")%> + (下方可修改资料~喵) +
+ +
+
+ + 会员中心 +
+ +
+ + 资料管理 +
+ 信息资料 银行卡管理 收货地址管理 + + +
+ + 订单管理 +
+ 我的订单 + 已删除订单 订单投诉 + + + + + <%--
+ + 收藏管理 +
--%> + + +
+ +
+ +
+
用户全部所有订单
+ +
+
    + +
+
+
+ + + + +
+
+
+
    +
    + +
    +
  • +
    + 订单日期:    +                 + ${ordertable.orderTime} +
    +
  • +
  • + 订单ID:         ${ordertable.orderID} +
  • +
  • + 商品名字:      ${ordertable.orderIgridsName} + +
  • +
  • + 购买者:         ${ordertable.orderuserName} +
  • +
  • + 购买价:         ${ordertable.orderzongRMB} +
  • +
  • + 收货地址:      ${ordertable.orderAddr} +
  • +
  • + 订单已删除 +
  • +
+
+
+
+ + + 返回主信息 +
+
+ + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Delivery_address.jsp b/src/main/webapp/WEB-INF/web-jsp/Delivery_address.jsp new file mode 100644 index 0000000..f10f6ff --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Delivery_address.jsp @@ -0,0 +1,176 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + + + + + + +屄哩屄哩-登录密码修改 + + +
+ + + + +
+ + +
+ 当前位置:首页>个人中心 +
+ +
+ +
+ +
+ +
+ " /> + 您好,<%=request.getSession().getAttribute("userName")%> (下方可修改资料~喵) +
+ +
+
+ + 会员中心 +
+ +
+ + 资料管理 +
+ 信息资料 银行卡管理 收货地址管理 + + +
+ <%-- + 订单管理 --%> +
+ 我的订单 + 已删除订单 订单投诉 + + + +
+ <%-- + 收藏管理 --%> +
+ + +
+ +
+ +
+
个人信息修改
+ +
+
    +
  • 1.收货地址------屄理屄理喵
  • +
  • 2.为了您的方便,请尽量填写您常用的信息
  • +
+
+
+
+

+ 您当前的登录账号:<%=request.getSession().getAttribute("userName")%> +

+ +

+ 用户真实名字: +

+ +

+ 手机号: +

+ +

+ 收货地址: +

+

+ <%=request.getAttribute("tishi") %> +

+ + +
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/DisplayVideo.jsp b/src/main/webapp/WEB-INF/web-jsp/DisplayVideo.jsp new file mode 100644 index 0000000..c119ed9 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/DisplayVideo.jsp @@ -0,0 +1,396 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + + path + "/"; +%> + + + + + + + + + + + + +屄哩屄哩-视频展示 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ +
+
+ +
+
+
+
+ +
+
在线客服:
+
+ 客服一 + +
客服二 +
+
+
+
+
+
+
+
+ +
+
官方微信站:
+
+ +
+
+
+ +
+
+ +
+ + + + + + + + +
+
+ + <% + if (request.getSession().getAttribute("userName") == null) { + %> + + + + <% + } else { + %> + + + + + + <% + } + %> +
+ +
+
+ + +
+ + + + +
+
+ 共计:<%=request.getAttribute("tag1")%>条记录 + +
+
+ +   + +   + +   + +     + +
+ + + +
+
+
+
+
+ +
+
+ + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Forum.jsp b/src/main/webapp/WEB-INF/web-jsp/Forum.jsp new file mode 100644 index 0000000..f3883ce --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Forum.jsp @@ -0,0 +1,366 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + +屄哩屄哩-论坛 + + + + + + + + + + + + +
+
+ +
+
+
+ + +
+ +
+ + +
+ +
+
+ +
+ + +
+ + + +
+ +
+ +
+
+
+ + +
+
+ + + + + + + +
作者回复/查看
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ 预览 + ${list.forumBT }   ${list.forumuserName } ${list.forumTime } + ${list.forumAmount}
+ +
+
+ + +
+ + +
+
+

快速发帖

+
+
+
+ +
+ +
+ 还可输入 80 个字符 + +
+ +
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+ + +
+ + +
+ +

+ + +

+
+ +
+
+ +
+ +
+ +
+
+ + +
+ +
+ +
+
+ + +
+ 返回顶部 + +
+ + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/ForumReply.jsp b/src/main/webapp/WEB-INF/web-jsp/ForumReply.jsp new file mode 100644 index 0000000..8c936ec --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/ForumReply.jsp @@ -0,0 +1,552 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + + path + "/"; +%> + + + + + + + + +屄哩屄哩-帖子详细 + + +
+
+ + + +
+
+
+ + +
+ +
+ + +
+ +
+
+
+ + +
+ +
+ +
+ +
+ + +
+ + + + + +
+ +

+ ${user.forumBT } +

+ +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+ +
+
+ + + + + +
+ + +
+
+
+ + +
+
+
+ 发表于 ${user.forumTime } +
+
+
+
+ +
+ +
+ + + + +

+
${user.forummessage }
+ +
+ +
+
+ +
+
+
+ +
+
+
+ + + + + +
+
+
+
+
+ +
+
+ + + + + +
+ + +
+ +
+ +
+ +
+ + +
+ + + + + +
+ +

+ <%-- ${user.forumBT } --%> +

+ +
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + +
+
+ + + +
+
+ +
+
+ + + + + +
+ + +
+
+
+ + +
+
+
+ 发表于 ${forumre.replytime } +
+
+
+
+ +
+ +
+ + + + +

+
${forumre.replyneirong }
+ +
+ +
+
+ +
+
+
+ +
+
+
+ + + + + +
+
+
+
+
+ +
+
+ + + + + +
+ +
+ + + +
+ + + +
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+ +
+ +
+ +
+
+
+
+
+ + +

+ + +

+ + +
+
+ +
+
+
+ + +
+ +
+ +
+ +
+ +
+ + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Forumindex.jsp b/src/main/webapp/WEB-INF/web-jsp/Forumindex.jsp new file mode 100644 index 0000000..67d186d --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Forumindex.jsp @@ -0,0 +1,723 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + + path + "/"; +%> + + + + + + + +屄哩屄哩-论坛 + + + + + + + + + +
+
+
+
+
+ + + +
+
+ +
+ +
+
+ +
+ 欢迎你的登录:${sessionScope.userName} +
+ +
+ + +
+
+ +
+ +
+ +
+
+ +
+
+
+
+
+ + +
+ +
+
+ +
+ 今日: ${onedaycount}|昨日: ${yessdaycount }|帖子: ${messacount }|会员: + ${usercount}位 + |一周内: ${servedatcount} + |欢迎新会员: ${userNamemessage} + 2分钟更新一次 +
+ + +
+ + +
+
+ + + + +
+ +
+ + +
+
+
+ 收起/展开 + +

+ 嘀哩嘀哩 +

+
+
+
+
+ +  +
+ + + + +
+

+ 热门动漫讨论区 (27) +

+ + + + + + +

+ 主题:2498, 贴数:29万 +

+

+ + + + + +
+ + + + +
+
+
+ +  +
+ + + + +
+

+ 嘀哩搞基(姬)区 (19) +

+ + + + + + +

+ 主题:5265, 贴数:41万 +

+

+ 最后:1 小时前 + +

+ + + + + +
+ + + + +
+
+
+ +  +
+ + + + +
+

+ 嘀哩嘀哩资源区 (306) +

+ + + + + + +

+ 主题:3405, 贴数:51万 +

+

+ 最后:32 秒前 + +

+ + + + + +
+ + + + +
+
+
+ +  +
+ + + + +
+

+ 嘀哩嘀哩报错寻番 (10) +

+ + + + + + +

+ 主题:1万, 贴数:2万 +

+

+ 最后:12 分钟前 + +

+ + + + + +
+ + + + +
+
+
+ +  +
+ + + + +
+

+ FAQ反馈建议 +

+ + + + + + +

主题:171, 贴数:1563

+

+ 最后:昨天 23:17 + +

+ + + + + +
+ + + + +
+ +
+
+
+
+ 收起/展开 + +

+ ACG资源 +

+
+
+
+
+ +  +
+ + + + +
+

+ 萌娘资源 (4) +

+ + + + + +

+ 专题 +

+ + + + + +
+ + + + +
+
+
+ +  +
+ + + + +
+

+ D站评论 (186) +

+ + + + + + +

+ 主题:5万, 贴数:34万 +

+

+ 最后:1 分钟前 + +

+ + + + + +
+ + + + +
+
+
+ +  +
+ + + + +
+

+ 二次元音乐 +

+ + + + + + +

主题:43, 贴数:718

+

+ 最后:昨天 10:54 + +

+ + + + + +
+ + + + +
+ +
+
+
+
+ 收起/展开 + +

+ 手游专区 +

+
+
+
+
+ +  +
+ + + + +
+

+ 死神斩魂 +

+ + + + + + +

主题:11, 贴数:23

+

+ 最后:2017-8-3 + 23:41 +

+ + + + + +
+ + + + +
+
+
+ +  +
+ + + + +
+

+ 阴阳师手游 +

+ + + + + + +

主题:20, 贴数:197

+

+ 最后:2017-8-4 + 01:52 +

+ + + + + +
+ + + + +
+
+
+ +  +
+ + + + +
+

+ 甲铁城的卡巴内瑞 +

+ + + + + + +

主题:8, 贴数:197

+

+ 最后:2017-8-4 + 19:36 +

+ + + + + +
+ + + + +
+ +
+
+
+
+ 收起/展开 + +

+ 站务管理 +

+
+
+
+
+ +  +
+ + + + +
+

+ 官方通告 +

+ + + + + + +

主题:259, 贴数:3641

+

+ 最后:3 天前 + +

+ + + + + +
+ + + + +
+
+
+ +  +
+ + + + +
+

+ 申请事务所 +

+ + + + + + +

主题:1010, 贴数:3997

+

最后:从未

+ + + + + +
+ + + + +
+ +
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Houtai.jsp b/src/main/webapp/WEB-INF/web-jsp/Houtai.jsp new file mode 100644 index 0000000..e64b8bb --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Houtai.jsp @@ -0,0 +1,268 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + + + + + + + +屄哩屄哩-管理员后台 + + + + + + +
+
+
+
注册用户信息管理系统
+ +
+
+
+
+
+
超级管理员:admin
+
+
+
+
+
+
用户信息管理
+
+ +
+ +
+
+
+
+
系统管理
+
+ +
+
+
+
+
安全退出
+
+
+
+
+
+
用户信息查询 > 精确查询
+ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +
用户ID用户账号联系电话地址审核状态操作
${list.userID}${list.userName}${list.userPhone}${list.userAddress}${list.userState } +
+
+
+ +
+ +
+
用户信息查询 > 组合条件查询
+ + + 请输入要查询的内容: + +
+ + +
+ + 请输入要查询的内容: + + +
+ +
+ + +
+
+
用户密码管理 > 找回密码
+
+
+
用户密码管理 > 更改密码
+
+
+ + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Information.jsp b/src/main/webapp/WEB-INF/web-jsp/Information.jsp new file mode 100644 index 0000000..526d44f --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Information.jsp @@ -0,0 +1,187 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + +<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> + + + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + + + + + + +屄哩屄哩-登录密码修改 + + +
+ + + + +
+ + +
+ 当前位置:首页>个人中心 +
+ +
+ +
+ +
+ +
+ " /> + 您好,<%=request.getSession().getAttribute("userName")%> (下方可修改资料~喵) +
+ +
+
+ + 会员中心 +
+ +
+ + 资料管理 +
+ 信息资料 银行卡管理 收货地址管理 + + +
+ + 订单管理 +
+ 我的订单 + 已删除订单 订单投诉 + + +<%-- +
+ + 收藏管理 +
+ 店铺收藏 + 菜品收藏 + --%> + +
+ +
+ +
+
用户全部信息资料
+ +
+
    +
  • 1.请牢记支付密码
  • +
  • 2.如果丢失密码,可以通过绑定的手机或邮箱找到
  • +
+
+
+

+ 用户真是姓名: +

+

+ 用户地址: +

+

+ 用户手机号: +

+

+ 用户QQ号: +

+

+ 用户邮箱: +

+

+ 最后一次登录时间: +

+

+ 用户状态: +

+ + 返回主信息 +
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Inquiryorder.jsp b/src/main/webapp/WEB-INF/web-jsp/Inquiryorder.jsp new file mode 100644 index 0000000..fc7782e --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Inquiryorder.jsp @@ -0,0 +1,138 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +订单 + + + + + + +
+ + +
+ +
+
首页>订单查询
+
+
+
+
+ + + + + + +
关键字:
+
+
+ +
+
+
+
+ +
+
+ + + + + + + + + +
订单时间订单商品名字购买者用户名订单价格状态
+ +
+
+
+
+ + + + + + +
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Order.jsp b/src/main/webapp/WEB-INF/web-jsp/Order.jsp new file mode 100644 index 0000000..10f6335 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Order.jsp @@ -0,0 +1,266 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + + path + "/"; +%> + + + + + +屄哩屄哩-我的订单 + + + + + + + + + + + + + + + + +
+ + + + +
+ + +
+ 当前位置:首页>个人中心 +
+ +
+ +
+ +
+ +
+ " /> + 您好,<%=request.getSession().getAttribute("userName")%> + (下方可修改资料~喵) +
+ +
+
+ + 会员中心 +
+ +
+ + 资料管理 +
+ 信息资料 银行卡管理 收货地址管理 + + +
+ + 订单管理 +
+ 我的订单 + 已删除订单 订单投诉 + + + + + <%--
+ + 收藏管理 +
--%> + + +
+ +
+ +
+
用户全部所有订单
+ +
+
    + +
+
+
+ + + + + + + + + + + + +
+
+
+
    +
    + + + + 取消订单 + + + 确认收货 + 取消订单 + 联系客服 + + + + + 联系客服 + + + + + 删除 + + 取消订单 + + + +
    +
  • +
    + 订单日期:    +                 + ${ordertable.orderTime} +
    +
  • +
  • + 订单ID:         ${ordertable.orderID} +
  • +
  • + 商品名字:      ${ordertable.orderIgridsName} + +
  • +
  • + 购买者:         ${ordertable.orderuserName} +
  • +
  • + 购买价:         ${ordertable.orderzongRMB} +
  • +
  • + 收货地址:      ${ordertable.orderAddr} +
  • +
  • 订单状态:       + + 已下单 + 已发货 + 待取消 + 订单完成 -(可删除) + <%-- + 订单完成 + + --%> + <%-- ${ordertable.orderStat} --%> +
  • +
+
+
+
+ + + + + + + + 返回主信息 +
+
+ + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Returngoods.jsp b/src/main/webapp/WEB-INF/web-jsp/Returngoods.jsp new file mode 100644 index 0000000..7ee75dd --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Returngoods.jsp @@ -0,0 +1,96 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +订单 + + + + + + +
+ + +
+ +
+
首页>订单查询
+
+
+
+ +
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
订单时间订单商品名字购买者用户名订单价格状态
${ordertable.orderTime} ${ordertable.orderIgridsName} + ${ordertable.orderuserName} ${ordertable.orderzongRMB} + 立即退货 +
+ +
+
+
+
+ + +
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Shipmentpending.jsp b/src/main/webapp/WEB-INF/web-jsp/Shipmentpending.jsp new file mode 100644 index 0000000..0a3aa61 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Shipmentpending.jsp @@ -0,0 +1,96 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +订单 + + + + + + +
+ + +
+ +
+
首页>订单查询
+
+
+
+ +
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + +
订单时间订单商品名字购买者用户名订单价格状态
${ordertable.orderTime} ${ordertable.orderIgridsName} + ${ordertable.orderuserName} ${ordertable.orderzongRMB} + 立即发货 +
+ +
+
+
+
+ + +
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Shopping.jsp b/src/main/webapp/WEB-INF/web-jsp/Shopping.jsp new file mode 100644 index 0000000..f860503 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Shopping.jsp @@ -0,0 +1,231 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +屄哩屄哩-周边商品 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ <% + if (request.getSession().getAttribute("userName") == null) { + %> + + + + <% + } else { + %> + + + + <%} %> +
+ +
+ + + + + + + +
+
+ +
+ +
+ +
+ + + +
+ + + + +
+ + +
+ + +
+
+
+
+
+ + +
+
+ +
+
+
+ + + + + + + + + +
+
+ + +
+ + +
+ +
+
+
+
+
+
+
+
+
+ + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Shoppingnew.jsp b/src/main/webapp/WEB-INF/web-jsp/Shoppingnew.jsp new file mode 100644 index 0000000..cead3c2 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Shoppingnew.jsp @@ -0,0 +1,107 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + + path + "/"; +%> + + + + + +屄哩屄哩-周边商品 + + + + + + + + +
+
+ <% + if (request.getSession().getAttribute("userName") == null) { + %> + + + + <% + } else { + %> + + + + <% + } + %> +
+ +
+ +
+ 查看购物车 +
  
+ 返回首页 + +
+ + + + + +
+
+
+
+
+
+ +
+
+
+ ${gridslist.girdsName} +
+
+

+ ${gridslist.girdsName} +

+

+ $ ${gridslist.girdsjiage} +
+
+
+
+
+
+
+
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Update_PayPassword.jsp b/src/main/webapp/WEB-INF/web-jsp/Update_PayPassword.jsp new file mode 100644 index 0000000..98dcaad --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Update_PayPassword.jsp @@ -0,0 +1,169 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + + + + + + +屄哩屄哩-登录密码修改 + + +
+ + + + +
+ + +
+ 当前位置:首页>个人中心 +
+ +
+ +
+ +
+ +
+ " /> + 您好,<%=request.getSession().getAttribute("userName")%> (下方可修改资料~喵) +
+ +
+
+ + 会员中心 +
+ +
+ + 资料管理 +
+ 信息资料 银行卡管理 收货地址管理 + + +
+ + 订单管理 +
+ 我的订单 + 已删除订单 订单投诉 + + + +<%--
+ + 收藏管理 +
+ 店铺收藏 + 菜品收藏 + --%> + +
+ +
+ +
+
支付密码修改
+ +
+
+
    +
  • 1.请牢记支付密码
  • +
  • 2.如果丢失密码,可以通过绑定的手机或邮箱找到
  • + +
  • 3.如没有设置支付密码 默认注册用户支付密码为 123456
  • +
    +
+
+
+

+ 原支付密码: +

+

+ 新的支付密码: +

+

+ 确认密码: +

+ <%if(request.getAttribute("PassWordErro5")!=null){ %> + +

+ <%=request.getAttribute("PassWordErro5") %> +

+ <%} %> + +
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Update_Phone.jsp b/src/main/webapp/WEB-INF/web-jsp/Update_Phone.jsp new file mode 100644 index 0000000..5f2c3ce --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Update_Phone.jsp @@ -0,0 +1,171 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + + + + + + +屄哩屄哩-登录密码修改 + + +
+ + + + +
+ + +
+ 当前位置:首页>个人中心 +
+ +
+ +
+ +
+ +
+ " /> + 您好,<%=request.getSession().getAttribute("userName")%> (下方可修改资料~喵) +
+ +
+
+ + 会员中心 +
+ +
+ + 资料管理 +
+ 信息资料 银行卡管理 收货地址管理 + + +
+ + 订单管理 +
+ 我的订单 + 已删除订单 订单投诉 + + + + +<%--
+ + 收藏管理 +
+ 店铺收藏 + 菜品收藏 + --%> + +
+ +
+ +
+
绑定手机
+ +
+
    +
  • 1. 绑定手机后可直接通过短信接受安全验证等重要操作。
  • +
  • 2. 更改手机时,请通过安全验证后重新输入新手机号码绑定。
  • +
  • 3. 收到安全验证码后,请在30分钟内完成验证。
  • +
+
+
+
+

+ 原绑定手机号: +

+ +

+ 新手机号码: + +

+

+ 收到的验证码: +

+ <%if(request.getAttribute("PassWordErro3")!=null){ %> + +

+ <%=request.getAttribute("PassWordErro3") %> +

+ <%} %> + +
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Update_email.jsp b/src/main/webapp/WEB-INF/web-jsp/Update_email.jsp new file mode 100644 index 0000000..72dc483 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Update_email.jsp @@ -0,0 +1,169 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + + + + + + +屄哩屄哩-登录密码修改 + + +
+ + + + +
+ + +
+ 当前位置:首页>个人中心 +
+ +
+ +
+ +
+ +
+ " /> + 您好,<%=request.getSession().getAttribute("userName")%> (下方可修改资料~喵) +
+ +
+
+ + 会员中心 +
+ +
+ + 资料管理 +
+ 信息资料 银行卡管理 收货地址管理 + + +
+ + 订单管理 +
+ 我的订单 + 已删除订单 订单投诉 + + +<%-- +
+ + 收藏管理 +
+ 店铺收藏 + 菜品收藏 + --%> + +
+ +
+ + +
+
绑定邮箱
+ +
+
    +
  • 1. 此邮箱将接收密码找回,订单通知等敏感性安全服务及提醒使用,请务必填写正确地址。
  • +
  • 2. 设置提交后,系统将自动发送验证邮件到您绑定的信箱,您需在24小时内登录邮箱并完成验证。
  • +
  • 3. 更改邮箱时,请通过安全验证后重新输入新邮箱地址绑定。
  • +
+
+
+
+

+ 原邮箱账号: +

+ +
+ +
+

+ 绑定邮箱账号: +

+ <%if(request.getAttribute("PassWordErro")!=null){ %> + +

+ <%=request.getAttribute("PassWordErro2") %> +

+ <%} %> + + +
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Update_login_password.jsp b/src/main/webapp/WEB-INF/web-jsp/Update_login_password.jsp new file mode 100644 index 0000000..284072c --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Update_login_password.jsp @@ -0,0 +1,168 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + + + + + + +屄哩屄哩-登录密码修改 + + +
+ + + + +
+ + +
+ 当前位置:首页>个人中心 +
+ +
+ +
+ +
+ +
+ " /> + 您好,<%=request.getSession().getAttribute("userName")%> (下方可修改资料~喵) +
+ +
+
+ + 会员中心 +
+ +
+ + 资料管理 +
+ 信息资料 + 银行卡管理 收货地址管理 + + +
+ + 订单管理 +
+ 我的订单 + 已删除订单 订单投诉 + + + +<%-- +
+ + 收藏管理 +
+ 店铺收藏 + 菜品收藏 + --%> + +
+ +
+ + +
+
登录密码修改
+ +
+
    +
  • 1.请牢记登录密码
  • +
  • 2.如果丢失密码,可以通过绑定的手机或邮箱找到
  • +
+
+
+
+

+ 原密码: +

+

+ 新的密码: +

+

+ 确认密码: +

+ + <%if(request.getAttribute("PassWordErro")!=null){ %> + +

+ <%=request.getAttribute("PassWordErro") %> +

+ <%} %> + +
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/User_full_information.jsp b/src/main/webapp/WEB-INF/web-jsp/User_full_information.jsp new file mode 100644 index 0000000..9fe633b --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/User_full_information.jsp @@ -0,0 +1,246 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + + + + + + +屄哩屄哩-用户信息 + + + +
+

+ 关闭 +

+ +
+ +
+ 选择一个文件:
+
+ + + + 进度条 +
+
+ + + +
+ + + + +
+ + +
+ 当前位置:首页>个人中心 +
+ +
+ +
+ +
+ +
+ 您好,${user.userName} + + (下方可修改资料~喵) +
+ +
+
+ + 会员中心 +
+ +
+ + 资料管理 +
+ + 上传头像 + 信息资料 + 银行卡管理 + 收货地址管理 + + +
+ + 订单管理 +
+ 我的订单 + 已删除订单 订单投诉 + + + <%-- +
+ + 收藏管理 +
+ 店铺收藏 + 菜品收藏 + --%> + +
+ +
+ +
+

+ 欢迎您,超级会员 <%=request.getSession().getAttribute("userName")%>!您上次登录时间为 2016-10-28 14:23 + + +

+ +
您的账户当前余额为:  ${user.userRMB} 元
+
+
账户安全
+
+

+ 您当前的安全等级: +

+
+ +
+ +
+ + 登录密码
+ 已设置
+

安全性高的密码,可以使账户更安全。建议您定期更换密码。安全性高的密码,可以使账户更安全。建议您定期更换密码。安全性高的密码,可以使账户更安全。建议您定期更换密码。

+ 修改密码 +
+ +
+ + 邮箱绑定
+ Email
+

进行邮箱验证后,可用于接收敏感操作的身份验证信息,以及订阅更优惠商品的促销邮件。

+ 绑定邮箱 +
+ +
+ + 手机绑定
+ Phone
+

进行手机验证后,可用于接收敏感操作的身份验证信息,以及进行积分消费的验证确认,非常有助于保护您的账号和账户财产安全。

+ 修改手机 +
+ +
+ + 支付密码
+ Password
+

设置支付密码后,在使用账户中余额时,需输入支付密码。

+ 修改密码 +
+
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/Video.jsp b/src/main/webapp/WEB-INF/web-jsp/Video.jsp new file mode 100644 index 0000000..4c5cc31 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/Video.jsp @@ -0,0 +1,424 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> +<% + String path = request.getContextPath(); + String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + + path + "/"; +%> + + + + + + + + + + + + + + + + + + + + + + +屄哩屄哩-视频区 + + +
+
+
+ + <% + if (request.getSession().getAttribute("userName") == null) { + %> + + + + <% + } else { + %> + + + + + + + <% + } + %> +
+ + + +
+ + + +
+ + + + + + + + + +
+ + + + + + +
+
+ + + +
+ + + "> + + + +
+ +
+ +
+ + + +
    
+
+ +
+ + + + +
+

+ 所有留言 +

+
+ +
+
+

${messagelist.messageuserName} + + +

+

${messagelist.messageTime}

+ +

${messagelist.message}

+
+ +
+ +
+ + +
+ +   + +   + +   + +     + +
+ + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/details.jsp b/src/main/webapp/WEB-INF/web-jsp/details.jsp new file mode 100644 index 0000000..bff9d32 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/details.jsp @@ -0,0 +1,17 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +屄哩屄哩-商品详情 + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/gouwuche.jsp b/src/main/webapp/WEB-INF/web-jsp/gouwuche.jsp new file mode 100644 index 0000000..20a4fae --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/gouwuche.jsp @@ -0,0 +1,102 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +屄哩屄哩-用户购物车 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + +
全选商品单价数量小计操作
${user.shoopingName}${user.shoopingjiage} + - + + + + ${user.shoopingjiage}删除${user.cartID}
+
+
+ +
+ + .. + +
+ + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/gridspay.jsp b/src/main/webapp/WEB-INF/web-jsp/gridspay.jsp new file mode 100644 index 0000000..7c35d8c --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/gridspay.jsp @@ -0,0 +1,167 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +屄哩屄哩-商品详情 + + + + + + +
+ +
+
+ + +
+
+ +
+

+ < + > +

+
+ +
+
+

${gridslist.girdsName}

+
+
+ ${gridslist.girdsjiage} +
+ 累计售出
370
+ 累计评价
25
+
+
+
+ 分类 + +
+ +
+ 数量 + + + + 库存(${gridslist.girdskucun}) +
+
+ + +
+
+ 邮费:包邮  支持货到付款 +
+
+ + + +
+ + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/index.jsp b/src/main/webapp/WEB-INF/web-jsp/index.jsp new file mode 100644 index 0000000..24103f8 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/index.jsp @@ -0,0 +1,510 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +屄哩屄哩-首页 + + + + + + + + + + + + + +
+
+
+
+ +

+ +
哔哩哔哩 (゜-゜)つロ 干杯~
+
+
+ + + + + + +
+
+ + + + +
+
+
+ +

动画

+
+ 有新动态 + +
+ + +
+ +
+
+
+
+

排行

+
+
+ 全部 +
+ +
+
+
+
    + +
+
+ + + +
+
+
+ + +
+
+
+ +

MAD

+ + +
+ +
+
+
+
+

排行

+
+
+ 全部 +
+ +
+
+
+
    + +
+ +
+ + +
+
+
+ + +
+
+
+ +

动漫

+ + +
+ +
+
+
+
+

排行

+
+
+ 全部 +
+ +
+
+
+
    + +
+ +
+ + + + + + +
+
+
+ + + +
+
+ + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/jsp b/src/main/webapp/WEB-INF/web-jsp/jsp new file mode 100644 index 0000000..1b5300c --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/jsp @@ -0,0 +1,17 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +Insert title here + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/loginnew.jsp b/src/main/webapp/WEB-INF/web-jsp/loginnew.jsp new file mode 100644 index 0000000..5546d25 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/loginnew.jsp @@ -0,0 +1,56 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +屄哩屄哩-登录 + + + + + + + + +
+
+
+ +
+
+
+
+
+

用户登录

+
+ + +
+
+ + +
+
<%if(request.getAttribute("PHO")!=null){ %> + <%= request.getAttribute("PHO") %> + <%} %> +
+ + 忘记密码 ? 立即注册? +
+ 返回首页 + + +
+ + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/videoFileTop.jsp b/src/main/webapp/WEB-INF/web-jsp/videoFileTop.jsp new file mode 100644 index 0000000..8844099 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/videoFileTop.jsp @@ -0,0 +1,195 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +屄哩屄哩-视频投稿 + + + + + +
+ +
+ +
+ +
+ +
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+ + + + + +
+
+
+ +
+
+ + + + + + +
+ + + + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/xiaoheiwu.jsp b/src/main/webapp/WEB-INF/web-jsp/xiaoheiwu.jsp new file mode 100644 index 0000000..359ec89 --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/xiaoheiwu.jsp @@ -0,0 +1,79 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + +屄哩屄哩-小黑屋 + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + +
用户名用户性别原因
${user.userName}${user.usersex}${user.userState}
+ +
+
+ + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web-jsp/zhuce.jsp b/src/main/webapp/WEB-INF/web-jsp/zhuce.jsp new file mode 100644 index 0000000..63e21ab --- /dev/null +++ b/src/main/webapp/WEB-INF/web-jsp/zhuce.jsp @@ -0,0 +1,199 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> +<% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + +屄哩屄哩-注册 + + + + + + + +
+ +
+
+
+
+
+ + +
+
+
+
+
+
+ +
+ +
+
+
+
+ +
+ +
+
+
+ +
+ +
+ +
+
+
+ + +
+ +
+ +
+
+
+
+ +
+ +
+ +
+ <%if(request.getAttribute("fail")!=null){ %> + <%=request.getAttribute("fail") %> + <%} %> +
+
+
+
+
+
验证码:<%=request.getSession().getAttribute("yanzhengma") %> +
验证码未写...暂时就刷新界面刷新验证码 +
+
+
+ + + 返回登录? +
+
+
+
+ +
+
+
+
+ + + + \ No newline at end of file diff --git "a/src/main/webapp/WEB-INF/web-jsp/\347\224\250\346\210\267\344\277\241\346\201\257JSP" "b/src/main/webapp/WEB-INF/web-jsp/\347\224\250\346\210\267\344\277\241\346\201\257JSP" new file mode 100644 index 0000000..948c7b3 --- /dev/null +++ "b/src/main/webapp/WEB-INF/web-jsp/\347\224\250\346\210\267\344\277\241\346\201\257JSP" @@ -0,0 +1,33 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + <% +String path = request.getContextPath(); +String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; +%> + + + + + + + + + + + + + + + + + + + + +屄哩屄哩-用户信息 + + + + + + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000..737d948 --- /dev/null +++ b/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,143 @@ + + + + + + bilibili + + + + + + CharacterEncodingFilter + org.springframework.web.filter.CharacterEncodingFilter + + encoding + utf-8 + + + + CharacterEncodingFilter + /* + + + + + default + *.css + + + default + *.gif + + + default + *.jpg + + + default + *.mp4 + + + default + *.png + + + default + *.js + + + default + *.html + + + + + + + + org.springframework.web.context.ContextLoaderListener + + + + + contextConfigLocation + classpath:springcontext.xml + + + + + + spring-mvc + org.springframework.web.servlet.DispatcherServlet + + + + contextConfigLocation + classpath:spring-mvc.xml + + 1 + + + + + UploadServlet + UploadServlet + com.sf.servlet.UploadServlet + + + + + ProServlet + ProServlet + com.sf.servlet.ProServlet + + + + + one + one + com.sf.servlet.one + + + + spring-mvc + / + + + UploadServlet + /UploadServlet + + + ProServlet + /ProServlet + + + one + /one + + + + + + one + + + + diff --git a/src/main/webapp/index2.jsp b/src/main/webapp/index2.jsp new file mode 100644 index 0000000..6e7a291 --- /dev/null +++ b/src/main/webapp/index2.jsp @@ -0,0 +1,17 @@ +<%@ page language="java" contentType="text/html; charset=UTF-8" + pageEncoding="UTF-8"%> + + + + +Insert title here + + + 首页 + + 登录 + + + 注册 + + \ No newline at end of file diff --git a/src/main/webapp/src/main/java/commons-fileupload-1.2.1.jar b/src/main/webapp/src/main/java/commons-fileupload-1.2.1.jar new file mode 100644 index 0000000..7db423e Binary files /dev/null and b/src/main/webapp/src/main/java/commons-fileupload-1.2.1.jar differ diff --git a/src/main/webapp/src/main/java/commons-io-2.5.jar b/src/main/webapp/src/main/java/commons-io-2.5.jar new file mode 100644 index 0000000..1234918 Binary files /dev/null and b/src/main/webapp/src/main/java/commons-io-2.5.jar differ diff --git a/src/main/webapp/src/main/java/jave-1.0.2.jar b/src/main/webapp/src/main/java/jave-1.0.2.jar new file mode 100644 index 0000000..a00a3db Binary files /dev/null and b/src/main/webapp/src/main/java/jave-1.0.2.jar differ diff --git a/src/main/webapp/src/main/java/jstl-1.2.jar b/src/main/webapp/src/main/java/jstl-1.2.jar new file mode 100644 index 0000000..0fd275e Binary files /dev/null and b/src/main/webapp/src/main/java/jstl-1.2.jar differ diff --git a/src/test/java/com/sf/Test/MyTask.java b/src/test/java/com/sf/Test/MyTask.java new file mode 100644 index 0000000..3952aa3 --- /dev/null +++ b/src/test/java/com/sf/Test/MyTask.java @@ -0,0 +1,13 @@ +package com.sf.Test; + +import java.util.TimerTask; + +public class MyTask extends TimerTask{ + + + @Override + public void run() { + System.out.println("我的查询方法!"); + + } +} diff --git a/src/test/java/com/sf/Test/Test.java b/src/test/java/com/sf/Test/Test.java new file mode 100644 index 0000000..fa42b43 --- /dev/null +++ b/src/test/java/com/sf/Test/Test.java @@ -0,0 +1,14 @@ +package com.sf.Test; + +import java.util.Timer; +import java.util.TimerTask; + +public class Test { + public static void main(String[] args) { + Timer timer = new Timer(); + timer.schedule(new MyTask(), 1000, 2000); + //没隔2秒钟执行一次 + + } + +} diff --git a/src/test/java/com/sf/Test/VideoTime.java b/src/test/java/com/sf/Test/VideoTime.java new file mode 100644 index 0000000..572fa26 --- /dev/null +++ b/src/test/java/com/sf/Test/VideoTime.java @@ -0,0 +1,32 @@ +package com.sf.Test; + + +import java.io.File; + +//import it.sauronsoftware.jave.Encoder; +//import it.sauronsoftware.jave.MultimediaInfo; + + +public class VideoTime { + public static void main(String[] args) { + /* File source = new File("G:\\Program Fox (x00000000)\\他人妻味 小嶋ひより.mp4"); + Encoder encoder = new Encoder(); + try { + MultimediaInfo m = encoder.getInfo(source); + long ls = m.getDuration(); + ls=ls/60000; + System.out.println("此视频时长为:"+ls+"分钟"); + + + long miao=0; + long ls2 = m.getDuration()/1000; + miao += ls2; + System.out.println(miao); + + + } catch (Exception e) { + e.printStackTrace(); + }*/ + } + +} diff --git a/src/test/java/com/sf/Test/chu.java b/src/test/java/com/sf/Test/chu.java new file mode 100644 index 0000000..b5352b7 --- /dev/null +++ b/src/test/java/com/sf/Test/chu.java @@ -0,0 +1,17 @@ +package com.sf.Test; + +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +public class chu { + public static void main(String[] args) { + + String str = "银行业存款类金融机构协助查冻扣账户数量[3041900001#01]<=银行业存款类金融机构协助查询账户数量[3041900001#b1]+银行业存款类金融机构协助冻结账户数量[3041900001#b2]+银行业存款类金融机构协助扣划账户数量[3041900001#b3]"; + String reg = "[\u4e00-\u9fa5]"; + Pattern pat = Pattern.compile(reg); + Matcher mat = pat.matcher(str); + String repickStr = mat.replaceAll(""); + System.out.println("去中文后:"+repickStr); + + } +}