Initial commit

This commit is contained in:
fuhouyin 2018-08-29 18:45:12 +08:00
commit fae515ef4a
820 changed files with 102075 additions and 0 deletions

23
.classpath Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="com.genuitec.runtime.library/com.genuitec.generic_7.0">
<attributes>
<attribute name="owner.project.facets" value="jst.web"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.web.container"/>
<classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>
<classpathentry kind="con" path="com.genuitec.runtime.library/com.genuitec.jstl_1.2.2">
<attributes>
<attribute name="org.eclipse.jst.component.dependency" value="WEB-INF/lib"/>
<attribute name="owner.project.facets" value="jst.web.jstl"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
</classpath>

2
.gitattributes vendored Normal file
View File

@ -0,0 +1,2 @@
# Auto detect text files and perform LF normalization
* text=auto

46
.project Normal file
View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>cot</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.wst.jsdt.core.jsNature</nature>
</natures>
</projectDescription>

12
.settings/.jsdtscope Normal file
View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="WebRoot"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject">
<attributes>
<attribute name="hide" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary/StandardBrowser/html5"/>
<classpathentry kind="output" path=""/>
</classpath>

View File

@ -0,0 +1,3 @@
eclipse.preferences.version=1
validator.Checked=WebRoot/admin/study,WebRoot/WEB-INF/cot/js,WebRoot/admin/js
validator.Unchecked=

View File

@ -0,0 +1,7 @@
eclipse.preferences.version=1
encoding//WebRoot/404.jsp=UTF-8
encoding//WebRoot/WEB-INF/me/my_person.jsp=UTF-8
encoding//WebRoot/WEB-INF/public/footer.jsp=UTF-8
encoding//WebRoot/WEB-INF/public/ztype.jsp=UTF-8
encoding//src/com/fhy/util/Page.java=UTF-8
encoding/<project>=UTF-8

View File

@ -0,0 +1,7 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.7

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="cot">
<wb-resource deploy-path="/" source-path="/WebRoot" tag="defaultRootSource"/>
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src"/>
<property name="context-root" value="cot"/>
<property name="java-output-path" value="/cot/WebRoot/WEB-INF/classes"/>
</wb-module>
</project-modules>

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<runtime name="com.genuitec.runtime.generic.jee70"/>
<fixed facet="jst.web"/>
<fixed facet="wst.jsdt.web"/>
<fixed facet="java"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.web" version="3.1"/>
<installed facet="jst.web.jstl" version="1.2.2"/>
<installed facet="wst.jsdt.web" version="1.0"/>
</faceted-project>

View File

@ -0,0 +1 @@
org.eclipse.wst.jsdt.launching.baseBrowserLibrary

View File

@ -0,0 +1 @@
Window

1
README.md Normal file
View File

@ -0,0 +1 @@
# cot

29
WebRoot/404.jsp Normal file
View File

@ -0,0 +1,29 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP '404.jsp' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
喂!我是一个老北京啊!
404 NOT FOUND!
</body>
</html>

View File

@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

View File

