package Bean;
public class Book {
private String ISBN;
private String bookname;
private String author;
private String press;
private String price;
private String BI;
private String clas;
public Book(String iSBN, String bookname, String author, String press, String price, String bI, String clas) {
super();
ISBN = iSBN;
this.bookname = bookname;
this.author = author;
this.press = press;
this.price = price;
BI = bI;
this.clas = clas;
}
public Book() {
super();
}
public String getISBN() {
return ISBN;
}
public void setISBN(String iSBN) {
ISBN = iSBN;
}
public String getBookname() {
return bookname;
}
public void setBookname(String bookname) {
this.bookname = bookname;
}
public String getAuthor() {
return author;
}
public void setAuthor(String author) {
this.author = author;
}
public String getPress() {
return press;
}
public void setPress(String press) {
this.press = press;
}
public String getPrice() {
return price;
}
public void setPrice(String price) {
this.price = price;
}
public String getBI() {
return BI;
}
public void setBI(String bI) {
BI = bI;
}
public String getClas() {
return clas;
}
public void setClas(String clas) {
this.clas = clas;
}
}
package Bean;
import java.sql.Timestamp;
public class BorrowRecord {
private String ISBN;
private String userid;
private String bookname;
private Timestamp time;
public String getISBN() {
return ISBN;
}
public void setISBN(String iSBN) {
ISBN = iSBN;
}
public String getUserid() {
return userid;
}
public void setUserid(String userid) {
this.userid = userid;
}
public String getBookname() {
return bookname;
}
public void setBookname(String bookname) {
this.bookname = bookname;
}
public Timestamp getTime() {
return time;
}
public void setTime(Timestamp time) {
this.time = time;
}
public BorrowRecord(String iSBN, String userid, String bookname, Timestamp time) {
super();
ISBN = iSBN;
this.userid = userid;
this.bookname = bookname;
this.time = time;
}
public BorrowRecord() {
super();
}
}
package Bean;
public class User {
private String userid;
private String username;
private String userunit;
private String userjob;
private String userpower;
private String borrowcount;
private String password;
public String getUserid() {
return userid;
}
public void setUserid(String userid) {
this.userid = userid;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getUserunit() {
return userunit;
}
public void setUserunit(String userunit) {
this.userunit = userunit;
}
public String getUserjob() {
return userjob;
}
public void setUserjob(String userjob) {
this.userjob = userjob;
}
public String getUserpower() {
return userpower;
}
public void setUserpower(String userpower) {
this.userpower = userpower;
}
public String getBorrowcount() {
return borrowcount;
}
public void setBorrowcount(String borrowcount) {
this.borrowcount = borrowcount;
}
public User(String userid, String username, String userunit, String userjob, String userpower, String borrowcount,
String password) {
super();
this.userid = userid;
this.username = username;
this.userunit = userunit;
this.userjob = userjob;
this.userpower = userpower;
this.borrowcount = borrowcount;
this.password = password;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public User() {
super();
}
}
package Bean;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
public class DB {
// MySQL 8.0 以上版本 - JDBC 驱动名及数据库 URL
static final String JDBC_DRIVER = "com.mysql.cj.jdbc.Driver";
//*************************************************服务器端口/数据库名称?useSS**********************
static final String DataBasName="library";
static final String URL_Fornt="jdbc:mysql://localhost:3307/";
static final String URL_Tail="?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC";
static final String URL =URL_Fornt+DataBasName+URL_Tail;
// 数据库的用户名与密码
static final String USER = "root";
static final String PASS = "123456";
public static Connection link_mysql() {
Connection conn=null;
try {
Class.forName(JDBC_DRIVER);
System.out.println("连接数据库...");
conn = DriverManager.getConnection(URL,USER,PASS);
System.out.println("已连接数据库");
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return conn;
}
public static void stop_link_mysql(Connection conn) {
if(conn!=null)
try {
conn.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static void stop_link_mysql(PreparedStatement pre) {
if(pre!=null)
try {
pre.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static void stop_link_mysql(Statement pre) {
if(pre!=null)
try {
pre.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public static void stop_link_mysql(ResultSet res) {
if(res!=null)
try {
res.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
package Bean;
import java.sql.*;
import java.util.*;
public class DaoBook {
static String table_name=" book";
final static String table_key="(ISBN,author,press,price,BI,class,bookName)";
final static String table_value="values (?,?,?,?,?,?,?)";
public boolean addUser(Book data) {
boolean flag=false;
Connection connection=DB.link_mysql();//链接数据库
PreparedStatement ps=null;
try {
String input="insert into "+table_name+table_key+table_value;
ps=connection.prepareStatement(input);
ps.setString(1, data.getISBN());
ps.setString(2, data.getAuthor());
ps.setString(3, data.getPress());
ps.setString(4, data.getPrice());
ps.setString(5, data.getBI());
ps.setString(6, data.getClas());
ps.setString(7, data.getBookname());
ps.executeUpdate();
flag=true;
System.out.println("数据导入成功");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally {
DB.stop_link_mysql(ps);
DB.stop_link_mysql(connection);
}
return flag;
}
public boolean delete(String id){
boolean flag=false;
System.out.println("now use delete()");
Connection connection=DB.link_mysql();//链接数据库
PreparedStatement ps=null;
try {
String delete="delete from "+table_name+" where ISBN=?";
ps = connection.prepareStatement(delete);
ps.setString(1, id);
ps.executeUpdate();
flag=true;
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
DB.stop_link_mysql(connection);
DB.stop_link_mysql(ps);
}
return flag;
}
public boolean update(User data) {
boolean flag=false;
System.out.println("now use update");
Connection connection=DB.link_mysql();//链接数据库
PreparedStatement ps=null;
System.out.println(data.getUsername());
try {
String change="update"+table_name+" set author = ? press = ? price = ? BI = ? class = ? bookName = ? where ISBN = ?";
ps=connection.prepareStatement(change);
ps.setString(7, data.getUserid());
ps.setString(1, data.getUsername());
ps.setString(2, data.getUserunit());
ps.setString(3, data.getUserjob());
ps.setString(4, data.getUserpower());
ps.setString(5, data.getPassword());
ps.setString(6, data.getBorrowcount());
ps.executeUpdate();
flag=true;
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
}finally {
DB.stop_link_mysql(connection);
DB.stop_link_mysql(ps);
}
return flag;
}
public boolean findID(String id) {
boolean flag=false;
Connection connection=DB.link_mysql();//链接数据库
PreparedStatement ps=null;
ResultSet rs=null;
try {
String change="select * from"+table_name+" where ISBN=?";
ps=connection.prepareStatement(change);
ps.setString(1, id);
rs=ps.executeQuery();
while(rs.next()) {
flag=true;
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally {
DB.stop_link_mysql(rs);
DB.stop_link_mysql(ps);
DB.stop_link_mysql(connection);
}
return flag;
}
public List<Book> getAll() {
System.out.println("now use getallclass()");
List<Book>list=new ArrayList<Book>();
Book cd=null;
Connection connection=DB.link_mysql();//链接数据库
PreparedStatement ps=null;
ResultSet rs=null;
try {
String output="select * from"+table_name;
ps=connection.prepareCall(output);
rs=ps.executeQuery();
if(rs!=null)
while(rs.next()){
cd=new Book(rs.getString("ISBN"),rs.getString("bookName"),rs.getString("author"),rs.getString("press"),rs.getString("price"),rs.getString("BI"),rs.getString("class"));
list.add(cd);
}
System.out.println("获取成功");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally {
DB.stop_link_mysql(connection);
DB.stop_link_mysql(ps);
DB.stop_link_mysql(rs);
}
return list;
}
public Book selectId(String id) {
System.out.println("now use select student id()");
System.out.println("select info where id 1="+id);
Book date=null;
Statement stm=null;
ResultSet rs=null;
Connection con = DB.link_mysql();
try {
stm = con.createStatement();
rs = stm.executeQuery("select * from "+table_name+" where ISBN='" + id + "'");
if(rs.next())
{
date = new Book(rs.getString("ISBN"),rs.getString("bookName"),rs.getString("author"),rs.getString("press"),rs.getString("price"),rs.getString("BI"),rs.getString("class"));
if(date!=null) {
return date;
}
}
}catch(Exception e) {
e.printStackTrace();
}finally {
DB.stop_link_mysql(rs);
DB.stop_link_mysql(stm);
DB.stop_link_mysql(con);
}
System.out.println("空,未找到数据");
return null;
}
public List<Book> selectNameList(String number) {
System.out.println("now use getallclass()");
List<Book>list=new ArrayList<Book>();
Book cd=null;
Connection connection=DB.link_mysql();//链接数据库
PreparedStatement ps=null;
ResultSet rs=null;
try {
String output="select * from "+table_name+" where bookName='" + number + "'";
ps=connection.prepareCall(output);
rs=ps.executeQuery();
if(rs!=null)
while(rs.next()){
cd=new Book(rs.getString("ISBN"),rs.getString("bookName"),rs.getString("author"),rs.getString("press"),rs.getString("price"),rs.getString("BI"),rs.getString("class"));
list.add(cd);
}
System.out.println("获取成功");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally {
DB.stop_link_mysql(connection);
DB.stop_link_mysql(ps);
DB.stop_link_mysql(rs);
}
return list;
}
public List<Book> selectLike(String temp) {
System.out.println("now use select book nameORjobORcompetence()");
System.out.println("select info where id=");
Connection con = DB.link_mysql();
String sql = "SELECT * FROM"+table_name+" WHERE bookName LIKE ?";
PreparedStatement ps = null;
List<Book> emps = null;
ResultSet rs = null;
Book emp = null;
try {
ps = con.prepareStatement(sql);
ps.setString(1, "%" + temp + "%");
rs = ps.executeQuery();
while (rs.next()) {
if (emps == null) {
emps = new ArrayList<Book>();
}
emp = new Book(rs.getString("ISBN"),rs.getString("bookName"),rs.getString("author"),rs.getString("press"),rs.getString("price"),rs.getString("BI"),rs.getString("class"));
emps.add(emp);
System.out.println("获取成功");
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
DB.stop_link_mysql(rs);
DB.stop_link_mysql(ps);
DB.stop_link_mysql(con);
}
return emps;
}
}
package Bean;
import java.sql.*;
import java.util.*;
public class DaoUser {
static String table_name=" user";
final static String table_key="(userID,userName,userUnit,userJob,userPower,password,borrowCount)";
final static String table_value="values (?,?,?,?,?,?,?)";
public boolean addUser(User data) {
boolean flag=false;
Connection connection=DB.link_mysql();//链接数据库
PreparedStatement ps=null;
try {
String input="insert into "+table_name+table_key+table_value;
ps=connection.prepareStatement(input);
ps.setString(1, data.getUserid());
ps.setString(2, data.getUsername());
ps.setString(3, data.getUserunit());
ps.setString(4, data.getUserjob());
ps.setString(5, data.getUserpower());
ps.setString(6, data.getPassword());
ps.setString(7, data.getBorrowcount());
ps.executeUpdate();
flag=true;
System.out.println("数据导入成功");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally {
DB.stop_link_mysql(ps);
DB.stop_link_mysql(connection);
}
return flag;
}
public boolean delete(String id){
boolean flag=false;
System.out.println("now use delete()");
Connection connection=DB.link_mysql();//链接数据库
PreparedStatement ps=null;
try {
String delete="delete from "+table_name+" where userID=?";
ps = connection.prepareStatement(delete);
ps.setString(1, id);
ps.executeUpdate();
flag=true;
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally{
DB.stop_link_mysql(connection);
DB.stop_link_mysql(ps);
}
return flag;
}
public boolean update(User data) {
boolean flag=false;
System.out.println("now use update");
Connection connection=DB.link_mysql();//链接数据库
PreparedStatement ps=null;
System.out.println(data.getUsername());
try {
String change="update"+table_name+" set userName = ? userUnit = ? userJob = ? userPower = ? password = ? borrowCount = ? where userID = ?";
ps=connection.prepareStatement(change);
ps.setString(7, data.getUserid());
ps.setString(1, data.getUsername());
ps.setString(2, data.getUserunit());
ps.setString(3, data.getUserjob());
ps.setString(4, data.getUserpower());
ps.setString(5, data.getPassword());
ps.setString(6, data.getBorrowcount());
ps.executeUpdate();
flag=true;
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
return false;
}finally {
DB.stop_link_mysql(connection);
DB.stop_link_mysql(ps);
}
return flag;
}
public boolean findID(String id) {
boolean flag=false;
Connection connection=DB.link_mysql();//链接数据库
PreparedStatement ps=null;
ResultSet rs=null;
try {
String change="select * from"+table_name+" where userID=?";
ps=connection.prepareStatement(change);
ps.setString(1, id);
rs=ps.executeQuery();
while(rs.next()) {
flag=true;
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally {
DB.stop_link_mysql(rs);
DB.stop_link_mysql(ps);
DB.stop_link_mysql(connection);
}
return flag;
}
public List<User> getAll() {
System.out.println("now use getallclass()");
List<User>list=new ArrayList<User>();
User cd=null;
Connection connection=DB.link_mysql();//链接数据库
PreparedStatement ps=null;
ResultSet rs=null;
try {
String output="select * from"+table_name;
ps=connection.prepareCall(output);
rs=ps.executeQuery();
if(rs!=null)
while(rs.next()){
cd=new User(rs.getString("userID"),rs.getString("userName"),rs.getString("userUnit"),rs.getString("userJob"),rs.getString("userPower"),rs.getString("password"),rs.getString("borrowCount"));
list.add(cd);
}
System.out.println("获取成功");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally {
DB.stop_link_mysql(connection);
DB.stop_link_mysql(ps);
DB.stop_link_mysql(rs);
}
return list;
}
public User selectId(String id) {
System.out.println("now use select student id()");
System.out.println("select info where id 1="+id);
User date=null;
Statement stm=null;
ResultSet rs=null;
Connection con = DB.link_mysql();
try {
stm = con.createStatement();
rs = stm.executeQuery("select * from "+table_name+" where userID='" + id + "'");
if(rs.next())
{
date = new User(rs.getString("userID"),rs.getString("userName"),rs.getString("userUnit"),rs.getString("userJob"),rs.getString("userPower"),rs.getString("borrowCount"),rs.getString("password"));
if(date!=null) {
return date;
}
}
}catch(Exception e) {
e.printStackTrace();
}finally {
DB.stop_link_mysql(rs);
DB.stop_link_mysql(stm);
DB.stop_link_mysql(con);
}
System.out.println("空,未找到数据");
return null;
}
public List<User> selectNameList(String number) {
System.out.println("now use getallclass()");
List<User>list=new ArrayList<User>();
User cd=null;
Connection connection=DB.link_mysql();//链接数据库
PreparedStatement ps=null;
ResultSet rs=null;
try {
String output="select * from "+table_name+" where userName='" + number + "'";
ps=connection.prepareCall(output);
rs=ps.executeQuery();
if(rs!=null)
while(rs.next()){
cd=new User(rs.getString("userID"),rs.getString("userName"),rs.getString("userUnit"),rs.getString("userJob"),rs.getString("userPower"),rs.getString("password"),rs.getString("borrowCount"));
list.add(cd);
}
System.out.println("获取成功");
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}finally {
DB.stop_link_mysql(connection);
DB.stop_link_mysql(ps);
DB.stop_link_mysql(rs);
}
return list;
}
public List<User> selectLike(String temp) {
System.out.println("now use select book nameORjobORcompetence()");
System.out.println("select info where id=");
Connection con = DB.link_mysql();
String sql = "SELECT * FROM"+table_name+" WHERE userName LIKE ?";
PreparedStatement ps = null;
List<User> emps = null;
ResultSet rs = null;
User emp = null;
try {
ps = con.prepareStatement(sql);
ps.setString(1, "%" + temp + "%");
rs = ps.executeQuery();
while (rs.next()) {
if (emps == null) {
emps = new ArrayList<User>();
}
emp = new User(rs.getString("userID"),rs.getString("userName"),rs.getString("userUnit"),rs.getString("userJob"),rs.getString("userPower"),rs.getString("password"),rs.getString("borrowCount"));
emps.add(emp);
System.out.println("获取成功");
}
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} finally {
DB.stop_link_mysql(rs);
DB.stop_link_mysql(ps);
DB.stop_link_mysql(con);
}
return emps;
}
}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="utf-8">
<title>HTML注册登录页面模板</title>
<link rel="stylesheet" href="css/style.css">
<script src="js/jquery-3.5.1.js"></script>
</head>
<script type="text/javascript">
$(document).ready(function(){
var number=request.getParameter("longin");
if(number==="1"){
alter("登录失败");
}
})
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#bo").click(function(){
var id=$("#id").val();
var pass=$("#password").val();
var u="Servlet?method=longin&c="+id;
var r="&p="+pass;
var url;
url=u+r;
window.location.href=url;
});
})
</script>
<script type="text/javascript">
$(document).ready(function(){
$("#b").click(function(){
var name=$("#name").val();
var id=$("#join").val();
var pass=$("#ps").val();
var part=$("#part").val();
var job=$("#job").val();
var u="Servlet?method=join&count="+id;
var r="&password="+pass;
var l="&name="+name;
var url=u+r+l+"&part="+part+"&job="+job;
window.location.href=url;
});
})
</script>
<body>
<div class="content">
<div class="form sign-in">
<h2>欢迎回来</h2>
<label>
<span>账号</span>
<input type="text" id="id">
</label>
<label>
<span>密码</span>
<input type="password" id="password">
</label>
<p class="forgot-pass"><a href="javascript:">忘记密码?</a></p>
<button type="button" class="submit" id="bo">登 录</button>
<!-- <button type="button" class="fb-btn">使用 <span>facebook</span> 帐号登录</button> -->
</div>
<div class="sub-cont">
<div class="img">
<div class="img__text m--up">
<h2>还未注册?</h2>
<p>立即注册,发现大量机会!</p>
</div>
<div class="img__text m--in">
<h2>已有帐号?</h2>
<p>有帐号就登录吧,好久不见了!</p>
</div>
<div class="img__btn">
<span class="m--up">注 册</span>
<span class="m--in">登 录</span>
</div>
</div>
<div class="form sign-up">
<h2>立即注册</h2>
<label>
<span>姓名</span>
<input type="text" id="name"/>
</label>
<label>
<span>唯一ID</span>
<input type="email" id="join"/>
</label>
<label>
<span>密码</span>
<input type="password" id="ps"/>
</label>
<label>
<span>工作单位</span>
<input type="password" id="part"/>
</label>
<label>
<span>工作</span>
<input type="password" id="job"/>
</label>
<button type="button" class="submit" id="b">注 册</button>
</div>
</div>
</div>
<script src="js/script.js"></script>
<div style="text-align:center;">
</div>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css">
</head>
<body>
<%
String massage=(String)request.getAttribute("massage");
if(massage==null){
System.out.println("null jsp");
}
int m=Integer.parseInt(massage);
System.out.println(m);
if(m==-1){
%>
<script type="text/javascript">
alert("账户不存在");
window.location.href="index.html";
</script>
<%
}
if(m==0){
%>
<script type="text/javascript">
alert("账户或者密码错误");
window.location.href="index.html";
</script>
<%
}
if(m==1){
%>
<script type="text/javascript">
alert("登录成功");
window.location.href="customer.jsp";
</script>
<%
}
if(m==2){
%>
<script type="text/javascript">
alert("登录成功");
window.location.href="total.jsp";
</script>
<%
}
if(m==3){
%>
<script type="text/javascript">
alert("用户ID重复,请重新注册");
window.location.href="index.html";
</script>
<%
}
if(m==4){
%>
<script type="text/javascript">
alert("用户信息录入失败");
window.location.href="index.html";
</script>
<%
}
if(m==5){
%>
<script type="text/javascript">
alert("用户信息录入成功");
window.location.href="index.html";
</script>
<%
}
%>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" href="layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
<div class="layui-header">
<div class="layui-logo">管理员你好</div>
<!-- 头部区域(可配合layui已有的水平导航) -->
<ul class="layui-nav layui-layout-left">
<li class="layui-nav-item"><dd><a href="add.jsp">商品记录</a></dd></li>
<li class="layui-nav-item"><a href="">商品管理</a></li>
<li class="layui-nav-item"><a href="">用户</a></li>
<li class="layui-nav-item">
<a href="javascript:;">其它系统</a>
<dl class="layui-nav-child">
<dd><a href="">邮件管理</a></dd>
<dd><a href="">消息管理</a></dd>
<dd><a href="">授权管理</a></dd>
</dl>
</li>
</ul>
<ul class="layui-nav layui-layout-right">
<li class="layui-nav-item">
<a href="javascript:;">
<img src="https://fiveyellowmice.com/images/2016/03/fault-ms1-title-page.jpg" class="layui-nav-img">
管理员,你好
</a>
<dl class="layui-nav-child">
<dd><a href="">基本资料</a></dd>
<dd><a href="">安全设置</a></dd>
</dl>
</li>
<li class="layui-nav-item"><a href="index.html">退出</a></li>
<li class="layui-nav-item"><a href="index.html">切换用户角色</a></li>
</ul>
</div>
<div class="layui-side layui-bg-black">
<div class="layui-side-scroll">
<!-- 左侧导航区域(可配合layui已有的垂直导航) -->
<ul class="layui-nav layui-nav-tree" lay-filter="test">
<li class="layui-nav-item layui-nav-itemed">
<dd> <a class="" href="Servlet?method=getallbook">所有图书</a></dd>
</dl>
</li>
<li class="layui-nav-item">
<a href="javascript:;">汇总查询</a>
<dl class="layui-nav-child">
<dd><a href="find.jsp">商品查询</a></dd>
<li class="layui-nav-item">
<a href="javascript:;">月度商品销售汇总</a>
<dl class="layui-nav-child">
<<dd><a href="monthYear?method=Number&time=month">销量排序</a></dd>
<dd><a href="monthYear?method=Count&time=month">销售额排序</a></dd>
</dl>
</li>
<li class="layui-nav-item">
<a href="javascript:;">年度商品销售汇总</a>
<dl class="layui-nav-child">
<<dd><a href="monthYear?method=Number&time=year">销量排序</a></dd>
<dd><a href="monthYear?method=Count&time=year">销售额排序</a></dd>
</dl>
</li>
</dl>
</li>
<!-- <li class="layui-nav-item"><a href="">云市场</a></li> -->
<li class="layui-nav-item"><dd><a href="addItem.jsp">添加商品</a><dd></li>
</ul>
</div>
</div>
<div class="layui-body">
<!-- 内容主体区域 -->
<iframe src="" id="main" width="100%" style="height: 99.9%" frameborder="0"></iframe>
<div style="padding: 15px;">内容主体区域</div>
</div>
<div class="layui-footer">
<!-- 底部固定区域 -->
© layui.com - 底部固定区域
</div>
</div>
<script src="layui/layui.js"></script>
<script>
//JavaScript代码区域
layui.use(['element','jquery'], function(){
var $=layui.jquery;
var element = layui.element;
$(document).ready(function(){
$("dd>a").click(function (e) {
e.preventDefault();
$("#main").attr("src",$(this).attr("href"));
});
});
// $("#cloud").click(function(){$("#main").html("jaosgoaighowg");});
});
</script>
<script>
//JavaScript代码区域
layui.use('element', function(){
var element = layui.element;
});
</script>
</body>
</html>