├── .DS_Store ├── .gitattributes ├── README.md ├── WebRoot ├── META-INF │ └── MANIFEST.MF ├── WEB-INF │ ├── lib │ │ ├── commons-fileupload-1.2.1.jar │ │ ├── commons-io-1.4.jar │ │ ├── fastjson-1.2.51-sources.jar │ │ ├── fastjson-1.2.51.jar │ │ ├── jackson-annotations-2.3.3.jar │ │ ├── jackson-core-2.3.3.jar │ │ ├── jackson-databind-2.3.3.jar │ │ ├── jstl.jar │ │ ├── mybatis-3.4.6.jar │ │ ├── mysql-connector-java-5.1.44.jar │ │ └── standard.jar │ └── web.xml ├── admin │ ├── addpro.jsp │ ├── admin.jsp │ ├── detailpro.jsp │ ├── editpro.jsp │ ├── editsuccess.jsp │ ├── listorders.jsp │ ├── listpro.jsp │ └── listsum.jsp ├── css │ ├── bootstrap.min.css │ ├── common.css │ ├── detail.css │ ├── fontawesome-all.css │ ├── index.css │ ├── login.css │ └── register.css ├── detailmyaddress.jsp ├── enter.jsp ├── favoriterank.html ├── footer.jsp ├── header.jsp ├── image │ ├── 001.jpg │ ├── 002.jpg │ ├── 003.jpg │ ├── 23c435c86e12cbc2.jpg │ ├── aj.jpg │ ├── azmyy.jpg │ ├── blsjt.jpg │ ├── bwb.jpg │ ├── e0c664cc61438500.jpg │ ├── index1.jpeg │ ├── jyysj.jpg │ ├── no.gif │ ├── nr.jpg │ ├── pain.png │ ├── pbj.jpg │ ├── qkl.png │ ├── ybfj.jpg │ ├── yumi.jpg │ ├── 电热水壶.jpg │ ├── 迷你挂烫机.jpg │ ├── 锅.png │ └── 面包机.jpg ├── images │ ├── banner_1.jpg │ ├── banner_2.jpg │ ├── banner_3.jpg │ ├── hot_tel.jpg │ ├── icon_1.jpg │ ├── icon_2.jpg │ ├── icon_3.jpg │ ├── icon_4.jpg │ ├── icon_5.jpg │ ├── icon_6.jpg │ ├── icon_7.jpg │ ├── login_bg.png │ ├── login_logo.jpg │ ├── logo.jpg │ └── top_banner.jpg ├── index.jsp ├── js │ ├── address.js │ ├── bootstrap.js │ ├── bootstrap.min.js │ ├── getParameter.js │ ├── get_content.js │ ├── include.js │ ├── jquery-1.11.0.min.js │ ├── jquery-3.3.1.js │ └── npm.js ├── layui │ ├── frame │ │ ├── echarts │ │ │ └── echarts.min.js │ │ ├── layui │ │ │ ├── PopLogin.js │ │ │ ├── css │ │ │ │ ├── layui.css │ │ │ │ ├── layui.mobile.css │ │ │ │ └── modules │ │ │ │ │ ├── code.css │ │ │ │ │ ├── laydate │ │ │ │ │ └── default │ │ │ │ │ │ └── laydate.css │ │ │ │ │ └── layer │ │ │ │ │ └── default │ │ │ │ │ ├── icon-ext.png │ │ │ │ │ ├── icon.png │ │ │ │ │ ├── layer.css │ │ │ │ │ ├── loading-0.gif │ │ │ │ │ ├── loading-1.gif │ │ │ │ │ └── loading-2.gif │ │ │ ├── font │ │ │ │ ├── iconfont.eot │ │ │ │ ├── iconfont.svg │ │ │ │ ├── iconfont.ttf │ │ │ │ └── iconfont.woff │ │ │ ├── images │ │ │ │ └── face │ │ │ │ │ ├── 0.gif │ │ │ │ │ ├── 1.gif │ │ │ │ │ ├── 10.gif │ │ │ │ │ ├── 11.gif │ │ │ │ │ ├── 12.gif │ │ │ │ │ ├── 13.gif │ │ │ │ │ ├── 14.gif │ │ │ │ │ ├── 15.gif │ │ │ │ │ ├── 16.gif │ │ │ │ │ ├── 17.gif │ │ │ │ │ ├── 18.gif │ │ │ │ │ ├── 19.gif │ │ │ │ │ ├── 2.gif │ │ │ │ │ ├── 20.gif │ │ │ │ │ ├── 21.gif │ │ │ │ │ ├── 22.gif │ │ │ │ │ ├── 23.gif │ │ │ │ │ ├── 24.gif │ │ │ │ │ ├── 25.gif │ │ │ │ │ ├── 26.gif │ │ │ │ │ ├── 27.gif │ │ │ │ │ ├── 28.gif │ │ │ │ │ ├── 29.gif │ │ │ │ │ ├── 3.gif │ │ │ │ │ ├── 30.gif │ │ │ │ │ ├── 31.gif │ │ │ │ │ ├── 32.gif │ │ │ │ │ ├── 33.gif │ │ │ │ │ ├── 34.gif │ │ │ │ │ ├── 35.gif │ │ │ │ │ ├── 36.gif │ │ │ │ │ ├── 37.gif │ │ │ │ │ ├── 38.gif │ │ │ │ │ ├── 39.gif │ │ │ │ │ ├── 4.gif │ │ │ │ │ ├── 40.gif │ │ │ │ │ ├── 41.gif │ │ │ │ │ ├── 42.gif │ │ │ │ │ ├── 43.gif │ │ │ │ │ ├── 44.gif │ │ │ │ │ ├── 45.gif │ │ │ │ │ ├── 46.gif │ │ │ │ │ ├── 47.gif │ │ │ │ │ ├── 48.gif │ │ │ │ │ ├── 49.gif │ │ │ │ │ ├── 5.gif │ │ │ │ │ ├── 50.gif │ │ │ │ │ ├── 51.gif │ │ │ │ │ ├── 52.gif │ │ │ │ │ ├── 53.gif │ │ │ │ │ ├── 54.gif │ │ │ │ │ ├── 55.gif │ │ │ │ │ ├── 56.gif │ │ │ │ │ ├── 57.gif │ │ │ │ │ ├── 58.gif │ │ │ │ │ ├── 59.gif │ │ │ │ │ ├── 6.gif │ │ │ │ │ ├── 60.gif │ │ │ │ │ ├── 61.gif │ │ │ │ │ ├── 62.gif │ │ │ │ │ ├── 63.gif │ │ │ │ │ ├── 64.gif │ │ │ │ │ ├── 65.gif │ │ │ │ │ ├── 66.gif │ │ │ │ │ ├── 67.gif │ │ │ │ │ ├── 68.gif │ │ │ │ │ ├── 69.gif │ │ │ │ │ ├── 7.gif │ │ │ │ │ ├── 70.gif │ │ │ │ │ ├── 71.gif │ │ │ │ │ ├── 8.gif │ │ │ │ │ └── 9.gif │ │ │ ├── lay │ │ │ │ └── modules │ │ │ │ │ ├── carousel.js │ │ │ │ │ ├── code.js │ │ │ │ │ ├── element.js │ │ │ │ │ ├── flow.js │ │ │ │ │ ├── form.js │ │ │ │ │ ├── jquery.js │ │ │ │ │ ├── laydate.js │ │ │ │ │ ├── layedit.js │ │ │ │ │ ├── layer.js │ │ │ │ │ ├── laypage.js │ │ │ │ │ ├── laytpl.js │ │ │ │ │ ├── mobile.js │ │ │ │ │ ├── table.js │ │ │ │ │ ├── tree.js │ │ │ │ │ ├── upload.js │ │ │ │ │ └── util.js │ │ │ ├── layui.all.js │ │ │ └── layui.js │ │ └── static │ │ │ ├── css │ │ │ ├── Login.css │ │ │ └── style.css │ │ │ ├── image │ │ │ ├── bg.png │ │ │ ├── code.png │ │ │ ├── v.png │ │ │ ├── wx.png │ │ │ └── zfb.png │ │ │ └── js │ │ │ ├── vip_comm.js │ │ │ ├── vip_nav.js │ │ │ ├── vip_tab.js │ │ │ └── vip_table.js │ └── js │ │ ├── index.js │ │ └── readme.txt ├── login.jsp ├── mycart.jsp ├── myorder.jsp ├── register.jsp ├── route_detail.jsp ├── route_list.html └── welcome.jsp └── src └── com └── Jutuan ├── ConnectDB ├── DbUtil.java └── GetConnect.java ├── bean ├── Orders.java ├── ProOrdSum.java ├── Product.java ├── ResultInfo.java ├── ShopCart.java └── Users.java ├── config ├── Configuration.xml └── map │ ├── OrdersMapper.xml │ ├── ProductOpera.xml │ └── UsersOpera.xml ├── dao ├── AddUserDao.java ├── CheckDao.java ├── CheckRegisterDao.java ├── FindNewProductDao.java ├── GetUserDao.java ├── OrderDao.java └── ProductDao.java ├── service ├── OrderService.java ├── ProductService.java └── UserService.java └── servlet ├── AddAddressServlet.java ├── AddProductServlet.java ├── AddToCartServlet.java ├── CheckCodeServlet.java ├── DelProductServlet.java ├── EditProductServlet.java ├── ExitServlet.java ├── FindAllOrdersGetSumServlet.java ├── FindAllOrdersServlet.java ├── FindAllProductServlet.java ├── FindDetailServlet.java ├── FindProSelectedServlet.java ├── FindUserServlet.java ├── GetMyAddressServlet.java ├── IndexListener.java ├── IndexServlet.java ├── IndexTask.java ├── LoginServlet.java ├── RegisterUserServlet.java ├── SubmitOrderServlet.java ├── ToAddAddressServlet.java ├── ToMyOrderCart.java ├── ToMyOrderServlet.java └── UploadImgServlet.java /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=java 2 | *.css linguist-language=java 3 | *.html linguist-language=java -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 全目录 2 | 3 | [更多系统、论文,供君选择 ~~>](https://www.yuque.com/wisebit/blog) 4 | 5 | # 87.HomeApplianceShoppingMallManagementSystem 6 | 7 |

群: 983063232(大佬群 2TB学习资料,讲解)(入群获取sql文件)

8 |

QQ: 206157502(加好友获取sql文件)

9 | 10 |

87.家用电器购物商城管理系统

11 | 12 |

13 | 14 | 15 | 16 | 17 |

18 | 19 | # 简介 20 | 21 | > 本代码来源于网络, 请入群(983063232)后联系群主索要sql文件! 22 | 23 | # 环境 24 | 25 | - IntelliJ IDEA 2009.3 26 | 27 | - Mysql 5.7.26 28 | 29 | - Maven 30 | 31 | - JDK 1.8 32 | 33 | 34 | ## 缩略图 35 | 36 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/83fca0df-b5d3-46cb-b377-52c08161403d.png) 37 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/ae0c0ad3-0ca1-4975-8b9d-7cce60bd7667.png) 38 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/5f8222dd-1152-49de-93ee-adc2bc479292.png) 39 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/5d9264c8-4a70-4e3a-a646-5da429307614.png) 40 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/1a15e0ff-780c-48e0-abf5-59ce91bad82f.png) 41 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/e9f126df-4525-4a2b-9c2e-8dc3fda2c6e2.png) 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /WebRoot/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Class-Path: 3 | 4 | -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-fileupload-1.2.1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/WEB-INF/lib/commons-fileupload-1.2.1.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/commons-io-1.4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/WEB-INF/lib/commons-io-1.4.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/fastjson-1.2.51-sources.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/WEB-INF/lib/fastjson-1.2.51-sources.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/fastjson-1.2.51.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/WEB-INF/lib/fastjson-1.2.51.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/jackson-annotations-2.3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/WEB-INF/lib/jackson-annotations-2.3.3.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/jackson-core-2.3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/WEB-INF/lib/jackson-core-2.3.3.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/jackson-databind-2.3.3.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/WEB-INF/lib/jackson-databind-2.3.3.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/jstl.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/WEB-INF/lib/jstl.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/mybatis-3.4.6.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/WEB-INF/lib/mybatis-3.4.6.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/mysql-connector-java-5.1.44.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/WEB-INF/lib/mysql-connector-java-5.1.44.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/lib/standard.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/WEB-INF/lib/standard.jar -------------------------------------------------------------------------------- /WebRoot/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | shop_online 4 | 5 | enter.jsp 6 | index.htm 7 | index.jsp 8 | default.html 9 | default.htm 10 | default.jsp 11 | 12 | 13 | RegisterUserServlet 14 | com.Jutuan.servlet.RegisterUserServlet 15 | 16 | 17 | RegisterUserServlet 18 | /register 19 | 20 | 21 | loginServlet 22 | com.Jutuan.servlet.LoginServlet 23 | 24 | 25 | loginServlet 26 | /loginServlet 27 | 28 | 29 | findUserServlet 30 | com.Jutuan.servlet.FindUserServlet 31 | 32 | 33 | findUserServlet 34 | /findUserServlet 35 | 36 | 37 | indexProduct 38 | com.Jutuan.servlet.IndexServlet 39 | 40 | 41 | indexProduct 42 | /indexProduct 43 | 44 | 45 | 46 | DelProductServlet 47 | DelProductServlet 48 | com.Jutuan.servlet.DelProductServlet 49 | 50 | 51 | DelProductServlet 52 | /DelProductServlet 53 | 54 | -------------------------------------------------------------------------------- /WebRoot/admin/addpro.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 | Title 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

添加商品

16 | 17 |

${msg }

18 |
19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 |
27 | 28 | 29 |
30 | 31 | 32 |
33 | 请选择商品发货规则: 34 | 37 | 38 | 39 | 请选择商品是否上下架状态: 40 | 43 | 44 | 请选择商品是否热门: 45 | 48 | 49 | 50 | 请输入商品摘要: 51 | 52 |
53 | 54 | 请输入商品介绍: 55 | 56 |
57 | 58 | 59 | 请输入商品特点: 60 | 61 |
62 | 商品图片 63 |
64 | 65 | 66 |
67 | 68 | 69 | 70 | 107 | 108 | -------------------------------------------------------------------------------- /WebRoot/admin/editpro.jsp: -------------------------------------------------------------------------------- 1 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 2 | <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 4 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 5 | 6 | 7 | Title 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |

修改商品

18 | 19 |

${msg }

20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 32 |
33 | 34 | 35 |
36 | 37 | 38 |
39 | 请选择商品发货规则: 40 | 51 | 52 | 53 | 请选择商品是否上下架状态: 54 | 67 | 68 | 请选择商品是否热门: 69 | 82 | 83 | 84 | 请输入商品摘要: 85 | 86 |
87 | 88 | 请输入商品介绍: 89 | 90 |
91 | 92 | 93 | 请输入商品特点: 94 | 95 |
96 | 商品图片 97 |
98 | 99 | 100 |
101 | 102 | 103 | 104 | 141 | 142 | -------------------------------------------------------------------------------- /WebRoot/admin/editsuccess.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 | Title 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |

修改成功!!!

16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /WebRoot/admin/listorders.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 |
订单号商品编号商品名称订单商品数订单总价格下单用户名下单收货地址订单时间
${v.ordernum }${v.pid }${v.pname }${v.ocount }${v.oprice}${v.username}${v.address}${v.ordertime}
68 | 69 | 70 |
71 | 72 | -------------------------------------------------------------------------------- /WebRoot/admin/listpro.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%> 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 |
28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 58 | 59 | 61 | 63 | 64 | 65 | 78 | 91 | 104 | 106 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 |
商品名称市场价格商店价格商品图片商品发布日期热门状态是否下架库存发货时间商品摘要商品特点商品简介商品删除
${v.pname }${v.market_price }${v.shop_price}${v.pdate }热门 不热门上架 下架${v.count }${v.delivery_time } 66 | 67 | 68 | 69 | 70 | ${fn:substring(v.summary,0,12)}…… 72 | 73 | 74 | 75 | ${v.summary } 76 | 77 | 79 | 80 | 81 | 82 | 83 | ${fn:substring(v.characteristics,0,12)}…… 85 | 86 | 87 | 88 | ${v.characteristics } 89 | 90 | 92 | 93 | 94 | 95 | 96 | ${fn:substring(v.pdesc,0,12)}…… 98 | 99 | 100 | 101 | ${v.pdesc } 102 | 103 |
117 | 118 | 153 | 180 | 181 | 182 |
183 | 184 | -------------------------------------------------------------------------------- /WebRoot/admin/listsum.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 53 | 54 | 56 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 |
商品名称市场价格商店价格商品图片商品发布日期热门状态是否下架库存销售总数
${v.product.pname }${v.product.market_price }${v.product.shop_price}${v.product.pdate }热门 不热门上架 下架${v.product.count }${v.sum }
71 | 72 | 73 |
74 | 75 | -------------------------------------------------------------------------------- /WebRoot/css/index.css: -------------------------------------------------------------------------------- 1 | .search_input { 2 | height: 40px; 3 | } 4 | 5 | #content { 6 | margin-bottom: 60px; 7 | } 8 | .jutuan_jx{ 9 | width: 1200px; 10 | overflow: hidden; 11 | margin: 0 auto; 12 | } 13 | .jx_top{ 14 | width: 1200px; 15 | height: 35px; 16 | line-height: 35px; 17 | margin: 0 auto; 18 | } 19 | 20 | .jx_top { 21 | margin-top: 35px; 22 | border-bottom: 2px solid #ffc900; 23 | } 24 | .jx_tit, .jx_tabs { 25 | float: left; 26 | 27 | } 28 | .jx_tit { 29 | width:100px; 30 | height: 35px; 31 | line-height: 35px; 32 | } 33 | .jx_tit img{ 34 | vertical-align: top; 35 | float: left; 36 | } 37 | .jx_tabs { 38 | list-style: none; 39 | margin-bottom: 0; 40 | height: 35px; 41 | margin-left: 120px; 42 | } 43 | .jx_tabs li { 44 | float: left; 45 | height: 35px; 46 | position: relative; 47 | } 48 | .jx_tabs li span{ 49 | display: inline-block; 50 | width: 110px; 51 | height: 33px; 52 | border: 1px solid #f0f0f0; 53 | border-bottom: none; 54 | transform: skew(-30deg); 55 | } 56 | .jx_tabs li a{ 57 | width: 110px; 58 | height: 35px; 59 | line-height: 35px; 60 | text-align: center; 61 | position: absolute; 62 | top: 0px; 63 | z-index: 99; 64 | text-decoration: none; 65 | color: #000; 66 | font-size: 16px; 67 | } 68 | .jx_tabs .active span { 69 | background: #ffc900; 70 | border:none; 71 | } 72 | .jx_tabs .active a{ 73 | color: #fff; 74 | } 75 | 76 | 77 | .jx_content .row, .guone_r .row { 78 | margin-right: -8px; 79 | } 80 | .jx_content a, .guone_r a{ 81 | text-decoration: none; 82 | display: block; 83 | } 84 | .jx_content .has_border, .guone_r .has_border{ 85 | border: 1px solid #eee; 86 | padding: 0 6px; 87 | } 88 | .jx_content h3, .guone_r h3 { 89 | margin: 5px 0; 90 | padding-right: 11px; 91 | font-size: 14px; 92 | color: #000; 93 | line-height: 24px; 94 | overflow: hidden; 95 | font-weight: normal; 96 | background-color: #fff; 97 | display: -webkit-box; 98 | -webkit-box-orient: vertical; 99 | -webkit-line-clamp: 2; 100 | overflow: hidden; 101 | } 102 | .jx_content img, .guone_r .row img { 103 | display: block; 104 | width: 100%; 105 | } 106 | .price { 107 | font-size: 12px; 108 | color: #666; 109 | padding-bottom: 17px; 110 | } 111 | .price em { 112 | font-size: 12px; 113 | font-style: normal; 114 | color: #ff4848; 115 | } 116 | .price strong { 117 | font-size: 18px; 118 | color: #ff4848; 119 | } 120 | .tab-content { 121 | margin-top: 10px; 122 | } 123 | 124 | 125 | 126 | /*国内游*/ 127 | 128 | 129 | .jutuan_gn{ 130 | width: 100%; 131 | overflow: hidden; 132 | } 133 | .guonei_l, 134 | .guone_r { 135 | float: left; 136 | } 137 | .guonei_l { 138 | width:360px; 139 | height: 490px; 140 | margin-right: 50px; 141 | margin-top: 10px; 142 | } 143 | .guone_r { 144 | width:790px; 145 | height: 490px; 146 | } 147 | .guone_r .row>div { 148 | margin-top: 10px; 149 | } 150 | 151 | 152 | .fl { 153 | float: left; 154 | 155 | } 156 | 157 | 158 | -------------------------------------------------------------------------------- /WebRoot/css/login.css: -------------------------------------------------------------------------------- 1 | #login_wrap { 2 | width:100%; 3 | min-width: 1300px; 4 | overflow: hidden; 5 | position: relative; 6 | } 7 | 8 | .login-box { 9 | width: 360px; 10 | 11 | height: 450px; 12 | position: absolute; 13 | top: 50px; 14 | right:170px; 15 | background: #fff; 16 | } 17 | .title { 18 | height: 80px; 19 | line-height: 80px; 20 | background: #ffc900; 21 | font-size: 22px; 22 | padding:0 30px; 23 | } 24 | .title img { 25 | float: left; 26 | margin-top: 12px; 27 | margin-right: 15px; 28 | } 29 | .login_inner { 30 | overflow: hidden; 31 | padding: 10px 50px; 32 | } 33 | 34 | .alert { 35 | margin: 0 auto; 36 | padding: 6px 10px; 37 | border: 1px solid transparent; 38 | text-align: left; 39 | color: #a94442; 40 | background-color: #f2dede; 41 | border-color: #ebccd1; 42 | margin-bottom: 17px; 43 | font-size: 12px; 44 | } 45 | .login_inner form{ 46 | width: 100%; 47 | overflow: hidden; 48 | padding-bottom: 15px; 49 | border-bottom: 1px solid #eee; 50 | } 51 | .login_inner input { 52 | display: inline-block; 53 | width: 246px; 54 | height: 26px; 55 | border: 1px solid #d8d8d8; 56 | font-size: 14px; 57 | color: #666; 58 | line-height: 28px; 59 | padding: 6px 0 6px 12px; 60 | box-shadow: 0 0 5px #fff; 61 | outline: none; 62 | transition: box-shadow 0.25s linear 0s; 63 | -webkit-transition: box-shadow 0.25s linear 0s; 64 | margin-bottom: 17px; 65 | } 66 | .verify input { 67 | width: 95px; 68 | margin-right: 20px; 69 | float: left; 70 | margin-bottom: 0; 71 | } 72 | 73 | .submit_btn button { 74 | width: 120px; 75 | height: 40px; 76 | border: none; 77 | background-color: #ffa800; 78 | text-align: center; 79 | line-height: 40px; 80 | color: #000; 81 | font-size: 18px; 82 | font-weight: bold; 83 | cursor: pointer; 84 | float: left; 85 | } 86 | .auto_login { 87 | margin-top: 15px; 88 | } 89 | .submit_btn .checkbox { 90 | float: left; 91 | width: 17px; 92 | margin: 7px 5px 0 54px; 93 | } 94 | .submit_btn span { 95 | line-height: 35px; 96 | } 97 | 98 | .reg { 99 | border-top: 1px solid #eeeeee; 100 | margin-top: 15px; 101 | width: 100%; 102 | height: 40px; 103 | line-height: 40px; 104 | background: #f1f1f1; 105 | text-align: center; 106 | font-size: 16px; 107 | } 108 | .reg a { 109 | color: #fc7f7f; 110 | } -------------------------------------------------------------------------------- /WebRoot/css/register.css: -------------------------------------------------------------------------------- 1 | .rg_layout{ 2 | width: 100%; 3 | height: 585px; 4 | background: url(../images/register_bg.png) no-repeat center; 5 | background-size: 100% 780px; 6 | overflow: hidden; 7 | } 8 | .rg_layout .rg_form{ 9 | width: 886px; 10 | height: 534px; 11 | background-color: #fff; 12 | margin:24px auto; 13 | border:8px solid #eeeeee; 14 | box-sizing: border-box; 15 | } 16 | 17 | .rg_layout .rg_form > .rg_form_left{ 18 | width:256px; 19 | float: left; 20 | padding-top:20px; 21 | padding-left: 20px; 22 | box-sizing: border-box; 23 | } 24 | .rg_layout .rg_form > .rg_form_center{ 25 | width:358px; 26 | float: left; 27 | padding-top:10px; 28 | box-sizing: border-box; 29 | font-size: 14px; 30 | } 31 | .rg_layout .rg_form > .rg_form_right{ 32 | width:256px; 33 | float: right; 34 | } 35 | 36 | .rg_form > .rg_form_left > p:first-child{ 37 | font-size: 20px; 38 | color:#ffcd26; 39 | 40 | } 41 | .rg_form > .rg_form_left > p:last-child{ 42 | font-size: 20px; 43 | color: #a6a6a6; 44 | } 45 | .rg_form > .rg_form_center .td_left{ 46 | width: 65px; 47 | text-align: right; 48 | } 49 | .rg_form > .rg_form_center table{ 50 | vertical-align: top; 51 | } 52 | .rg_form > .rg_form_center table tr{ 53 | height: 50px; 54 | } 55 | .rg_form > .rg_form_center .td_right{ 56 | width: 293px; 57 | } 58 | .rg_form_center .td_right > input[type="text"],.rg_form_center .td_right > input[type="date"]{ 59 | width: 256px; 60 | height: 32px; 61 | line-height: 32px; 62 | box-sizing: border-box; 63 | padding: 6px 12px; 64 | border-radius: 4px; 65 | border:1px solid #a6a6a6; 66 | float: right; 67 | } 68 | .rg_form > .rg_form_center .td_right.gender{ 69 | padding-left: 40px; 70 | box-sizing: border-box; 71 | } 72 | .rg_form > .rg_form_center .td_right.check{ 73 | padding-left: 36px; 74 | box-sizing: border-box; 75 | } 76 | .rg_form > .rg_form_center .td_right > .check{ 77 | width: 118px; 78 | float: left; 79 | margin-right:14px; 80 | } 81 | .rg_form > .rg_form_center .td_right > .submit{ 82 | width: 120px; 83 | height: 36px; 84 | line-height: 36px; 85 | background-color: #ffc900; 86 | font-size: 14px; 87 | } 88 | .rg_form > .rg_form_right >p{ 89 | float: right; 90 | font-size: 14px; 91 | padding: 20px 12px 0 0; 92 | box-sizing: border-box; 93 | } 94 | .rg_form > .rg_form_right >p >a{ 95 | color: #fc8989; 96 | } -------------------------------------------------------------------------------- /WebRoot/enter.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | 13 | 14 | -------------------------------------------------------------------------------- /WebRoot/favoriterank.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 |

暂未开发功能

9 | 10 | -------------------------------------------------------------------------------- /WebRoot/footer.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | 11 | 54 | 55 | -------------------------------------------------------------------------------- /WebRoot/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 4 | 5 | 6 | 7 | 8 | 9 | Insert title here 10 | 11 | 14 | 15 | 16 | 52 | 53 | 54 | 76 | 77 | 78 | -------------------------------------------------------------------------------- /WebRoot/image/001.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/001.jpg -------------------------------------------------------------------------------- /WebRoot/image/002.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/002.jpg -------------------------------------------------------------------------------- /WebRoot/image/003.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/003.jpg -------------------------------------------------------------------------------- /WebRoot/image/23c435c86e12cbc2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/23c435c86e12cbc2.jpg -------------------------------------------------------------------------------- /WebRoot/image/aj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/aj.jpg -------------------------------------------------------------------------------- /WebRoot/image/azmyy.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/azmyy.jpg -------------------------------------------------------------------------------- /WebRoot/image/blsjt.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/blsjt.jpg -------------------------------------------------------------------------------- /WebRoot/image/bwb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/bwb.jpg -------------------------------------------------------------------------------- /WebRoot/image/e0c664cc61438500.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/e0c664cc61438500.jpg -------------------------------------------------------------------------------- /WebRoot/image/index1.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/index1.jpeg -------------------------------------------------------------------------------- /WebRoot/image/jyysj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/jyysj.jpg -------------------------------------------------------------------------------- /WebRoot/image/no.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/no.gif -------------------------------------------------------------------------------- /WebRoot/image/nr.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/nr.jpg -------------------------------------------------------------------------------- /WebRoot/image/pain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/pain.png -------------------------------------------------------------------------------- /WebRoot/image/pbj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/pbj.jpg -------------------------------------------------------------------------------- /WebRoot/image/qkl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/qkl.png -------------------------------------------------------------------------------- /WebRoot/image/ybfj.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/ybfj.jpg -------------------------------------------------------------------------------- /WebRoot/image/yumi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/yumi.jpg -------------------------------------------------------------------------------- /WebRoot/image/电热水壶.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/电热水壶.jpg -------------------------------------------------------------------------------- /WebRoot/image/迷你挂烫机.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/迷你挂烫机.jpg -------------------------------------------------------------------------------- /WebRoot/image/锅.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/锅.png -------------------------------------------------------------------------------- /WebRoot/image/面包机.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/image/面包机.jpg -------------------------------------------------------------------------------- /WebRoot/images/banner_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/banner_1.jpg -------------------------------------------------------------------------------- /WebRoot/images/banner_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/banner_2.jpg -------------------------------------------------------------------------------- /WebRoot/images/banner_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/banner_3.jpg -------------------------------------------------------------------------------- /WebRoot/images/hot_tel.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/hot_tel.jpg -------------------------------------------------------------------------------- /WebRoot/images/icon_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/icon_1.jpg -------------------------------------------------------------------------------- /WebRoot/images/icon_2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/icon_2.jpg -------------------------------------------------------------------------------- /WebRoot/images/icon_3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/icon_3.jpg -------------------------------------------------------------------------------- /WebRoot/images/icon_4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/icon_4.jpg -------------------------------------------------------------------------------- /WebRoot/images/icon_5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/icon_5.jpg -------------------------------------------------------------------------------- /WebRoot/images/icon_6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/icon_6.jpg -------------------------------------------------------------------------------- /WebRoot/images/icon_7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/icon_7.jpg -------------------------------------------------------------------------------- /WebRoot/images/login_bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/login_bg.png -------------------------------------------------------------------------------- /WebRoot/images/login_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/login_logo.jpg -------------------------------------------------------------------------------- /WebRoot/images/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/logo.jpg -------------------------------------------------------------------------------- /WebRoot/images/top_banner.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/images/top_banner.jpg -------------------------------------------------------------------------------- /WebRoot/js/getParameter.js: -------------------------------------------------------------------------------- 1 | //根据传递过来的参数name获取对应的值 2 | function getParameter(name) { 3 | var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)","i"); 4 | var r = location.search.substr(1).match(reg); 5 | if (r!=null) return (r[2]); return null; 6 | } -------------------------------------------------------------------------------- /WebRoot/js/get_content.js: -------------------------------------------------------------------------------- 1 | $ ( function () { 2 | post (); 3 | } ) 4 | 5 | function post () { 6 | zbp.plugin.on ( "comment.postsuccess" , "ReplyVisible" , function ( formData , data , textStatus , jqXhr ) { 7 | $.ajax ( { 8 | url: bloghost + "zb_system/cmd.php?act=reply_visible" , 9 | type: "POST" , 10 | data: { 11 | log_id: formData.postid , 12 | } , 13 | dataType: "json" , 14 | success: function ( res ) { 15 | if ( res.code == 200 ) { 16 | $ ( "#post-body-" + formData.postid ).html ( res.msg ); 17 | zbp.plugin.unbind ( "comment.postsuccess" , "ReplyVisible" ); 18 | //鐒跺悗鍐欒繘鍘伙紝鏈€鍚庡垹闄ゅ綋鍓嶈繖涓枃浠� 19 | } else { 20 | alert ( '鑾峰彇闅愯棌鏂囩珷澶辫触锛岃鍒锋柊褰撳墠椤甸潰閲嶈瘯' ); 21 | } 22 | console.log ( res ); 23 | } , 24 | error: function ( err ) { 25 | // alert ( '鑾峰彇闅愯棌鏂囩珷澶辫触锛岃鍒锋柊褰撳墠椤甸潰閲嶈瘯' ); 26 | } 27 | } ); 28 | } ); 29 | } 30 | -------------------------------------------------------------------------------- /WebRoot/js/include.js: -------------------------------------------------------------------------------- 1 | $(function () { 2 | $.get("header.jsp",function (data) { 3 | $("#header").html(data); 4 | }); 5 | $.get("footer.jsp",function (data) { 6 | $("#footer").html(data); 7 | }); 8 | }); -------------------------------------------------------------------------------- /WebRoot/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/PopLogin.js: -------------------------------------------------------------------------------- 1 | // JavaScript Document 2 | $(function() { 3 | $('.change a').click(function() { 4 | $('.signform').animate({ height: 'tooggle', opacity: 'tooggle' }, 'slow'); 5 | }); 6 | }) 7 | 8 | function start() { 9 | document.getElementById('login').style.display = ""; 10 | moveType:1; 11 | 12 | } 13 | 14 | function signclose() { 15 | document.getElementById('login').style.display = "none" 16 | document.getElementById('registerform').style.display = "none" 17 | } 18 | 19 | function loading() { 20 | document.getElementById('registerloading').style.display = "" 21 | } -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/css/modules/code.css: -------------------------------------------------------------------------------- 1 | /** layui-v2.0.2 MIT License By http://www.layui.com */ 2 | html #layuicss-skincodecss{display:none;position:absolute;width:1989px}.layui-code-h3,.layui-code-view{position:relative;font-size:12px}.layui-code-view{display:block;margin:10px 0;padding:0;border:1px solid #e2e2e2;border-left-width:6px;background-color:#F2F2F2;color:#333;font-family:Courier New}.layui-code-h3{padding:0 10px;height:32px;line-height:32px;border-bottom:1px solid #e2e2e2}.layui-code-h3 a{position:absolute;right:10px;top:0;color:#999}.layui-code-view .layui-code-ol{position:relative;overflow:auto}.layui-code-view .layui-code-ol li{position:relative;margin-left:45px;line-height:20px;padding:0 5px;border-left:1px solid #e2e2e2;list-style-type:decimal-leading-zero;*list-style-type:decimal;background-color:#fff}.layui-code-view pre{margin:0}.layui-code-notepad{border:1px solid #0C0C0C;border-left-color:#3F3F3F;background-color:#0C0C0C;color:#C2BE9E}.layui-code-notepad .layui-code-h3{border-bottom:none}.layui-code-notepad .layui-code-ol li{background-color:#3F3F3F;border-left:none} -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/css/modules/layer/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/css/modules/layer/default/icon-ext.png -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/css/modules/layer/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/css/modules/layer/default/icon.png -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/css/modules/layer/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/css/modules/layer/default/loading-0.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/css/modules/layer/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/css/modules/layer/default/loading-1.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/css/modules/layer/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/css/modules/layer/default/loading-2.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/font/iconfont.eot -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/font/iconfont.ttf -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/font/iconfont.woff -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/0.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/1.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/10.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/10.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/11.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/11.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/12.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/12.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/13.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/13.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/14.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/14.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/15.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/15.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/16.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/16.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/17.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/17.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/18.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/19.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/2.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/20.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/21.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/21.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/22.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/22.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/23.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/23.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/24.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/24.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/25.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/25.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/26.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/26.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/27.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/27.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/28.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/28.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/29.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/29.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/3.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/3.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/30.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/30.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/31.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/32.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/32.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/33.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/33.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/34.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/34.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/35.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/35.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/36.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/36.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/37.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/37.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/38.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/38.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/39.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/39.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/4.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/4.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/40.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/40.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/41.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/41.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/42.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/42.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/43.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/43.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/44.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/44.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/45.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/45.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/46.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/46.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/47.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/47.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/48.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/48.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/49.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/49.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/5.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/50.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/50.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/51.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/51.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/52.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/52.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/53.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/53.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/54.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/54.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/55.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/55.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/56.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/56.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/57.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/57.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/58.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/58.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/59.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/59.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/6.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/6.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/60.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/60.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/61.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/61.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/62.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/62.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/63.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/63.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/64.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/65.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/65.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/66.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/66.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/67.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/67.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/68.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/68.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/69.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/69.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/7.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/7.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/70.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/70.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/71.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/71.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/8.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/8.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/images/face/9.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/layui/images/face/9.gif -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/lay/modules/carousel.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.0.2 MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var i=layui.$,n=(layui.hint(),layui.device(),{config:{},set:function(e){var n=this;return n.config=i.extend({},n.config,e),n},on:function(e,i){return layui.onevent.call(this,t,e,i)}}),t="carousel",a="layui-this",o=">*[carousel-item]>*",l="layui-carousel-left",r="layui-carousel-right",d="layui-carousel-prev",s="layui-carousel-next",u="layui-carousel-arrow",c="layui-carousel-ind",m=function(e){var t=this;t.config=i.extend({},t.config,n.config,e),t.render()};m.prototype.config={width:"600px",height:"280px",full:!1,arrow:"hover",indicator:"inside",autoplay:!0,interval:3e3,anim:"",trigger:"click",index:0},m.prototype.render=function(){var e=this,n=e.config;n.elem=i(n.elem),n.elem[0]&&(e.elemItem=n.elem.find(o),n.index<0&&(n.index=0),n.index>=e.elemItem.length&&(n.index=e.elemItem.length-1),n.interval<800&&(n.interval=800),n.full?n.elem.css({position:"fixed",width:"100%",height:"100%",zIndex:9999}):n.elem.css({width:n.width,height:n.height}),n.elem.attr("lay-anim",n.anim),e.elemItem.eq(n.index).addClass(a),e.indicator(),e.elemItem.length<=1||(e.arrow(),e.autoplay(),e.events()))},m.prototype.reload=function(e){var n=this;clearInterval(n.timer),n.config=i.extend({},n.config,e),n.render()},m.prototype.prevIndex=function(){var e=this,i=e.config,n=i.index-1;return n<0&&(n=e.elemItem.length-1),n},m.prototype.nextIndex=function(){var e=this,i=e.config,n=i.index+1;return n>=e.elemItem.length&&(n=0),n},m.prototype.addIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index+e,n.index>=i.elemItem.length&&(n.index=0)},m.prototype.subIndex=function(e){var i=this,n=i.config;e=e||1,n.index=n.index-e,n.index<0&&(n.index=i.elemItem.length-1)},m.prototype.autoplay=function(){var e=this,i=e.config;i.autoplay&&(e.timer=setInterval(function(){e.slide()},i.interval))},m.prototype.arrow=function(){var e=this,n=e.config,t=i(['",'"].join(""));n.elem.attr("lay-arrow",n.arrow),n.elem.find("."+u)[0]&&n.elem.find("."+u).remove(),n.elem.append(t),t.on("click",function(){var n=i(this),t=n.attr("lay-type");e.slide(t)})},m.prototype.indicator=function(){var e=this,n=e.config,t=e.elemInd=i(['
"].join(""));n.elem.attr("lay-indicator",n.indicator),n.elem.find("."+c)[0]&&n.elem.find("."+c).remove(),n.elem.append(t),"updown"===n.anim&&t.css("margin-top",-(t.height()/2)),t.find("li").on("hover"===n.trigger?"mouseover":n.trigger,function(){var t=i(this),a=t.index();a>n.index?e.slide("add",a-n.index):a/g,">").replace(/'/g,"'").replace(/"/g,""")),c.html('
  1. '+o.replace(/[\r\t\n]+/g,"
  2. ")+"
"),c.find(">.layui-code-h3")[0]||c.prepend('

'+(c.attr("lay-title")||e.title||"code")+(e.about?'layui.code':"")+"

");var d=c.find(">.layui-code-ol");c.addClass("layui-box layui-code-view"),(c.attr("lay-skin")||e.skin)&&c.addClass("layui-code-"+(c.attr("lay-skin")||e.skin)),(d.find("li").length/100|0)>0&&d.css("margin-left",(d.find("li").length/100|0)+"px"),(c.attr("lay-height")||e.height)&&d.css("max-height",c.attr("lay-height")||e.height)})})}).addcss("modules/code.css","skincodecss"); -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/lay/modules/flow.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.0.2 MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var l=layui.$,o=function(e){},t='';o.prototype.load=function(e){var o,i,n,r,a=this,c=0;e=e||{};var f=l(e.elem);if(f[0]){var m=l(e.scrollElem||document),u=e.mb||50,s=!("isAuto"in e)||e.isAuto,v=e.end||"没有更多了",y=e.scrollElem&&e.scrollElem!==document,d="加载更多",h=l('
'+d+"
");f.find(".layui-flow-more")[0]||f.append(h);var p=function(e,t){e=l(e),h.before(e),t=0==t||null,t?h.html(v):h.find("a").html(d),i=t,o=null,n&&n()},g=function(){o=!0,h.find("a").html(t),"function"==typeof e.done&&e.done(++c,p)};if(g(),h.find("a").on("click",function(){l(this);i||o||g()}),e.isLazyimg)var n=a.lazyimg({elem:e.elem+" img",scrollElem:e.scrollElem});return s?(m.on("scroll",function(){var e=l(this),t=e.scrollTop();r&&clearTimeout(r),i||(r=setTimeout(function(){var i=y?e.height():l(window).height(),n=y?e.prop("scrollHeight"):document.documentElement.scrollHeight;n-t-i<=u&&(o||g())},100))}),a):a}},o.prototype.lazyimg=function(e){var o,t=this,i=0;e=e||{};var n=l(e.scrollElem||document),r=e.elem||"img",a=e.scrollElem&&e.scrollElem!==document,c=function(e,l){var o=n.scrollTop(),r=o+l,c=a?function(){return e.offset().top-n.offset().top+o}():e.offset().top;if(c>=o&&c<=r&&!e.attr("src")){var m=e.attr("lay-src");layui.img(m,function(){var l=t.lazyimg.elem.eq(i);e.attr("src",m).removeAttr("lay-src"),l[0]&&f(l),i++})}},f=function(e,o){var f=a?(o||n).height():l(window).height(),m=n.scrollTop(),u=m+f;if(t.lazyimg.elem=l(r),e)c(e,f);else for(var s=0;su)break}};if(f(),!o){var m;n.on("scroll",function(){var e=l(this);m&&clearTimeout(m),m=setTimeout(function(){f(null,e)},50)}),o=!0}return f},e("flow",new o)}); -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/lay/modules/laypage.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.0.2 MIT License By http://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var a=document,t="getElementById",r="getElementsByTagName",n="laypage",i="layui-disabled",u=function(e){var a=this;a.config=e||{},a.config.index=++s.index,a.render(!0)};u.prototype.type=function(){var e=this.config;if("object"==typeof e.elem)return void 0===e.elem.length?2:3},u.prototype.view=function(){var e=this,a=e.config;a.layout="object"==typeof a.layout?a.layout:["prev","page","next"],a.count=0|a.count,a.curr=0|a.curr||1,a.groups=0|a.groups||5,a.limits="object"==typeof a.limits?a.limits:[10,20,30,40,50],a.limit=0|a.limit||10,a.pages=Math.ceil(a.count/a.limit)||1,a.curr>a.pages&&(a.curr=a.pages),a.groups<0?a.groups=0:a.groups>a.pages&&(a.groups=a.pages),a.prev="prev"in a?a.prev:"上一页",a.next="next"in a?a.next:"下一页";var t=a.pages>a.groups?Math.ceil((a.curr+(a.groups>1?1:0))/(a.groups>0?a.groups:1)):1,r={prev:function(){return a.prev?''+a.prev+"":""}(),page:function(){var e=[];if(a.count<1)return"";t>1&&a.first!==!1&&0!==a.groups&&e.push(''+(a.first||1)+"");var r=Math.floor((a.groups-1)/2),n=t>1?a.curr-r:1,i=t>1?function(){var e=a.curr+(a.groups-r-1);return e>a.pages?a.pages:e}():a.groups;for(i-n2&&e.push('');n<=i;n++)n===a.curr?e.push('"+n+""):e.push(''+n+"");return a.pages>a.groups&&a.pages>i&&a.last!==!1&&(i+1…'),0!==a.groups&&e.push(''+(a.last||a.pages)+"")),e.join("")}(),next:function(){return a.next?''+a.next+"":""}(),count:'共 '+a.count+" 条",limit:function(){var e=['"}(),skip:function(){return['到第','','页',""].join("")}()};return['
',function(){var e=[];return layui.each(a.layout,function(a,t){r[t]&&e.push(r[t])}),e.join("")}(),"
"].join("")},u.prototype.jump=function(e,a){if(e){var t=this,n=t.config,i=e.children,u=e[r]("button")[0],p=e[r]("input")[0],l=e[r]("select")[0],o=function(){var e=0|p.value.replace(/\s|\D/g,"");e&&(n.curr=e,t.render())};if(a)return o();for(var c=0,g=i.length;cn.pages||(n.curr=e,t.render())});l&&s.on(l,"change",function(){var e=this.value;n.curr*e>n.count&&(n.curr=Math.ceil(n.count/e)),n.limit=e,t.render()}),u&&s.on(u,"click",function(){o()})}},u.prototype.skip=function(e){if(e){var a=this,t=e[r]("input")[0];t&&s.on(t,"keyup",function(t){var r=this.value,n=t.keyCode;/^(37|38|39|40)$/.test(n)||(/\D/.test(r)&&(this.value=r.replace(/\D/,"")),13===n&&a.jump(e,!0))})}},u.prototype.render=function(e){var r=this,n=r.config,i=r.type(),u=r.view();2===i?n.elem&&(n.elem.innerHTML=u):3===i?n.elem.html(u):a[t](n.elem)&&(a[t](n.elem).innerHTML=u),n.jump&&n.jump(n,e);var s=a[t]("layui-laypage-"+n.index);r.jump(s),n.hash&&!e&&(location.hash="!"+n.hash+"="+n.curr),r.skip(s)};var s={render:function(e){var a=new u(e);return a.index},index:layui.laypage?layui.laypage.index+1e4:0,on:function(e,a,t){return e.attachEvent?e.attachEvent("on"+a,function(a){t.call(e,a)}):e.addEventListener(a,t,!1),this}};e(n,s)}); -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/lay/modules/laytpl.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.0.2 MIT License By http://www.layui.com */ 2 | ;layui.define(function(e){"use strict";var r={open:"{{",close:"}}"},n={exp:function(e){return new RegExp(e,"g")},query:function(e,n,t){var o=["#([\\s\\S])+?","([^{#}])*?"][e||0];return c((n||"")+r.open+o+r.close+(t||""))},escape:function(e){return String(e||"").replace(/&(?!#?[a-zA-Z0-9]+;)/g,"&").replace(//g,">").replace(/'/g,"'").replace(/"/g,""")},error:function(e,r){var n="Laytpl Error:";return"object"==typeof console&&console.error(n+e+"\n"+(r||"")),n+e}},c=n.exp,t=function(e){this.tpl=e};t.pt=t.prototype,window.errors=0,t.pt.parse=function(e,t){var o=this,p=e,a=c("^"+r.open+"#",""),l=c(r.close+"$","");e=e.replace(/\s+|\r|\t|\n/g," ").replace(c(r.open+"#"),r.open+"# ").replace(c(r.close+"}"),"} "+r.close).replace(/\\/g,"\\\\").replace(/(?="|')/g,"\\").replace(n.query(),function(e){return e=e.replace(a,"").replace(l,""),'";'+e.replace(/\\/g,"")+';view+="'}).replace(n.query(1),function(e){var n='"+(';return e.replace(/\s/g,"")===r.open+r.close?"":(e=e.replace(c(r.open+"|"+r.close),""),/^=/.test(e)&&(e=e.replace(/^=/,""),n='"+_escape_('),n+e.replace(/\\/g,"")+')+"')}),e='"use strict";var view = "'+e+'";return view;';try{return o.cache=e=new Function("d, _escape_",e),e(t,n.escape)}catch(u){return delete o.cache,n.error(u,p)}},t.pt.render=function(e,r){var c,t=this;return e?(c=t.cache?t.cache(e,n.escape):t.parse(t.tpl,e),r?void r(c):c):n.error("no data")};var o=function(e){return"string"!=typeof e?n.error("Template not found"):new t(e)};o.config=function(e){e=e||{};for(var n in e)r[n]=e[n]},o.v="1.2.0",e("laytpl",o)}); -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/lay/modules/tree.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.0.2 MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,a=layui.hint(),i="layui-tree-enter",r=function(e){this.options=e},t={arrow:["",""],checkbox:["",""],radio:["",""],branch:["",""],leaf:""};r.prototype.init=function(e){var o=this;e.addClass("layui-box layui-tree"),o.options.skin&&e.addClass("layui-tree-skin-"+o.options.skin),o.tree(e),o.on(e)},r.prototype.tree=function(e,a){var i=this,r=i.options,n=a||r.nodes;layui.each(n,function(a,n){var l=n.children&&n.children.length>0,c=o('
    '),s=o(["
  • ",function(){return l?''+(n.spread?t.arrow[1]:t.arrow[0])+"":""}(),function(){return r.check?''+("checkbox"===r.check?t.checkbox[0]:"radio"===r.check?t.radio[0]:"")+"":""}(),function(){return'"+(''+(l?n.spread?t.branch[1]:t.branch[0]:t.leaf)+"")+(""+(n.name||"未命名")+"")}(),"
  • "].join(""));l&&(s.append(c),i.tree(c,n.children)),e.append(s),"function"==typeof r.click&&i.click(s,n),i.spread(s,n),r.drag&&i.drag(s,n)})},r.prototype.click=function(e,o){var a=this,i=a.options;e.children("a").on("click",function(e){layui.stope(e),i.click(o)})},r.prototype.spread=function(e,o){var a=this,i=(a.options,e.children(".layui-tree-spread")),r=e.children("ul"),n=e.children("a"),l=function(){e.data("spread")?(e.data("spread",null),r.removeClass("layui-show"),i.html(t.arrow[0]),n.find(".layui-icon").html(t.branch[0])):(e.data("spread",!0),r.addClass("layui-show"),i.html(t.arrow[1]),n.find(".layui-icon").html(t.branch[1]))};r[0]&&(i.on("click",l),n.on("dblclick",l))},r.prototype.on=function(e){var a=this,r=a.options,t="layui-tree-drag";e.find("i").on("selectstart",function(e){return!1}),r.drag&&o(document).on("mousemove",function(e){var i=a.move;if(i.from){var r=(i.to,o('
    '));e.preventDefault(),o("."+t)[0]||o("body").append(r);var n=o("."+t)[0]?o("."+t):r;n.addClass("layui-show").html(i.from.elem.children("a").html()),n.css({left:e.pageX+10,top:e.pageY+10})}}).on("mouseup",function(){var e=a.move;e.from&&(e.from.elem.children("a").removeClass(i),e.to&&e.to.elem.children("a").removeClass(i),a.move={},o("."+t).remove())})},r.prototype.move={},r.prototype.drag=function(e,a){var r=this,t=(r.options,e.children("a")),n=function(){var t=o(this),n=r.move;n.from&&(n.to={item:a,elem:e},t.addClass(i))};t.on("mousedown",function(){var o=r.move;o.from={item:a,elem:e}}),t.on("mouseenter",n).on("mousemove",n).on("mouseleave",function(){var e=o(this),a=r.move;a.from&&(delete a.to,e.removeClass(i))})},e("tree",function(e){var i=new r(e=e||{}),t=o(e.elem);return t[0]?void i.init(t):a.error("layui.tree 没有找到"+e.elem+"元素")})}); -------------------------------------------------------------------------------- /WebRoot/layui/frame/layui/lay/modules/util.js: -------------------------------------------------------------------------------- 1 | /** layui-v2.0.2 MIT License By http://www.layui.com */ 2 | ;layui.define("jquery",function(e){"use strict";var o=layui.$,t={fixbar:function(e){var t,a,i="layui-fixbar",l="layui-fixbar-top",r=o(document),c=o("body");e=o.extend({showHeight:200},e),e.bar1=e.bar1===!0?"":e.bar1,e.bar2=e.bar2===!0?"":e.bar2,e.bgcolor=e.bgcolor?"background-color:"+e.bgcolor:"";var n=[e.bar1,e.bar2,""],u=o(['
      ',e.bar1?'
    • '+n[0]+"
    • ":"",e.bar2?'
    • '+n[1]+"
    • ":"",'
    • '+n[2]+"
    • ","
    "].join("")),s=u.find("."+l),b=function(){var o=r.scrollTop();o>=e.showHeight?t||(s.show(),t=1):t&&(s.hide(),t=0)};o("."+i)[0]||("object"==typeof e.css&&u.css(e.css),c.append(u),b(),u.find("li").on("click",function(){var t=o(this),a=t.attr("lay-type");"top"===a&&o("html,body").animate({scrollTop:0},200),e.click&&e.click.call(this,a)}),r.on("scroll",function(){clearTimeout(a),a=setTimeout(function(){b()},100)}))},countdown:function(e,o,t){var a=this,i="function"==typeof o,l=new Date(e).getTime(),r=new Date(!o||i?(new Date).getTime():o).getTime(),c=l-r,n=[Math.floor(c/864e5),Math.floor(c/36e5)%24,Math.floor(c/6e4)%60,Math.floor(c/1e3)%60];i&&(t=o);var u=setTimeout(function(){a.countdown(e,r+1e3,t)},1e3);return t&&t(c>0?n:[0,0,0,0],o,u),c<=0&&clearTimeout(u),u},timeAgo:function(e,o){var t=(new Date).getTime()-new Date(e).getTime();return t>2592e6?(t=new Date(e).toLocaleString(),o&&(t=t.replace(/\s[\S]+$/g,"")),t):t>=864e5?(t/1e3/60/60/24|0)+"天前":t>=36e5?(t/1e3/60/60|0)+"小时前":t>=18e4?(t/1e3/60|0)+"分钟前":t<0?"未来":"刚刚"}};e("util",t)}); -------------------------------------------------------------------------------- /WebRoot/layui/frame/static/css/Login.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | /* CSS Document */ 4 | 5 | A { 6 | text-decoration: NONE 7 | } 8 | 9 | * { 10 | margin: 0; 11 | padding: 0; 12 | } 13 | 14 | .H { 15 | width: 800px; 16 | padding-top: 2px; 17 | margin-left: 600px; 18 | } 19 | 20 | .H div { 21 | padding-top: 30px; 22 | text-align: center; 23 | } 24 | 25 | .H div .i { 26 | margin-top: 0px; 27 | padding-top: 0px; 28 | display: block; 29 | float: right; 30 | } 31 | 32 | .H input { 33 | text-align: left; 34 | border: 1px solid #000000 35 | } 36 | 37 | .bk { 38 | width: 700px; 39 | margin-top: 300px; 40 | margin-left: 10px; 41 | border: 2px solid #000000; 42 | } 43 | 44 | .zh, 45 | .mm { 46 | width: 350px; 47 | height: 30px; 48 | } 49 | 50 | .fx { 51 | margin-left: 30px; 52 | } 53 | 54 | .H div .an { 55 | width: 350px; 56 | height: 70px; 57 | text-align: center; 58 | font-size: 20px; 59 | background: #3fa8c8; 60 | border-radius: 10px; 61 | border-color: transparent; 62 | box-shadow: none; 63 | } 64 | 65 | .an:hover { 66 | background: #49bde0; 67 | } 68 | 69 | .zc a { 70 | margin-left: 500px; 71 | color: #000; 72 | } 73 | 74 | .zc a:hover { 75 | color: #49bde0; 76 | } -------------------------------------------------------------------------------- /WebRoot/layui/frame/static/image/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/static/image/bg.png -------------------------------------------------------------------------------- /WebRoot/layui/frame/static/image/code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/static/image/code.png -------------------------------------------------------------------------------- /WebRoot/layui/frame/static/image/v.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/static/image/v.png -------------------------------------------------------------------------------- /WebRoot/layui/frame/static/image/wx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/static/image/wx.png -------------------------------------------------------------------------------- /WebRoot/layui/frame/static/image/zfb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/HomeApplianceShoppingMallManagementSystem/e733c18219fefbf6cdb901689594921562ed10d7/WebRoot/layui/frame/static/image/zfb.png -------------------------------------------------------------------------------- /WebRoot/layui/frame/static/js/vip_nav.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Administrator on 2017/5/20. 3 | * @name: vip-admin 后台模板 菜单navJS 4 | * @author: 随丶 5 | */ 6 | layui.define(['layer', 'element'], function (exports) { 7 | // 操作对象 8 | var layer = layui.layer 9 | , element = layui.element 10 | , $ = layui.jquery; 11 | 12 | // 封装方法 13 | var mod = { 14 | // 添加 HTMl 15 | addHtml: function (addr, obj, treeStatus, data) { 16 | // 请求数据 17 | $.get(addr, data, function (res) { 18 | var view = ""; 19 | if (res.data) { 20 | $(res.data).each(function (k, v) { 21 | v.subset && treeStatus ? view += '
  • ' : view += '
  • '; 22 | if (v.subset) { 23 | view += '' + v.icon + '' + v.text + '
    '; 24 | $(v.subset).each(function (ko, vo) { 25 | view += '
    '; 26 | if(vo.target){ 27 | view += ''; 28 | }else{ 29 | view += ''; 30 | } 31 | view += '' + vo.icon + '' + vo.text + '
    '; 32 | }); 33 | view += '
    '; 34 | } else { 35 | if (v.target) { 36 | view += ''; 37 | } else { 38 | view += ''; 39 | } 40 | view += '' + v.icon + '' + v.text + ''; 41 | } 42 | view += '
  • '; 43 | }); 44 | } else { 45 | layer.msg('接受的菜单数据不符合规范,无法解析'); 46 | } 47 | // 添加到 HTML 48 | $(document).find(".layui-nav[lay-filter=" + obj + "]").html(view); 49 | // 更新渲染 50 | element.init(); 51 | },'json'); 52 | } 53 | // 左侧主体菜单 [请求地址,过滤ID,是否展开,携带参数] 54 | , main: function (addr, obj, treeStatus, data) { 55 | // 添加HTML 56 | this.addHtml(addr, obj, treeStatus, data); 57 | } 58 | // 顶部左侧菜单 [请求地址,过滤ID,是否展开,携带参数] 59 | , top_left: function (addr, obj, treeStatus, data) { 60 | // 添加HTML 61 | this.addHtml(addr, obj, treeStatus, data); 62 | } 63 | /*// 顶部右侧菜单 64 | ,top_right: function(){ 65 | 66 | }*/ 67 | }; 68 | 69 | // 输出 70 | exports('vip_nav', mod); 71 | }); 72 | 73 | 74 | -------------------------------------------------------------------------------- /WebRoot/layui/frame/static/js/vip_tab.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Administrator on 2017/05/20 1582. 3 | * @name: vip-admin 后台模板 选项卡JS操作 4 | * @author: 随丶 5 | */ 6 | layui.define('layer', function (exports) { 7 | 8 | // 封装方法 9 | var mod = { 10 | // 添加选项卡 [操作对象,标签标题,url地址] 11 | add: function (elem, tit, url) { 12 | parent.addTab(elem, tit, url); 13 | } 14 | // 获取当前选中的选项卡的lay-id 15 | ,getThisTabId: function () { 16 | // 获取并返回 id 17 | return parent.getThisTabID(); 18 | } 19 | // 删除选项卡[标签lay-id] 20 | ,del: function (id) { 21 | parent.delTab(id); 22 | } 23 | }; 24 | 25 | // 输出 26 | exports('vip_tab', mod); 27 | }); 28 | 29 | 30 | -------------------------------------------------------------------------------- /WebRoot/layui/frame/static/js/vip_table.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Administrator on 2017/08/25. 3 | * @name: vip-admin 后台模板 表格JS功能 4 | * @author: 随丶 5 | */ 6 | layui.define(['layer', 'element'], function (exports) { 7 | 8 | var $ = layui.jquery; 9 | 10 | // 封装方法 11 | var mod = { 12 | // 删除公共方法 deleteAll(ids,请求的url,操作成功跳转url,操作失败跳转url) 13 | deleteAll: function (ids, url, sUrl, eUrl) { 14 | // ids不能为空 15 | if (ids == null || ids == '') { 16 | layer.msg('请选择要删除的数据', {time: 2000}); 17 | return false; 18 | } else { 19 | layer.confirm('确认删除选中数据?', { 20 | title: '删除', 21 | btn: ['确认', '取消'] // 按钮 22 | }, function (index, layero) { 23 | // 确认 24 | $.post(url, {ids: ids}, function (res) { 25 | // 大于0表示删除成功 26 | if (res.status > 0) { 27 | // 提示信息并跳转 28 | layer.msg(res.msg, {time: 1500}, function () { 29 | location.href = sUrl; 30 | }) 31 | } else { 32 | // 提示信息并跳转 33 | layer.msg(res.msg, {time: 1500}, function () { 34 | location.href = eUrl; 35 | }) 36 | } 37 | }); 38 | }, function (index) { 39 | // 关闭 40 | layer.close(index); 41 | }); 42 | } 43 | } 44 | // 转换时间戳为日期时间(时间戳,是否只显示年月日时分,8) 45 | ,unixToDate: function (unixTime, isFull, timeZone) { 46 | if (unixTime == '' || unixTime == null) { 47 | return ''; 48 | } 49 | if (typeof (timeZone) == 'number') { 50 | unixTime = parseInt(unixTime) + parseInt(timeZone) * 60 * 60; 51 | } 52 | var time = new Date(unixTime * 1000); 53 | var ymdhis = ""; 54 | var year, month, date, hours, minutes, seconds; 55 | if (time.getUTCFullYear() < 10) { 56 | year = '0' + time.getUTCFullYear(); 57 | } else { 58 | year = time.getUTCFullYear(); 59 | } 60 | if ((time.getUTCMonth() + 1) < 10) { 61 | month = '0' + (time.getUTCMonth() + 1); 62 | } else { 63 | month = (time.getUTCMonth() + 1); 64 | } 65 | if (time.getUTCDate() < 10) { 66 | date = '0' + time.getUTCDate(); 67 | } else { 68 | date = time.getUTCDate(); 69 | } 70 | ymdhis += year + "-"; 71 | ymdhis += month + "-"; 72 | ymdhis += date; 73 | if (isFull === true) { 74 | if (time.getUTCHours() < 10) { 75 | hours = '0' + time.getUTCHours(); 76 | } else { 77 | hours = time.getUTCHours(); 78 | } 79 | if (time.getUTCMinutes() < 10) { 80 | minutes = '0' + time.getUTCMinutes(); 81 | } else { 82 | minutes = time.getUTCMinutes(); 83 | } 84 | if (time.getUTCSeconds() < 10) { 85 | seconds = '0' + time.getUTCSeconds(); 86 | } else { 87 | seconds = time.getUTCSeconds(); 88 | } 89 | ymdhis += " " + hours + ":"; 90 | ymdhis += minutes; 91 | // ymdhis += seconds; 92 | } 93 | return ymdhis; 94 | } 95 | // 批量删除 返回需要的 ids 96 | ,getIds: function (o, str) { 97 | var obj = o.find('tbody tr td:first-child input[type="checkbox"]:checked'); 98 | var list = ''; 99 | obj.each(function (index, elem) { 100 | list += $(elem).attr(str) + ','; 101 | }); 102 | // 去除最后一位逗号 103 | list = list.substr(0, (list.length - 1)); 104 | return list; 105 | } 106 | // 获取高度 107 | ,getFullHeight: function(){ 108 | return $(window).height() - ( $('.my-btn-box').outerHeight(true) ? $('.my-btn-box').outerHeight(true) + 35 : 40 ); 109 | } 110 | }; 111 | 112 | // 输出 113 | exports('vip_table', mod); 114 | }); 115 | 116 | -------------------------------------------------------------------------------- /WebRoot/layui/js/index.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Administrator on 2017/8/25. 3 | */ 4 | // 配置扩展方法路径 5 | layui.config({ 6 | base: './../frame/static/js/' // 模块目录 7 | }).extend({ // 模块别名 8 | vip_nav: 'vip_nav' 9 | , vip_tab: 'vip_tab' 10 | , vip_table: 'vip_table' 11 | }); -------------------------------------------------------------------------------- /WebRoot/layui/js/readme.txt: -------------------------------------------------------------------------------- 1 | js文件夹 -------------------------------------------------------------------------------- /WebRoot/login.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | 登录 8 | 9 | 10 | 11 | 12 | 54 | 55 | 56 | 57 | 58 | 59 |
    60 |
    61 | 62 |
    63 | 98 |
    99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | -------------------------------------------------------------------------------- /WebRoot/myorder.jsp: -------------------------------------------------------------------------------- 1 | 。<%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 4 | 5 | 6 | 7 | 8 | 11 | 14 | 我的订单 15 | 16 | 18 | 20 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 39 | 40 | 41 | 77 | 78 | 79 | 101 | 102 |
    104 | 105 |
    106 | 107 |

    我的订单

    108 | 109 |
    110 | 111 | 112 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 |
    订单号商品编号商品名称订单商品数订单总价格下单收货地址订单时间
    ${v.ordernum } 137 | ${v.pid }${v.pname}${v.ocount }${v.oprice}${v.address}${v.ordertime}
    157 | 158 |
    159 |
    160 | -------------------------------------------------------------------------------- /WebRoot/route_detail.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" contentType="text/html; charset=UTF-8" 2 | pageEncoding="UTF-8"%> 3 | 4 | 5 | 6 | 7 | Insert title here 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /WebRoot/route_list.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Insert title here 6 | 7 | 8 |

    暂未开发功能

    9 | 10 | -------------------------------------------------------------------------------- /WebRoot/welcome.jsp: -------------------------------------------------------------------------------- 1 | 2 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 3 | 4 | 5 | Title 6 | 9 | 10 | 11 | 12 |

    13 | 欢迎进入家用电器商城后台管理

    14 |
    15 | 家用电器商城后台管理系统,高效率在线管理商品及订单! 16 | 17 |
    18 | 19 | 20 | -------------------------------------------------------------------------------- /src/com/Jutuan/ConnectDB/DbUtil.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.ConnectDB; 2 | 3 | import java.io.IOException; 4 | import java.io.InputStream; 5 | import java.sql.Connection; 6 | import java.sql.DriverManager; 7 | import java.sql.PreparedStatement; 8 | import java.sql.SQLException; 9 | import java.util.Properties; 10 | 11 | public class DbUtil { 12 | 13 | private static String URL = "com.mysql.jdbc.Driver"; 14 | private static String USERNAME = "jdbc:mysql://localhost:3306/graduation_online_shopping?useUnicode=true&characterEncoding=utf-8"; 15 | private static String PASSWORD = "root"; 16 | private static String DRIVER = "123456"; 17 | static { 18 | Properties prop = new Properties(); 19 | InputStream in = DbUtil.class.getResourceAsStream("/jdbc.properties"); 20 | try { 21 | prop.load(in); 22 | URL = prop.getProperty("url").trim(); 23 | USERNAME = prop.getProperty("username").trim(); 24 | PASSWORD = prop.getProperty("password").trim(); 25 | DRIVER = prop.getProperty("driver").trim(); 26 | } catch (IOException e) { 27 | e.printStackTrace(); 28 | } 29 | 30 | } 31 | 32 | public static Connection getConnection() { 33 | try { 34 | Class.forName(DRIVER); 35 | Connection connection = DriverManager.getConnection(URL, USERNAME, PASSWORD); 36 | return connection; 37 | } catch (ClassNotFoundException e) { 38 | e.printStackTrace(); 39 | return null; 40 | } catch (SQLException e) { 41 | e.printStackTrace(); 42 | return null; 43 | } 44 | 45 | } 46 | 47 | public static void update(String sql, Object... params) { 48 | // 获取连接对象 49 | Connection conn = getConnection(); 50 | // 获取操作对象 51 | PreparedStatement pstm = null; 52 | try { 53 | pstm = conn.prepareStatement(sql); 54 | } catch (SQLException e) { 55 | // TODO Auto-generated catch block 56 | e.printStackTrace(); 57 | } 58 | try { 59 | if (params != null) { 60 | for (int i = 0; i < params.length; i++) { 61 | pstm.setObject(i + 1, params[i]); 62 | } 63 | } 64 | } catch (SQLException e) { 65 | // TODO Auto-generated catch block 66 | e.printStackTrace(); 67 | } 68 | 69 | try { 70 | pstm.executeUpdate(); 71 | } catch (SQLException e) { 72 | // TODO Auto-generated catch block 73 | e.printStackTrace(); 74 | } 75 | } 76 | 77 | 78 | 79 | 80 | 81 | } 82 | -------------------------------------------------------------------------------- /src/com/Jutuan/ConnectDB/GetConnect.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.ConnectDB; 2 | 3 | import java.io.IOException; 4 | import java.io.Reader; 5 | 6 | import org.apache.ibatis.io.Resources; 7 | import org.apache.ibatis.session.SqlSession; 8 | import org.apache.ibatis.session.SqlSessionFactory; 9 | import org.apache.ibatis.session.SqlSessionFactoryBuilder; 10 | 11 | /** 12 | * 13 | * 数据库访问类 14 | * 15 | */ 16 | public class GetConnect { 17 | public SqlSession getSqlSession() throws IOException { 18 | //通过配置文件获取数据库信息 19 | Reader reader = Resources.getResourceAsReader("com/Jutuan/config/Configuration.xml"); 20 | //通过配置信息构建一个SqlSessionFactory 21 | SqlSessionFactory sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader); 22 | //通过SqlSessionFactory打开一个数据库会话 23 | SqlSession sqlSession = sqlSessionFactory.openSession(); 24 | System.out.print("数据库连接成功"); 25 | return sqlSession; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/com/Jutuan/bean/Orders.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.bean; 2 | /** 3 | * 订单实体 4 | * @author Administrator 5 | * 6 | */ 7 | public class Orders { 8 | //订单id 9 | private String ordernum; 10 | //商品id 11 | private String pid; 12 | // 商品名称 13 | private String pname; 14 | //订单时间 15 | private String ordertime; 16 | //订单商品数量 17 | private Integer ocount; 18 | //订单总价格 19 | private Float oprice; 20 | //订单详情 21 | private String pdesc; 22 | //订单下单用户用户名 23 | private String username; 24 | //订单地址 25 | private String address; 26 | 27 | 28 | public String getAddress() { 29 | return address; 30 | } 31 | 32 | public void setAddress(String address) { 33 | this.address = address; 34 | } 35 | 36 | public String getOrdernum() { 37 | return ordernum; 38 | } 39 | 40 | public void setOrdernum(String ordernum) { 41 | this.ordernum = ordernum == null ? null : ordernum.trim(); 42 | } 43 | 44 | public String getPid() { 45 | return pid; 46 | } 47 | 48 | public void setPid(String pid) { 49 | this.pid = pid == null ? null : pid.trim(); 50 | } 51 | 52 | public String getPname() { 53 | return pname; 54 | } 55 | 56 | public void setPname(String pname) { 57 | this.pname = pname; 58 | } 59 | 60 | public String getOrdertime() { 61 | return ordertime; 62 | } 63 | 64 | public void setOrdertime(String ordertime) { 65 | this.ordertime = ordertime == null ? null : ordertime.trim(); 66 | } 67 | 68 | public Integer getOcount() { 69 | return ocount; 70 | } 71 | 72 | public void setOcount(Integer ocount) { 73 | this.ocount = ocount; 74 | } 75 | 76 | public Float getOprice() { 77 | return oprice; 78 | } 79 | 80 | public void setOprice(Float oprice) { 81 | this.oprice = oprice; 82 | } 83 | 84 | public String getPdesc() { 85 | return pdesc; 86 | } 87 | 88 | public void setPdesc(String pdesc) { 89 | this.pdesc = pdesc == null ? null : pdesc.trim(); 90 | } 91 | 92 | public String getUsername() { 93 | return username; 94 | } 95 | 96 | public void setUsername(String username) { 97 | this.username = username == null ? null : username.trim(); 98 | } 99 | 100 | @Override 101 | public String toString() { 102 | return "Orders{" + 103 | "ordernum='" + ordernum + '\'' + 104 | ", pid='" + pid + '\'' + 105 | ", pname='" + pname + '\'' + 106 | ", ordertime='" + ordertime + '\'' + 107 | ", ocount=" + ocount + 108 | ", oprice=" + oprice + 109 | ", pdesc='" + pdesc + '\'' + 110 | ", username='" + username + '\'' + 111 | ", address='" + address + '\'' + 112 | '}'; 113 | } 114 | } -------------------------------------------------------------------------------- /src/com/Jutuan/bean/ProOrdSum.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.bean; 2 | 3 | import java.io.Serializable; 4 | /** 5 | * 订单商品计数实体 6 | * @author Administrator 7 | * 8 | */ 9 | public class ProOrdSum implements Serializable { 10 | //订单商品 11 | private Product product; 12 | //商品总下单数量 13 | private Integer sum; 14 | 15 | public Product getProduct() { 16 | return product; 17 | } 18 | 19 | public void setProduct(Product product) { 20 | this.product = product; 21 | } 22 | 23 | public Integer getSum() { 24 | return sum; 25 | } 26 | 27 | public void setSum(Integer sum) { 28 | this.sum = sum; 29 | } 30 | 31 | 32 | } 33 | -------------------------------------------------------------------------------- /src/com/Jutuan/bean/Product.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.bean; 2 | 3 | public class Product { 4 | private String pid; 5 | private String pname; 6 | private Double market_price; 7 | private Double shop_price; 8 | private String pimage; 9 | private String pdate; 10 | private int is_new;//1为热门,0为不热门 11 | private String pdesc;//商品简介 12 | private int pflag;//商品是否下架0为没下架,1为下架 13 | private int count; 14 | private String summary;//摘要 15 | private String characteristics;//特点 16 | private String delivery_time;//发货时间 17 | 18 | public String getPid() { 19 | return pid; 20 | } 21 | public void setPid(String pid) { 22 | this.pid = pid; 23 | } 24 | public String getPname() { 25 | return pname; 26 | } 27 | public void setPname(String pname) { 28 | this.pname = pname; 29 | } 30 | public Double getMarket_price() { 31 | return market_price; 32 | } 33 | public void setMarket_price(Double market_price) { 34 | this.market_price = market_price; 35 | } 36 | public Double getShop_price() { 37 | return shop_price; 38 | } 39 | public void setShop_price(Double shop_price) { 40 | this.shop_price = shop_price; 41 | } 42 | public String getPimage() { 43 | return pimage; 44 | } 45 | public void setPimage(String pimage) { 46 | this.pimage = pimage; 47 | } 48 | public String getPdate() { 49 | return pdate; 50 | } 51 | public void setPdate(String pdate) { 52 | this.pdate = pdate; 53 | } 54 | public String getPdesc() { 55 | return pdesc; 56 | } 57 | public void setPdesc(String pdesc) { 58 | this.pdesc = pdesc; 59 | } 60 | public int getPflag() { 61 | return pflag; 62 | } 63 | public void setPflag(int pflag) { 64 | this.pflag = pflag; 65 | } 66 | public int getCount() { 67 | return count; 68 | } 69 | public void setCount(int count) { 70 | this.count = count; 71 | } 72 | public String getSummary() { 73 | return summary; 74 | } 75 | public void setSummary(String summary) { 76 | this.summary = summary; 77 | } 78 | public String getCharacteristics() { 79 | return characteristics; 80 | } 81 | public void setCharacteristics(String characteristics) { 82 | this.characteristics = characteristics; 83 | } 84 | public String getDelivery_time() { 85 | return delivery_time; 86 | } 87 | public void setDelivery_time(String delivery_time) { 88 | this.delivery_time = delivery_time; 89 | } 90 | public int getIs_new() { 91 | return is_new; 92 | } 93 | public void setIs_new(int is_new) { 94 | this.is_new = is_new; 95 | } 96 | @Override 97 | public String toString() { 98 | return "Product [pid=" + pid + ", pname=" + pname + ", market_price=" + market_price + ", shop_price=" 99 | + shop_price + ", pimage=" + pimage + ", pdate=" + pdate + ", is_new=" + is_new + ", pdesc=" + pdesc 100 | + ", pflag=" + pflag + ", count=" + count + ", summary=" + summary + ", characteristics=" 101 | + characteristics + ", delivery_time=" + delivery_time + "]"; 102 | } 103 | 104 | 105 | } 106 | -------------------------------------------------------------------------------- /src/com/Jutuan/bean/ResultInfo.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.bean; 2 | 3 | import java.io.Serializable; 4 | import java.util.Objects; 5 | 6 | /** 7 | * 用于封装后端返回前端数据对象 8 | */ 9 | public class ResultInfo implements Serializable { 10 | private boolean flag;//后端返回结果正常为true,发生异常返回false 11 | private Object data;//后端返回结果数据对象 12 | private String errorMsg;//发生异常的错误消息 13 | private int role ;//检测登录人员1为管理员,2为用户 14 | 15 | public int getRole() { 16 | return role; 17 | } 18 | public void setRole(int role) { 19 | this.role = role; 20 | } 21 | //无参构造方法 22 | public ResultInfo() { 23 | } 24 | public ResultInfo(boolean flag,int role) { 25 | this.flag = flag; 26 | this.role = role; 27 | } 28 | /** 29 | * 有参构造方法 30 | * @param flag 31 | * @param errorMsg 32 | */ 33 | public ResultInfo(boolean flag, String errorMsg) { 34 | this.flag = flag; 35 | this.errorMsg = errorMsg; 36 | } 37 | /** 38 | * 有参构造方法 39 | * @param flag 40 | * @param data 41 | * @param errorMsg 42 | */ 43 | public ResultInfo(boolean flag, Object data, String errorMsg) { 44 | this.flag = flag; 45 | this.data = data; 46 | this.errorMsg = errorMsg; 47 | } 48 | 49 | public boolean isFlag() { 50 | return flag; 51 | } 52 | 53 | public void setFlag(boolean flag) { 54 | this.flag = flag; 55 | } 56 | 57 | public Object getData() { 58 | return data; 59 | } 60 | 61 | public void setData(Object data) { 62 | this.data = data; 63 | } 64 | 65 | public String getErrorMsg() { 66 | return errorMsg; 67 | } 68 | 69 | public void setErrorMsg(String errorMsg) { 70 | this.errorMsg = errorMsg; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /src/com/Jutuan/bean/ShopCart.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.bean; 2 | 3 | import java.io.Serializable; 4 | 5 | public class ShopCart implements Serializable { 6 | 7 | private Product product; 8 | private Integer sum; 9 | 10 | public ShopCart(Product book, Integer sum2) { 11 | // TODO Auto-generated constructor stub 12 | this.product = book; 13 | this.sum = sum2; 14 | } 15 | 16 | public Product getProduct() { 17 | return product; 18 | } 19 | 20 | public void setProduct(Product product) { 21 | this.product = product; 22 | } 23 | 24 | public Integer getSum() { 25 | return sum; 26 | } 27 | 28 | public void setSum(Integer sum) { 29 | this.sum = sum; 30 | } 31 | 32 | 33 | } 34 | -------------------------------------------------------------------------------- /src/com/Jutuan/bean/Users.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.bean; 2 | 3 | /** 4 | * 用户类 5 | */ 6 | public class Users { 7 | 8 | //用户名 9 | private String username; 10 | //密码 11 | private String password; 12 | //邮箱 13 | private String email; 14 | //姓名 15 | private String name; 16 | //手机 17 | private String telephone; 18 | //性别 19 | private String sex; 20 | //出生年月 21 | private String birthday; 22 | //role为1是管理员,2是普通用户 23 | private int role; 24 | 25 | //用户收货地址 26 | private String address; 27 | 28 | public String getUsername() { 29 | return username; 30 | } 31 | 32 | public void setUsername(String username) { 33 | this.username = username; 34 | } 35 | 36 | public String getPassword() { 37 | return password; 38 | } 39 | 40 | public void setPassword(String password) { 41 | this.password = password; 42 | } 43 | 44 | public String getEmail() { 45 | return email; 46 | } 47 | 48 | public void setEmail(String email) { 49 | this.email = email; 50 | } 51 | 52 | public String getName() { 53 | return name; 54 | } 55 | 56 | public void setName(String name) { 57 | this.name = name; 58 | } 59 | 60 | public String getTelephone() { 61 | return telephone; 62 | } 63 | 64 | public void setTelephone(String telephone) { 65 | this.telephone = telephone; 66 | } 67 | 68 | public String getSex() { 69 | return sex; 70 | } 71 | 72 | public void setSex(String sex) { 73 | this.sex = sex; 74 | } 75 | 76 | public String getBirthday() { 77 | return birthday; 78 | } 79 | 80 | public void setBirthday(String birthday) { 81 | this.birthday = birthday; 82 | } 83 | 84 | public int getRole() { 85 | return role; 86 | } 87 | 88 | public void setRole(int role) { 89 | this.role = role; 90 | } 91 | 92 | public String getAddress() { 93 | return address; 94 | } 95 | 96 | public void setAddress(String address) { 97 | this.address = address; 98 | } 99 | 100 | 101 | 102 | } 103 | -------------------------------------------------------------------------------- /src/com/Jutuan/config/Configuration.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 22 | 23 | 24 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/com/Jutuan/config/map/OrdersMapper.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | insert into orders (ordernum, pid, pname,ordertime, 17 | ocount, oprice, pdesc, 18 | username,address) 19 | values (#{ordernum,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR}, 20 | #{pname,jdbcType=VARCHAR}, 21 | #{ordertime,jdbcType=VARCHAR}, 22 | #{ocount,jdbcType=INTEGER}, #{oprice,jdbcType=REAL}, #{pdesc,jdbcType=VARCHAR}, 23 | #{username,jdbcType=VARCHAR},#{address,jdbcType=VARCHAR}) 24 | 25 | 26 | 29 | 30 | 31 | 32 | insert into orders 33 | 34 | 35 | ordernum, 36 | 37 | 38 | pid, 39 | 40 | 41 | pname, 42 | 43 | 44 | ordertime, 45 | 46 | 47 | ocount, 48 | 49 | 50 | oprice, 51 | 52 | 53 | pdesc, 54 | 55 | 56 | username, 57 | 58 | 59 | address, 60 | 61 | 62 | 63 | 64 | #{ordernum,jdbcType=VARCHAR}, 65 | 66 | 67 | #{pid,jdbcType=VARCHAR}, 68 | 69 | 70 | #{pname,jdbcType=VARCHAR}, 71 | 72 | 73 | #{ordertime,jdbcType=VARCHAR}, 74 | 75 | 76 | #{ocount,jdbcType=INTEGER}, 77 | 78 | 79 | #{oprice,jdbcType=REAL}, 80 | 81 | 82 | #{pdesc,jdbcType=VARCHAR}, 83 | 84 | 85 | #{username,jdbcType=VARCHAR}, 86 | 87 | 88 | #{address,jdbcType=VARCHAR}, 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /src/com/Jutuan/config/map/ProductOpera.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 22 | 23 | 24 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 49 | 52 | 55 | 58 | 59 | 60 | 61 | 64 | 65 | 66 | 67 | 68 | 69 | insert into product values( 70 | #{pid},#{summary},#{pname},#{market_price},#{shop_price},#{pimage},#{pdate}, #{is_new}, #{pdesc}, #{pflag},#{characteristics}, #{delivery_time},#{count} 71 | ); 72 | 73 | 74 | 75 | 76 | 77 | 78 | update product set count=#{count} where pid=#{pid}; 79 | 80 | 81 | 82 | 83 | 88 | 89 | 90 | 91 | delete from product where pid=#{pid}; 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /src/com/Jutuan/config/map/UsersOpera.xml: -------------------------------------------------------------------------------- 1 | 2 | 19 | 22 | 23 | 24 | 27 | 28 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 45 | 48 | 51 | 54 | 57 | 60 | 63 | 64 | INSERT INTO users 65 | ( USERNAME, 66 | PASSWORD, 67 | EMAIL, 68 | NAME, 69 | TELEPHONE, 70 | SEX, 71 | BIRTHDAY, 72 | ROLE 73 | ) 74 | VALUES 75 | ( #{username}, 76 | #{password}, 77 | #{email}, 78 | #{name}, 79 | #{telephone}, 80 | #{sex}, 81 | #{birthday}, 82 | #{role} 83 | ) 84 | 85 | 86 | 87 | update users set address=#{address} where username=#{username} 88 | 89 | 90 | 91 | -------------------------------------------------------------------------------- /src/com/Jutuan/dao/AddUserDao.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.dao; 2 | /** 3 | * 添加用户注册信息 4 | */ 5 | import java.io.IOException; 6 | 7 | 8 | import org.apache.ibatis.session.SqlSession; 9 | 10 | import com.Jutuan.ConnectDB.GetConnect; 11 | import com.Jutuan.bean.Users; 12 | 13 | public class AddUserDao { 14 | public void AddUser(Users user) { 15 | //实例化ConnectDB对象 16 | GetConnect connerctDB = new GetConnect(); 17 | SqlSession sqlSession = null; 18 | try { 19 | //获取sqlsession对象 20 | sqlSession = connerctDB.getSqlSession(); 21 | //执行sql语句 22 | sqlSession.insert("UsersOpera.userinsert",user); 23 | //提交事务 24 | sqlSession.commit(); 25 | } catch (IOException e) { 26 | // TODO Auto-generated catch block 27 | e.printStackTrace(); 28 | }finally{ 29 | if(sqlSession != null) { 30 | sqlSession.close(); 31 | } 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /src/com/Jutuan/dao/CheckDao.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.dao; 2 | 3 | import java.io.IOException; 4 | 5 | import org.apache.ibatis.session.SqlSession; 6 | 7 | import com.Jutuan.ConnectDB.GetConnect; 8 | import com.Jutuan.bean.Users; 9 | 10 | /** 11 | * 12 | * 验证用户是否存在 13 | * 14 | */ 15 | public class CheckDao { 16 | public int LoginInfor(String username, String passowrd) { 17 | //实例化ConnectDB对象 18 | GetConnect connerctDB = new GetConnect(); 19 | //实例化User对象并设置属性 20 | Users user = new Users(); 21 | user.setUsername(username); 22 | user.setPassword(passowrd); 23 | //接受查询返回值 24 | int a = 0; 25 | SqlSession sqlSession = null; 26 | try { 27 | //获取SqlSession对象 28 | sqlSession = connerctDB.getSqlSession(); 29 | //执行Sql语句 30 | a = sqlSession.selectOne("UsersOpera.CheckUser",user); 31 | } catch (IOException e) { 32 | // TODO Auto-generated catch block 33 | e.printStackTrace(); 34 | }finally{ 35 | if(sqlSession != null) { 36 | sqlSession.close(); 37 | } 38 | } 39 | return a; 40 | } 41 | } 42 | 43 | -------------------------------------------------------------------------------- /src/com/Jutuan/dao/CheckRegisterDao.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.dao; 2 | /** 3 | * 注册验证 4 | */ 5 | import java.io.IOException; 6 | 7 | import org.apache.ibatis.session.SqlSession; 8 | 9 | import com.Jutuan.ConnectDB.GetConnect; 10 | import com.Jutuan.bean.Users; 11 | 12 | public class CheckRegisterDao { 13 | public int CheckRegister(String username) { 14 | //实例化ConnectDB对象 15 | GetConnect connerctDB = new GetConnect(); 16 | //实例化User对象并设置属性 17 | Users user = new Users(); 18 | user.setUsername(username); 19 | //接受查询返回值 20 | int a = 0; 21 | SqlSession sqlSession = null; 22 | try { 23 | //获取SqlSession对象 24 | sqlSession = connerctDB.getSqlSession(); 25 | //执行Sql语句 26 | a = sqlSession.selectOne("UsersOpera.CheckRegister",user); 27 | } catch (IOException e) { 28 | // TODO Auto-generated catch block 29 | e.printStackTrace(); 30 | }finally{ 31 | if(sqlSession != null) { 32 | sqlSession.close(); 33 | } 34 | } 35 | return a; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /src/com/Jutuan/dao/FindNewProductDao.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.dao; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.apache.ibatis.session.SqlSession; 8 | 9 | import com.Jutuan.ConnectDB.GetConnect; 10 | import com.Jutuan.bean.Product; 11 | 12 | public class FindNewProductDao { 13 | public List findNewProductDao() { 14 | //实例化ConnectDB对象 15 | System.out.println("1"); 16 | GetConnect connerctDB = new GetConnect(); 17 | Product product = new Product(); 18 | product.setPflag(1); 19 | product.setCount(6); 20 | //接受查询返回值 21 | List list = new ArrayList(); 22 | SqlSession sqlSession = null; 23 | try { 24 | //获取SqlSession对象 25 | sqlSession = connerctDB.getSqlSession(); 26 | //执行Sql语句 27 | list = sqlSession.selectList("ProductOpera.FindNewProduct",product); 28 | 29 | } catch (IOException e) { 30 | // TODO Auto-generated catch block 31 | e.printStackTrace(); 32 | }finally{ 33 | if(sqlSession != null) { 34 | sqlSession.close(); 35 | } 36 | } 37 | return list; 38 | } 39 | 40 | public void save(Product product) { 41 | // TODO Auto-generated method stub 42 | 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/com/Jutuan/dao/GetUserDao.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.dao; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.apache.ibatis.session.SqlSession; 8 | 9 | import com.Jutuan.ConnectDB.GetConnect; 10 | import com.Jutuan.bean.Users; 11 | 12 | /** 13 | * 14 | * 获取用户的名称 15 | * 16 | */ 17 | public class GetUserDao { 18 | public List GetUserName(String username) { 19 | //实例化ConnectDB对象 20 | 21 | GetConnect connerctDB = new GetConnect(); 22 | //接受查询返回值 23 | List list = new ArrayList(); 24 | SqlSession sqlSession = null; 25 | try { 26 | //获取SqlSession对象 27 | sqlSession = connerctDB.getSqlSession(); 28 | //执行Sql语句 29 | list = sqlSession.selectList("UsersOpera.GetUserName",username); 30 | } catch (IOException e) { 31 | // TODO Auto-generated catch block 32 | e.printStackTrace(); 33 | }finally{ 34 | if(sqlSession != null) { 35 | sqlSession.close(); 36 | } 37 | } 38 | return list; 39 | } 40 | 41 | public void updateAddress(String username, String address) { 42 | // TODO Auto-generated method stub 43 | //实例化ConnectDB对象 44 | 45 | GetConnect connerctDB = new GetConnect(); 46 | //接受查询返回值 47 | 48 | SqlSession sqlSession = null; 49 | try { 50 | //获取SqlSession对象 51 | sqlSession = connerctDB.getSqlSession(); 52 | //执行Sql语句 53 | Users user=new Users(); 54 | user.setUsername(username); 55 | user.setAddress(address); 56 | System.out.println(address); 57 | sqlSession.update("UsersOpera.updateAddress",user); 58 | //提交事务 59 | sqlSession.commit(); 60 | } catch (IOException e) { 61 | // TODO Auto-generated catch block 62 | e.printStackTrace(); 63 | }finally{ 64 | if(sqlSession != null) { 65 | sqlSession.close(); 66 | } 67 | } 68 | 69 | } 70 | } 71 | 72 | -------------------------------------------------------------------------------- /src/com/Jutuan/dao/OrderDao.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.dao; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.apache.ibatis.session.SqlSession; 8 | 9 | import com.Jutuan.ConnectDB.GetConnect; 10 | import com.Jutuan.bean.Orders; 11 | import com.Jutuan.bean.Product; 12 | /** 13 | * 订单Dao类 14 | * @author Administrator 15 | * 16 | */ 17 | public class OrderDao { 18 | /** 19 | * 增加订单 20 | * @param orders 21 | */ 22 | public void save(Orders orders) { 23 | // TODO Auto-generated method stub 24 | GetConnect connerctDB = new GetConnect(); 25 | SqlSession sqlSession = null; 26 | try { 27 | // 获取sqlsession对象 28 | sqlSession = connerctDB.getSqlSession(); 29 | // 执行sql语句 30 | sqlSession.insert("OrdersMapper.insert", orders); 31 | // 提交事务 32 | sqlSession.commit(); 33 | } catch (IOException e) { 34 | // TODO Auto-generated catch block 35 | e.printStackTrace(); 36 | } finally { 37 | if (sqlSession != null) { 38 | sqlSession.close(); 39 | } 40 | } 41 | } 42 | /** 43 | * 查询所有订单 44 | * @return 45 | */ 46 | 47 | public List queryAll() { 48 | // 实例化ConnectDB对象 49 | 50 | GetConnect connerctDB = new GetConnect(); 51 | // 接受查询返回值 52 | List list = new ArrayList(); 53 | SqlSession sqlSession = null; 54 | try { 55 | // 获取SqlSession对象 56 | sqlSession = connerctDB.getSqlSession(); 57 | // 执行Sql语句 58 | list = sqlSession.selectList("OrdersMapper.queryAll"); 59 | } catch (IOException e) { 60 | // TODO Auto-generated catch block 61 | e.printStackTrace(); 62 | } finally { 63 | if (sqlSession != null) { 64 | sqlSession.close(); 65 | } 66 | } 67 | return list; 68 | 69 | } 70 | 71 | } 72 | -------------------------------------------------------------------------------- /src/com/Jutuan/dao/ProductDao.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.dao; 2 | 3 | import com.Jutuan.ConnectDB.GetConnect; 4 | import com.Jutuan.bean.Product; 5 | import org.apache.ibatis.session.SqlSession; 6 | 7 | import java.io.IOException; 8 | import java.util.ArrayList; 9 | import java.util.List; 10 | /** 11 | * 商品Dao类 12 | * @author Administrator 13 | * 14 | */ 15 | public class ProductDao { 16 | /** 17 | * 增加商品 18 | * 19 | * @param product 20 | */ 21 | public void save(Product product) { 22 | // TODO Auto-generated method stub 23 | GetConnect connerctDB = new GetConnect(); 24 | SqlSession sqlSession = null; 25 | try { 26 | // 获取sqlsession对象 27 | sqlSession = connerctDB.getSqlSession(); 28 | // 执行sql语句 29 | sqlSession.insert("ProductOpera.save", product); 30 | // 提交事务 31 | sqlSession.commit(); 32 | } catch (IOException e) { 33 | // TODO Auto-generated catch block 34 | e.printStackTrace(); 35 | } finally { 36 | if (sqlSession != null) { 37 | sqlSession.close(); 38 | } 39 | } 40 | } 41 | 42 | 43 | 44 | /** 45 | * 查询商品 46 | * 47 | * @return 48 | */ 49 | public Product getProductById(String pid) { 50 | // 实例化ConnectDB对象 51 | 52 | GetConnect connerctDB = new GetConnect(); 53 | // 接受查询返回值 54 | Product product= new Product(); 55 | SqlSession sqlSession = null; 56 | try { 57 | // 获取SqlSession对象 58 | sqlSession = connerctDB.getSqlSession(); 59 | // 执行Sql语句 60 | product = sqlSession.selectOne("ProductOpera.getProductById",pid); 61 | } catch (IOException e) { 62 | // TODO Auto-generated catch block 63 | e.printStackTrace(); 64 | } finally { 65 | if (sqlSession != null) { 66 | sqlSession.close(); 67 | } 68 | } 69 | return product; 70 | 71 | } 72 | 73 | 74 | /** 75 | * 查询所有商品 76 | * 77 | * @return 78 | */ 79 | public List queryAll() { 80 | // 实例化ConnectDB对象 81 | 82 | GetConnect connerctDB = new GetConnect(); 83 | // 接受查询返回值 84 | List list = new ArrayList(); 85 | SqlSession sqlSession = null; 86 | try { 87 | // 获取SqlSession对象 88 | sqlSession = connerctDB.getSqlSession(); 89 | // 执行Sql语句 90 | list = sqlSession.selectList("ProductOpera.queryAll"); 91 | } catch (IOException e) { 92 | // TODO Auto-generated catch block 93 | e.printStackTrace(); 94 | } finally { 95 | if (sqlSession != null) { 96 | sqlSession.close(); 97 | } 98 | } 99 | return list; 100 | 101 | } 102 | 103 | /** 104 | * 减少商品库存 105 | * 106 | * @param pro 107 | */ 108 | public void decreaseCount(Product pro) { 109 | // TODO Auto-generated method stub 110 | GetConnect connerctDB = new GetConnect(); 111 | SqlSession sqlSession = null; 112 | try { 113 | // 获取sqlsession对象 114 | sqlSession = connerctDB.getSqlSession(); 115 | // 执行sql语句 116 | System.out.println(pro.toString()); 117 | sqlSession.update("ProductOpera.decreaseCount", pro); 118 | // 提交事务 119 | sqlSession.commit(); 120 | } catch (IOException e) { 121 | // TODO Auto-generated catch block 122 | e.printStackTrace(); 123 | } finally { 124 | if (sqlSession != null) { 125 | sqlSession.close(); 126 | } 127 | } 128 | } 129 | 130 | public void delProduct(String pid) { 131 | // TODO Auto-generated method stub 132 | GetConnect connerctDB = new GetConnect(); 133 | SqlSession sqlSession = null; 134 | try { 135 | // 获取sqlsession对象 136 | sqlSession = connerctDB.getSqlSession(); 137 | // 执行sql语句 138 | sqlSession.update("ProductOpera.del", pid); 139 | // 提交事务 140 | sqlSession.commit(); 141 | } catch (IOException e) { 142 | // TODO Auto-generated catch block 143 | e.printStackTrace(); 144 | } finally { 145 | if (sqlSession != null) { 146 | sqlSession.close(); 147 | } 148 | } 149 | } 150 | 151 | } 152 | -------------------------------------------------------------------------------- /src/com/Jutuan/service/OrderService.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.service; 2 | 3 | import java.text.SimpleDateFormat; 4 | import java.util.Date; 5 | import java.util.List; 6 | import java.util.UUID; 7 | 8 | import com.Jutuan.bean.Orders; 9 | import com.Jutuan.bean.Product; 10 | import com.Jutuan.bean.Users; 11 | import com.Jutuan.dao.OrderDao; 12 | import com.Jutuan.dao.ProductDao; 13 | 14 | /** 15 | * 订单业务类 16 | * 17 | * @author Administrator 18 | * 19 | */ 20 | public class OrderService { 21 | private OrderDao orderDao = new OrderDao(); 22 | 23 | private ProductDao productDao = new ProductDao(); 24 | 25 | /** 26 | * 增加订单 27 | * 28 | * @param product 29 | * @param sum 30 | * @param user 31 | */ 32 | public void save(Product product, String sum,String address, String user) { 33 | // TODO Auto-generated method stub 34 | Orders order = new Orders(); 35 | 36 | order.setUsername(user); 37 | 38 | order.setPid(product.getPid()); 39 | order.setPname(product.getPname()); 40 | 41 | order.setAddress(address); 42 | 43 | order.setOrdertime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); 44 | 45 | order.setOcount(Integer.parseInt(sum)); 46 | float price = (float) (Integer.parseInt(sum) * product.getShop_price()); 47 | order.setOprice(price); 48 | 49 | order.setOrdernum(new SimpleDateFormat("yyyyMMddHHmmss").format(new Date()).toString() 50 | + UUID.randomUUID().toString().substring(0, 18)); 51 | 52 | order.setPdesc(""); 53 | 54 | // 商品减少库存 55 | 56 | product.setCount(product.getCount() - Integer.parseInt(sum)); 57 | 58 | productDao.decreaseCount(product); 59 | 60 | orderDao.save(order); 61 | 62 | } 63 | 64 | /** 65 | * 查询订单 66 | * 67 | * @return 68 | */ 69 | 70 | public List queryAll() { 71 | // TODO Auto-generated method stub 72 | return orderDao.queryAll(); 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /src/com/Jutuan/service/ProductService.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.service; 2 | 3 | import com.Jutuan.bean.Product; 4 | import com.Jutuan.dao.FindNewProductDao; 5 | import com.Jutuan.dao.ProductDao; 6 | 7 | import java.text.SimpleDateFormat; 8 | import java.util.*; 9 | import java.util.stream.Collectors; 10 | 11 | /** 12 | * 产品业务类 13 | * 14 | * @author Administrator 15 | * 16 | */ 17 | public class ProductService { 18 | 19 | private ProductDao productDao = new ProductDao(); 20 | 21 | /** 22 | * 23 | * 查询最新商品 24 | */ 25 | public List findByNew() { 26 | FindNewProductDao findNewProductDao = new FindNewProductDao(); 27 | return findNewProductDao.findNewProductDao(); 28 | } 29 | 30 | /** 31 | * 增加产品 32 | * 33 | * @param product 34 | */ 35 | public void saveProduct(Product product) { 36 | 37 | // TODO Auto-generated method stub 38 | product.setPid(UUID.randomUUID().toString().substring(0, 32)); 39 | product.setPdate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); 40 | productDao.save(product); 41 | 42 | } 43 | public void updateProduct(Product product) { 44 | // TODO Auto-generated method stub 45 | product.setPdate(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); 46 | productDao.save(product); 47 | 48 | } 49 | 50 | 51 | 52 | /** 53 | * 得到产品 54 | * 55 | * @param pid 56 | */ 57 | public Product getProductById( String pid) { 58 | 59 | // TODO Auto-generated method stub 60 | return productDao.getProductById(pid); 61 | 62 | } 63 | 64 | 65 | /** 66 | * 查询所有产品 67 | * 68 | * @return 69 | */ 70 | public List queryAll() { 71 | // TODO Auto-generated method stub 72 | return productDao.queryAll(); 73 | } 74 | 75 | /** 76 | * 查询精选6个产品 77 | * 78 | * @return 79 | */ 80 | 81 | public List findBySelected() { 82 | // TODO Auto-generated method stub 83 | List product = productDao.queryAll(); 84 | product = product.stream() 85 | .filter(x -> x.getPflag() == 0 86 | && x.getPdate().equals(String.valueOf(new SimpleDateFormat("yyyy-MM-dd").format(new Date())))) 87 | .collect(Collectors.toList()); 88 | 89 | if (product != null && !product.isEmpty()) { 90 | if (product.size() > 6) { 91 | product = product.subList(0, 6); 92 | } 93 | return product; 94 | 95 | } else { 96 | return Collections.EMPTY_LIST; 97 | } 98 | } 99 | 100 | /** 101 | * 查询昨日6个产品 102 | * 103 | * @return 104 | */ 105 | 106 | public List findYesterdayProduct() { 107 | // TODO Auto-generated method stub 108 | List product = productDao.queryAll(); 109 | product = product.stream() 110 | .filter(x -> x.getPflag() == 0 && x.getPdate() 111 | .equals(String.valueOf(new SimpleDateFormat("yyyy-MM-dd").format(getYesterday(new Date()))))) 112 | .collect(Collectors.toList()); 113 | 114 | if (product != null && !product.isEmpty()) { 115 | if (product.size() > 6) { 116 | product = product.subList(0, 6); 117 | } 118 | return product; 119 | 120 | } else { 121 | return Collections.EMPTY_LIST; 122 | } 123 | } 124 | 125 | /** 126 | * 获得昨天日期 127 | * 128 | * @param today 129 | * @return 130 | */ 131 | private Date getYesterday(Date today) { 132 | 133 | Calendar c = Calendar.getInstance(); 134 | 135 | c.setTime(today); 136 | 137 | c.add(Calendar.DAY_OF_MONTH, -1); 138 | 139 | return c.getTime(); 140 | } 141 | 142 | } 143 | -------------------------------------------------------------------------------- /src/com/Jutuan/service/UserService.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.service; 2 | 3 | import java.util.List; 4 | 5 | import com.Jutuan.bean.Users; 6 | import com.Jutuan.dao.AddUserDao; 7 | import com.Jutuan.dao.CheckDao; 8 | import com.Jutuan.dao.CheckRegisterDao; 9 | import com.Jutuan.dao.GetUserDao; 10 | 11 | public class UserService { 12 | 13 | public int LoginInfor(String username, String passowrd) { 14 | // 实例化LoginDao对象 15 | CheckDao checkDao = new CheckDao(); 16 | // 判断账号或者密码是否为空或空格 17 | if (username == null || "".equals(username.trim()) || passowrd == null || "".equals(passowrd.trim())) { 18 | return 0; 19 | } else { 20 | return checkDao.LoginInfor(username, passowrd); 21 | } 22 | } 23 | 24 | /** 25 | * 调用AddUserDao 26 | */ 27 | public void AddUser(String username, String password, String email, String name, String telephone, String sex, 28 | String birthday) { 29 | // 实例化Users对象 30 | Users user = new Users(); 31 | // 实例化AddUserDao 32 | AddUserDao addUserDao = new AddUserDao(); 33 | // 设置user的值 34 | user.setUsername(username); 35 | user.setPassword(password); 36 | user.setEmail(email); 37 | user.setName(name); 38 | user.setTelephone(telephone); 39 | user.setSex(sex); 40 | user.setBirthday(birthday); 41 | user.setRole(2); 42 | // 调用AddUser()方法 43 | addUserDao.AddUser(user); 44 | } 45 | 46 | /** 47 | * 调用GetUserNameDao 48 | */ 49 | public List GetUserName(String username) { 50 | // 实例化GetUserNameDao 51 | GetUserDao getUserNameDao = new GetUserDao(); 52 | 53 | // 调用AddUser()方法 54 | return getUserNameDao.GetUserName(username); 55 | } 56 | 57 | public int CheckRegister(String username) { 58 | // 1.根据用户名查询用户对象 59 | CheckRegisterDao checkRegisterDao = new CheckRegisterDao(); 60 | int a = checkRegisterDao.CheckRegister(username); 61 | // 判断u是否为null 62 | if (a != 0) { 63 | // 用户名存在,注册失败 64 | return a; 65 | } 66 | return a; 67 | } 68 | 69 | public void updateAddress(String username, List list) { 70 | // TODO Auto-generated method stub 71 | GetUserDao getUserNameDao = new GetUserDao(); 72 | 73 | String address = ""; 74 | for (String str : list) { 75 | address =address+str+"###"; 76 | } 77 | ; 78 | 79 | getUserNameDao.updateAddress(username, address); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/AddAddressServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import java.util.Arrays; 6 | import java.util.List; 7 | 8 | import javax.servlet.ServletException; 9 | import javax.servlet.annotation.WebServlet; 10 | import javax.servlet.http.HttpServlet; 11 | import javax.servlet.http.HttpServletRequest; 12 | import javax.servlet.http.HttpServletResponse; 13 | 14 | import com.Jutuan.service.UserService; 15 | 16 | /** 17 | * Servlet implementation class AddAddressServlet 18 | */ 19 | @WebServlet("/AddAddressServlet") 20 | public class AddAddressServlet extends HttpServlet { 21 | private static final long serialVersionUID = 1L; 22 | 23 | /** 24 | * @see HttpServlet#HttpServlet() 25 | */ 26 | public AddAddressServlet() { 27 | super(); 28 | // TODO Auto-generated constructor stub 29 | } 30 | 31 | /** 32 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) 33 | */ 34 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 35 | // TODO Auto-generated method stub 36 | // 接收中文乱码处理 37 | request.setCharacterEncoding("UTF-8"); 38 | // 响应中文乱码处理 39 | response.setContentType("text/html; charset=UTF-8"); 40 | 41 | String newaddress=request.getParameter("address"); 42 | String username=(String) request.getSession().getAttribute("username"); 43 | 44 | UserService userService=new UserService(); 45 | String oldaddress=(String) request.getAttribute("address"); 46 | List list=(List) request.getSession().getAttribute("address"); 47 | List arrList=null; 48 | if(list!=null&&!list.isEmpty()) { 49 | arrList = new ArrayList(list); 50 | arrList.add(newaddress); 51 | }else { 52 | list=new ArrayList(); 53 | arrList = new ArrayList(list); 54 | arrList.add(newaddress); 55 | 56 | } 57 | userService.updateAddress(username,arrList); 58 | 59 | request.getSession().setAttribute("address",arrList); 60 | 61 | String pid = request.getParameter("pid"); 62 | String sum = request.getParameter("sum"); 63 | 64 | request.setAttribute("pid", pid); 65 | request.setAttribute("sum", sum); 66 | 67 | request.getRequestDispatcher("detailmyaddress.jsp").forward(request, response); 68 | } 69 | 70 | /** 71 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) 72 | */ 73 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 74 | // TODO Auto-generated method stub 75 | doGet(request, response); 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/AddToCartServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import javax.servlet.http.HttpServletRequest; 4 | import javax.servlet.http.HttpServletResponse; 5 | import javax.servlet.http.HttpSession; 6 | 7 | import com.Jutuan.bean.Product; 8 | import com.Jutuan.bean.ShopCart; 9 | import com.Jutuan.service.ProductService; 10 | 11 | import java.text.SimpleDateFormat; 12 | import java.util.*; 13 | import java.util.stream.Collectors; 14 | import java.util.stream.Stream; 15 | 16 | import java.io.IOException; 17 | import javax.servlet.ServletException; 18 | import javax.servlet.annotation.WebServlet; 19 | import javax.servlet.http.HttpServlet; 20 | import javax.servlet.http.HttpServletRequest; 21 | import javax.servlet.http.HttpServletResponse; 22 | 23 | /** 24 | * Servlet implementation class AddToCartServlet 25 | */ 26 | @WebServlet("/AddToCartServlet") 27 | public class AddToCartServlet extends HttpServlet { 28 | private static final long serialVersionUID = 1L; 29 | private ProductService productService = new ProductService(); 30 | 31 | /** 32 | * @see HttpServlet#HttpServlet() 33 | */ 34 | public AddToCartServlet() { 35 | super(); 36 | // TODO Auto-generated constructor stub 37 | } 38 | 39 | /** 40 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse 41 | * response) 42 | */ 43 | protected void doGet(HttpServletRequest request, HttpServletResponse response) 44 | throws ServletException, IOException { 45 | // TODO Auto-generated method stub 46 | 47 | List list = this.productService.queryAll(); 48 | 49 | // TODO Auto-generated method stub 50 | String pid = String.valueOf(request.getParameter("pid")); 51 | 52 | Integer sum = Integer.parseInt(String.valueOf(request.getParameter("sum"))); 53 | 54 | HttpSession session = request.getSession(); 55 | 56 | Map cartMapSession = (Map) session.getAttribute("cartMap"); 57 | 58 | if (null == cartMapSession) { 59 | cartMapSession = new HashMap(); 60 | 61 | Product book = list.stream().filter(x -> x.getPid().equals(pid)).collect(Collectors.toList()).get(0); 62 | 63 | ShopCart bookShopCart = new ShopCart(book, sum); 64 | 65 | cartMapSession.put(pid, bookShopCart); 66 | 67 | System.out.println(book); 68 | 69 | session.setAttribute("cartMap", cartMapSession); 70 | 71 | } else { 72 | // 已经存在过相关数据 73 | ShopCart bookshopCart = cartMapSession.get(pid); 74 | if (null == bookshopCart) { 75 | Product book = list.stream().filter(x -> x.getPid().equals(pid)).collect(Collectors.toList()).get(0); 76 | ShopCart bookShopCart = new ShopCart(book, sum); 77 | System.out.println(book); 78 | cartMapSession.put(pid, bookShopCart); 79 | 80 | session.setAttribute("cartMap", cartMapSession); 81 | } else { 82 | 83 | int sumOld = bookshopCart.getSum(); 84 | 85 | bookshopCart.setSum(sumOld + sum); 86 | 87 | cartMapSession.put(pid, bookshopCart); 88 | session.setAttribute("cartMap", cartMapSession); 89 | 90 | } 91 | } 92 | 93 | try { 94 | response.getOutputStream().print("success"); 95 | } catch (Exception e) { 96 | // TODO Auto-generated catch block 97 | 98 | } finally { 99 | 100 | } 101 | } 102 | 103 | /** 104 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse 105 | * response) 106 | */ 107 | protected void doPost(HttpServletRequest request, HttpServletResponse response) 108 | throws ServletException, IOException { 109 | // TODO Auto-generated method stub 110 | doGet(request, response); 111 | } 112 | 113 | } 114 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/CheckCodeServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.awt.Color; 4 | import java.awt.Font; 5 | import java.awt.Graphics; 6 | import java.awt.image.BufferedImage; 7 | import java.io.IOException; 8 | import java.util.Random; 9 | 10 | import javax.imageio.ImageIO; 11 | import javax.servlet.ServletException; 12 | import javax.servlet.annotation.WebServlet; 13 | import javax.servlet.http.HttpServlet; 14 | import javax.servlet.http.HttpServletRequest; 15 | import javax.servlet.http.HttpServletResponse; 16 | 17 | /** 18 | * 验证码 19 | */ 20 | @WebServlet("/checkCode") 21 | public class CheckCodeServlet extends HttpServlet { 22 | public void doGet(HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException { 23 | 24 | //服务器通知浏览器不要缓存 25 | response.setHeader("pragma","no-cache"); 26 | response.setHeader("cache-control","no-cache"); 27 | response.setHeader("expires","0"); 28 | 29 | //在内存中创建一个长80,宽30的图片,默认黑色背景 30 | //参数一:长 31 | //参数二:宽 32 | //参数三:颜色 33 | int width = 80; 34 | int height = 30; 35 | BufferedImage image = new BufferedImage(width,height,BufferedImage.TYPE_INT_RGB); 36 | 37 | //获取画笔 38 | Graphics g = image.getGraphics(); 39 | //设置画笔颜色为灰色 40 | g.setColor(Color.GRAY); 41 | //填充图片 42 | g.fillRect(0,0, width,height); 43 | 44 | //产生4个随机验证码,12Ey 45 | String checkCode = getCheckCode(); 46 | //将验证码放入HttpSession中 47 | request.getSession().setAttribute("CHECKCODE_SERVER",checkCode); 48 | 49 | //设置画笔颜色为黄色 50 | g.setColor(Color.YELLOW); 51 | //设置字体的小大 52 | g.setFont(new Font("黑体",Font.BOLD,24)); 53 | //向图片上写入验证码 54 | g.drawString(checkCode,15,25); 55 | 56 | //将内存中的图片输出到浏览器 57 | //参数一:图片对象 58 | //参数二:图片的格式,如PNG,JPG,GIF 59 | //参数三:图片输出到哪里去 60 | ImageIO.write(image,"PNG",response.getOutputStream()); 61 | } 62 | /** 63 | * 产生4位随机字符串 64 | */ 65 | private String getCheckCode() { 66 | String base = "0123456789ABCDEFGabcdefg"; 67 | int size = base.length(); 68 | Random r = new Random(); 69 | StringBuffer sb = new StringBuffer(); 70 | for(int i=1;i<=4;i++){ 71 | //产生0到size-1的随机值 72 | int index = r.nextInt(size); 73 | //在base字符串中获取下标为index的字符 74 | char c = base.charAt(index); 75 | //将c放入到StringBuffer中去 76 | sb.append(c); 77 | } 78 | return sb.toString(); 79 | } 80 | public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 81 | this.doGet(request,response); 82 | } 83 | } 84 | 85 | 86 | 87 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/DelProductServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | import javax.servlet.http.HttpServlet; 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | 9 | import com.Jutuan.dao.ProductDao; 10 | 11 | /** 12 | * Servlet implementation class DelProductServlet 13 | */ 14 | public class DelProductServlet extends HttpServlet { 15 | private static final long serialVersionUID = 1L; 16 | 17 | /** 18 | * @see HttpServlet#HttpServlet() 19 | */ 20 | public DelProductServlet() { 21 | super(); 22 | // TODO Auto-generated constructor stub 23 | } 24 | 25 | /** 26 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) 27 | */ 28 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 29 | // TODO Auto-generated method stub 30 | 31 | new ProductDao().delProduct(request.getParameter("pid")); 32 | request.getRequestDispatcher("FindAllProductServlet").forward(request, response); 33 | 34 | } 35 | 36 | /** 37 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) 38 | */ 39 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 40 | // TODO Auto-generated method stub 41 | doGet(request, response); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/EditProductServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import com.Jutuan.bean.Product; 4 | import com.Jutuan.service.ProductService; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.annotation.WebServlet; 8 | import javax.servlet.http.HttpServlet; 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpServletResponse; 11 | import java.io.IOException; 12 | 13 | /** 14 | * Servlet implementation class FindAllProductServlet 15 | * 查询所有商品servlet 16 | */ 17 | @WebServlet("/EditProductServlet") 18 | public class EditProductServlet extends HttpServlet { 19 | private static final long serialVersionUID = 1L; 20 | 21 | /** 22 | * @see HttpServlet#HttpServlet() 23 | */ 24 | public EditProductServlet() { 25 | super(); 26 | // TODO Auto-generated constructor stub 27 | } 28 | 29 | /** 30 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse 31 | * response) 32 | */ 33 | protected void doGet(HttpServletRequest request, HttpServletResponse response) 34 | throws ServletException, IOException { 35 | // TODO Auto-generated method stub 36 | ProductService productSerivce = new ProductService(); 37 | Product product = productSerivce.getProductById(request.getParameter("pid")); 38 | request.setAttribute("product", product); 39 | 40 | request.getRequestDispatcher("/admin/editpro.jsp").forward(request, response); 41 | } 42 | 43 | /** 44 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse 45 | * response) 46 | */ 47 | protected void doPost(HttpServletRequest request, HttpServletResponse response) 48 | throws ServletException, IOException { 49 | // TODO Auto-generated method stub 50 | doGet(request, response); 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/ExitServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import javax.servlet.ServletException; 4 | import javax.servlet.annotation.WebServlet; 5 | import javax.servlet.http.HttpServlet; 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import java.io.IOException; 9 | 10 | @WebServlet("/exitServlet") 11 | public class ExitServlet extends HttpServlet { 12 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 13 | //1.销毁session 14 | request.getSession().invalidate(); 15 | 16 | //2.跳转登录页面 17 | response.sendRedirect(request.getContextPath()+"/login.jsp"); 18 | } 19 | 20 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 21 | this.doPost(request, response); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/FindAllOrdersGetSumServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import java.util.List; 5 | import java.util.stream.Collectors; 6 | 7 | import javax.servlet.ServletException; 8 | import javax.servlet.annotation.WebServlet; 9 | import javax.servlet.http.HttpServlet; 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | 13 | import com.Jutuan.bean.Orders; 14 | import com.Jutuan.bean.ProOrdSum; 15 | import com.Jutuan.bean.Product; 16 | import com.Jutuan.service.OrderService; 17 | import com.Jutuan.service.ProductService; 18 | 19 | /** 20 | * Servlet implementation class FindAllOrdersGetSumServlet 21 | * 商品总计servlet 22 | */ 23 | @WebServlet("/FindAllOrdersGetSumServlet") 24 | public class FindAllOrdersGetSumServlet extends HttpServlet { 25 | private static final long serialVersionUID = 1L; 26 | 27 | /** 28 | * @see HttpServlet#HttpServlet() 29 | */ 30 | public FindAllOrdersGetSumServlet() { 31 | super(); 32 | // TODO Auto-generated constructor stub 33 | } 34 | 35 | /** 36 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) 37 | */ 38 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 39 | // TODO Auto-generated method stub 40 | ProductService productSerivce = new ProductService(); 41 | List listPro = productSerivce.queryAll(); 42 | 43 | OrderService orderService=new OrderService(); 44 | //查询所有订单 45 | ListlistOrd=orderService.queryAll(); 46 | //订单统计商品购买数量 47 | ListlistSum=listPro.stream().map(pro->{ 48 | ProOrdSum proOrdSum=new ProOrdSum(); 49 | proOrdSum.setProduct(pro); 50 | 51 | int sum=0; 52 | for(int i=0;ilist=orderService.queryAll(); 39 | request.setAttribute("list", list); 40 | request.getRequestDispatcher("/admin/listorders.jsp").forward(request, response); 41 | } 42 | 43 | /** 44 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) 45 | */ 46 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 47 | // TODO Auto-generated method stub 48 | doGet(request, response); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/FindAllProductServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import java.util.List; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.annotation.WebServlet; 8 | import javax.servlet.http.HttpServlet; 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpServletResponse; 11 | 12 | import com.Jutuan.bean.Product; 13 | import com.Jutuan.service.ProductService; 14 | 15 | /** 16 | * Servlet implementation class FindAllProductServlet 17 | * 查询所有商品servlet 18 | */ 19 | @WebServlet("/FindAllProductServlet") 20 | public class FindAllProductServlet extends HttpServlet { 21 | private static final long serialVersionUID = 1L; 22 | 23 | /** 24 | * @see HttpServlet#HttpServlet() 25 | */ 26 | public FindAllProductServlet() { 27 | super(); 28 | // TODO Auto-generated constructor stub 29 | } 30 | 31 | /** 32 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse 33 | * response) 34 | */ 35 | protected void doGet(HttpServletRequest request, HttpServletResponse response) 36 | throws ServletException, IOException { 37 | // TODO Auto-generated method stub 38 | ProductService productSerivce = new ProductService(); 39 | List list = productSerivce.queryAll(); 40 | request.setAttribute("list", list); 41 | 42 | request.getRequestDispatcher("/admin/listpro.jsp").forward(request, response); 43 | } 44 | 45 | /** 46 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse 47 | * response) 48 | */ 49 | protected void doPost(HttpServletRequest request, HttpServletResponse response) 50 | throws ServletException, IOException { 51 | // TODO Auto-generated method stub 52 | doGet(request, response); 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/FindDetailServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import java.text.SimpleDateFormat; 5 | import java.util.Arrays; 6 | import java.util.Date; 7 | import java.util.HashMap; 8 | import java.util.List; 9 | import java.util.Map; 10 | import java.util.stream.Collectors; 11 | 12 | import javax.servlet.ServletException; 13 | import javax.servlet.annotation.WebServlet; 14 | import javax.servlet.http.HttpServlet; 15 | import javax.servlet.http.HttpServletRequest; 16 | import javax.servlet.http.HttpServletResponse; 17 | 18 | import com.Jutuan.bean.Product; 19 | import com.Jutuan.service.ProductService; 20 | 21 | /** 22 | * Servlet implementation class FindDetailServlet 23 | * 查询商品细节servet 24 | */ 25 | @WebServlet("/FindDetailServlet") 26 | public class FindDetailServlet extends HttpServlet { 27 | private static final long serialVersionUID = 1L; 28 | 29 | /** 30 | * @see HttpServlet#HttpServlet() 31 | */ 32 | public FindDetailServlet() { 33 | super(); 34 | // TODO Auto-generated constructor stub 35 | } 36 | 37 | /** 38 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) 39 | */ 40 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 41 | // TODO Auto-generated method stub 42 | String pid=request.getParameter("pid"); 43 | ProductService productSerivce = new ProductService(); 44 | List list = productSerivce.queryAll(); 45 | Product product=list.stream().filter(x->x.getPid().equals(pid)).collect(Collectors.toList()).get(0); 46 | List listStr=Arrays.asList(product.getPdesc().split("。")); 47 | //浏览计数,获取application域对象。计数和商品的数据结构Map key->商品id,value->商品数量 48 | Map map=(Map) request.getServletContext().getAttribute("seeSum"); 49 | int sumSee=1; 50 | if(map!=null) { 51 | Integer sum=map.get(pid); 52 | if(null!=sum) { 53 | map.put(pid, ++sum); 54 | sumSee=sum; 55 | }else { 56 | map.put(pid, 1); 57 | } 58 | }else { 59 | map=new HashMap<>(); 60 | map.put(pid, 1); 61 | } 62 | request.getServletContext().setAttribute("seeSum", map); 63 | request.setAttribute("sum", sumSee); 64 | request.setAttribute("v", product); 65 | request.setAttribute("listStr", listStr); 66 | //根据商品是否今日上线来判断是否可购买 67 | request.setAttribute("canby", product.getPdate().equals(new SimpleDateFormat("yyyy-MM-dd").format(new Date()).toString())?"yes":"no"); 68 | request.getRequestDispatcher("/admin/detailpro.jsp").forward(request, response); 69 | } 70 | 71 | /** 72 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) 73 | */ 74 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 75 | // TODO Auto-generated method stub 76 | doGet(request, response); 77 | } 78 | 79 | } 80 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/FindProSelectedServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | import javax.servlet.annotation.WebServlet; 6 | import javax.servlet.http.HttpServlet; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | /** 11 | * Servlet implementation class FindProSelectedServlet 12 | */ 13 | @WebServlet("/FindProSelectedServlet") 14 | public class FindProSelectedServlet extends HttpServlet { 15 | private static final long serialVersionUID = 1L; 16 | 17 | /** 18 | * @see HttpServlet#HttpServlet() 19 | */ 20 | public FindProSelectedServlet() { 21 | super(); 22 | // TODO Auto-generated constructor stub 23 | } 24 | 25 | /** 26 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse 27 | * response) 28 | */ 29 | protected void doGet(HttpServletRequest request, HttpServletResponse response) 30 | throws ServletException, IOException { 31 | // TODO Auto-generated method stub 32 | response.getWriter().append("Served at: ").append(request.getContextPath()); 33 | } 34 | 35 | /** 36 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse 37 | * response) 38 | */ 39 | protected void doPost(HttpServletRequest request, HttpServletResponse response) 40 | throws ServletException, IOException { 41 | // TODO Auto-generated method stub 42 | doGet(request, response); 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/FindUserServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | import javax.servlet.annotation.WebServlet; 6 | import javax.servlet.http.HttpServlet; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | import com.alibaba.fastjson.JSON; 11 | 12 | 13 | /** 14 | * Servlet implementation class FindUserServlet 15 | */ 16 | //@WebServlet("/findUserServlet") 17 | public class FindUserServlet extends HttpServlet { 18 | private static final long serialVersionUID = 1L; 19 | 20 | /** 21 | * @see HttpServlet#HttpServlet() 22 | */ 23 | public FindUserServlet() { 24 | super(); 25 | // TODO Auto-generated constructor stub 26 | } 27 | 28 | /** 29 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) 30 | */ 31 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 32 | // TODO Auto-generated method stub 33 | //从session中获取登录用户 34 | String user = (String) request.getSession().getAttribute("user"); 35 | 36 | //设置content-type 37 | if(user != null || "".equals(user)) 38 | response.setContentType("text/html; charset=UTF-8"); 39 | response.getWriter().write(user); 40 | 41 | } 42 | 43 | /** 44 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) 45 | */ 46 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 47 | // TODO Auto-generated method stub 48 | doGet(request, response); 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/GetMyAddressServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | import javax.servlet.annotation.WebServlet; 6 | import javax.servlet.http.HttpServlet; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | /** 11 | * Servlet implementation class GetMyAddressServlet 12 | */ 13 | @WebServlet("/GetMyAddressServlet") 14 | public class GetMyAddressServlet extends HttpServlet { 15 | private static final long serialVersionUID = 1L; 16 | 17 | /** 18 | * @see HttpServlet#HttpServlet() 19 | */ 20 | public GetMyAddressServlet() { 21 | super(); 22 | // TODO Auto-generated constructor stub 23 | } 24 | 25 | /** 26 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) 27 | */ 28 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 29 | // TODO Auto-generated method stub 30 | response.getWriter().append("Served at: ").append(request.getContextPath()); 31 | } 32 | 33 | /** 34 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) 35 | */ 36 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 37 | // TODO Auto-generated method stub 38 | doGet(request, response); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/IndexListener.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.util.Calendar; 4 | import java.util.Date; 5 | import java.util.Timer; 6 | 7 | import javax.servlet.ServletContextEvent; 8 | import javax.servlet.ServletContextListener; 9 | import javax.servlet.http.HttpServlet; 10 | /** 11 | * 监听器,监听0点任务 12 | * @author Administrator 13 | * 14 | */ 15 | public class IndexListener implements ServletContextListener { 16 | private java.util.Timer timer = null; 17 | private static final long PERIOD_DAY = 24 * 60 * 60 * 1000; 18 | 19 | @Override 20 | public void contextInitialized(ServletContextEvent sce) { 21 | //获取0点0分0秒的Date 22 | Calendar calendar = Calendar.getInstance(); 23 | calendar.set(Calendar.HOUR_OF_DAY, 1); 24 | calendar.set(Calendar.MINUTE, 0); 25 | calendar.set(Calendar.SECOND, 0); 26 | Date date = calendar.getTime(); 27 | if (date.before(new Date())) { 28 | date = this.addDay(date, 1); 29 | } 30 | timer = new java.util.Timer(true); 31 | sce.getServletContext().log("initializing task..."); 32 | //开启task 设置task的schedule 33 | timer.schedule(new IndexTask(sce.getServletContext()), PERIOD_DAY); 34 | } 35 | 36 | @Override 37 | public void contextDestroyed(ServletContextEvent sce) { 38 | sce.getServletContext().log("system core auto task ended."); 39 | timer.cancel(); 40 | } 41 | //Date增加一日方法 42 | public Date addDay(Date date, int num) { 43 | Calendar startDT = Calendar.getInstance(); 44 | startDT.setTime(date); 45 | startDT.add(Calendar.DAY_OF_MONTH, num); 46 | return startDT.getTime(); 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/IndexServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import java.util.List; 5 | 6 | import javax.servlet.ServletException; 7 | import javax.servlet.annotation.WebServlet; 8 | import javax.servlet.http.HttpServlet; 9 | import javax.servlet.http.HttpServletRequest; 10 | import javax.servlet.http.HttpServletResponse; 11 | 12 | import com.Jutuan.bean.Product; 13 | import com.Jutuan.service.ProductService; 14 | 15 | /** 16 | * Servlet implementation class IndexServlet 17 | * 进入首页servlet 18 | */ 19 | @WebServlet("/IndexServlet") 20 | public class IndexServlet extends HttpServlet { 21 | private static final long serialVersionUID = 1L; 22 | 23 | /** 24 | * @see HttpServlet#HttpServlet() 25 | */ 26 | public IndexServlet() { 27 | super(); 28 | // TODO Auto-generated constructor stub 29 | } 30 | 31 | /** 32 | * @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response) 33 | */ 34 | protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 35 | ProductService productService = new ProductService(); 36 | List newList = productService.findBySelected(); 37 | List yesterdayListPro = productService.findYesterdayProduct(); 38 | 39 | request.getSession().setAttribute("newList", newList); 40 | request.getSession().setAttribute("yesterdayListPro", yesterdayListPro); 41 | 42 | request.getSession().setAttribute("newListOther", 6-newList.size()); 43 | 44 | request.getSession().setAttribute("yesterdayListProOther", 6-yesterdayListPro.size()); 45 | request.getRequestDispatcher("/index.jsp").forward(request, response); 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/IndexTask.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.util.List; 4 | import java.util.TimerTask; 5 | 6 | import javax.servlet.ServletContext; 7 | import com.Jutuan.bean.Product; 8 | import com.Jutuan.service.ProductService; 9 | 10 | import com.Jutuan.bean.Product; 11 | /** 12 | * 首页刷新商品任务 13 | * @author Administrator 14 | * 15 | */ 16 | 17 | public class IndexTask extends TimerTask { 18 | private ServletContext sc = null; 19 | private static boolean running = false; 20 | 21 | // constructor method of CCoreTask 22 | public IndexTask(ServletContext sc) { 23 | this.sc = sc; 24 | } 25 | 26 | @Override 27 | public void run() { 28 | if (!running) { 29 | running = true; 30 | this.sc.log("start running IndexTask..."); 31 | //启动定时任务,0点刷新商品精选,昨日商品 32 | doTask(); 33 | running = false; 34 | this.sc.log("IndexTask runned."); 35 | } 36 | } 37 | 38 | private void doTask() { 39 | //先移除,再设置全局域对象 40 | sc.removeAttribute("newList"); 41 | sc.removeAttribute("yesterdayListPro"); 42 | sc.removeAttribute("newListOther"); 43 | sc.removeAttribute("yesterdayListProOther"); 44 | ProductService productService = new ProductService(); 45 | 46 | List newList = productService.findBySelected(); 47 | List yesterdayListPro = productService.findYesterdayProduct(); 48 | 49 | sc.setAttribute("newList", newList); 50 | sc.setAttribute("yesterdayListPro", yesterdayListPro); 51 | 52 | sc.setAttribute("newListOther", 6 - newList.size()); 53 | 54 | sc.setAttribute("yesterdayListProOther", 6 - yesterdayListPro.size()); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/LoginServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import java.util.Arrays; 6 | import java.util.List; 7 | 8 | import javax.servlet.ServletException; 9 | import javax.servlet.http.HttpServlet; 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpServletResponse; 12 | import javax.servlet.http.HttpSession; 13 | 14 | import com.Jutuan.bean.ResultInfo; 15 | import com.Jutuan.bean.Users; 16 | import com.Jutuan.service.UserService; 17 | import com.alibaba.fastjson.JSON; 18 | 19 | 20 | /** 21 | * Servlet implementation class LoginServlet 22 | */ 23 | //@WebServlet("/LoginServlet") 24 | public class LoginServlet extends HttpServlet { 25 | private static final long serialVersionUID = 1L; 26 | 27 | /** 28 | * @see HttpServlet#HttpServlet() 29 | */ 30 | public LoginServlet() { 31 | super(); 32 | // TODO Auto-generated constructor stub 33 | } 34 | 35 | /** 36 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) 37 | */ 38 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 39 | // TODO Auto-generated method stub 40 | // 接收中文乱码处理 41 | request.setCharacterEncoding("UTF-8"); 42 | // 响应中文乱码处理 43 | response.setContentType("text/html; charset=UTF-8"); 44 | 45 | //验证校验 46 | String check = request.getParameter("check"); 47 | //从sesion中获取验证码 48 | HttpSession session = request.getSession(); 49 | String checkcode_server = (String) session.getAttribute("CHECKCODE_SERVER"); 50 | session.removeAttribute("CHECKCODE_SERVER");//为了保证验证码只能使用一次 51 | //比较 52 | if(checkcode_server == null || !checkcode_server.equalsIgnoreCase(check)){ 53 | //验证码错误 54 | ResultInfo info = new ResultInfo(); 55 | //注册失败 56 | info.setFlag(false); 57 | info.setErrorMsg("验证码错误"); 58 | //将info对象序列化为json 59 | String json = JSON.toJSONString(info); 60 | response.setContentType("application/json;charset=utf-8"); 61 | response.getWriter().write(json); 62 | return; 63 | } 64 | 65 | //接受表单数据 66 | String username = request.getParameter("username"); 67 | String password = request.getParameter("password"); 68 | 69 | //接收返回值 70 | int a = 0; 71 | //调用LoginInfor()验证用户 72 | UserService usersService = new UserService(); 73 | a = usersService.LoginInfor(username, password); 74 | Users user = new Users(); 75 | 76 | List list = new ArrayList(); 77 | // 获取用户的姓名 78 | list = usersService.GetUserName(username); 79 | 80 | ResultInfo info = new ResultInfo(); 81 | if(a != 0){ 82 | //登录成功 83 | user = list.get(0); 84 | String name = user.getName(); 85 | String usernam=user.getUsername(); 86 | request.getSession().setAttribute("user", name); 87 | request.getSession().setAttribute("username", username); 88 | if(user.getAddress()!=null) { 89 | request.getSession().setAttribute("address", Arrays.asList(user.getAddress().split("###"))); 90 | } 91 | info.setFlag(true); 92 | info.setRole(user.getRole()); 93 | }else{ 94 | //登录失败 95 | info.setFlag(false); 96 | info.setErrorMsg("登录失败!"); 97 | } 98 | 99 | //将info对象序列化为json 100 | String json = JSON.toJSONString(info); 101 | 102 | //将json数据写回客户端 103 | //设置content-type 104 | response.setContentType("application/json;charset=utf-8"); 105 | response.getWriter().write(json); 106 | } 107 | 108 | 109 | /** 110 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) 111 | */ 112 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 113 | // TODO Auto-generated method stub 114 | doGet(request, response); 115 | } 116 | 117 | } 118 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/RegisterUserServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | import javax.servlet.http.HttpServlet; 6 | import javax.servlet.http.HttpServletRequest; 7 | import javax.servlet.http.HttpServletResponse; 8 | import javax.servlet.http.HttpSession; 9 | 10 | import com.Jutuan.bean.ResultInfo; 11 | 12 | import com.Jutuan.service.UserService; 13 | import com.alibaba.fastjson.JSON; 14 | 15 | /** 16 | * Servlet implementation class RegisterUserServlet 17 | */ 18 | 19 | //@WebServlet("RegisterUserServlet") 20 | public class RegisterUserServlet extends HttpServlet { 21 | private static final long serialVersionUID = 1L; 22 | 23 | /** 24 | * @see HttpServlet#HttpServlet() 25 | */ 26 | public RegisterUserServlet() { 27 | super(); 28 | // TODO Auto-generated constructor stub 29 | } 30 | 31 | /** 32 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) 33 | */ 34 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 35 | // TODO Auto-generated method stub 36 | doPost(request, response); 37 | } 38 | 39 | /** 40 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) 41 | */ 42 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 43 | // TODO Auto-generated method stub 44 | // 接收中文乱码处理 45 | request.setCharacterEncoding("UTF-8"); 46 | // 响应中文乱码处理 47 | response.setContentType("text/html; charset=UTF-8"); 48 | //验证校验 49 | String check = request.getParameter("check"); 50 | //从sesion中获取验证码 51 | HttpSession session = request.getSession(); 52 | String checkcode_server = (String) session.getAttribute("CHECKCODE_SERVER"); 53 | session.removeAttribute("CHECKCODE_SERVER");//为了保证验证码只能使用一次 54 | //比较 55 | if(checkcode_server == null || !checkcode_server.equalsIgnoreCase(check)){ 56 | //验证码错误 57 | ResultInfo info = new ResultInfo(); 58 | //注册失败 59 | info.setFlag(false); 60 | info.setErrorMsg("验证码错误"); 61 | //将info对象序列化为json 62 | String json = JSON.toJSONString(info); 63 | response.setContentType("application/json;charset=utf-8"); 64 | response.getWriter().write(json); 65 | return; 66 | } 67 | 68 | String username = request.getParameter("username"); 69 | String password = request.getParameter("password"); 70 | String email = request.getParameter("email"); 71 | String name = request.getParameter("name"); 72 | String telephone = request.getParameter("telephone"); 73 | String sex = request.getParameter("sex"); 74 | String birthday = request.getParameter("birthday"); 75 | 76 | UserService userService = new UserService(); 77 | 78 | int a = userService.CheckRegister(username); 79 | 80 | ResultInfo info = new ResultInfo(); 81 | 82 | userService.AddUser(username, password, email, name, telephone, sex, birthday); 83 | //4.响应结果 84 | if(a==0){ 85 | //注册成功 86 | info.setFlag(true); 87 | }else{ 88 | //注册失败 89 | info.setFlag(false); 90 | info.setErrorMsg("注册失败!"); 91 | } 92 | 93 | //将info对象序列化为json 94 | String json = JSON.toJSONString(info); 95 | 96 | //将json数据写回客户端 97 | //设置content-type 98 | response.setContentType("application/json;charset=utf-8"); 99 | response.getWriter().write(json); 100 | 101 | 102 | } 103 | 104 | } 105 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/SubmitOrderServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import java.text.SimpleDateFormat; 5 | import java.util.Date; 6 | import java.util.Iterator; 7 | import java.util.List; 8 | import java.util.Map; 9 | import java.util.Map.Entry; 10 | import java.util.stream.Collectors; 11 | 12 | import javax.servlet.ServletException; 13 | import javax.servlet.annotation.WebServlet; 14 | import javax.servlet.http.HttpServlet; 15 | import javax.servlet.http.HttpServletRequest; 16 | import javax.servlet.http.HttpServletResponse; 17 | 18 | import com.Jutuan.bean.Product; 19 | import com.Jutuan.bean.ShopCart; 20 | import com.Jutuan.bean.Users; 21 | import com.Jutuan.service.OrderService; 22 | import com.Jutuan.service.ProductService; 23 | 24 | /** 25 | * Servlet implementation class SubmitOrderServlet 提交订单servlet 26 | */ 27 | @WebServlet("/SubmitOrderServlet") 28 | public class SubmitOrderServlet extends HttpServlet { 29 | private static final long serialVersionUID = 1L; 30 | 31 | /** 32 | * @see HttpServlet#HttpServlet() 33 | */ 34 | public SubmitOrderServlet() { 35 | super(); 36 | // TODO Auto-generated constructor stub 37 | } 38 | 39 | /** 40 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse 41 | * response) 42 | */ 43 | protected void doGet(HttpServletRequest request, HttpServletResponse response) 44 | throws ServletException, IOException { 45 | // TODO Auto-generated method stub 46 | // 接收中文乱码处理 47 | request.setCharacterEncoding("UTF-8"); 48 | // 响应中文乱码处理 49 | response.setContentType("text/html; charset=UTF-8"); 50 | System.out.println(); 51 | Map cartMapSession = (Map) request.getSession().getAttribute("cartMap"); 52 | System.out.println("cartMapSession" + cartMapSession); 53 | if (null != cartMapSession) { 54 | 55 | Iterator> iterator = cartMapSession.entrySet().iterator(); 56 | 57 | while (iterator.hasNext()) { 58 | Entry next = iterator.next(); 59 | String pid = next.getKey(); 60 | ShopCart value = next.getValue(); 61 | String sum = String.valueOf(value.getSum()); 62 | 63 | String address = request.getParameter("address"); 64 | 65 | String user = (String) request.getSession().getAttribute("username"); 66 | 67 | ProductService productSerivce = new ProductService(); 68 | List list = productSerivce.queryAll(); 69 | // lambda获取单个商品 70 | Product product = list.stream().filter(x -> x.getPid().equals(pid)).collect(Collectors.toList()).get(0); 71 | // 查询商品是否可以购买下单 72 | boolean canByBoolean = product.getPdate() 73 | .equals(new SimpleDateFormat("yyyy-MM-dd").format(new Date()).toString()); 74 | 75 | if (canByBoolean) { 76 | OrderService orderService = new OrderService(); 77 | 78 | orderService.save(product, sum, address, user); 79 | 80 | } else { 81 | } 82 | 83 | } 84 | 85 | } 86 | 87 | request.getSession().removeAttribute("cartMap"); 88 | 89 | request.setAttribute("subOrder", "下单成功"); 90 | request.getRequestDispatcher("/mycart.jsp").forward(request, response); 91 | 92 | } 93 | 94 | /** 95 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse 96 | * response) 97 | */ 98 | protected void doPost(HttpServletRequest request, HttpServletResponse response) 99 | throws ServletException, IOException { 100 | // TODO Auto-generated method stub 101 | doGet(request, response); 102 | } 103 | 104 | } 105 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/ToAddAddressServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | import javax.servlet.annotation.WebServlet; 6 | import javax.servlet.http.HttpServlet; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | /** 11 | * Servlet implementation class ToAddAddressServlet 12 | */ 13 | @WebServlet("/ToAddAddressServlet") 14 | public class ToAddAddressServlet extends HttpServlet { 15 | private static final long serialVersionUID = 1L; 16 | 17 | /** 18 | * @see HttpServlet#HttpServlet() 19 | */ 20 | public ToAddAddressServlet() { 21 | super(); 22 | // TODO Auto-generated constructor stub 23 | } 24 | 25 | /** 26 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) 27 | */ 28 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 29 | // TODO Auto-generated method stub 30 | 31 | request.getRequestDispatcher("/detailmyaddress.jsp").forward(request, response); 32 | } 33 | 34 | /** 35 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) 36 | */ 37 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 38 | // TODO Auto-generated method stub 39 | doGet(request, response); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/ToMyOrderCart.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | import javax.servlet.annotation.WebServlet; 6 | import javax.servlet.http.HttpServlet; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | /** 11 | * Servlet implementation class ToMyOrderCart 12 | */ 13 | @WebServlet("/ToMyOrderCart") 14 | public class ToMyOrderCart extends HttpServlet { 15 | private static final long serialVersionUID = 1L; 16 | 17 | /** 18 | * @see HttpServlet#HttpServlet() 19 | */ 20 | public ToMyOrderCart() { 21 | super(); 22 | // TODO Auto-generated constructor stub 23 | } 24 | 25 | /** 26 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response) 27 | */ 28 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 29 | // TODO Auto-generated method stub 30 | request.getRequestDispatcher("/mycart.jsp").forward(request, response); 31 | } 32 | 33 | /** 34 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response) 35 | */ 36 | protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { 37 | // TODO Auto-generated method stub 38 | doGet(request, response); 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/ToMyOrderServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | import java.util.stream.Collectors; 7 | 8 | import javax.servlet.ServletException; 9 | import javax.servlet.annotation.WebServlet; 10 | import javax.servlet.http.HttpServlet; 11 | import javax.servlet.http.HttpServletRequest; 12 | import javax.servlet.http.HttpServletResponse; 13 | 14 | import com.Jutuan.bean.Orders; 15 | import com.Jutuan.service.OrderService; 16 | 17 | /** 18 | * Servlet implementation class ToMyOrderServlet 19 | */ 20 | @WebServlet("/ToMyOrderServlet") 21 | public class ToMyOrderServlet extends HttpServlet { 22 | private static final long serialVersionUID = 1L; 23 | 24 | /** 25 | * @see HttpServlet#HttpServlet() 26 | */ 27 | public ToMyOrderServlet() { 28 | super(); 29 | // TODO Auto-generated constructor stub 30 | } 31 | 32 | /** 33 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse 34 | * response) 35 | */ 36 | protected void doGet(HttpServletRequest request, HttpServletResponse response) 37 | throws ServletException, IOException { 38 | // TODO Auto-generated method stub 39 | OrderService orderService = new OrderService(); 40 | String user = (String) request.getSession().getAttribute("username"); 41 | List list = orderService.queryAll(); 42 | List listArr = new ArrayList<>(); 43 | System.out.println(user); 44 | for (int i = 0; i < list.size(); i++) { 45 | String username = list.get(i).getUsername(); 46 | System.out.println(username + "-"); 47 | if (username.equals(user)) { 48 | listArr.add(list.get(i)); 49 | } 50 | } 51 | 52 | request.setAttribute("list", listArr); 53 | 54 | request.getRequestDispatcher("/myorder.jsp").forward(request, response); 55 | } 56 | 57 | /** 58 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse 59 | * response) 60 | */ 61 | protected void doPost(HttpServletRequest request, HttpServletResponse response) 62 | throws ServletException, IOException { 63 | // TODO Auto-generated method stub 64 | doGet(request, response); 65 | } 66 | 67 | } 68 | -------------------------------------------------------------------------------- /src/com/Jutuan/servlet/UploadImgServlet.java: -------------------------------------------------------------------------------- 1 | package com.Jutuan.servlet; 2 | 3 | import java.io.IOException; 4 | import javax.servlet.ServletException; 5 | import javax.servlet.annotation.WebServlet; 6 | import javax.servlet.http.HttpServlet; 7 | import javax.servlet.http.HttpServletRequest; 8 | import javax.servlet.http.HttpServletResponse; 9 | 10 | import javax.servlet.ServletConfig; 11 | import javax.servlet.ServletException; 12 | import javax.servlet.http.HttpServletRequest; 13 | import javax.servlet.http.HttpServletResponse; 14 | import javax.servlet.http.HttpSession; 15 | import java.io.FileOutputStream; 16 | import java.io.IOException; 17 | import java.io.InputStream; 18 | import java.text.DateFormat; 19 | import java.text.ParseException; 20 | import java.text.SimpleDateFormat; 21 | import java.util.*; 22 | import java.util.regex.Pattern; 23 | import java.io.File; 24 | import java.io.FileOutputStream; 25 | import org.apache.commons.fileupload.FileItem; 26 | import org.apache.commons.fileupload.disk.DiskFileItemFactory; 27 | import org.apache.commons.fileupload.servlet.ServletFileUpload; 28 | 29 | /** 30 | * Servlet implementation class UploadImgServlet 31 | * 上传商品servlet 32 | */ 33 | @WebServlet("/UploadImgServlet") 34 | public class UploadImgServlet extends HttpServlet { 35 | private static final long serialVersionUID = 1L; 36 | 37 | /** 38 | * @see HttpServlet#HttpServlet() 39 | */ 40 | public UploadImgServlet() { 41 | super(); 42 | // TODO Auto-generated constructor stub 43 | } 44 | 45 | /** 46 | * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse 47 | * response) 48 | */ 49 | protected void doGet(HttpServletRequest request, HttpServletResponse response) 50 | throws ServletException, IOException { 51 | // TODO Auto-generated method stub 52 | // 得到上传文件的保存目录,将上传的文件存放于WEB-INF目录下,不允许外界直接访问,保证上传文件的安全 53 | String savePath = this.getServletContext().getRealPath("/image"); 54 | File file = new File(savePath); 55 | // 判断上传文件的保存目录是否存在 56 | if (!file.exists() && !file.isDirectory()) { 57 | System.out.println(savePath + "目录不存在,需要创建"); 58 | // 创建目录 59 | file.mkdir(); 60 | } 61 | // 消息提示 62 | String message = ""; 63 | try { 64 | // 使用Apache文件上传组件处理文件上传步骤: 65 | // 1、创建一个DiskFileItemFactory工厂 66 | DiskFileItemFactory factory = new DiskFileItemFactory(); 67 | // 2、创建一个文件上传解析器 68 | ServletFileUpload upload = new ServletFileUpload(factory); 69 | // 解决上传文件名的中文乱码 70 | upload.setHeaderEncoding("UTF-8"); 71 | // 3、判断提交上来的数据是否是上传表单的数据 72 | if (!ServletFileUpload.isMultipartContent(request)) { 73 | // 按照传统方式获取数据 74 | return; 75 | } 76 | // 4、使用ServletFileUpload解析器解析上传数据,解析结果返回的是一个List集合,每一个FileItem对应一个Form表单的输入项 77 | List list = upload.parseRequest(request); 78 | for (FileItem item : list) { 79 | // 如果fileitem中封装的是普通输入项的数据 80 | if (item.isFormField()) { 81 | String name = item.getFieldName(); 82 | // 解决普通输入项的数据的中文乱码问题 83 | String value = item.getString("UTF-8"); 84 | // value = new String(value.getBytes("iso8859-1"),"UTF-8"); 85 | System.out.println(name + "=" + value); 86 | } else {// 如果fileitem中封装的是上传文件 87 | // 得到上传的文件名称, 88 | String filename = item.getName(); 89 | System.out.println(filename); 90 | request.getSession().setAttribute("filename", filename); 91 | 92 | if (filename == null || filename.trim().equals("")) { 93 | continue; 94 | } 95 | // 注意:不同的浏览器提交的文件名是不一样的,有些浏览器提交上来的文件名是带有路径的,如: c:\a\b\1.txt,而有些只是单纯的文件名,如:1.txt 96 | // 处理获取到的上传文件的文件名的路径部分,只保留文件名部分 97 | filename = filename.substring(filename.lastIndexOf("\\") + 1); 98 | // 获取item中的上传文件的输入流 99 | InputStream in = item.getInputStream(); 100 | // 创建一个文件输出流 101 | FileOutputStream out = new FileOutputStream(savePath + "\\" + filename); 102 | // 创建一个缓冲区 103 | byte buffer[] = new byte[1024]; 104 | // 判断输入流中的数据是否已经读完的标识 105 | int len = 0; 106 | // 循环将输入流读入到缓冲区当中,(len=in.read(buffer))>0就表示in里面还有数据 107 | while ((len = in.read(buffer)) > 0) { 108 | // 使用FileOutputStream输出流将缓冲区的数据写入到指定的目录(savePath + "\\" + filename)当中 109 | out.write(buffer, 0, len); 110 | } 111 | // 关闭输入流 112 | in.close(); 113 | // 关闭输出流 114 | out.close(); 115 | // 删除处理文件上传时生成的临时文件 116 | item.delete(); 117 | message = "文件上传成功!"; 118 | System.out.println(message); 119 | } 120 | 121 | } 122 | } catch (Exception e) { 123 | 124 | } 125 | } 126 | 127 | /** 128 | * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse 129 | * response) 130 | */ 131 | protected void doPost(HttpServletRequest request, HttpServletResponse response) 132 | throws ServletException, IOException { 133 | // TODO Auto-generated method stub 134 | doGet(request, response); 135 | } 136 | 137 | } 138 | --------------------------------------------------------------------------------