@ -0,0 +1,60 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="shortcut icon" href="admin/img/lion.ico" />
<title>后台管理界面</title>
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css"
rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
</head>
<body>
<nav class="top"> <span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor">后台界面</span>
<a href="userlist">用户管理</a>
<a href="commlist">商品管理</a>
<a href="torderlist">订单管理</a>
<a href="logout">注销</a>
</nav>
<img id="logo" src="admin/img/site/logo.gif" class="logo">
<div class="homepageCategoryProducts" style="height:400px;margin-top:200px">
<div style="clear:both"></div>
<a href="userlist" style="float:left;" ><button type="button" class="btn btn-primary">用户管理</button></a>
<a href="commlist" style="float:left;clear:both" ><button type="button" class="btn btn-primary">商品管理</button></a>
<a href="torderlist" style="float:left;clear:both" ><button type="button" class="btn btn-primary">订单管理</button></a>
<img style="width:350px;height:200px;margin-left: 280px" src="admin/images/lion.png">
<p style="font-size: 24px;color:red;float: right;margin-top: 10px;margin-right: 210px">喵! 欢迎回来,我是小依 ^_^</p>
<div style="clear:both"></div>
<img id="endpng" class="endpng" src="admin/img/site/end.png">
</div>
<div id="footer" class="footer" style="display: block;margin-top: 100px">
<img id="cateye" class="cateye" src="admin/img/site/cateye.png">
<div id="copyright" class="copyright">
<div class="white_link">
<a href="#nowhere">关于校易</a> <a href="http://www.hxci.com.cn/">哈尔滨信息工程学院</a>
<a href="#nowhere">校园快递</a>
</div>
<div class="license">
<div class="copyRightYear">© 2017-2018 校园网上交易系统 版权所有</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,84 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="shortcut icon" href="admin/img/lion.ico" />
<title>后台管理/商品管理</title>
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css"rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
</head>
<body>
<nav class="top ">
<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor">后台管理</span>
<a href="userlist">用户管理</a>
<a href="commlist">商品管理</a>
<a href="torderlist">订单管理</a>
<a href="logout">注销</a>
</nav>
<img id="logo" src="admin/img/site/logo.gif" class="logo">
<!-- 商品列表 -->
<div class="homepageCategoryProducts" style="height:500px;margin-top:135px">
<div class=" table-responsive">
<table class="table table-bordered table-vcenter" align='center' border='1' cellspacing='0'>
<thead style="background:#337ab7;">
<tr>
<td>商品编号</td>
<td>商品名称</td>
<td>商品价格</td>
<td>商品图片</td>
<td>商品状态</td>
<td>操作</td>
<td>操作</td>
</tr>
</thead>
<c:forEach items="${c}" var="c" varStatus="st">
<tr>
<td>${c.id}</td>
<td>${c.commName}</td>
<td>¥${c.commPrice}</td>
<td><a href="hcomminfo?id=${c.id}"><img width="35px" height="30px" src="upload/${c.commImg }"></a></td>
<td class="status">${c.commStatus}</td>
<td><a href="commdown?id=${c.id }"><button type="button" class="btn btn-primary">下架</button></a></td>
<td><a href="commup?id=${c.id }"><button type="button" class="btn btn-primary">上架</button></a></td>
</tr>
</c:forEach>
</table>
<div style="text-align:center">
<a href="commlist?start=0"><button type="button" class="btn btn-primary">首页</button></a>
<a href="commlist?start=${page.start-page.count}"><button type="button" class="btn btn-primary">上一页</button></a>
<a href="commlist?start=${page.start+page.count}"><button type="button" class="btn btn-primary">下一页</button></a>
<a href="commlist?start=${page.last}"><button type="button" class="btn btn-primary">末页</button></a>
</div>
</div>
<div style="clear:both"></div>
<img id="endpng" class="endpng" src="admin/img/site/end.png">
</div>
<jsp:include page="../public/footer.jsp"></jsp:include>
<script>
$(function() {
$(".status").each(function(){
if($(this).html()=="1"){
$(this).html("出售中");
}
if($(this).html()=="0"){
$(this).html("已下架");
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,95 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="shortcut icon" href="admin/img/lion.ico" />
<title>后台管理/商品管理</title>
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css"rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
</head>
<body>
<nav class="top ">
<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor">后台管理</span>
<a href="userlist">用户管理</a>
<a href="commlist">商品管理</a>
<a href="torderlist">订单管理</a>
<a href="logout">注销</a>
</nav>
<img id="logo" src="admin/img/site/logo.gif" class="logo">
<div style="width:100%;height:150px"></div>
<!-- 商品列表 -->
<a href="commlist"><<<返回用户管理>>></a>
<div class="imgAndInfo">
<div class="imgInimgAndInfo">
<img src="upload/${sessionScope.co.commImg }" class="bigImg">
</div>
</div>
<div class="infoInimgAndInfo">
<div class="productTitle">${sessionScope.co.commName }:${sessionScope.co.commRemark }</div>
<div class="productPrice">
<div class="juhuasuan">
<span class="juhuasuanBig" >校易精品:${sessionScope.co.commName }</span>
</div>
<div class="productPriceDiv">
<div class="gouwujuanDiv">
<span> 全校易实物商品通用</span>
</div>
<div class="promotionDiv">
<span class="promotionPriceYuan">校易专属价 </span>
<span class="promotionPriceYuan">¥</span>
<span class="promotionPrice">
${sessionScope.co.commPrice }
</span>
</div>
<div class="promotionDiv">
<span>卖家信息=></span>
<span>卖家姓名:${sessionScope.co.name } |</span>
<span>卖家电话:${sessionScope.co.phone } |</span>
<span>卖家微信:${sessionScope.co.weixin }</span>
</div>
</div>
</div>
<div class="serviceCommitment">
<span class="serviceCommitmentDesc">服务承诺</span>
<span class="serviceCommitmentLink">
<a href="#nowhere">正品保证</a>
<a href="#nowhere">极速退款</a>
<a href="#nowhere">赠运费险</a>
<a href="#nowhere">七天无理由退换</a>
</span>
</div>
</div>
<jsp:include page="../public/footer.jsp"></jsp:include>
<script>
$(function() {
$(".status").each(function(){
if($(this).html()=="1"){
$(this).html("出售中");
}
if($(this).html()=="0"){
$(this).html("已下架");
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,74 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="shortcut icon" href="admin/img/lion.ico" />
<title>后台管理界面</title>
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css"
rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
</head>
<body>
<nav class="top"> <span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor">后台界面</span>
<a href="userlist">用户管理</a>
<a href="commlist">商品管理</a>
<a href="torderlist">订单管理</a>
<a href="logout">注销</a>
</nav>
<img id="logo" src="admin/img/site/logo.gif" class="logo">
<div class="homepageCategoryProducts" style="height:400px;margin-top:200px">
<div style="clear:both"></div>
<a href="userlist"><<<返回用户管理>>></a>
<table class="table table-bordered table-vcenter" align='center' border='1' cellspacing='0'>
<tr>
<th>真实姓名</th>
<td><input type="text" name="name" value="${my.name}" readonly="readonly"></td>
</tr>
<tr>
<th>微信号</th>
<td><input type="text" name="weixin" value="${my.weixin}" readonly="readonly"></td>
</tr>
<tr>
<th>详细地址</th>
<td><input type="text" name="address" value="${my.address}" readonly="readonly"></td>
</tr>
<tr>
<th>联系电话</th>
<td><input type="text" name="phone" value="${my.phone}" readonly="readonly"></td>
</tr>
</table>
<div style="clear:both"></div>
<img id="endpng" class="endpng" src="admin/img/site/end.png">
</div>
<div id="footer" class="footer" style="display: block;margin-top: 100px">
<img id="cateye" class="cateye" src="admin/img/site/cateye.png">
<div id="copyright" class="copyright">
<div class="white_link">
<a href="#nowhere">关于校易</a> <a href="http://www.hxci.com.cn/">哈尔滨信息工程学院</a>
<a href="#nowhere">校园快递</a>
</div>
<div class="license">
<div class="copyRightYear">© 2017-2018 校园网上交易系统 版权所有</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,72 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="shortcut icon" href="admin/img/lion.ico" />
<title>后台管理/商品管理</title>
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css"rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
</head>
<body>
<nav class="top ">
<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor">后台管理</span>
<a href="userlist">用户管理</a>
<a href="commlist">商品管理</a>
<a href="torderlist">订单管理</a>
<a href="logout">注销</a>
</nav>
<img id="logo" src="admin/img/site/logo.gif" class="logo">
<!-- 商品列表 -->
<div class="homepageCategoryProducts" style="height:500px;margin-top:135px">
<div class=" table-responsive">
<table class="table table-bordered table-vcenter" align='center' border='1' cellspacing='0'>
<thead style="background:#337ab7;">
<tr>
<td>订单编号</td>
<td>商品名称</td>
<td>商品价格</td>
<td>商品图片</td>
<td>购买数量</td>
<td>购买时间</td>
<td>购买者</td>
</tr>
</thead>
<c:forEach items="${oc}" var="oc" varStatus="st">
<tr>
<td>${oc.oid}</td>
<td>${oc.commName}</td>
<td>¥${oc.commPrice}</td>
<td><a href="hcomminfo?id=${oc.commId}"><img width="35px" height="30px" src="upload/${oc.commImg }"></a></td>
<td>${oc.commNum}</td>
<td>${oc.otime}</td>
<td>${oc.username}</td>
</tr>
</c:forEach>
</table>
<div style="text-align:center">
<a href="commlist?start=0"><button type="button" class="btn btn-primary">首页</button></a>
<a href="commlist?start=${page.start-page.count}"><button type="button" class="btn btn-primary">上一页</button></a>
<a href="commlist?start=${page.start+page.count}"><button type="button" class="btn btn-primary">下一页</button></a>
<a href="commlist?start=${page.last}"><button type="button" class="btn btn-primary">末页</button></a>
</div>
</div>
<div style="clear:both"></div>
<img id="endpng" class="endpng" src="admin/img/site/end.png">
</div>
<jsp:include page="../public/footer.jsp"></jsp:include>
</body>
</html>

View File

@ -0,0 +1,84 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="shortcut icon" href="admin/img/lion.ico" />
<title>后台管理/商品管理</title>
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css"rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
</head>
<body>
<nav class="top ">
<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor">后台管理</span>
<a href="userlist">用户管理</a>
<a href="commlist">商品管理</a>
<a href="torderlist">订单管理</a>
<a href="logout">注销</a>
</nav>
<img id="logo" src="admin/img/site/logo.gif" class="logo">
<!-- 商品列表 -->
<div class="homepageCategoryProducts" style="height:500px;margin-top:135px">
<div class=" table-responsive">
<table class="table table-bordered table-vcenter" align='center' border='1' cellspacing='0'>
<thead style="background:#337ab7;">
<tr>
<td>商品编号</td>
<td>商品名称</td>
<td>商品价格</td>
<td>商品图片</td>
<td>商品状态</td>
<td>操作</td>
<td>操作</td>
</tr>
</thead>
<c:forEach items="${c}" var="c" varStatus="st">
<tr>
<td>${c.id}</td>
<td>${c.commName}</td>
<td>¥${c.commPrice}</td>
<td><a href="hcomminfo?id=${c.id}"><img width="35px" height="30px" src="upload/${c.commImg }"></a></td>
<td class="status">${c.commStatus}</td>
<td><a href="commdown?id=${c.id }"><button type="button" class="btn btn-primary">下架</button></a></td>
<td><a href="commup?id=${c.id }"><button type="button" class="btn btn-primary">上架</button></a></td>
</tr>
</c:forEach>
</table>
<div style="text-align:center">
<a href="commlist?start=0"><button type="button" class="btn btn-primary">首页</button></a>
<a href="commlist?start=${page.start-page.count}"><button type="button" class="btn btn-primary">上一页</button></a>
<a href="commlist?start=${page.start+page.count}"><button type="button" class="btn btn-primary">下一页</button></a>
<a href="commlist?start=${page.last}"><button type="button" class="btn btn-primary">末页</button></a>
</div>
</div>
<div style="clear:both"></div>
<img id="endpng" class="endpng" src="admin/img/site/end.png">
</div>
<jsp:include page="../public/footer.jsp"></jsp:include>
<script>
$(function() {
$(".status").each(function(){
if($(this).html()=="1"){
$(this).html("出售中");
}
if($(this).html()=="0"){
$(this).html("已下架");
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,81 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="shortcut icon" href="admin/img/lion.ico" />
<title>后台管理/用户管理</title>
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css"rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
</head>
<body>
<nav class="top ">
<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor">后台管理</span>
<a href="userlist">用户管理</a>
<a href="commlist">商品管理</a>
<a href="torderlist">订单管理</a>
<a href="logout">注销</a>
</nav>
<img id="logo" src="admin/img/site/logo.gif" class="logo">
<div class="homepageCategoryProducts" style="height:500px;margin-top:135px">
<div class=" table-responsive">
<table class="table table-bordered table-vcenter" align='center' border='1' cellspacing='0'>
<thead style="background:#337ab7;">
<tr>
<td>编号</td>
<td>账号</td>
<td>密码</td>
<td>状态</td>
<td>操作</td>
<td>操作</td>
</tr>
</thead>
<c:forEach items="${us}" var="u" varStatus="st">
<tr>
<td>${u.id}</td>
<td><a href="myuserinfo?user_id=${u.id}">${u.username}</a></td>
<td>${u.password}</td>
<td class="status">${u.status}</td>
<td><a href="updateuserdown?id=${u.id}"><button type="button" class="btn btn-primary">禁止登录</button></a></td>
<td><a href="updateuserup?id=${u.id}"><button type="button" class="btn btn-primary">准许登录</button></a></td>
</tr>
</c:forEach>
</table>
<div style="text-align:center">
<a href="userlist?start=0"><button type="button" class="btn btn-primary">首页</button></a>
<a href="userlist?start=${page.start-page.count}"><button type="button" class="btn btn-primary">上一页</button></a>
<a href="userlist?start=${page.start+page.count}"><button type="button" class="btn btn-primary">下一页</button></a>
<a href="userlist?start=${page.last}"><button type="button" class="btn btn-primary">末页</button></a>
</div>
</div>
<div style="clear:both"></div>
<img id="endpng" class="endpng" src="admin/img/site/end.png">
</div>
<jsp:include page="../public/footer.jsp"></jsp:include>
<script>
$(function() {
$(".status").each(function(){
if($(this).html()=="1"){
$(this).html("准许登录");
}
if($(this).html()=="0"){
$(this).html("已禁止登录");
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,79 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
<context:annotation-config />
<context:component-scan base-package="com.fhy.service" />
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
<!-- 基本属性 url、user、password -->
<property name="url" value="jdbc:mysql://localhost:3306/cot?characterEncoding=UTF-8" />
<property name="username" value="root" />
<property name="password" value="" />
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<!-- 配置初始化大小、最小、最大 -->
<property name="initialSize" value="3" />
<property name="minIdle" value="3" />
<property name="maxActive" value="20" />
<!-- 配置获取连接等待超时的时间 -->
<property name="maxWait" value="60000" />
<!-- 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 -->
<property name="timeBetweenEvictionRunsMillis" value="60000" />
<!-- 配置一个连接在池中最小生存的时间,单位是毫秒 -->
<property name="minEvictableIdleTimeMillis" value="300000" />
<property name="validationQuery" value="SELECT 1" />
<property name="testWhileIdle" value="true" />
<property name="testOnBorrow" value="false" />
<property name="testOnReturn" value="false" />
<!-- 打开PSCache并且指定每个连接上PSCache的大小 -->
<property name="poolPreparedStatements" value="true" />
<property name="maxPoolPreparedStatementPerConnectionSize" value="20" />
</bean>
<bean id="sqlSession" class="org.mybatis.spring.SqlSessionFactoryBean">
<property name="typeAliasesPackage" value="com.fhy.pojo" />
<property name="dataSource" ref="dataSource"/>
<property name="mapperLocations" value="classpath:com/fhy/mapper/*.xml"/>
<!-- 分页 -->
<property name="plugins">
<array>
<bean class="com.github.pagehelper.PageInterceptor">
<property name="properties">
<!--使用下面的方式配置参数,一行配置一个 -->
<value>
</value>
</property>
</bean>
</array>
</property>
</bean>
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
<property name="basePackage" value="com.fhy.mapper"/>
</bean>
</beans>

View File

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fhy.mapper.AreaMapper" >
<resultMap id="BaseResultMap" type="com.fhy.pojo.Area" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="area_id" property="areaId" jdbcType="VARCHAR" />
<result column="city_id" property="cityId" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, name, area_id, city_id
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from area
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from area
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.fhy.pojo.Area" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into area (id, name, area_id,
city_id)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{areaId,jdbcType=VARCHAR},
#{cityId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.fhy.pojo.Area" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into area
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="name != null" >
name,
</if>
<if test="areaId != null" >
area_id,
</if>
<if test="cityId != null" >
city_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="areaId != null" >
#{areaId,jdbcType=VARCHAR},
</if>
<if test="cityId != null" >
#{cityId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.fhy.pojo.Area" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update area
<set >
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="areaId != null" >
area_id = #{areaId,jdbcType=VARCHAR},
</if>
<if test="cityId != null" >
city_id = #{cityId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.fhy.pojo.Area" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update area
set name = #{name,jdbcType=VARCHAR},
area_id = #{areaId,jdbcType=VARCHAR},
city_id = #{cityId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -0,0 +1,114 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fhy.mapper.CityMapper" >
<resultMap id="BaseResultMap" type="com.fhy.pojo.City" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="city_id" property="cityId" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="province_id" property="provinceId" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, city_id, name, province_id
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from city
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from city
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.fhy.pojo.City" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into city (id, city_id, name,
province_id)
values (#{id,jdbcType=INTEGER}, #{cityId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{provinceId,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.fhy.pojo.City" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into city
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="cityId != null" >
city_id,
</if>
<if test="name != null" >
name,
</if>
<if test="provinceId != null" >
province_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="cityId != null" >
#{cityId,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="provinceId != null" >
#{provinceId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.fhy.pojo.City" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update city
<set >
<if test="cityId != null" >
city_id = #{cityId,jdbcType=VARCHAR},
</if>
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="provinceId != null" >
province_id = #{provinceId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.fhy.pojo.City" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update city
set city_id = #{cityId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
province_id = #{provinceId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fhy.mapper.CommMapper" >
<resultMap id="BaseResultMap" type="com.fhy.pojo.Comm" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="type_id" property="typeId" jdbcType="INTEGER" />
<result column="ztype_id" property="ztypeId" jdbcType="INTEGER" />
<result column="comm_name" property="commName" jdbcType="VARCHAR" />
<result column="comm_price" property="commPrice" jdbcType="VARCHAR" />
<result column="comm_img" property="commImg" jdbcType="VARCHAR" />
<result column="comm_status" property="commStatus" jdbcType="INTEGER" />
<result column="comm_remark" property="commRemark" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id, user_id, type_id,ztype_id,comm_name, comm_price, comm_img, comm_status,comm_remark
</sql>
<!-- 根据ID查询 -->
<select id="selectbyid" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select * from comm where id= #{id}
</select>
<!-- 查询所有商品 -->
<select id="selectcommall" resultMap="BaseResultMap" parameterType="com.fhy.pojo.Comm">
select * from comm
</select>
<!-- 通过一级类别查询商品 -->
<select id="selectbytype" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select * from comm where type_id = #{type_id} and comm_status = 1
</select>
<!-- 通过二级类别查询商品 -->
<select id="selectbyztype" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select * from comm where ztype_id = #{ztype_id} and comm_status = 1
</select>
<!-- 按条件查询商品 -->
<select id="selectKeyWord" resultMap="BaseResultMap" parameterType="java.lang.String">
SELECT * FROM comm WHERE comm_name like CONCAT('%',#{keyword},'%') and comm_status = 1
</select>
<!-- 商品的详细信息 -->
<select id="comminfo" resultMap="BaseResultMap" parameterType="com.fhy.pojo.Comm">
select comm.comm_name,comm.comm_price,comm.comm_img,comm.comm_remark,my_user.name,my_user.phone,my_user.weixin,type.comm_type,ztype.ztype_name
from comm,my_user,type,ztype
where comm.id = #{id} and my_user.user_id = comm.user_id and type.id = comm.type_id and ztype.id = comm.ztype_id
</select>
<!-- 查询自己出售的商品 -->
<select id="my_comm" resultMap="BaseResultMap" parameterType="com.fhy.pojo.Comm">
select * from comm where user_id = #{user_id}
</select>
<!-- 录入商品信息 -->
<insert id="insertSelective" parameterType="com.fhy.pojo.Comm" >
insert into comm
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="userId != null" >
user_id,
</if>
<if test="typeId != null" >
type_id,
</if>
<if test="ztypeId != null" >
ztype_id,
</if>
<if test="commName != null" >
comm_name,
</if>
<if test="commPrice != null" >
comm_price,
</if>
<if test="commImg != null" >
comm_img,
</if>
<if test="commStatus != null" >
comm_status,
</if>
<if test="commRemark != null" >
comm_remark,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="userId != null" >
#{userId,jdbcType=INTEGER},
</if>
<if test="typeId != null" >
#{typeId,jdbcType=INTEGER},
</if>
<if test="ztypeId != null" >
#{ztypeId,jdbcType=INTEGER},
</if>
<if test="commName != null" >
#{commName,jdbcType=VARCHAR},
</if>
<if test="commPrice != null" >
#{commPrice,jdbcType=VARCHAR},
</if>
<if test="commImg != null" >
#{commImg,jdbcType=VARCHAR},
</if>
<if test="commStatus != null" >
#{commStatus,jdbcType=INTEGER},
</if>
<if test="commRemark != null" >
#{commRemark,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<!-- 修改商品信息 -->
<update id="updateByPrimaryKeySelective" parameterType="com.fhy.pojo.Comm" >
update comm
<set >
<if test="userId != null" >
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="typeId != null" >
type_id = #{typeId,jdbcType=INTEGER},
</if>
<if test="ztypeId != null" >
ztype_id = #{ztypeId,jdbcType=INTEGER},
</if>
<if test="commName != null" >
comm_name = #{commName,jdbcType=VARCHAR},
</if>
<if test="commPrice != null" >
comm_price = #{commPrice,jdbcType=VARCHAR},
</if>
<if test="commImg != null" >
comm_img = #{commImg,jdbcType=VARCHAR},
</if>
<if test="commStatus != null" >
comm_status = #{commStatus,jdbcType=INTEGER},
</if>
<if test="commRemark != null" >
comm_remark = #{commRemark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fhy.mapper.GcarCommMapper" >
<resultMap id="BaseResultMap" type="com.fhy.pojo.GcarComm" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="comm_id" property="commId" jdbcType="INTEGER" />
<result column="g_id" property="gId" jdbcType="INTEGER" />
<result column="comm_num" property="commNum" jdbcType="VARCHAR" />
<result column="comm_price" property="commPrice" jdbcType="VARCHAR" />
<result column="comm_name" property="commName" jdbcType="VARCHAR" />
<result column="comm_img" property="commImg" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, comm_id, g_id, comm_num, comm_price
</sql>
<!-- 添加购物车详情 -->
<insert id="insertSelective" parameterType="com.fhy.pojo.GcarComm" >
insert into gcar_comm
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="commId != null" >
comm_id,
</if>
<if test="gId != null" >
g_id,
</if>
<if test="commNum != null" >
comm_num,
</if>
<if test="commPrice != null" >
comm_price,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="commId != null" >
#{commId,jdbcType=INTEGER},
</if>
<if test="gId != null" >
#{gId,jdbcType=INTEGER},
</if>
<if test="commNum != null" >
#{commNum,jdbcType=VARCHAR},
</if>
<if test="commPrice != null" >
#{commPrice,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<!-- 查询自己的购物车 -->
<select id="selectByuserid" resultMap="BaseResultMap" parameterType="com.fhy.pojo.GcarComm">
select c.comm_name,gcc.comm_num,gcc.comm_price,c.comm_img,gc.gtime,gcc.comm_id,gcc.g_id
from gcar_comm as gcc,comm as c,gcar as gc
where c.id = gcc.comm_id and gc.id = gcc.g_id and g_id in (select id from gcar where user_id = #{user_id} and gstatus = 1)
</select>
<!-- 修改 删除 -->
<update id="updateByPrimaryKeySelective" parameterType="com.fhy.pojo.GcarComm" >
update gcar_comm
<set >
<if test="commId != null" >
comm_id = #{commId,jdbcType=INTEGER},
</if>
<if test="gId != null" >
g_id = #{gId,jdbcType=INTEGER},
</if>
<if test="commNum != null" >
comm_num = #{commNum,jdbcType=VARCHAR},
</if>
<if test="commPrice != null" >
comm_price = #{commPrice,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fhy.mapper.GcarMapper" >
<resultMap id="BaseResultMap" type="com.fhy.pojo.Gcar" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="gtime" property="gtime" jdbcType="VARCHAR" />
<result column="gstatus" property="gstatus" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
id, user_id, gtime, gstatus
</sql>
<insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.fhy.pojo.Gcar" >
insert into gcar
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="userId != null" >
user_id,
</if>
<if test="gtime != null" >
gtime,
</if>
<if test="gstatus != null" >
gstatus,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="userId != null" >
#{userId,jdbcType=INTEGER},
</if>
<if test="gtime != null" >
#{gtime,jdbcType=VARCHAR},
</if>
<if test="gstatus != null" >
#{gstatus,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from gcar
where id = #{id,jdbcType=INTEGER}
</select>
<update id="updateByPrimaryKeySelective" parameterType="com.fhy.pojo.Gcar" >
update gcar
<set >
<if test="userId != null" >
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="gtime != null" >
gtime = #{gtime,jdbcType=VARCHAR},
</if>
<if test="gstatus != null" >
gstatus = #{gstatus,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fhy.mapper.MyUserMapper" >
<resultMap id="BaseResultMap" type="com.fhy.pojo.MyUser" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="weixin" property="weixin" jdbcType="VARCHAR" />
<result column="address" property="address" jdbcType="VARCHAR" />
<result column="pca" property="pca" jdbcType="VARCHAR" />
<result column="province_id" property="provinceId" jdbcType="INTEGER" />
<result column="city_id" property="cityId" jdbcType="INTEGER" />
<result column="area_id" property="areaId" jdbcType="INTEGER" />
<result column="phone" property="phone" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, user_id, name, weixin, address, pca, province_id, city_id, area_id, phone, remark
</sql>
<!-- 查询用户信息记录是否存在 如果不存在就执行adduserinfo -->
<select id="selectByuserid" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from my_user
where user_id = #{user_id,jdbcType=INTEGER}
</select>
<!-- 注册时,添加用户信息记录 -->
<insert id="adduserinfo" parameterType="com.fhy.pojo.MyUser">
insert into my_user (user_id) values (#{userId,jdbcType=INTEGER})
</insert>
<!-- 查询用户信息 -->
<select id="userinfo" resultMap="BaseResultMap" parameterType="com.fhy.pojo.MyUser">
select u.username,m.id,m.user_id, m.name, m.weixin, m.address, m.pca, m.phone
from my_user as m,user as u
where user_id = #{user_id} and u.id = m.user_id
</select>
<!-- 修改,删除 -->
<update id="updateByPrimaryKeySelective" parameterType="com.fhy.pojo.MyUser" >
update my_user
<set >
<if test="userId != null" >
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="weixin != null" >
weixin = #{weixin,jdbcType=VARCHAR},
</if>
<if test="address != null" >
address = #{address,jdbcType=VARCHAR},
</if>
<if test="pca != null" >
pca = #{pca,jdbcType=VARCHAR},
</if>
<if test="provinceId != null" >
province_id = #{provinceId,jdbcType=INTEGER},
</if>
<if test="cityId != null" >
city_id = #{cityId,jdbcType=INTEGER},
</if>
<if test="areaId != null" >
area_id = #{areaId,jdbcType=INTEGER},
</if>
<if test="phone != null" >
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fhy.mapper.OrderCommMapper" >
<resultMap id="BaseResultMap" type="com.fhy.pojo.OrderComm" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="comm_id" property="commId" jdbcType="INTEGER" />
<result column="comm_num" property="commNum" jdbcType="VARCHAR" />
<result column="comm_price" property="commPrice" jdbcType="VARCHAR" />
<result column="oid" property="oid" jdbcType="INTEGER" />
<result column="comm_name" property="commName" jdbcType="VARCHAR" />
<result column="comm_img" property="commImg" jdbcType="VARCHAR" />
<result column="username" property="username" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List" >
id, comm_id, comm_num, comm_price, oid
</sql>
<!-- 查询所有订单 -->
<select id="selectorderall" resultMap="BaseResultMap" parameterType="com.fhy.pojo.OrderComm">
select c.comm_name,oc.comm_num,oc.comm_price,c.comm_img,too.otime,u.username,oc.oid,oc.comm_id
from comm as c,order_comm as oc,torder as too,user as u
where c.id = oc.comm_id and oc.oid = too.id and u.id = too.user_id
</select>
<select id="selectByUserId" resultMap="BaseResultMap" parameterType="com.fhy.pojo.OrderComm">
select c.comm_name,oc.comm_num,oc.comm_price,c.comm_img,too.otime,oc.oid,oc.comm_id
from comm as c,order_comm as oc,torder as too
where c.id = oc.comm_id and oc.oid = too.id and oid in (select id from torder where user_id = #{user_id} and ostatus = 1)
</select>
<!-- 添加订单详情 -->
<insert id="insertSelective" parameterType="com.fhy.pojo.OrderComm" >
insert into order_comm
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="commId != null" >
comm_id,
</if>
<if test="commNum != null" >
comm_num,
</if>
<if test="commPrice != null" >
comm_price,
</if>
<if test="oid != null" >
oid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="commId != null" >
#{commId,jdbcType=INTEGER},
</if>
<if test="commNum != null" >
#{commNum,jdbcType=VARCHAR},
</if>
<if test="commPrice != null" >
#{commPrice,jdbcType=VARCHAR},
</if>
<if test="oid != null" >
#{oid,jdbcType=INTEGER},
</if>
</trim>
</insert>
<!-- 删除 修改 -->
<update id="updateByPrimaryKeySelective" parameterType="com.fhy.pojo.OrderComm" >
update order_comm
<set >
<if test="commId != null" >
comm_id = #{commId,jdbcType=INTEGER},
</if>
<if test="commNum != null" >
comm_num = #{commNum,jdbcType=VARCHAR},
</if>
<if test="commPrice != null" >
comm_price = #{commPrice,jdbcType=VARCHAR},
</if>
<if test="oid != null" >
oid = #{oid,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -0,0 +1,103 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fhy.mapper.ProvinceMapper" >
<resultMap id="BaseResultMap" type="com.fhy.pojo.Province" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="province_id" property="provinceId" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
id, name, province_id
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
select
<include refid="Base_Column_List" />
from province
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
delete from province
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.fhy.pojo.Province" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into province (id, name, province_id
)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{provinceId,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.fhy.pojo.Province" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
insert into province
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="name != null" >
name,
</if>
<if test="provinceId != null" >
province_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="provinceId != null" >
#{provinceId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.fhy.pojo.Province" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update province
<set >
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="provinceId != null" >
province_id = #{provinceId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.fhy.pojo.Province" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
-->
update province
set name = #{name,jdbcType=VARCHAR},
province_id = #{provinceId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -0,0 +1,82 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fhy.mapper.TorderMapper" >
<resultMap id="BaseResultMap" type="com.fhy.pojo.Torder" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="user_id" property="userId" jdbcType="INTEGER" />
<result column="otime" property="otime" jdbcType="VARCHAR" />
<result column="ostatus" property="ostatus" jdbcType="INTEGER" />
<result column="total" property="total" jdbcType="DECIMAL" />
</resultMap>
<sql id="Base_Column_List" >
id, user_id, otime, ostatus, total
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from torder
where id = #{id,jdbcType=INTEGER}
</select>
<!-- 添加订单记录 -->
<insert id="insertSelective" useGeneratedKeys="true" keyProperty="id" parameterType="com.fhy.pojo.Torder" >
insert into torder
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="userId != null" >
user_id,
</if>
<if test="otime != null" >
otime,
</if>
<if test="ostatus != null" >
ostatus,
</if>
<if test="total != null" >
total,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="userId != null" >
#{userId,jdbcType=INTEGER},
</if>
<if test="otime != null" >
#{otime,jdbcType=VARCHAR},
</if>
<if test="ostatus != null" >
#{ostatus,jdbcType=INTEGER},
</if>
<if test="total != null" >
#{total,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<!-- 修改 删除订单记录 -->
<update id="updateByPrimaryKeySelective" parameterType="com.fhy.pojo.Torder" >
update torder
<set >
<if test="userId != null" >
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="otime != null" >
otime = #{otime,jdbcType=VARCHAR},
</if>
<if test="ostatus != null" >
ostatus = #{ostatus,jdbcType=INTEGER},
</if>
<if test="total != null" >
total = #{total,jdbcType=DECIMAL},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fhy.mapper.TypeMapper" >
<resultMap id="BaseResultMap" type="com.fhy.pojo.Type" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="comm_type" property="commType" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, comm_type
</sql>
<!-- 查询 -->
<select id="typelist" resultMap="BaseResultMap" parameterType="com.fhy.pojo.Type">
select * from type
</select>
<select id="typelist2" resultMap="BaseResultMap" parameterType="com.fhy.pojo.Type">
select * from type
</select>
</mapper>

View File

@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fhy.mapper.UserMapper" >
<resultMap id="BaseResultMap" type="com.fhy.pojo.User" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="username" property="username" jdbcType="VARCHAR" />
<result column="password" property="password" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="auth" property="auth" jdbcType="INTEGER" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, username, password, status, auth, remark
</sql>
<!-- 查询用户信息all -->
<select id="selectall" resultMap="BaseResultMap" parameterType="com.fhy.pojo.User">
select * from user
</select>
<!-- 登陆查询 -->
<select id="login" resultMap="BaseResultMap" parameterType="com.fhy.pojo.User">
select * from user where username = #{username} and password=#{password}
</select>
<!-- 用户是否存在查询 -->
<select id="selectByUsername" resultMap="BaseResultMap" parameterType="com.fhy.pojo.User">
select * from user where username = #{username}
</select>
<!-- 查询密码 -->
<select id="selectBypwd" resultMap="BaseResultMap" parameterType="com.fhy.pojo.User">
select * from user where username = #{username}
</select>
<!-- 用户注册 -->
<insert id="zhuce" useGeneratedKeys="true" keyProperty="id" parameterType="com.fhy.pojo.User" >
insert into user (username,password) values (#{username,jdbcType=VARCHAR},#{password,jdbcType=VARCHAR})
</insert>
<!-- 密码、状态、身份的修改 -->
<update id="updateByPrimaryKeySelective" parameterType="com.fhy.pojo.User" >
update user
<set >
<if test="username != null" >
username = #{username,jdbcType=VARCHAR},
</if>
<if test="password != null" >
password = #{password,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="auth != null" >
auth = #{auth,jdbcType=INTEGER},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.fhy.mapper.ZtypeMapper" >
<resultMap id="BaseResultMap" type="com.fhy.pojo.Ztype" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="ztype_name" property="ztypeName" jdbcType="VARCHAR" />
<result column="type_id" property="typeId" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
id, ztype_name, type_id
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from ztype
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByTypeId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
select ztype.id, ztype.ztype_name from ztype where type_id = #{type_id}
</select>
</mapper>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,8 @@
# Global logging configuration
log4j.rootLogger=ERROR, stdout
# MyBatis logging configuration...
log4j.logger.com.fhy=TRACE
# Console output...
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%5p [%t] - %m%n

View File

@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd">
<context:annotation-config/>
<context:component-scan base-package="com.fhy.controller">
<context:include-filter type="annotation"
expression="org.springframework.stereotype.Controller"/>
</context:component-scan>
<mvc:annotation-driven >
<mvc:message-converters register-defaults="true">
<bean class="org.springframework.http.converter.StringHttpMessageConverter">
<property name="supportedMediaTypes" value="text/plain;charset=UTF-8" />
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
<mvc:default-servlet-handler />
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/*"/>
<bean class="com.fhy.interceptor.LoginInterceptor"></bean>
</mvc:interceptor>
</mvc:interceptors>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="viewClass"
value="org.springframework.web.servlet.view.JstlView" />
<property name="prefix" value="/WEB-INF/" />
<property name="suffix" value=".jsp" />
</bean>
<!-- 配置文件上传,如果没有使用文件上传可以不用配置,当然如果不配,那么配置文件中也不必引入上传组件包 -->
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- 默认编码 -->
<property name="defaultEncoding" value="utf-8" />
<!-- 文件大小最大值 -->
<property name="maxUploadSize" value="10485760000" />
<!-- 内存中的最大值 -->
<property name="maxInMemorySize" value="40960" />
</bean>
</beans>

View File

@ -0,0 +1,69 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="shortcut icon" href="admin/img/lion.ico" />
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
<title>校园网上交易系统官网</title>
</head>
<body>
<nav class="top ">
<a href="main">
<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor"></span>
校易首页
</a>
<span>喵,欢迎 ${ sessionScope.user.username} 来到校易</span>
<a href="my">个人中心</a>
<a href="logout">注销</a>
</nav>
<a href="main"><img id="logo" src="admin/img/site/logo.gif" class="logo"></a>
<form method="post" action="selectkeyword">
<div class="searchDiv">
<input name="keyword" type="text" placeholder="书籍刊物 技术服务 ">
<button type="submit" class="searchButton">搜索</button>
</div>
</form>
<div class="homepageDiv">
<img src="admin/img/site/catear.png" id="catear" class="catear"/>
<div class="categoryWithCarousel">
<div class="headbar show1" style="height:40px">
<div class="rightMenu" style="margin-left:400px;margin-top: 8px">
<span><a href="main" style="margin-left:800px">返回首页</a></span>
</div>
</div>
<div class="homepageCategoryProducts">
<div style="clear:both"></div>
<c:forEach items="${c}" var="c">
<div class="productItem" >
<a href="comminfo?id=${c.id }"><img width="50px" src="upload/${c.commImg }"></a>
<span class="productItemDesc">${c.commName}</span>
<span class="productPrice">校易专属价:¥${c.commPrice}</span>
<span class="productItemDesc"><a href="insertorder?id=${c.id }&&price=${c.commPrice}&&img=${c.commImg }" >加入购物车</a></span>
</div>
</c:forEach>
<div style="clear:both"></div>
<img id="endpng" class="endpng" src="admin/img/site/end.png">
</div>
<jsp:include page="../public/footer.jsp"></jsp:include>
</body>
</html>

View File

@ -0,0 +1,107 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="shortcut icon" href="admin/img/lion.ico" />
<title>个人中心/商品添加</title>
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
</head>
<body>
<nav class="top ">
<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor">个人中心</span>
</nav>
<a href="main"><img id="logo" src="admin/img/site/logo.gif" class="logo"></a>
<div class="homepageCategoryProducts" style="height:350px;margin-top:200px">
<div style="clear:both"></div>
<a href="my"><<<<<返回个人中心>>>>></a>
<div class=" table-responsive" >
<form action="addcomm" method="post" enctype="multipart/form-data">
<table class="table table-bordered table-vcenter" align='center' border='1' cellspacing='0'>
<tr>
<th>商品名称</th>
<td><input type="text" name="comm_name" required="required"></td>
</tr>
<tr>
<th>商品价格</th>
<td><input type="text" name="comm_price" required="required"></td>
</tr>
<tr>
<th>商品一级类别</th>
<td>
<select id="type" name="type_id">
</select>
</td>
</tr>
<tr>
<th>商品二级类别</th>
<td><select id="ztype" name="ztype_id">
</select></td>
</tr>
<tr>
<th>商品描述或关键词</th>
<td><input type="text" name="comm_remark" required="required"></td>
</tr>
<tr>
<th>请选择图片</th>
<td><input type="file" name="file" required="required"></td>
</tr>
<td><input type="submit" class="btn btn-primary" value="添加"></td>
</table>
</form>
</div>
<div style="clear:both"></div>
<img id="endpng" class="endpng" src="admin/img/site/end.png">
</div>
<jsp:include page="../public/footer.jsp"/>
<script>
$(document).ready(function(){
$.ajax({
url :'http://localhost:8080/cot/typelist',
type : "post",
async:true,
dataType : 'json', //以json的形式返回易解析 "json",
success: function(data){
$("#type").empty();
$("<option value=''>--请选择--</option>").appendTo("#type");
for(var i=0;i<data.length;i++){//获取plist里面的数据拼接到select上
$("#type").append("<option value='"+data[i].id+"'>"+data[i].commType+"</option>");
}
},
});
$("#type").click(function(){
var id=$("#type").val();
$.ajax({
url : 'http://localhost:8080/cot/ztypelist',
type:'post',
data: {id:$("#type").val()},
dataType:'json',
async:true,
success:function(data){
console.log(data);
$("#ztype").empty();// jq写法 清楚地区下拉框的所有内容,然后拼接上从后台取出来的数据
$("<option value=''>--请选择--</option>").appendTo("#ztype");
for(var i=0;i<data.length;i++){//获取clist里面的数据拼接到select上
$("#ztype").append("<option value='"+data[i].id+"'>"+data[i].ztypeName+"</option>");
}
},
});
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,104 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="shortcut icon" href="admin/img/lion.ico" />
<title>个人中心/商品添加</title>
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
</head>
<body>
<nav class="top ">
<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor">个人中心</span>
</nav>
<a href="main"><img id="logo" src="admin/img/site/logo.gif" class="logo"></a>
<div class="homepageCategoryProducts" style="height:350px;margin-top:200px">
<div style="clear:both"></div>
<a href="my"><<<<<返回个人中心>>>>></a>
<div class=" table-responsive" >
<form action="editcomm" method="post" enctype="multipart/form-data">
<table class="table table-bordered table-vcenter" align='center' border='1' cellspacing='0'>
<tr>
<th>商品名称</th>
<td><input type="text" name="comm_name" required="required" value="${co.commName}"></td>
<td><input type="hidden" name="id" value="${co.id}">
</tr>
<tr>
<th>商品价格</th>
<td><input type="text" name="comm_price" required="required" value="${co.commPrice}"></td>
</tr>
<tr>
<th>商品一级类别</th>
<td>
<select id="type" name="type_id">
</select>
</td>
</tr>
<tr>
<th>商品二级类别</th>
<td><select id="ztype" name="ztype_id">
</select></td>
</tr>
<tr>
<th>商品描述或关键词</th>
<td><input type="text" name="comm_remark" required="required" value="${co.commRemark}"></td>
</tr>
<td><input type="submit" class="btn btn-primary" value="提交"></td>
</table>
</form>
</div>
<div style="clear:both"></div>
<img id="endpng" class="endpng" src="admin/img/site/end.png">
</div>
<jsp:include page="../public/footer.jsp"/>
<script>
$(document).ready(function(){
$.ajax({
url :'http://localhost:8080/cot/typelist',
type : "post",
async:true,
dataType : 'json', //以json的形式返回易解析 "json",
success: function(data){
$("#type").empty();
$("<option value=''>--请选择--</option>").appendTo("#type");
for(var i=0;i<data.length;i++){//获取plist里面的数据拼接到select上
$("#type").append("<option value='"+data[i].id+"'>"+data[i].commType+"</option>");
}
},
});
$("#type").click(function(){
var id=$("#type").val();
$.ajax({
url : 'http://localhost:8080/cot/ztypelist',
type:'post',
data: {id:$("#type").val()},
dataType:'json',
async:true,
success:function(data){
console.log(data);
$("#ztype").empty();// jq写法 清楚地区下拉框的所有内容,然后拼接上从后台取出来的数据
$("<option value=''>--请选择--</option>").appendTo("#ztype");
for(var i=0;i<data.length;i++){//获取clist里面的数据拼接到select上
$("#ztype").append("<option value='"+data[i].id+"'>"+data[i].ztypeName+"</option>");
}
},
});
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,48 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="shortcut icon" href="admin/img/lion.ico" />
<title>个人中心/商品添加</title>
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
</head>
<body>
<nav class="top ">
<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor">个人中心</span>
</nav>
<a href="main"><img id="logo" src="admin/img/site/logo.gif" class="logo"></a>
<div class="homepageCategoryProducts" style="height:350px;margin-top:200px">
<div style="clear:both"></div>
<a href="my"><<<<<返回个人中心>>>>></a>
<div class=" table-responsive" >
<form action="editcommimg" method="post" enctype="multipart/form-data">
<table class="table table-bordered table-vcenter" align='center' border='1' cellspacing='0'>
<tr>
<th>请选择图片</th>
<td><input type="hidden" name="id" value="${sessionScope.c_id}">
<td><input type="file" name="file" required="required"></td>
</tr>
<td><input type="submit" class="btn btn-primary" value="提交"></td>
</table>
</form>
</div>
<div style="clear:both"></div>
<img id="endpng" class="endpng" src="admin/img/site/end.png">
</div>
<jsp:include page="../public/footer.jsp"/>
</body>
</html>

View File

@ -0,0 +1,169 @@
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8" import="java.util.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="shortcut icon" href="admin/img/lion.ico" />
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css" rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
<title>校园网上交易系统官网</title>
</head>
<body>
<nav class="top ">
<a href="main">
<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor"></span>
校易首页
</a>
<span>喵,欢迎来校易</span>
</nav>
<a href="main"><img id="logo" src="admin/img/site/logo.gif" class="logo"></a>
<form method="post" action="selectkeyword">
<div class="searchDiv">
<input name="keyword" type="text" placeholder=" 搜索 校易 热门商品:书籍刊物 技术服务 ">
<button type="submit" class="searchButton">搜索</button>
</div>
</form>
<div class="homepageDiv">
<script>
$(function(){
$("div.eachCategory").mouseenter(function(){
var cid = $(this).attr("cid");
$("div.productsAsideCategorys[cid="+cid+"]").show();
});
$("div.eachCategory").mouseleave(function(){
var cid = $(this).attr("cid");
$("div.productsAsideCategorys[cid="+cid+"]").hide();
});
$("div.productsAsideCategorys").mouseenter(function(){
$(this).show();
});
$("div.productsAsideCategorys").mouseleave(function(){
$(this).hide();
});
$("div.rightMenu span").mouseenter(function(){
var left = $(this).position().left;
var top = $(this).position().top;
var width = $(this).css("width");
var destLeft = parseInt(left) + parseInt(width)/2;
$("img#catear").css("left",destLeft);
$("img#catear").css("top",top-20);
$("img#catear").fadeIn(500);
});
$("div.rightMenu span").mouseleave(function(){
$("img#catear").hide();
});
var left = $("div#carousel-of-product").offset().left;
$("div.categoryMenu").css("left",left-20);
$("div.categoryWithCarousel div.head").css("margin-left",left);
$("div.productsAsideCategorys").css("left",left-20);
});
</script>
<img src="admin/img/site/catear.png" id="catear" class="catear"/>
<div class="categoryWithCarousel">
<div class="headbar show1" style="height:40px">
<div class="rightMenu" style="margin-left:400px;margin-top: 8px">
<span><a href="main" style="margin-left:800px">返回首页</a></span>
</div>
</div>
<div class="categoryPictureInProductPageDiv">
<img class="categoryPictureInProductPage" src="">
</div>
<div class="imgAndInfo">
<div class="imgInimgAndInfo">
<img src="upload/${sessionScope.co.commImg }" class="bigImg">
</div>
</div>
<div class="infoInimgAndInfo">
<div class="productTitle">${sessionScope.co.commName }:${sessionScope.co.commRemark }</div>
<div class="productPrice">
<div class="juhuasuan">
<span class="juhuasuanBig" >校易精品:${sessionScope.co.commName }</span>
</div>
<div class="productPriceDiv">
<div class="gouwujuanDiv">
<span> 全校易实物商品通用</span>
</div>
<div class="promotionDiv">
<span class="promotionPriceYuan">校易专属价 </span>
<span class="promotionPriceYuan">¥</span>
<span class="promotionPrice">
${sessionScope.co.commPrice }
</span>
</div>
<div class="promotionDiv">
<span>卖家信息=></span>
<span>卖家姓名:${sessionScope.co.name } |</span>
<span>卖家电话:${sessionScope.co.phone } |</span>
<span>卖家微信:${sessionScope.co.weixin }</span>
</div>
</div>
</div>
<div class="serviceCommitment">
<span class="serviceCommitmentDesc">服务承诺</span>
<span class="serviceCommitmentLink">
<a href="#nowhere">正品保证</a>
<a href="#nowhere">极速退款</a>
<a href="#nowhere">赠运费险</a>
<a href="#nowhere">七天无理由退换</a>
</span>
</div>
<div class="buyDiv">
<form action="insertgcar" method="post">
<input type="number" name="comm_num">
<input type="hidden" name="comm_id" value="${sessionScope.co.id }">
<input type="hidden" name="comm_price" value="${sessionScope.co.commPrice }">
<button class="buyButton">加入购物车</button>
</form>
</div>
<div class="buyDiv">
<form action="insertorder" method="post">
<input type="number" name="comm_num">
<input type="hidden" name="comm_id" value="${sessionScope.co.id }">
<input type="hidden" name="comm_price" value="${sessionScope.co.commPrice }">
<button class="buyButton">立即购买</button>
</form>
</div>
</div>
<div id="footer" class="footer" style="display: block;margin-top: 200px">
<div id="footer_ensure" class="footer_ensure">
<img src="admin/img/site/ensure.png">
</div>
<img id="cateye" class="cateye" src="admin/img/site/cateye.png">
<div id="copyright" class="copyright">
<div class="white_link">
<a href="#nowhere">关于校易</a> <a href="http://www.hxci.com.cn/">哈尔滨信息工程学院</a>
<a href="#nowhere">校园快递</a>
</div>
<div class="license">
<div class="copyRightYear">© 2017-2018 校园网上交易系统 版权所有</div>
</div>
</div>
</div>
</body>
</html>

View File

@ -0,0 +1,83 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="shortcut icon" href="admin/img/lion.ico" />
<title>个人中心/商品管理</title>
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css"rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
</head>
<body>
<nav class="top ">
<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor">个人中心</span>
</nav>
<a href="main"><img id="logo" src="admin/img/site/logo.gif" class="logo"></a>
<!-- 商品列表 -->
<div class="homepageCategoryProducts" style="height:500px;margin-top:135px">
<a href="my"><<<<<返回个人中心>>>>></a>
<div class=" table-responsive">
<table class="table table-bordered table-vcenter" align='center' border='1' cellspacing='0'>
<thead style="background:#337ab7;">
<tr>
<td>商品编号</td>
<td>商品名称</td>
<td>商品价格</td>
<td>商品图片</td>
<td>商品状态</td>
<td>操作</td>
<td>操作</td>
<td>操作</td>
</tr>
</thead>
<c:forEach items="${c}" var="c" varStatus="st">
<tr>
<td>${c.id}</td>
<td>${c.commName}</td>
<td>¥${c.commPrice}</td>
<td><a href="comminfo?id=${c.id}"><img width="35px" height="30px" src="upload/${c.commImg }"></a></td>
<td class="status">${c.commStatus}</td>
<td><a href="mycommdown?id=${c.id }"><button type="button" class="btn btn-primary">下架</button></a></td>
<td><a href="commedit?id=${c.id }"><button type="button" class="btn btn-primary">修改</button></a></td>
<td><a href="editimg?id=${c.id }"><button type="button" class="btn btn-primary">修改</button></a></td>
</tr>
</c:forEach>
</table>
<div style="text-align:center">
<a href="my_comm?start=0"><button type="button" class="btn btn-primary">首页</button></a>
<a href="my_comm?start=${page.start-page.count}"><button type="button" class="btn btn-primary">上一页</button></a>
<a href="my_comm?start=${page.start+page.count}"><button type="button" class="btn btn-primary">下一页</button></a>
<a href="my_comm?start=${page.last}"><button type="button" class="btn btn-primary">末页</button></a>
</div>
</div>
<div style="clear:both"></div>
<img id="endpng" class="endpng" src="admin/img/site/end.png">
</div>
<jsp:include page="../public/footer.jsp"></jsp:include>
<script>
$(function() {
$(".status").each(function(){
if($(this).html()=="1"){
$(this).html("上架中");
}
if($(this).html()=="0"){
$(this).html("下架中");
}
});
});
</script>
</body>
</html>

View File

@ -0,0 +1,67 @@
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<link rel="shortcut icon" href="admin/img/lion.ico" />
<title>个人中心/购物车</title>
<script src="admin/study/js/jquery/2.0.0/jquery.min.js"></script>
<link href="admin/study/css/bootstrap/3.3.6/bootstrap.min.css"rel="stylesheet">
<script src="admin/study/js/bootstrap/3.3.6/bootstrap.min.js"></script>
<link href="admin/show.css" rel="stylesheet">
</head>
<body>
<nav class="top ">
<span style="color:#C40000;margin:0px" class=" glyphicon glyphicon glyphicon-home redColor">个人中心</span>
</nav>
<a href="main"><img id="logo" src="admin/img/site/logo.gif" class="logo"></a>
<div class="homepageCategoryProducts" style="height:500px;margin-top:135px">
<a href="my"><<<<<返回个人中心>>>>></a>
<p style="text-align:center;color:red;font-size:20">购买前请联系好卖家以便及时发货(如不知卖家信息可点击商品图片查看卖家信息)</p>
<div class=" table-responsive">
<table class="table table-bordered table-vcenter" align='center' border='1' cellspacing='0'>
<thead style="background:#337ab7;">
<tr>
<td>商品名称</td>
<td>商品价格</td>
<td>购买数量</td>
<td>商品图片</td>
<td>添加时间</td>
<td>操作</td>
<td>操作</td>
</tr>
</thead>
<c:forEach items="${gcc}" var="gcc" varStatus="st">
<tr>
<td>${gcc.commName}</td>
<td>¥${gcc.commPrice}</td>
<td>${gcc.commNum}</td>
<td><a href="comminfo?id=${gcc.commId }"><img width="35px" height="30px" src="upload/${gcc.commImg }"></a></td>
<td>${gcc.gtime}</td>
<td><a href="insertorder?comm_id=${gcc.commId }&&comm_num=${gcc.commNum}&&comm_price=${gcc.commPrice}&&id=${gcc.gId }"><button type="button" class="btn btn-primary">购买</button></a></td>
<td><a href="delgcar?id=${gcc.gId }"><button type="button" class="btn btn-primary">取消</button></a></td>
</tr>
</c:forEach>
</table>
<div style="text-align:center">
<a href="selectByuserid?start=0"><button type="button" class="btn btn-primary">首页</button></a>
<a href="selectByuserid?start=${page.start-page.count}"><button type="button" class="btn btn-primary">上一页</button></a>
<a href="selectByuserid?start=${page.start+page.count}"><button type="button" class="btn btn-primary">下一页</button></a>
<a href="selectByuserid?start=${page.last}"><button type="button" class="btn btn-primary">末页</button></a>
</div>
</div>
<div style="clear:both"></div>
<img id="endpng" class="endpng" src="admin/img/site/end.png">
</div>
<jsp:include page="../public/footer.jsp"></jsp:include>
</body>
</html>

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More