├── .DS_Store ├── .gitattributes ├── .gitignore ├── README.md ├── generatorConfig.xml ├── minority.iml ├── pom.xml ├── shop.iml └── src ├── main ├── java │ └── org │ │ └── healthbeauty │ │ ├── controller │ │ ├── admin │ │ │ ├── ActivityController.java │ │ │ ├── AdminOrderController.java │ │ │ ├── GoodsController.java │ │ │ ├── LoginController.java │ │ │ ├── UserController.java │ │ │ └── newsController.java │ │ └── front │ │ │ ├── CartController.java │ │ │ ├── ChatController.java │ │ │ ├── CustomerController.java │ │ │ ├── FrontGoodsController.java │ │ │ ├── MainController.java │ │ │ ├── OrderController.java │ │ │ └── VerificationCodeImgController.java │ │ ├── dao │ │ ├── ActivityMapper.java │ │ ├── AddressMapper.java │ │ ├── AdminMapper.java │ │ ├── CategoryMapper.java │ │ ├── ChatMapper.java │ │ ├── CommentMapper.java │ │ ├── DeliverMapper.java │ │ ├── FavoriteMapper.java │ │ ├── GoodsMapper.java │ │ ├── ImagePathMapper.java │ │ ├── OrderItemMapper.java │ │ ├── OrderMapper.java │ │ ├── ShopCartMapper.java │ │ └── UserMapper.java │ │ ├── pojo │ │ ├── Activity.java │ │ ├── ActivityExample.java │ │ ├── Address.java │ │ ├── AddressExample.java │ │ ├── Admin.java │ │ ├── AdminExample.java │ │ ├── Category.java │ │ ├── CategoryExample.java │ │ ├── Chat.java │ │ ├── ChatExample.java │ │ ├── Comment.java │ │ ├── CommentExample.java │ │ ├── Deliver.java │ │ ├── DeliverExample.java │ │ ├── Favorite.java │ │ ├── FavoriteExample.java │ │ ├── FavoriteKey.java │ │ ├── Goods.java │ │ ├── GoodsExample.java │ │ ├── GoodsPrice.java │ │ ├── ImagePath.java │ │ ├── ImagePathExample.java │ │ ├── Msg.java │ │ ├── Order.java │ │ ├── OrderExample.java │ │ ├── OrderItem.java │ │ ├── OrderItemExample.java │ │ ├── ShopCart.java │ │ ├── ShopCartExample.java │ │ ├── ShopCartKey.java │ │ ├── User.java │ │ └── UserExample.java │ │ ├── service │ │ ├── ActivityService.java │ │ ├── AddressService.java │ │ ├── AdminService.java │ │ ├── CateService.java │ │ ├── ChatService.java │ │ ├── CommentService.java │ │ ├── GoodsService.java │ │ ├── OrderService.java │ │ ├── ShopCartService.java │ │ ├── UserService.java │ │ └── impl │ │ │ ├── ActivityServiceImpl.java │ │ │ ├── AddressServiceImpl.java │ │ │ ├── AdminServiceImpl.java │ │ │ ├── CateServiceImpl.java │ │ │ ├── ChatServiceImpl.java │ │ │ ├── CommentServiceImpl.java │ │ │ ├── GoodsServiceImpl.java │ │ │ ├── OrderServiceImpl.java │ │ │ ├── ShopCartServiceImpl.java │ │ │ └── UserServiceImpl.java │ │ └── util │ │ ├── Test.java │ │ └── verificate │ │ └── Verificate.java ├── resources │ ├── applicationContext.xml │ ├── dbconfig.properties │ ├── mapper │ │ ├── ActivityMapper.xml │ │ ├── AddressMapper.xml │ │ ├── AdminMapper.xml │ │ ├── CategoryMapper.xml │ │ ├── ChatMapper.xml │ │ ├── CommentMapper.xml │ │ ├── DeliverMapper.xml │ │ ├── FavoriteMapper.xml │ │ ├── GoodsMapper.xml │ │ ├── ImagePathMapper.xml │ │ ├── OrderItemMapper.xml │ │ ├── OrderMapper.xml │ │ ├── ShopCartMapper.xml │ │ └── UserMapper.xml │ ├── mybatis-config.xml │ └── spring-mvc.xml └── webapp │ ├── WEB-INF │ ├── views │ │ ├── activity.jsp │ │ ├── addActivity.jsp │ │ ├── addCategory.jsp │ │ ├── addGoods.jsp │ │ ├── addNews.jsp │ │ ├── address.jsp │ │ ├── admin.jsp │ │ ├── adminAllGoods.jsp │ │ ├── adminAllNews.jsp │ │ ├── adminAllOrder.jsp │ │ ├── adminChat.jsp │ │ ├── adminLogin.jsp │ │ ├── adminOrderComplete.jsp │ │ ├── adminOrderNav.jsp │ │ ├── adminOrderReceive.jsp │ │ ├── category.jsp │ │ ├── chat.jsp │ │ ├── chatrobot.jsp │ │ ├── detail.jsp │ │ ├── favorite.jsp │ │ ├── footer.jsp │ │ ├── frontChat.jsp │ │ ├── goodsNav.jsp │ │ ├── header.jsp │ │ ├── information.jsp │ │ ├── list.jsp │ │ ├── login.jsp │ │ ├── main.jsp │ │ ├── news.jsp │ │ ├── newsDetail.jsp │ │ ├── orderConfirm.jsp │ │ ├── personalInfo.jsp │ │ ├── register.jsp │ │ ├── search.jsp │ │ ├── shopcart.jsp │ │ ├── sidebar.jsp │ │ ├── userManage.jsp │ │ └── verificationcodeimg.jsp │ └── web.xml │ ├── css │ ├── MaterialIcons-Regular.woff2 │ ├── bootstrap.min.css │ ├── bootstrap │ │ ├── css │ │ │ ├── bootstrap-theme.css │ │ │ ├── bootstrap-theme.css.map │ │ │ ├── bootstrap-theme.min.css │ │ │ ├── bootstrap-theme.min.css.map │ │ │ ├── bootstrap.css │ │ │ ├── bootstrap.css.map │ │ │ ├── bootstrap.min.css │ │ │ └── bootstrap.min.css.map │ │ ├── fonts │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ └── glyphicons-halflings-regular.woff2 │ │ └── js │ │ │ ├── bootstrap.js │ │ │ ├── bootstrap.min.js │ │ │ └── npm.js │ ├── chat.css │ ├── chatrobot.css │ ├── favorite.css │ ├── font-awesome.min.css │ ├── googleapis.css │ ├── icon.css │ ├── information.css │ ├── infostyle.css │ ├── login.css │ ├── main.css │ ├── material.cyan-light_blue.min.css │ ├── order.css │ ├── release.css │ ├── shopcart.css │ ├── shopdetail.css │ ├── style.css │ ├── sweetalert.css │ ├── templatemo-style.css │ └── video-js.css │ ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.svg │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ └── fontawesome-webfont.woff2 │ ├── image │ ├── 1.jpg │ ├── 11.jpg │ ├── 12.jpg │ ├── 13.jpg │ ├── 14.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 3333.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── 6.jpg │ ├── 7.jpg │ ├── 8.jpg │ ├── checkbox-radio-sheet.png │ ├── darkbg.png │ ├── head.jpg │ ├── img │ │ ├── cancel-off.png │ │ ├── cancel-on.png │ │ ├── star-half.png │ │ ├── star-off.png │ │ └── star-on.png │ ├── img01.png │ ├── img02.png │ ├── img03.png │ ├── img04.png │ ├── img05.png │ ├── kebi.jpg │ ├── login.png │ ├── login0.png │ ├── logo.jpg │ ├── register.png │ ├── register0.png │ ├── tao.jpg │ └── whitebg.png │ ├── index.jsp │ ├── js │ ├── address.js │ ├── adminchat.js │ ├── bootstrap-filestyle.min.js │ ├── categery.js │ ├── chat.js │ ├── detail.js │ ├── distpicker.js │ ├── goodsManage.js │ ├── holder.js │ ├── information.js │ ├── jquery-1.11.2.min.js │ ├── jquery-migrate-1.2.1.min.js │ ├── jquery.form.min.js │ ├── jquery.js │ ├── jquery.raty.js │ ├── jquery.validate.min.js │ ├── list.js │ ├── login.js │ ├── mqttws31.js │ ├── newsManage.js │ ├── order.js │ ├── send.js │ ├── shopcart.js │ ├── sort.js │ ├── sweetalert.min.js │ ├── templatemo-script.js │ ├── userManage.js │ ├── validate.js │ ├── video.js │ └── videojs-ie8.min.js │ └── shopimage │ ├── 0c7c33a4e6d046768a24927b6bc06ec3.jpg │ ├── 1.jpg │ ├── 12dc59840787441f8b4d0e8f8dfb8dc4.jpg │ ├── 13.jpg │ ├── 2.jpg │ ├── 3.jpg │ ├── 4.jpg │ ├── 5.jpg │ ├── 76c7a5b27d174c2f9c09b267068351d2.jpg │ ├── b4b845c8e36f4282bd3a2cd7a0131647.jpg │ ├── ball1.png │ ├── ball2.png │ ├── ball3.jpg │ ├── e51ef13962bf45aa87091478ed00ef29.jpg │ ├── maoshan1.jpg │ ├── shirt1.png │ ├── shirt2.png │ ├── shirt3.jpg │ ├── shirt4.jpg │ ├── sport wear1.png │ ├── sport2.jpg │ ├── sport3.jpg │ ├── troser1.png │ └── trouser2.png └── test └── java └── com └── neu └── shop └── mybatis ├── EnvTest.java ├── MBGTest.java └── MapperTest.java /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/.DS_Store -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | *.js linguist-language=java 2 | *.css linguist-language=java 3 | *.html linguist-language=java -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Created by .ignore support plugin (hsz.mobi) 2 | target 3 | .idea/compiler.xml 4 | .idea/workspace.xml 5 | .idea/misc.xml 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 全目录 2 | 3 | [更多系统、论文,供君选择 ~~>](https://www.yuque.com/wisebit/blog) 4 | 5 | # 49.NBAOnlineBusinessPlatformManagementSystem 6 | 7 |

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

8 |

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

9 | 10 |

49.NBA网商平台管理系统

11 | 12 | 13 |

14 | 15 | 16 | 17 | 18 |

19 | 20 | # 简介 21 | 22 | 23 | > 本代码来源于网络, 请入群(983063232)后联系群主索要sql文件! 24 | 25 | > 前端访问: http://localhost:8080/ 26 | > 后台访问: http://localhost:8080/admin/login 27 | 28 | 29 | # 环境 30 | 31 | - IntelliJ IDEA 2009.3 32 | 33 | - Mysql 5.7.26 34 | 35 | - Tomcat 7.0.73 36 | 37 | - JDK 1.8 38 | 39 | 40 | ## 缩略图 41 | 42 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/01611603-bb7e-4c68-b9aa-f63ddd05ea1d.png) 43 | 44 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/0ce40af3-4130-462a-8978-686f8d3be884.png) 45 | 46 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/7beecc00-71e4-47e6-aec2-39e3b54c16c6.png) 47 | 48 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/e3c3e3d8-c612-41dc-a414-24f6a5c95f7f.png) 49 | 50 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/c4098ea6-7cbe-41f0-af8b-0f3e5e94cf0b.png) 51 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/974dc522-ffcb-46f5-96a7-a638e1eacace.png) 52 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/637c6ca4-de15-4b16-b8cd-b07b0c796f6d.png) 53 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/89336604-d86d-4dbe-b80a-887944bf9675.png) 54 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/88db51f6-b159-4f31-bfe3-e733028be1b5.png) 55 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/049b4fb4-a883-4747-8d34-c74483f0ebd3.png) 56 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/24dd031c-f650-4d00-b9b9-e4bd19475eef.png) 57 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/3a3965ec-749c-4012-908a-42bfe062ab03.png) 58 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/952d81c7-e203-431e-b20b-e3c6b0527ab9.png) 59 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/41764a26-dbfe-4a21-9f37-b19f79dbcdaf.png) 60 | ![](https://bitwise.oss-cn-heyuan.aliyuncs.com/2024/9/10/7a3b6f08-e0e5-4746-a65f-97b398a328ad.png) 61 | 62 | -------------------------------------------------------------------------------- /generatorConfig.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 |
42 |
43 |
44 | -------------------------------------------------------------------------------- /minority.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | -------------------------------------------------------------------------------- /shop.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/controller/admin/ActivityController.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.controller.admin; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import com.github.pagehelper.PageInfo; 5 | 6 | import org.healthbeauty.pojo.*; 7 | import org.healthbeauty.service.ActivityService; 8 | import org.healthbeauty.service.GoodsService; 9 | import org.springframework.beans.factory.annotation.Autowired; 10 | import org.springframework.stereotype.Controller; 11 | import org.springframework.ui.Model; 12 | import org.springframework.web.bind.annotation.RequestMapping; 13 | import org.springframework.web.bind.annotation.RequestParam; 14 | import org.springframework.web.bind.annotation.ResponseBody; 15 | 16 | import javax.servlet.http.HttpSession; 17 | import java.util.List; 18 | 19 | @Controller 20 | @RequestMapping("/activity") 21 | public class ActivityController { 22 | 23 | @Autowired(required = false) 24 | ActivityService activityService; 25 | 26 | @Autowired(required = false) 27 | GoodsService goodsService; 28 | 29 | @RequestMapping("/show") 30 | public String showActivity(@RequestParam(value = "page",defaultValue = "1") Integer pn, Model model, HttpSession session) { 31 | 32 | Admin admin = (Admin) session.getAttribute("admin"); 33 | if (admin == null) { 34 | return "redirect:/admin/login"; 35 | } 36 | 37 | //一页显示几个数据 38 | PageHelper.startPage(pn, 10); 39 | 40 | ActivityExample activityExample = new ActivityExample(); 41 | activityExample.or(); 42 | 43 | List activityList = activityService.getAllActivity(activityExample); 44 | 45 | //显示几个页号 46 | PageInfo page = new PageInfo(activityList,5); 47 | model.addAttribute("pageInfo", page); 48 | 49 | return "activity"; 50 | } 51 | 52 | @RequestMapping("/showjson") 53 | @ResponseBody 54 | public Msg showActivityJson(@RequestParam(value = "page",defaultValue = "1") Integer pn, Model model ,HttpSession session) { 55 | 56 | Admin admin = (Admin) session.getAttribute("admin"); 57 | if (admin == null) { 58 | return Msg.fail("请先登录"); 59 | } 60 | 61 | ActivityExample activityExample = new ActivityExample(); 62 | activityExample.or(); 63 | 64 | List activityList = activityService.getAllActivity(activityExample); 65 | 66 | return Msg.success("获取活动信息成功").add("activity",activityList); 67 | } 68 | 69 | @RequestMapping("/add") 70 | public String showAddActivity(HttpSession session) { 71 | Admin admin = (Admin) session.getAttribute("admin"); 72 | if (admin == null) { 73 | return "redirect:/admin/login"; 74 | } 75 | return "addActivity"; 76 | } 77 | 78 | @RequestMapping("/addResult") 79 | public String addActivity(Activity activity) { 80 | 81 | activityService.insertActivitySelective(activity); 82 | 83 | return "redirect:/admin/activity/show"; 84 | } 85 | 86 | @RequestMapping("/update") 87 | @ResponseBody 88 | public Msg updateActivity(Integer goodsid, Integer activityid, HttpSession session) { 89 | Admin admin = (Admin) session.getAttribute("admin"); 90 | if (admin == null) { 91 | return Msg.fail("请先登录"); 92 | } 93 | Goods goods = new Goods(); 94 | goods.setActivityid(activityid); 95 | goods.setGoodsid(goodsid); 96 | goodsService.updateGoodsById(goods); 97 | return Msg.success("更新商品活动成功"); 98 | } 99 | 100 | @RequestMapping("delete") 101 | public String deleteActivity(Integer activityid, HttpSession session) { 102 | Admin admin = (Admin) session.getAttribute("admin"); 103 | if (admin == null) { 104 | return "redirect:/admin/login"; 105 | } 106 | 107 | activityService.deleteByActivityId(activityid); 108 | return "redirect:/admin/activity/show"; 109 | } 110 | } 111 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/controller/admin/LoginController.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.controller.admin; 2 | 3 | import org.healthbeauty.pojo.Admin; 4 | import org.healthbeauty.service.AdminService; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.stereotype.Controller; 7 | import org.springframework.ui.Model; 8 | import org.springframework.web.bind.annotation.RequestMapping; 9 | 10 | import javax.servlet.http.HttpServletRequest; 11 | import javax.servlet.http.HttpSession; 12 | 13 | 14 | @Controller 15 | @RequestMapping("/admin") 16 | public class LoginController { 17 | 18 | @Autowired 19 | private AdminService adminService; 20 | 21 | @RequestMapping("/login") 22 | public String adminLogin() { 23 | return "adminLogin"; 24 | } 25 | 26 | @RequestMapping("/confirmLogin") 27 | public String confirmLogin(Admin admin, Model model, HttpServletRequest request) { 28 | Admin selectAdmin = adminService.selectByName(admin); 29 | if (selectAdmin == null) { 30 | model.addAttribute("errorMsg", "用户名或密码错误"); 31 | return "adminLogin"; 32 | } else { 33 | HttpSession session = request.getSession(); 34 | session.setAttribute("admin", selectAdmin); 35 | return "redirect:/admin/user/show"; 36 | } 37 | } 38 | 39 | @RequestMapping("/logout") 40 | public String adminLogout(HttpServletRequest request) { 41 | HttpSession session = request.getSession(); 42 | session.removeAttribute("admin"); 43 | return "redirect:/admin/login"; 44 | } 45 | 46 | /*@RequestMapping("/index") 47 | public String showAdminIndex() { 48 | return "user"; 49 | }*/ 50 | } 51 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/controller/admin/UserController.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.controller.admin; 2 | 3 | import com.github.pagehelper.PageHelper; 4 | import com.github.pagehelper.PageInfo; 5 | 6 | import org.healthbeauty.pojo.*; 7 | import org.healthbeauty.service.UserService; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Controller; 10 | import org.springframework.ui.Model; 11 | import org.springframework.web.bind.annotation.*; 12 | 13 | import javax.servlet.http.HttpServletResponse; 14 | import java.util.List; 15 | 16 | 17 | @Controller 18 | @RequestMapping("/admin/user") 19 | public class UserController { 20 | 21 | @Autowired 22 | private UserService userService; 23 | 24 | @RequestMapping("/showjson") 25 | @ResponseBody 26 | public Msg getAllGoods(@RequestParam(value = "page",defaultValue = "1") Integer pn, HttpServletResponse response, Model model) { 27 | //一页显示几个数据 28 | PageHelper.startPage(pn, 10); 29 | 30 | List userList = userService.selectByExample(new UserExample()); 31 | 32 | //显示几个页号 33 | PageInfo page = new PageInfo(userList,5); 34 | 35 | /* model.addAttribute("pageInfo", page);*/ 36 | 37 | return Msg.success("查询成功!").add("pageInfo", page); 38 | } 39 | 40 | @RequestMapping("/show") 41 | public String userManage() { 42 | return "userManage"; 43 | } 44 | 45 | @RequestMapping(value = "/delete/{userid}", method = RequestMethod.DELETE) 46 | @ResponseBody 47 | public Msg deleteUser(@PathVariable("userid")Integer userid) { 48 | // goodsService.deleteGoodsById(goodsid); 49 | userService.deleteUserById(userid); 50 | return Msg.success("删除成功!"); 51 | } 52 | 53 | @RequestMapping(value = "/savepsw/{userid}", method = RequestMethod.POST) 54 | @ResponseBody 55 | public Msg savePsw(@PathVariable("userid")Integer userid,String Psw) 56 | { 57 | User user=userService.selectByPrimaryKey(userid); 58 | user.setPassword(Psw); 59 | userService.updateByPrimaryKeySelective(user); 60 | return Msg.success("修改密码成功"); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/controller/front/CartController.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.controller.front; 2 | 3 | import org.healthbeauty.pojo.*; 4 | import org.healthbeauty.service.GoodsService; 5 | import org.healthbeauty.service.ShopCartService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.web.bind.annotation.PathVariable; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.RequestMethod; 11 | import org.springframework.web.bind.annotation.ResponseBody; 12 | 13 | import javax.servlet.http.HttpServletRequest; 14 | import javax.servlet.http.HttpSession; 15 | import java.util.*; 16 | 17 | @Controller 18 | public class CartController { 19 | 20 | @Autowired 21 | private ShopCartService shopCartService; 22 | 23 | @Autowired 24 | private GoodsService goodsService; 25 | 26 | @RequestMapping("/addCart") 27 | public String addCart(ShopCart shopCart, HttpServletRequest request) { 28 | HttpSession session = request.getSession(); 29 | User user = (User) session.getAttribute("user"); 30 | if(user == null) { 31 | return "redirect:/login"; 32 | } 33 | 34 | //判断是否已经加入购物车 35 | ShopCart shopCart1 = shopCartService.selectCartByKey(new ShopCartKey(user.getUserid(), shopCart.getGoodsid())); 36 | if (shopCart1 != null) { 37 | return "redirect:/showcart"; 38 | } 39 | 40 | //用户 41 | shopCart.setUserid(user.getUserid()); 42 | 43 | //加入时间 44 | shopCart.setCatedate(new Date()); 45 | 46 | shopCartService.addShopCart(shopCart); 47 | 48 | //返回到购物车页面 49 | return "redirect:/showcart"; 50 | } 51 | 52 | @RequestMapping("/showcart") 53 | public String showCart(HttpSession session) { 54 | User user = (User) session.getAttribute("user"); 55 | if(user == null) { 56 | return "redirect:/login"; 57 | } 58 | return "shopcart"; 59 | } 60 | 61 | @RequestMapping("/cartjson") 62 | @ResponseBody 63 | public Msg getCart(HttpSession session) { 64 | User user = (User) session.getAttribute("user"); 65 | if(user == null) { 66 | return Msg.fail("请先登录"); 67 | } 68 | 69 | //获取当前用户的购物车信息 70 | ShopCartExample shopCartExample = new ShopCartExample(); 71 | shopCartExample.or().andUseridEqualTo(user.getUserid()); 72 | List shopCart = shopCartService.selectByExample(shopCartExample); 73 | 74 | //获取购物车中的商品信息 75 | List goodsAndImage = new ArrayList<>(); 76 | for (ShopCart cart:shopCart) { 77 | Goods goods = goodsService.selectById(cart.getGoodsid()); 78 | 79 | List imagePathList = goodsService.findImagePath(goods.getGoodsid()); 80 | goods.setImagePaths(imagePathList); 81 | goods.setNum(cart.getGoodsnum()); 82 | goodsAndImage.add(goods); 83 | } 84 | 85 | return Msg.success("查询成功").add("shopcart",goodsAndImage); 86 | } 87 | 88 | @RequestMapping(value = "/deleteCart/{goodsid}", method = RequestMethod.DELETE) 89 | @ResponseBody 90 | public Msg deleteCart(@PathVariable("goodsid")Integer goodsid, HttpSession session) { 91 | User user = (User) session.getAttribute("user"); 92 | if(user == null) { 93 | return Msg.fail("请先登录"); 94 | } 95 | 96 | shopCartService.deleteByKey(new ShopCartKey(user.getUserid(), goodsid)); 97 | return Msg.success("删除成功"); 98 | } 99 | 100 | @RequestMapping("/update") 101 | @ResponseBody 102 | public Msg updateCart(Integer goodsid,Integer num,HttpSession session) { 103 | User user = (User) session.getAttribute("user"); 104 | if(user == null) { 105 | return Msg.fail("请先登录"); 106 | } 107 | ShopCart shopCart = new ShopCart(); 108 | shopCart.setUserid(user.getUserid()); 109 | shopCart.setGoodsid(goodsid); 110 | shopCart.setGoodsnum(num); 111 | shopCartService.updateCartByKey(shopCart); 112 | return Msg.success("更新购物车成功"); 113 | } 114 | } 115 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/controller/front/OrderController.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.controller.front; 2 | 3 | import org.healthbeauty.pojo.*; 4 | import org.healthbeauty.service.*; 5 | import org.springframework.beans.factory.annotation.Autowired; 6 | import org.springframework.beans.factory.annotation.Value; 7 | import org.springframework.stereotype.Controller; 8 | import org.springframework.ui.Model; 9 | import org.springframework.web.bind.annotation.RequestMapping; 10 | import org.springframework.web.bind.annotation.ResponseBody; 11 | 12 | import javax.annotation.Resource; 13 | import javax.servlet.http.HttpSession; 14 | import java.math.BigDecimal; 15 | import java.util.ArrayList; 16 | import java.util.Date; 17 | import java.util.List; 18 | 19 | 20 | @Controller 21 | public class OrderController { 22 | 23 | /*@Value("#{addressService}")*/ 24 | @Autowired 25 | private AddressService addressService; 26 | 27 | @Autowired 28 | private ShopCartService shopCartService; 29 | 30 | @Autowired 31 | private GoodsService goodsService; 32 | 33 | @Autowired 34 | private OrderService orderService; 35 | 36 | @Autowired 37 | private ActivityService activityService; 38 | 39 | @RequestMapping("/order") 40 | public String showOrder(HttpSession session, Model model) { 41 | 42 | User user = (User) session.getAttribute("user"); 43 | if (user == null) { 44 | return "redirect:/login"; 45 | } 46 | 47 | //查询当前用户的收货地址 48 | AddressExample addressExample = new AddressExample(); 49 | addressExample.or().andUseridEqualTo(user.getUserid()); 50 | List
addressList = addressService.getAllAddressByExample(addressExample); 51 | 52 | model.addAttribute("address", addressList); 53 | 54 | //订单信息 55 | //获取当前用户的购物车信息 56 | ShopCartExample shopCartExample = new ShopCartExample(); 57 | shopCartExample.or().andUseridEqualTo(user.getUserid()); 58 | List shopCart = shopCartService.selectByExample(shopCartExample); 59 | 60 | //获取购物车中的商品信息 61 | List goodsAndImage = new ArrayList<>(); 62 | 63 | Float totalPrice = new Float(0); 64 | Integer oldTotalPrice = 0; 65 | 66 | for (ShopCart cart:shopCart) { 67 | Goods goods = goodsService.selectById(cart.getGoodsid()); 68 | 69 | List imagePathList = goodsService.findImagePath(goods.getGoodsid()); 70 | goods.setImagePaths(imagePathList); 71 | goods.setNum(cart.getGoodsnum()); 72 | 73 | //活动信息 74 | Activity activity = activityService.selectByKey(goods.getActivityid()); 75 | goods.setActivity(activity); 76 | 77 | if(activity.getDiscount() != 1) { 78 | goods.setNewPrice(goods.getPrice()*goods.getNum()* activity.getDiscount()); 79 | } else if(activity.getFullnum() != null) { 80 | if (goods.getNum() >= activity.getFullnum()) { 81 | goods.setNewPrice((float) (goods.getPrice()*(goods.getNum()-activity.getReducenum()))); 82 | } else { 83 | goods.setNewPrice((float) (goods.getPrice()*goods.getNum())); 84 | } 85 | } else { 86 | goods.setNewPrice((float) (goods.getPrice()*goods.getNum())); 87 | } 88 | totalPrice = totalPrice + goods.getNewPrice(); 89 | oldTotalPrice = oldTotalPrice + goods.getNum() * goods.getPrice(); 90 | goodsAndImage.add(goods); 91 | } 92 | 93 | model.addAttribute("totalPrice", totalPrice); 94 | model.addAttribute("oldTotalPrice", oldTotalPrice); 95 | model.addAttribute("goodsAndImage", goodsAndImage); 96 | 97 | return "orderConfirm"; 98 | } 99 | 100 | @RequestMapping("/orderFinish") 101 | @ResponseBody 102 | public Msg orderFinish(Float oldPrice, Float newPrice, Boolean isPay, Integer addressid,HttpSession session) { 103 | User user = (User) session.getAttribute("user"); 104 | 105 | //获取订单信息 106 | ShopCartExample shopCartExample = new ShopCartExample(); 107 | shopCartExample.or().andUseridEqualTo(user.getUserid()); 108 | List shopCart = shopCartService.selectByExample(shopCartExample); 109 | 110 | //删除购物车 111 | for (ShopCart cart : shopCart) { 112 | shopCartService.deleteByKey(new ShopCartKey(cart.getUserid(),cart.getGoodsid())); 113 | } 114 | 115 | //把订单信息写入数据库 116 | Order order = new Order(null, user.getUserid(), new Date(), oldPrice, newPrice, isPay, false, false, false, addressid,null,null); 117 | orderService.insertOrder(order); 118 | //插入的订单号 119 | Integer orderId = order.getOrderid(); 120 | 121 | //把订单项写入orderitem表中 122 | for (ShopCart cart : shopCart) { 123 | orderService.insertOrderItem(new OrderItem(null, orderId, cart.getGoodsid(), cart.getGoodsnum())); 124 | } 125 | 126 | return Msg.success("购买成功"); 127 | } 128 | 129 | } 130 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/controller/front/VerificationCodeImgController.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.controller.front; 2 | 3 | import org.springframework.stereotype.Controller; 4 | import org.springframework.web.bind.annotation.RequestMapping; 5 | import org.springframework.web.servlet.ModelAndView; 6 | 7 | 8 | @Controller 9 | public class VerificationCodeImgController { 10 | @RequestMapping("/verificationcodeimg") 11 | public ModelAndView verificationcodeimg(){ 12 | ModelAndView verificationcodeimg=new ModelAndView(); 13 | verificationcodeimg.setViewName("verificationcodeimg"); 14 | return verificationcodeimg; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/ActivityMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.Activity; 6 | import org.healthbeauty.pojo.ActivityExample; 7 | 8 | public interface ActivityMapper { 9 | long countByExample(ActivityExample example); 10 | 11 | int deleteByExample(ActivityExample example); 12 | 13 | int deleteByPrimaryKey(Integer activityid); 14 | 15 | int insert(Activity record); 16 | 17 | int insertSelective(Activity record); 18 | 19 | List selectByExample(ActivityExample example); 20 | 21 | Activity selectByPrimaryKey(Integer activityid); 22 | 23 | int updateByExampleSelective(@Param("record") Activity record, @Param("example") ActivityExample example); 24 | 25 | int updateByExample(@Param("record") Activity record, @Param("example") ActivityExample example); 26 | 27 | int updateByPrimaryKeySelective(Activity record); 28 | 29 | int updateByPrimaryKey(Activity record); 30 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/AddressMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.Address; 6 | import org.healthbeauty.pojo.AddressExample; 7 | 8 | public interface AddressMapper { 9 | long countByExample(AddressExample example); 10 | 11 | int deleteByExample(AddressExample example); 12 | 13 | int deleteByPrimaryKey(Integer addressid); 14 | 15 | int insert(Address record); 16 | 17 | int insertSelective(Address record); 18 | 19 | List
selectByExample(AddressExample example); 20 | 21 | Address selectByPrimaryKey(Integer addressid); 22 | 23 | int updateByExampleSelective(@Param("record") Address record, @Param("example") AddressExample example); 24 | 25 | int updateByExample(@Param("record") Address record, @Param("example") AddressExample example); 26 | 27 | int updateByPrimaryKeySelective(Address record); 28 | 29 | int updateByPrimaryKey(Address record); 30 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/AdminMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.Admin; 6 | import org.healthbeauty.pojo.AdminExample; 7 | 8 | public interface AdminMapper { 9 | long countByExample(AdminExample example); 10 | 11 | int deleteByExample(AdminExample example); 12 | 13 | int deleteByPrimaryKey(Integer adminid); 14 | 15 | int insert(Admin record); 16 | 17 | int insertSelective(Admin record); 18 | 19 | List selectByExample(AdminExample example); 20 | 21 | Admin selectByPrimaryKey(Integer adminid); 22 | 23 | Admin selectByName(Admin admin); 24 | 25 | int updateByExampleSelective(@Param("record") Admin record, @Param("example") AdminExample example); 26 | 27 | int updateByExample(@Param("record") Admin record, @Param("example") AdminExample example); 28 | 29 | int updateByPrimaryKeySelective(Admin record); 30 | 31 | int updateByPrimaryKey(Admin record); 32 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/CategoryMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.Category; 6 | import org.healthbeauty.pojo.CategoryExample; 7 | 8 | public interface CategoryMapper { 9 | long countByExample(CategoryExample example); 10 | 11 | int deleteByExample(CategoryExample example); 12 | 13 | int deleteByPrimaryKey(Integer cateid); 14 | 15 | int insert(Category record); 16 | 17 | int insertSelective(Category record); 18 | 19 | List selectByExample(CategoryExample example); 20 | 21 | List selectByExampleLimit(CategoryExample example); 22 | 23 | Category selectByPrimaryKey(Integer cateid); 24 | 25 | int updateByExampleSelective(@Param("record") Category record, @Param("example") CategoryExample example); 26 | 27 | int updateByExample(@Param("record") Category record, @Param("example") CategoryExample example); 28 | 29 | int updateByPrimaryKeySelective(Category record); 30 | 31 | int updateByPrimaryKey(Category record); 32 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/ChatMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.Chat; 6 | import org.healthbeauty.pojo.ChatExample; 7 | 8 | public interface ChatMapper { 9 | long countByExample(ChatExample example); 10 | 11 | int deleteByExample(ChatExample example); 12 | 13 | int deleteByPrimaryKey(Integer chatid); 14 | 15 | int insert(Chat record); 16 | 17 | int insertSelective(Chat record); 18 | 19 | List selectByExample(ChatExample example); 20 | 21 | Chat selectByPrimaryKey(Integer chatid); 22 | 23 | int updateByExampleSelective(@Param("record") Chat record, @Param("example") ChatExample example); 24 | 25 | int updateByExample(@Param("record") Chat record, @Param("example") ChatExample example); 26 | 27 | int updateByPrimaryKeySelective(Chat record); 28 | 29 | int updateByPrimaryKey(Chat record); 30 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/CommentMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.Comment; 6 | import org.healthbeauty.pojo.CommentExample; 7 | 8 | public interface CommentMapper { 9 | long countByExample(CommentExample example); 10 | 11 | int deleteByExample(CommentExample example); 12 | 13 | int deleteByPrimaryKey(Integer commentid); 14 | 15 | int insert(Comment record); 16 | 17 | int insertSelective(Comment record); 18 | 19 | List selectByExample(CommentExample example); 20 | 21 | Comment selectByPrimaryKey(Integer commentid); 22 | 23 | int updateByExampleSelective(@Param("record") Comment record, @Param("example") CommentExample example); 24 | 25 | int updateByExample(@Param("record") Comment record, @Param("example") CommentExample example); 26 | 27 | int updateByPrimaryKeySelective(Comment record); 28 | 29 | int updateByPrimaryKey(Comment record); 30 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/DeliverMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.Deliver; 6 | import org.healthbeauty.pojo.DeliverExample; 7 | 8 | public interface DeliverMapper { 9 | long countByExample(DeliverExample example); 10 | 11 | int deleteByExample(DeliverExample example); 12 | 13 | int deleteByPrimaryKey(Integer deliverid); 14 | 15 | int insert(Deliver record); 16 | 17 | int insertSelective(Deliver record); 18 | 19 | List selectByExample(DeliverExample example); 20 | 21 | Deliver selectByPrimaryKey(Integer deliverid); 22 | 23 | int updateByExampleSelective(@Param("record") Deliver record, @Param("example") DeliverExample example); 24 | 25 | int updateByExample(@Param("record") Deliver record, @Param("example") DeliverExample example); 26 | 27 | int updateByPrimaryKeySelective(Deliver record); 28 | 29 | int updateByPrimaryKey(Deliver record); 30 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/FavoriteMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.Favorite; 6 | import org.healthbeauty.pojo.FavoriteExample; 7 | import org.healthbeauty.pojo.FavoriteKey; 8 | 9 | public interface FavoriteMapper { 10 | long countByExample(FavoriteExample example); 11 | 12 | int deleteByExample(FavoriteExample example); 13 | 14 | int deleteByPrimaryKey(FavoriteKey key); 15 | 16 | int insert(Favorite record); 17 | 18 | int insertSelective(Favorite record); 19 | 20 | List selectByExample(FavoriteExample example); 21 | 22 | Favorite selectByPrimaryKey(FavoriteKey key); 23 | 24 | int updateByExampleSelective(@Param("record") Favorite record, @Param("example") FavoriteExample example); 25 | 26 | int updateByExample(@Param("record") Favorite record, @Param("example") FavoriteExample example); 27 | 28 | int updateByPrimaryKeySelective(Favorite record); 29 | 30 | int updateByPrimaryKey(Favorite record); 31 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/GoodsMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.Goods; 6 | import org.healthbeauty.pojo.GoodsExample; 7 | 8 | public interface GoodsMapper { 9 | long countByExample(GoodsExample example); 10 | 11 | int deleteByExample(GoodsExample example); 12 | 13 | int deleteByPrimaryKey(Integer goodsid); 14 | 15 | int insert(Goods record); 16 | 17 | int insertSelective(Goods record); 18 | 19 | List selectByExampleWithBLOBs(GoodsExample example); 20 | 21 | List selectByExample(GoodsExample example); 22 | 23 | List selectList(@Param("list") List list); 24 | 25 | Goods selectByPrimaryKey(Integer goodsid); 26 | 27 | int updateByExampleSelective(@Param("record") Goods record, @Param("example") GoodsExample example); 28 | 29 | int updateByExampleWithBLOBs(@Param("record") Goods record, @Param("example") GoodsExample example); 30 | 31 | int updateByExample(@Param("record") Goods record, @Param("example") GoodsExample example); 32 | 33 | int updateByPrimaryKeySelective(Goods record); 34 | 35 | int updateByPrimaryKeyWithBLOBs(Goods record); 36 | 37 | int updateByPrimaryKey(Goods record); 38 | 39 | List selectByExampleWithBLOBsLimit(GoodsExample digGoodsExample); 40 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/ImagePathMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.ImagePath; 6 | import org.healthbeauty.pojo.ImagePathExample; 7 | 8 | public interface ImagePathMapper { 9 | long countByExample(ImagePathExample example); 10 | 11 | int deleteByExample(ImagePathExample example); 12 | 13 | int deleteByPrimaryKey(Integer pathid); 14 | 15 | int insert(ImagePath record); 16 | 17 | int insertSelective(ImagePath record); 18 | 19 | List selectByExample(ImagePathExample example); 20 | 21 | ImagePath selectByPrimaryKey(Integer pathid); 22 | 23 | int updateByExampleSelective(@Param("record") ImagePath record, @Param("example") ImagePathExample example); 24 | 25 | int updateByExample(@Param("record") ImagePath record, @Param("example") ImagePathExample example); 26 | 27 | int updateByPrimaryKeySelective(ImagePath record); 28 | 29 | int updateByPrimaryKey(ImagePath record); 30 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/OrderItemMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.OrderItem; 6 | import org.healthbeauty.pojo.OrderItemExample; 7 | 8 | public interface OrderItemMapper { 9 | long countByExample(OrderItemExample example); 10 | 11 | int deleteByExample(OrderItemExample example); 12 | 13 | int deleteByPrimaryKey(Integer itemid); 14 | 15 | int insert(OrderItem record); 16 | 17 | int insertSelective(OrderItem record); 18 | 19 | List selectByExample(OrderItemExample example); 20 | 21 | List selectList(Integer orderId); 22 | 23 | OrderItem selectByPrimaryKey(Integer itemid); 24 | 25 | int updateByExampleSelective(@Param("record") OrderItem record, @Param("example") OrderItemExample example); 26 | 27 | int updateByExample(@Param("record") OrderItem record, @Param("example") OrderItemExample example); 28 | 29 | int updateByPrimaryKeySelective(OrderItem record); 30 | 31 | int updateByPrimaryKey(OrderItem record); 32 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/OrderMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.Order; 6 | import org.healthbeauty.pojo.OrderExample; 7 | 8 | public interface OrderMapper { 9 | long countByExample(OrderExample example); 10 | 11 | int deleteByExample(OrderExample example); 12 | 13 | int deleteByPrimaryKey(Integer orderid); 14 | 15 | int insert(Order record); 16 | 17 | int insertSelective(Order record); 18 | 19 | List selectByExample(OrderExample example); 20 | 21 | Order selectByPrimaryKey(Integer orderid); 22 | 23 | int updateByExampleSelective(@Param("record") Order record, @Param("example") OrderExample example); 24 | 25 | int updateByExample(@Param("record") Order record, @Param("example") OrderExample example); 26 | 27 | int updateByPrimaryKeySelective(Order record); 28 | 29 | int updateByPrimaryKey(Order record); 30 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/ShopCartMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.ShopCart; 6 | import org.healthbeauty.pojo.ShopCartExample; 7 | import org.healthbeauty.pojo.ShopCartKey; 8 | 9 | public interface ShopCartMapper { 10 | long countByExample(ShopCartExample example); 11 | 12 | int deleteByExample(ShopCartExample example); 13 | 14 | int deleteByPrimaryKey(ShopCartKey key); 15 | 16 | int insert(ShopCart record); 17 | 18 | int insertSelective(ShopCart record); 19 | 20 | List selectByExample(ShopCartExample example); 21 | 22 | ShopCart selectByPrimaryKey(ShopCartKey key); 23 | 24 | int updateByExampleSelective(@Param("record") ShopCart record, @Param("example") ShopCartExample example); 25 | 26 | int updateByExample(@Param("record") ShopCart record, @Param("example") ShopCartExample example); 27 | 28 | int updateByPrimaryKeySelective(ShopCart record); 29 | 30 | int updateByPrimaryKey(ShopCart record); 31 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/dao/UserMapper.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.dao; 2 | 3 | import java.util.List; 4 | import org.apache.ibatis.annotations.Param; 5 | import org.healthbeauty.pojo.User; 6 | import org.healthbeauty.pojo.UserExample; 7 | 8 | public interface UserMapper { 9 | long countByExample(UserExample example); 10 | 11 | int deleteByExample(UserExample example); 12 | 13 | int deleteByPrimaryKey(Integer userid); 14 | 15 | int insert(User record); 16 | 17 | int insertSelective(User record); 18 | 19 | List selectByExample(UserExample example); 20 | 21 | User selectByPrimaryKey(Integer userid); 22 | 23 | int updateByExampleSelective(@Param("record") User record, @Param("example") UserExample example); 24 | 25 | int updateByExample(@Param("record") User record, @Param("example") UserExample example); 26 | 27 | int updateByPrimaryKeySelective(User record); 28 | 29 | int updateByPrimaryKey(User record); 30 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/Activity.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | public class Activity { 4 | private Integer activityid; 5 | 6 | private String activityname; 7 | 8 | private String activitydes; 9 | 10 | private Float discount; 11 | 12 | private Integer fullprice; 13 | 14 | private Integer reduceprice; 15 | 16 | private Integer fullnum; 17 | 18 | private Integer reducenum; 19 | 20 | public Integer getActivityid() { 21 | return activityid; 22 | } 23 | 24 | public void setActivityid(Integer activityid) { 25 | this.activityid = activityid; 26 | } 27 | 28 | public String getActivityname() { 29 | return activityname; 30 | } 31 | 32 | public void setActivityname(String activityname) { 33 | this.activityname = activityname == null ? null : activityname.trim(); 34 | } 35 | 36 | public String getActivitydes() { 37 | return activitydes; 38 | } 39 | 40 | public void setActivitydes(String activitydes) { 41 | this.activitydes = activitydes == null ? null : activitydes.trim(); 42 | } 43 | 44 | public Float getDiscount() { 45 | return discount; 46 | } 47 | 48 | public void setDiscount(Float discount) { 49 | this.discount = discount; 50 | } 51 | 52 | public Integer getFullprice() { 53 | return fullprice; 54 | } 55 | 56 | public void setFullprice(Integer fullprice) { 57 | this.fullprice = fullprice; 58 | } 59 | 60 | public Integer getReduceprice() { 61 | return reduceprice; 62 | } 63 | 64 | public void setReduceprice(Integer reduceprice) { 65 | this.reduceprice = reduceprice; 66 | } 67 | 68 | public Integer getFullnum() { 69 | return fullnum; 70 | } 71 | 72 | public void setFullnum(Integer fullnum) { 73 | this.fullnum = fullnum; 74 | } 75 | 76 | public Integer getReducenum() { 77 | return reducenum; 78 | } 79 | 80 | public void setReducenum(Integer reducenum) { 81 | this.reducenum = reducenum; 82 | } 83 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/Address.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | public class Address { 4 | private Integer addressid; 5 | 6 | private Integer userid; 7 | 8 | private String province; 9 | 10 | private String city; 11 | 12 | private String county; 13 | 14 | private String detailaddr; 15 | 16 | private String conname; 17 | 18 | private String contel; 19 | 20 | public Integer getAddressid() { 21 | return addressid; 22 | } 23 | 24 | public void setAddressid(Integer addressid) { 25 | this.addressid = addressid; 26 | } 27 | 28 | public Integer getUserid() { 29 | return userid; 30 | } 31 | 32 | public void setUserid(Integer userid) { 33 | this.userid = userid; 34 | } 35 | 36 | public String getProvince() { 37 | return province; 38 | } 39 | 40 | public void setProvince(String province) { 41 | this.province = province == null ? null : province.trim(); 42 | } 43 | 44 | public String getCity() { 45 | return city; 46 | } 47 | 48 | public void setCity(String city) { 49 | this.city = city == null ? null : city.trim(); 50 | } 51 | 52 | public String getCounty() { 53 | return county; 54 | } 55 | 56 | public void setCounty(String county) { 57 | this.county = county == null ? null : county.trim(); 58 | } 59 | 60 | public String getDetailaddr() { 61 | return detailaddr; 62 | } 63 | 64 | public void setDetailaddr(String detailaddr) { 65 | this.detailaddr = detailaddr == null ? null : detailaddr.trim(); 66 | } 67 | 68 | public String getConname() { 69 | return conname; 70 | } 71 | 72 | public void setConname(String conname) { 73 | this.conname = conname == null ? null : conname.trim(); 74 | } 75 | 76 | public String getContel() { 77 | return contel; 78 | } 79 | 80 | public void setContel(String contel) { 81 | this.contel = contel == null ? null : contel.trim(); 82 | } 83 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/Admin.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | public class Admin { 4 | private Integer adminid; 5 | 6 | private String adminname; 7 | 8 | private String password; 9 | 10 | public Admin(Integer adminid, String adminname, String password) { 11 | this.adminid = adminid; 12 | this.adminname = adminname; 13 | this.password = password; 14 | } 15 | 16 | public Admin() { 17 | } 18 | 19 | public Integer getAdminid() { 20 | return adminid; 21 | } 22 | 23 | public void setAdminid(Integer adminid) { 24 | this.adminid = adminid; 25 | } 26 | 27 | public String getAdminname() { 28 | return adminname; 29 | } 30 | 31 | public void setAdminname(String adminname) { 32 | this.adminname = adminname == null ? null : adminname.trim(); 33 | } 34 | 35 | public String getPassword() { 36 | return password; 37 | } 38 | 39 | public void setPassword(String password) { 40 | this.password = password == null ? null : password.trim(); 41 | } 42 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/Category.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | public class Category { 4 | private Integer cateid; 5 | 6 | private String catename; 7 | 8 | public Integer getCateid() { 9 | return cateid; 10 | } 11 | 12 | public void setCateid(Integer cateid) { 13 | this.cateid = cateid; 14 | } 15 | 16 | public String getCatename() { 17 | return catename; 18 | } 19 | 20 | public void setCatename(String catename) { 21 | this.catename = catename == null ? null : catename.trim(); 22 | } 23 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/Chat.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | import java.util.Date; 4 | 5 | public class Chat { 6 | private Integer chatid; 7 | 8 | private Integer senduser; 9 | 10 | private Integer receiveuser; 11 | 12 | private String msgcontent; 13 | 14 | private Date msgtime; 15 | 16 | public Integer getChatid() { 17 | return chatid; 18 | } 19 | 20 | public void setChatid(Integer chatid) { 21 | this.chatid = chatid; 22 | } 23 | 24 | public Integer getSenduser() { 25 | return senduser; 26 | } 27 | 28 | public void setSenduser(Integer senduser) { 29 | this.senduser = senduser; 30 | } 31 | 32 | public Integer getReceiveuser() { 33 | return receiveuser; 34 | } 35 | 36 | public void setReceiveuser(Integer receiveuser) { 37 | this.receiveuser = receiveuser; 38 | } 39 | 40 | public String getMsgcontent() { 41 | return msgcontent; 42 | } 43 | 44 | public void setMsgcontent(String msgcontent) { 45 | this.msgcontent = msgcontent == null ? null : msgcontent.trim(); 46 | } 47 | 48 | public Date getMsgtime() { 49 | return msgtime; 50 | } 51 | 52 | public void setMsgtime(Date msgtime) { 53 | this.msgtime = msgtime; 54 | } 55 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/Comment.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | import java.util.Date; 4 | 5 | public class Comment { 6 | private Integer commentid; 7 | 8 | private Integer userid; 9 | 10 | private Integer goodsid; 11 | 12 | private Integer point; 13 | 14 | private String content; 15 | 16 | private Date commenttime; 17 | 18 | private String username; 19 | 20 | public Integer getCommentid() { 21 | return commentid; 22 | } 23 | 24 | public void setCommentid(Integer commentid) { 25 | this.commentid = commentid; 26 | } 27 | 28 | public Integer getUserid() { 29 | return userid; 30 | } 31 | 32 | public void setUserid(Integer userid) { 33 | this.userid = userid; 34 | } 35 | 36 | public Integer getGoodsid() { 37 | return goodsid; 38 | } 39 | 40 | public void setGoodsid(Integer goodsid) { 41 | this.goodsid = goodsid; 42 | } 43 | 44 | public Integer getPoint() { 45 | return point; 46 | } 47 | 48 | public void setPoint(Integer point) { 49 | this.point = point; 50 | } 51 | 52 | public String getContent() { 53 | return content; 54 | } 55 | 56 | public void setContent(String content) { 57 | this.content = content == null ? null : content.trim(); 58 | } 59 | 60 | public Date getCommenttime() { 61 | return commenttime; 62 | } 63 | 64 | public void setCommenttime(Date commenttime) { 65 | this.commenttime = commenttime; 66 | } 67 | 68 | public void setUserName(String userName) {this.username=userName;} 69 | 70 | public String getUsername() {return username;} 71 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/Deliver.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | public class Deliver { 4 | private Integer deliverid; 5 | 6 | private Integer orderid; 7 | 8 | private Integer sendid; 9 | 10 | public Integer getDeliverid() { 11 | return deliverid; 12 | } 13 | 14 | public void setDeliverid(Integer deliverid) { 15 | this.deliverid = deliverid; 16 | } 17 | 18 | public Integer getOrderid() { 19 | return orderid; 20 | } 21 | 22 | public void setOrderid(Integer orderid) { 23 | this.orderid = orderid; 24 | } 25 | 26 | public Integer getSendid() { 27 | return sendid; 28 | } 29 | 30 | public void setSendid(Integer sendid) { 31 | this.sendid = sendid; 32 | } 33 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/Favorite.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | import java.util.Date; 4 | 5 | public class Favorite extends FavoriteKey { 6 | private Date collecttime; 7 | 8 | public Date getCollecttime() { 9 | return collecttime; 10 | } 11 | 12 | public void setCollecttime(Date collecttime) { 13 | this.collecttime = collecttime; 14 | } 15 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/FavoriteKey.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | public class FavoriteKey { 4 | private Integer userid; 5 | 6 | private Integer goodsid; 7 | 8 | public FavoriteKey() { 9 | } 10 | 11 | public FavoriteKey(Integer userid, Integer goodsid) { 12 | 13 | this.userid = userid; 14 | this.goodsid = goodsid; 15 | } 16 | 17 | public Integer getUserid() { 18 | return userid; 19 | } 20 | 21 | public void setUserid(Integer userid) { 22 | this.userid = userid; 23 | } 24 | 25 | public Integer getGoodsid() { 26 | return goodsid; 27 | } 28 | 29 | public void setGoodsid(Integer goodsid) { 30 | this.goodsid = goodsid; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/Goods.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | public class Goods { 7 | private Integer goodsid; 8 | 9 | private String goodsname; 10 | 11 | private Integer price; 12 | 13 | private Integer num; 14 | 15 | private Date uptime; 16 | 17 | private Integer category; 18 | 19 | private String detailcate; 20 | 21 | private Integer activityid; 22 | 23 | private String description; 24 | 25 | private List imagePaths; 26 | 27 | private boolean fav; 28 | 29 | private Activity activity; 30 | 31 | private Float newPrice; 32 | private String bianhao; 33 | 34 | public String getBianhao() { 35 | return bianhao; 36 | } 37 | 38 | public void setBianhao(String bianhao) { 39 | this.bianhao = bianhao; 40 | } 41 | 42 | public Integer getGoodsid() { 43 | return goodsid; 44 | } 45 | 46 | public void setGoodsid(Integer goodsid) { 47 | this.goodsid = goodsid; 48 | } 49 | 50 | public String getGoodsname() { 51 | return goodsname; 52 | } 53 | 54 | public void setGoodsname(String goodsname) { 55 | this.goodsname = goodsname == null ? null : goodsname.trim(); 56 | } 57 | 58 | public Integer getPrice() { 59 | return price; 60 | } 61 | 62 | public void setPrice(Integer price) { 63 | this.price = price; 64 | } 65 | 66 | public Integer getNum() { 67 | return num; 68 | } 69 | 70 | public void setNum(Integer num) { 71 | this.num = num; 72 | } 73 | 74 | public Date getUptime() { 75 | return uptime; 76 | } 77 | 78 | public void setUptime(Date uptime) { 79 | this.uptime = uptime; 80 | } 81 | 82 | public Integer getCategory() { 83 | return category; 84 | } 85 | 86 | public void setCategory(Integer category) { 87 | this.category = category; 88 | } 89 | 90 | public String getDetailcate() { 91 | return detailcate; 92 | } 93 | 94 | public void setDetailcate(String detailcate) { 95 | this.detailcate = detailcate == null ? null : detailcate.trim(); 96 | } 97 | 98 | public Integer getActivityid() { 99 | return activityid; 100 | } 101 | 102 | public void setActivityid(Integer activityid) { 103 | this.activityid = activityid; 104 | } 105 | 106 | public String getDescription() { 107 | return description; 108 | } 109 | 110 | public void setDescription(String description) { 111 | this.description = description == null ? null : description.trim(); 112 | } 113 | 114 | public List getImagePaths() { 115 | return imagePaths; 116 | } 117 | 118 | public void setImagePaths(List imagePaths) { 119 | this.imagePaths = imagePaths; 120 | } 121 | 122 | 123 | public boolean isFav() { 124 | return fav; 125 | } 126 | 127 | public void setFav(boolean fav) { 128 | this.fav = fav; 129 | } 130 | 131 | public Activity getActivity() { 132 | return activity; 133 | } 134 | 135 | public void setActivity(Activity activity) { 136 | this.activity = activity; 137 | } 138 | 139 | public Float getNewPrice() { 140 | return newPrice; 141 | } 142 | 143 | public void setNewPrice(Float newPrice) { 144 | this.newPrice = newPrice; 145 | } 146 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/GoodsPrice.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | /** 4 | * Created by 文辉 on 2017/7/27. 5 | */ 6 | public class GoodsPrice { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/ImagePath.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | public class ImagePath { 4 | private Integer pathid; 5 | 6 | private Integer goodid; 7 | 8 | private String path; 9 | 10 | public ImagePath() { 11 | } 12 | 13 | public ImagePath(Integer pathid, Integer goodid, String path) { 14 | 15 | this.pathid = pathid; 16 | this.goodid = goodid; 17 | this.path = path; 18 | } 19 | 20 | public Integer getPathid() { 21 | return pathid; 22 | } 23 | 24 | public void setPathid(Integer pathid) { 25 | this.pathid = pathid; 26 | } 27 | 28 | public Integer getGoodid() { 29 | return goodid; 30 | } 31 | 32 | public void setGoodid(Integer goodid) { 33 | this.goodid = goodid; 34 | } 35 | 36 | public String getPath() { 37 | return path; 38 | } 39 | 40 | public void setPath(String path) { 41 | this.path = path == null ? null : path.trim(); 42 | } 43 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/Msg.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | import java.util.HashMap; 4 | import java.util.Map; 5 | 6 | /** 7 | * 返回json 8 | */ 9 | public class Msg { 10 | //100-success,200-fail 11 | private int code; 12 | 13 | //提示信息 14 | private String msg; 15 | 16 | //数据 17 | private Map info = new HashMap(); 18 | 19 | public static Msg success(String msg) { 20 | Msg result = new Msg(); 21 | result.setCode(100); 22 | result.setMsg(msg); 23 | return result; 24 | } 25 | 26 | public static Msg fail(String msg) { 27 | Msg result = new Msg(); 28 | result.setCode(200); 29 | result.setMsg(msg); 30 | return result; 31 | } 32 | 33 | public Msg add(String key, Object value) { 34 | this.getInfo().put(key, value); 35 | return this; 36 | } 37 | 38 | public int getCode() { 39 | return code; 40 | } 41 | 42 | public void setCode(int code) { 43 | this.code = code; 44 | } 45 | 46 | public String getMsg() { 47 | return msg; 48 | } 49 | 50 | public void setMsg(String msg) { 51 | this.msg = msg; 52 | } 53 | 54 | public Map getInfo() { 55 | return info; 56 | } 57 | 58 | public void setInfo(Map info) { 59 | this.info = info; 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/Order.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | import java.util.Date; 4 | import java.util.List; 5 | 6 | public class Order { 7 | private Integer orderid; 8 | 9 | private Integer userid; 10 | 11 | private Date ordertime; 12 | 13 | private Float oldprice; 14 | 15 | private Float newprice; 16 | 17 | private Boolean ispay; 18 | 19 | private Boolean issend; 20 | 21 | private Boolean isreceive; 22 | 23 | private Boolean iscomplete; 24 | 25 | private Integer addressid; 26 | 27 | private List goodsInfo; 28 | 29 | public Order() { 30 | } 31 | 32 | private Address address; 33 | 34 | public Order(Integer orderid, Integer userid, Date ordertime, Float oldprice, Float newprice, Boolean ispay, Boolean issend, Boolean isreceive, Boolean iscomplete, Integer addressid, List goodsInfo, Address address) { 35 | this.orderid = orderid; 36 | this.userid = userid; 37 | this.ordertime = ordertime; 38 | this.oldprice = oldprice; 39 | this.newprice = newprice; 40 | this.ispay = ispay; 41 | this.issend = issend; 42 | this.isreceive = isreceive; 43 | this.iscomplete = iscomplete; 44 | this.addressid = addressid; 45 | this.goodsInfo = goodsInfo; 46 | this.address = address; 47 | } 48 | 49 | public Integer getOrderid() { 50 | return orderid; 51 | } 52 | 53 | public void setOrderid(Integer orderid) { 54 | this.orderid = orderid; 55 | } 56 | 57 | public Integer getUserid() { 58 | return userid; 59 | } 60 | 61 | public void setUserid(Integer userid) { 62 | this.userid = userid; 63 | } 64 | 65 | public Date getOrdertime() { 66 | return ordertime; 67 | } 68 | 69 | public void setOrdertime(Date ordertime) { 70 | this.ordertime = ordertime; 71 | } 72 | 73 | public Float getOldprice() { 74 | return oldprice; 75 | } 76 | 77 | public void setOldprice(Float oldprice) { 78 | this.oldprice = oldprice; 79 | } 80 | 81 | public Float getNewprice() { 82 | return newprice; 83 | } 84 | 85 | public void setNewprice(Float newprice) { 86 | this.newprice = newprice; 87 | } 88 | 89 | public Boolean getIspay() { 90 | return ispay; 91 | } 92 | 93 | public void setIspay(Boolean ispay) { 94 | this.ispay = ispay; 95 | } 96 | 97 | public Boolean getIssend() { 98 | return issend; 99 | } 100 | 101 | public void setIssend(Boolean issend) { 102 | this.issend = issend; 103 | } 104 | 105 | public Boolean getIsreceive() { 106 | return isreceive; 107 | } 108 | 109 | public void setIsreceive(Boolean isreceive) { 110 | this.isreceive = isreceive; 111 | } 112 | 113 | public Boolean getIscomplete() { 114 | return iscomplete; 115 | } 116 | 117 | public void setIscomplete(Boolean iscomplete) { 118 | this.iscomplete = iscomplete; 119 | } 120 | 121 | public Integer getAddressid() { 122 | return addressid; 123 | } 124 | 125 | public void setAddressid(Integer addressid) { 126 | this.addressid = addressid; 127 | } 128 | 129 | public List getGoodsInfo() { 130 | return goodsInfo; 131 | } 132 | 133 | public void setGoodsInfo(List goodsInfo) { 134 | this.goodsInfo = goodsInfo; 135 | } 136 | 137 | public Address getAddress() { 138 | return address; 139 | } 140 | 141 | public void setAddress(Address address) { 142 | this.address = address; 143 | } 144 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/OrderItem.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | public class OrderItem { 4 | private Integer itemid; 5 | 6 | private Integer orderid; 7 | 8 | private Integer goodsid; 9 | 10 | private Integer num; 11 | 12 | public OrderItem() { 13 | } 14 | 15 | public OrderItem(Integer itemid, Integer orderid, Integer goodsid, Integer num) { 16 | 17 | this.itemid = itemid; 18 | this.orderid = orderid; 19 | this.goodsid = goodsid; 20 | this.num = num; 21 | } 22 | 23 | public Integer getItemid() { 24 | return itemid; 25 | } 26 | 27 | public void setItemid(Integer itemid) { 28 | this.itemid = itemid; 29 | } 30 | 31 | public Integer getOrderid() { 32 | return orderid; 33 | } 34 | 35 | public void setOrderid(Integer orderid) { 36 | this.orderid = orderid; 37 | } 38 | 39 | public Integer getGoodsid() { 40 | return goodsid; 41 | } 42 | 43 | public void setGoodsid(Integer goodsid) { 44 | this.goodsid = goodsid; 45 | } 46 | 47 | public Integer getNum() { 48 | return num; 49 | } 50 | 51 | public void setNum(Integer num) { 52 | this.num = num; 53 | } 54 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/ShopCart.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | import java.util.Date; 4 | 5 | public class ShopCart extends ShopCartKey { 6 | private Date catedate; 7 | 8 | private Integer goodsnum; 9 | 10 | public Date getCatedate() { 11 | return catedate; 12 | } 13 | 14 | public void setCatedate(Date catedate) { 15 | this.catedate = catedate; 16 | } 17 | 18 | public Integer getGoodsnum() { 19 | return goodsnum; 20 | } 21 | 22 | public void setGoodsnum(Integer goodsnum) { 23 | this.goodsnum = goodsnum; 24 | } 25 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/ShopCartKey.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | public class ShopCartKey { 4 | private Integer userid; 5 | 6 | private Integer goodsid; 7 | 8 | public ShopCartKey() { 9 | } 10 | 11 | public ShopCartKey(Integer userid, Integer goodsid) { 12 | 13 | this.userid = userid; 14 | this.goodsid = goodsid; 15 | } 16 | 17 | public Integer getUserid() { 18 | return userid; 19 | } 20 | 21 | public void setUserid(Integer userid) { 22 | this.userid = userid; 23 | } 24 | 25 | public Integer getGoodsid() { 26 | return goodsid; 27 | } 28 | 29 | public void setGoodsid(Integer goodsid) { 30 | this.goodsid = goodsid; 31 | } 32 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/pojo/User.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.pojo; 2 | 3 | import java.util.Date; 4 | 5 | public class User { 6 | private Integer userid; 7 | 8 | private String username; 9 | 10 | private String password; 11 | 12 | private Date regtime; 13 | 14 | private String email; 15 | 16 | private String telephone; 17 | 18 | public Integer getUserid() { 19 | return userid; 20 | } 21 | 22 | public void setUserid(Integer userid) { 23 | this.userid = userid; 24 | } 25 | 26 | public String getUsername() { 27 | return username; 28 | } 29 | 30 | public void setUsername(String username) { 31 | this.username = username == null ? null : username.trim(); 32 | } 33 | 34 | public String getPassword() { 35 | return password; 36 | } 37 | 38 | public void setPassword(String password) { 39 | this.password = password == null ? null : password.trim(); 40 | } 41 | 42 | public Date getRegtime() { 43 | return regtime; 44 | } 45 | 46 | public void setRegtime(Date regtime) { 47 | this.regtime = regtime; 48 | } 49 | 50 | public String getEmail() { 51 | return email; 52 | } 53 | 54 | public void setEmail(String email) { 55 | this.email = email == null ? null : email.trim(); 56 | } 57 | 58 | public String getTelephone() { 59 | return telephone; 60 | } 61 | 62 | public void setTelephone(String telephone) { 63 | this.telephone = telephone == null ? null : telephone.trim(); 64 | } 65 | } -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/ActivityService.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service; 2 | 3 | import java.util.List; 4 | 5 | import org.healthbeauty.pojo.Activity; 6 | import org.healthbeauty.pojo.ActivityExample; 7 | import org.healthbeauty.pojo.Goods; 8 | 9 | public interface ActivityService { 10 | List getAllActivity(ActivityExample activityExample); 11 | 12 | void insertActivitySelective(Activity activity); 13 | 14 | Activity selectByKey(Integer activityid); 15 | 16 | void deleteByActivityId(Integer activityid); 17 | 18 | // void updateGoodsActSelective(Goods goods); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/AddressService.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service; 2 | 3 | import java.util.List; 4 | 5 | import org.healthbeauty.pojo.Address; 6 | import org.healthbeauty.pojo.AddressExample; 7 | 8 | public interface AddressService { 9 | public List
getAllAddressByExample(AddressExample addressExample); 10 | 11 | public void updateByPrimaryKeySelective(Address address); 12 | 13 | public void deleteByPrimaryKey(Integer addressid); 14 | 15 | public void insert(Address address); 16 | 17 | public void insertSelective(Address address); 18 | 19 | public Address selectByPrimaryKey(Integer addressid); 20 | } 21 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/AdminService.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service; 2 | 3 | import org.healthbeauty.pojo.Admin; 4 | 5 | public interface AdminService { 6 | public Admin selectByName(Admin admin); 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/CateService.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service; 2 | 3 | import org.healthbeauty.pojo.Category; 4 | import org.healthbeauty.pojo.CategoryExample; 5 | import org.springframework.stereotype.Service; 6 | 7 | import java.util.List; 8 | 9 | @Service("CateService") 10 | public interface CateService { 11 | public List selectByExample(CategoryExample example); 12 | public void insertSelective(Category category); 13 | 14 | public List selectByExampleLimit(CategoryExample digCategoryExample); 15 | 16 | public Category selectById(Integer category); 17 | 18 | public void updateByPrimaryKeySelective(Category category); 19 | 20 | public void deleteByPrimaryKey(Integer cateid); 21 | } 22 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/ChatService.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service; 2 | 3 | import java.util.List; 4 | 5 | import org.healthbeauty.pojo.Chat; 6 | import org.healthbeauty.pojo.ChatExample; 7 | 8 | public interface ChatService { 9 | public void insertChatSelective(Chat chat); 10 | 11 | public List selectChatByExample(ChatExample chatExample); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/CommentService.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service; 2 | 3 | import java.util.List; 4 | 5 | import org.healthbeauty.pojo.Comment; 6 | import org.healthbeauty.pojo.CommentExample; 7 | 8 | public interface CommentService { 9 | public void insertSelective(Comment comment); 10 | 11 | public List selectByExample(CommentExample commentExample); 12 | } 13 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/GoodsService.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service; 2 | 3 | import java.util.List; 4 | 5 | import org.apache.ibatis.annotations.Param; 6 | import org.healthbeauty.pojo.*; 7 | 8 | 9 | public interface GoodsService { 10 | public Integer addGoods(Goods goods); 11 | 12 | public void addImagePath(ImagePath imagePath); 13 | 14 | public List selectByExample(GoodsExample example); 15 | 16 | 17 | public List selectList( List list); 18 | 19 | 20 | 21 | public void deleteGoodsById(Integer goodsid); 22 | 23 | public void updateGoodsById(Goods goods); 24 | 25 | public List findImagePath(Integer goodsid); 26 | 27 | public Goods selectById(Integer goodsid); 28 | 29 | public List selectByExampleLimit(GoodsExample digGoodsExample); 30 | 31 | public void addFavorite(Favorite favorite); 32 | 33 | public Favorite selectFavByKey(FavoriteKey favoriteKey); 34 | 35 | public void deleteFavByKey(FavoriteKey favoriteKey); 36 | 37 | public List selectFavByExample(FavoriteExample favoriteExample); 38 | } 39 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/OrderService.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service; 2 | 3 | import java.util.List; 4 | 5 | import org.healthbeauty.pojo.*; 6 | 7 | public interface OrderService { 8 | public void insertOrder(Order order); 9 | 10 | public void deleteById(Integer orderid); 11 | 12 | 13 | public List selectOrderByExample(OrderExample orderExample); 14 | 15 | public List getOrderItemByExample(OrderItemExample orderItemExample); 16 | 17 | public List selectList(Integer orderId); 18 | 19 | public Address getAddressByKey(Integer addressid); 20 | 21 | public void updateOrderByKey(Order order); 22 | 23 | public Order selectByPrimaryKey(Integer orderid); 24 | 25 | void insertOrderItem(OrderItem orderItem); 26 | } 27 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/ShopCartService.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service; 2 | 3 | import java.util.List; 4 | 5 | import org.healthbeauty.pojo.ShopCart; 6 | import org.healthbeauty.pojo.ShopCartExample; 7 | import org.healthbeauty.pojo.ShopCartKey; 8 | 9 | public interface ShopCartService { 10 | public void addShopCart(ShopCart shopCart); 11 | 12 | public List selectByExample(ShopCartExample shopCartExample); 13 | 14 | public void deleteByKey(ShopCartKey shopCartKey); 15 | 16 | public void updateCartByKey(ShopCart shopCart); 17 | 18 | public ShopCart selectCartByKey(ShopCartKey shopCartKey); 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/UserService.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service; 2 | 3 | import java.util.List; 4 | 5 | import org.healthbeauty.pojo.User; 6 | import org.healthbeauty.pojo.UserExample; 7 | 8 | public interface UserService { 9 | public User selectByPrimaryKey(int userId); 10 | /*public User selectByPrimaryKeyAndPassword(int userId,String password);*/ 11 | public List selectByExample(UserExample userExample); 12 | 13 | public void insertSelective(User user); 14 | 15 | public void deleteUserById(Integer userid); 16 | 17 | public void updateByPrimaryKeySelective(User user); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/impl/ActivityServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service.impl; 2 | 3 | import org.healthbeauty.dao.ActivityMapper; 4 | import org.healthbeauty.pojo.Activity; 5 | import org.healthbeauty.pojo.ActivityExample; 6 | import org.healthbeauty.pojo.Goods; 7 | import org.healthbeauty.service.ActivityService; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.List; 12 | 13 | @Service("activityService") 14 | public class ActivityServiceImpl implements ActivityService { 15 | 16 | @Autowired(required = false) 17 | ActivityMapper activityMapper; 18 | 19 | public List getAllActivity(ActivityExample activityExample) { 20 | return activityMapper.selectByExample(activityExample); 21 | } 22 | 23 | @Override 24 | public void insertActivitySelective(Activity activity) { 25 | activityMapper.insertSelective(activity); 26 | } 27 | 28 | @Override 29 | public Activity selectByKey(Integer activityid) { 30 | return activityMapper.selectByPrimaryKey(activityid); 31 | } 32 | 33 | @Override 34 | public void deleteByActivityId(Integer activityid) { 35 | activityMapper.deleteByPrimaryKey(activityid); 36 | } 37 | 38 | /*@Override 39 | public void updateGoodsActSelective(Goods goods) { 40 | 41 | }*/ 42 | } 43 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/impl/AddressServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service.impl; 2 | 3 | import org.healthbeauty.dao.AddressMapper; 4 | import org.healthbeauty.pojo.Address; 5 | import org.healthbeauty.pojo.AddressExample; 6 | import org.healthbeauty.service.AddressService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | @Service("addressService") 13 | public class AddressServiceImpl implements AddressService { 14 | 15 | @Autowired(required = false) 16 | private AddressMapper addressMapper; 17 | 18 | @Override 19 | public List
getAllAddressByExample(AddressExample addressExample) { 20 | return addressMapper.selectByExample(addressExample); 21 | } 22 | 23 | @Override 24 | public void updateByPrimaryKeySelective(Address address) { 25 | 26 | /** 27 | * 地址修改 28 | */ 29 | addressMapper.updateByPrimaryKeySelective(address); 30 | } 31 | 32 | @Override 33 | public void deleteByPrimaryKey(Integer addressid) { 34 | addressMapper.deleteByPrimaryKey(addressid); 35 | } 36 | 37 | @Override 38 | public void insert(Address address) { 39 | addressMapper.insert(address); 40 | } 41 | 42 | @Override 43 | public void insertSelective(Address address) { 44 | addressMapper.insertSelective(address); 45 | } 46 | 47 | @Override 48 | public Address selectByPrimaryKey(Integer addressid) { 49 | return addressMapper.selectByPrimaryKey(addressid); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/impl/AdminServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service.impl; 2 | 3 | import org.healthbeauty.dao.AdminMapper; 4 | import org.healthbeauty.pojo.Admin; 5 | import org.healthbeauty.service.AdminService; 6 | import org.springframework.beans.factory.annotation.Autowired; 7 | import org.springframework.stereotype.Service; 8 | 9 | @Service("adminService") 10 | public class AdminServiceImpl implements AdminService { 11 | 12 | @Autowired(required = false) 13 | private AdminMapper adminMapper; 14 | 15 | @Override 16 | public Admin selectByName(Admin admin) { 17 | return adminMapper.selectByName(admin); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/impl/CateServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service.impl; 2 | 3 | import org.healthbeauty.dao.CategoryMapper; 4 | import org.healthbeauty.pojo.Category; 5 | import org.healthbeauty.pojo.CategoryExample; 6 | import org.healthbeauty.service.CateService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | @Service("cateService") 13 | public class CateServiceImpl implements CateService { 14 | 15 | @Autowired(required = false) 16 | CategoryMapper categoryMapper; 17 | 18 | @Override 19 | public List selectByExample(CategoryExample example) { 20 | return categoryMapper.selectByExample(example); 21 | } 22 | 23 | @Override 24 | public void insertSelective(Category category) { 25 | categoryMapper.insertSelective(category); 26 | } 27 | 28 | @Override 29 | public List selectByExampleLimit(CategoryExample digCategoryExample) { 30 | return categoryMapper.selectByExampleLimit(digCategoryExample); 31 | } 32 | 33 | @Override 34 | public Category selectById(Integer category) { 35 | return categoryMapper.selectByPrimaryKey(category); 36 | } 37 | 38 | @Override 39 | public void updateByPrimaryKeySelective(Category category) { 40 | categoryMapper.updateByPrimaryKeySelective(category); 41 | } 42 | 43 | @Override 44 | public void deleteByPrimaryKey(Integer cateid) { 45 | categoryMapper.deleteByPrimaryKey(cateid); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/impl/ChatServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service.impl; 2 | 3 | import org.healthbeauty.dao.ChatMapper; 4 | import org.healthbeauty.pojo.Chat; 5 | import org.healthbeauty.pojo.ChatExample; 6 | import org.healthbeauty.service.ChatService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | @Service("chatService") 13 | public class ChatServiceImpl implements ChatService { 14 | 15 | @Autowired(required = false) 16 | ChatMapper chatMapper; 17 | 18 | @Override 19 | public void insertChatSelective(Chat chat) { 20 | chatMapper.insertSelective(chat); 21 | } 22 | 23 | @Override 24 | public List selectChatByExample(ChatExample chatExample) { 25 | return chatMapper.selectByExample(chatExample); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/impl/CommentServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service.impl; 2 | 3 | import org.healthbeauty.dao.CommentMapper; 4 | import org.healthbeauty.pojo.Comment; 5 | import org.healthbeauty.pojo.CommentExample; 6 | import org.healthbeauty.service.CommentService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | @Service("commentService") 13 | public class CommentServiceImpl implements CommentService { 14 | 15 | @Autowired(required = false) 16 | private CommentMapper commentMapper; 17 | 18 | @Override 19 | public void insertSelective(Comment comment){ 20 | commentMapper.insertSelective(comment); 21 | } 22 | 23 | @Override 24 | public List selectByExample(CommentExample commentExample) { 25 | return commentMapper.selectByExample(commentExample); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/impl/GoodsServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service.impl; 2 | 3 | import org.healthbeauty.dao.FavoriteMapper; 4 | import org.healthbeauty.dao.GoodsMapper; 5 | import org.healthbeauty.dao.ImagePathMapper; 6 | import org.healthbeauty.pojo.*; 7 | import org.healthbeauty.service.GoodsService; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.List; 12 | 13 | 14 | @Service("goodsService") 15 | public class GoodsServiceImpl implements GoodsService { 16 | 17 | @Autowired(required = false) 18 | GoodsMapper goodsMapper; 19 | 20 | @Autowired(required = false) 21 | ImagePathMapper imagePathMapper; 22 | 23 | @Autowired(required = false) 24 | FavoriteMapper favoriteMapper; 25 | 26 | @Override 27 | public Integer addGoods(Goods goods) { 28 | goodsMapper.insertSelective(goods); 29 | return goods.getGoodsid(); 30 | } 31 | 32 | @Override 33 | public void addImagePath(ImagePath imagePath) { 34 | imagePathMapper.insertSelective(imagePath); 35 | } 36 | 37 | @Override 38 | public List selectByExample(GoodsExample example) { 39 | return goodsMapper.selectByExampleWithBLOBs(example); 40 | } 41 | 42 | @Override 43 | public List selectList(List list) { 44 | 45 | return goodsMapper.selectList(list); 46 | } 47 | 48 | @Override 49 | public void deleteGoodsById(Integer goodsid) { 50 | 51 | goodsMapper.deleteByPrimaryKey(goodsid); 52 | } 53 | 54 | @Override 55 | public void updateGoodsById(Goods goods) { 56 | goodsMapper.updateByPrimaryKeySelective(goods); 57 | } 58 | 59 | @Override 60 | public List findImagePath(Integer goodsid) { 61 | ImagePathExample imagePathExample = new ImagePathExample(); 62 | imagePathExample.or().andGoodidEqualTo(goodsid); 63 | 64 | return imagePathMapper.selectByExample(imagePathExample); 65 | } 66 | 67 | @Override 68 | public Goods selectById(Integer goodsid) { 69 | return goodsMapper.selectByPrimaryKey(goodsid); 70 | } 71 | 72 | @Override 73 | public List selectByExampleLimit(GoodsExample digGoodsExample) { 74 | return goodsMapper.selectByExampleWithBLOBsLimit(digGoodsExample); 75 | } 76 | 77 | @Override 78 | public void addFavorite(Favorite favorite) { 79 | favoriteMapper.insertSelective(favorite); 80 | } 81 | 82 | @Override 83 | public Favorite selectFavByKey(FavoriteKey favoriteKey) { 84 | return favoriteMapper.selectByPrimaryKey(favoriteKey); 85 | } 86 | 87 | @Override 88 | public void deleteFavByKey(FavoriteKey favoriteKey) { 89 | favoriteMapper.deleteByPrimaryKey(favoriteKey); 90 | } 91 | 92 | @Override 93 | public List selectFavByExample(FavoriteExample favoriteExample) { 94 | return favoriteMapper.selectByExample(favoriteExample); 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/impl/OrderServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service.impl; 2 | 3 | import org.healthbeauty.dao.AddressMapper; 4 | import org.healthbeauty.dao.OrderItemMapper; 5 | import org.healthbeauty.dao.OrderMapper; 6 | import org.healthbeauty.pojo.*; 7 | import org.healthbeauty.service.OrderService; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.List; 12 | 13 | @Service("orderService") 14 | public class OrderServiceImpl implements OrderService { 15 | 16 | @Autowired(required = false) 17 | private OrderMapper orderMapper; 18 | 19 | @Autowired(required = false) 20 | private OrderItemMapper orderItemMapper; 21 | 22 | @Autowired(required = false) 23 | private AddressMapper addressMapper; 24 | 25 | @Override 26 | public void insertOrder(Order order) { 27 | orderMapper.insertSelective(order); 28 | } 29 | 30 | @Override 31 | public void deleteById(Integer orderid) { 32 | orderMapper.deleteByPrimaryKey(orderid); 33 | } 34 | 35 | 36 | @Override 37 | public List selectOrderByExample(OrderExample orderExample) { 38 | return orderMapper.selectByExample(orderExample); 39 | } 40 | 41 | @Override 42 | public List getOrderItemByExample(OrderItemExample orderItemExample) { 43 | return orderItemMapper.selectByExample(orderItemExample); 44 | } 45 | 46 | @Override 47 | public List selectList(Integer orderId) { 48 | return orderItemMapper.selectList(orderId); 49 | } 50 | 51 | @Override 52 | public Address getAddressByKey(Integer addressid) { 53 | return addressMapper.selectByPrimaryKey(addressid); 54 | } 55 | 56 | @Override 57 | public void updateOrderByKey(Order order) { 58 | orderMapper.updateByPrimaryKeySelective(order); 59 | } 60 | 61 | @Override 62 | public Order selectByPrimaryKey(Integer orderid) { 63 | return orderMapper.selectByPrimaryKey(orderid); 64 | } 65 | 66 | @Override 67 | public void insertOrderItem(OrderItem orderItem) { 68 | orderItemMapper.insertSelective(orderItem); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/impl/ShopCartServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service.impl; 2 | 3 | import org.healthbeauty.dao.ShopCartMapper; 4 | import org.healthbeauty.pojo.ShopCart; 5 | import org.healthbeauty.pojo.ShopCartExample; 6 | import org.healthbeauty.pojo.ShopCartKey; 7 | import org.healthbeauty.service.ShopCartService; 8 | import org.springframework.beans.factory.annotation.Autowired; 9 | import org.springframework.stereotype.Service; 10 | 11 | import java.util.List; 12 | 13 | @Service("addShopCart") 14 | public class ShopCartServiceImpl implements ShopCartService { 15 | 16 | @Autowired(required = false) 17 | ShopCartMapper shopCartMapper; 18 | 19 | @Override 20 | public void addShopCart(ShopCart shopCart) { 21 | shopCartMapper.insertSelective(shopCart); 22 | } 23 | 24 | @Override 25 | public List selectByExample(ShopCartExample shopCartExample) { 26 | 27 | return shopCartMapper.selectByExample(shopCartExample); 28 | } 29 | 30 | @Override 31 | public void deleteByKey(ShopCartKey shopCartKey) { 32 | shopCartMapper.deleteByPrimaryKey(shopCartKey); 33 | } 34 | 35 | @Override 36 | public void updateCartByKey(ShopCart shopCart) { 37 | shopCartMapper.updateByPrimaryKeySelective(shopCart); 38 | } 39 | 40 | @Override 41 | public ShopCart selectCartByKey(ShopCartKey shopCartKey) { 42 | return shopCartMapper.selectByPrimaryKey(shopCartKey); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/service/impl/UserServiceImpl.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.service.impl; 2 | 3 | import org.healthbeauty.dao.UserMapper; 4 | import org.healthbeauty.pojo.User; 5 | import org.healthbeauty.pojo.UserExample; 6 | import org.healthbeauty.service.UserService; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.stereotype.Service; 9 | 10 | import java.util.List; 11 | 12 | @Service("userService") 13 | public class UserServiceImpl implements UserService { 14 | 15 | @Autowired(required = false) 16 | private UserMapper userMapper; 17 | 18 | @Override 19 | public User selectByPrimaryKey(int userId) { 20 | return userMapper.selectByPrimaryKey(userId); 21 | } 22 | 23 | @Override 24 | public List selectByExample(UserExample userExample) { 25 | return userMapper.selectByExample(userExample); 26 | } 27 | 28 | @Override 29 | public void insertSelective(User user) { 30 | userMapper.insertSelective(user); 31 | } 32 | 33 | @Override 34 | public void deleteUserById(Integer userid) { 35 | userMapper.deleteByPrimaryKey(userid); 36 | } 37 | 38 | @Override 39 | public void updateByPrimaryKeySelective(User user) { 40 | userMapper.updateByPrimaryKeySelective(user); 41 | } 42 | 43 | 44 | /* @Override 45 | public User selectByPrimaryKeyAndPassword(int userId,String password){return userMapper.selectByPrimaryKeyAndPassword();}*/ 46 | } 47 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/util/Test.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.util; 2 | 3 | /** 4 | * Created by 5 | */ 6 | public class Test { 7 | } 8 | -------------------------------------------------------------------------------- /src/main/java/org/healthbeauty/util/verificate/Verificate.java: -------------------------------------------------------------------------------- 1 | package org.healthbeauty.util.verificate; 2 | 3 | import javax.imageio.ImageIO; 4 | import java.awt.*; 5 | import java.awt.image.BufferedImage; 6 | import java.io.IOException; 7 | import java.io.OutputStream; 8 | import java.util.Random; 9 | 10 | /** 11 | * Created . 12 | */ 13 | public class Verificate { 14 | 15 | // 验证码图片中可以出现的字符集,可根据需要修改 16 | private char mapTable[] = { 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 17 | 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9' }; 18 | 19 | /** 20 | * 功能:生成彩色验证码图片 参数width为生成图片的宽度,参数height为生成图片的高度,参数为页面的输出流 21 | */ 22 | public String getCertPic(int width, int height,OutputStream os) { 23 | if (width <= 0) 24 | width = 60; 25 | if (height <= 0) 26 | height = 20; 27 | BufferedImage image = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); 28 | // 获取图形上下文 29 | Graphics g = image.getGraphics(); 30 | // 设定背景色 31 | g.setColor(new Color(0x9FDCB1)); 32 | g.fillRect(0, 0, width, height); 33 | // 画边框 34 | g.setColor(new Color(0x9FDCB1)); 35 | g.drawRect(0, 0, width - 1, height - 1); 36 | // 取随机产生的认证码 37 | String strEnsure = ""; 38 | // 4代表4位验证码,如果要生成更多位的认证码,则加大数值 39 | for (int i = 0; i < 4; ++i) { 40 | strEnsure += mapTable[(int) (mapTable.length * Math.random())]; 41 | } 42 | // 将认证码显示到图像中,如果要生成更多位的认证码,增加drawString语句 43 | g.setColor(new Color(0x172D44)); 44 | g.setFont(new Font("Atlantic Inline", Font.PLAIN, 18)); 45 | String str = strEnsure.substring(0, 1); 46 | g.drawString(str, 8, 17); 47 | str = strEnsure.substring(1, 2); 48 | g.drawString(str, 20, 15); 49 | str = strEnsure.substring(2, 3); 50 | g.drawString(str, 35, 18); 51 | str = strEnsure.substring(3, 4); 52 | g.drawString(str, 45, 15); 53 | // 随机产生10个干扰点 54 | Random rand = new Random(); 55 | for (int i = 0; i < 10; i++) { 56 | int x = rand.nextInt(width); 57 | int y = rand.nextInt(height); 58 | g.drawOval(x, y, 1, 1); 59 | } 60 | // 释放图形上下文 61 | g.dispose(); 62 | try { 63 | // 输出图像到页面 64 | ImageIO.write(image, "JPEG", os); 65 | } catch (IOException e) { 66 | return ""; 67 | } 68 | return strEnsure; 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /src/main/resources/applicationContext.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /src/main/resources/dbconfig.properties: -------------------------------------------------------------------------------- 1 | #jdbc.jdbcUrl=jdbc:mysql://121.4.26.171:3306/minority?useUnicode=true&characterEncoding=utf8 2 | jdbc.jdbcUrl=jdbc:mysql://localhost:3306/graduation_minority?useUnicode=true&characterEncoding=utf8 3 | jdbc.driverClass=com.mysql.jdbc.Driver 4 | #jdbc.user=foreign 5 | #jdbc.password=root 6 | jdbc.user=root 7 | jdbc.password=123456 -------------------------------------------------------------------------------- /src/main/resources/mybatis-config.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/main/resources/spring-mvc.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/adminLogin.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 管理员登录 9 | 10 | 11 | 12 | 13 | 14 | 15 | 45 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/adminOrderNav.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 |
3 |
4 | 12 |
13 |
14 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/category.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java"%> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 产品类别 10 | 11 | 13 | 15 | 17 | 18 | 19 | 37 | 38 | 39 |
40 | 43 |
44 | 分类筛选: 45 |
46 | 全部 47 | 48 | ${category.catename} 49 | 50 | 51 |
52 |
53 |
54 | 55 |
56 |
57 |

58 | 类别>${cate} 59 |

60 |
61 |
62 | 63 |
64 |
65 |
    66 | 67 |
  • 68 |
    69 | 71 | 74 | 75 |
    76 |

    77 | ${goods.goodsname} 79 |

    80 |
    81 | ¥${goods.price} 82 |
    83 |
    84 | 85 | 88 | 89 | 90 | 93 | 94 | 95 |
    96 |
  • 97 |
    98 | 99 |
    100 |
101 |
102 |
103 |
104 | 当前第${pageInfo.pageNum}页,共${pageInfo.pages}页,总共${pageInfo.size}条记录 105 |
106 |
107 | 150 |
151 |
152 |
153 |
154 |
155 |
156 | 157 | 158 | 159 | 160 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/chatrobot.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | 4 | 5 | 6 | 7 | 8 | 淘一淘-小淘 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 22 |
23 |
24 |
25 |
26 |

小淘

27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 | 38 |
39 |
40 | 41 |
42 |
43 |
44 |
45 |
46 | 47 |
48 |
49 | 50 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/footer.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java"%> 2 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/frontChat.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 | 56 | 57 | 58 | <%String clientID=request.getParameter("clientID"); 59 | String toID=request.getParameter("toID"); 60 | %> 61 |

62 | 63 | 64 | 65 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/goodsNav.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 |
3 |
4 | 12 |
13 |
14 | 15 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/header.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java"%> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 3 | 5 |
6 | 35 |
36 | 47 |
48 |
49 |
50 | 111 |
112 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/login.jsp: -------------------------------------------------------------------------------- 1 | <%@page import="java.security.interfaces.RSAKey"%> 2 | <%@ page language="java" pageEncoding="UTF-8"%> 3 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 4 | 5 | 6 | 7 | 8 | 9 | Health Beauty - 欢迎登录 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | <%----%> 42 | 43 | 49 | 50 | 51 | 52 |
53 | 56 | 107 |
108 | 109 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/news.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java"%> 2 | <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 3 | 4 | 5 | 6 | 7 | 8 | 9 | 类别 10 | 11 | 13 | 15 | 17 | 18 | 19 | 37 | 38 | 39 |
40 | 43 |
44 | 分类筛选: 45 |
46 | 全部 47 | 48 | ${category.catename} 49 | 50 | 51 |
52 |
53 |
54 | 55 |
56 |
57 |

58 | 类别>${cate} 59 |

60 |
61 |
62 | 63 |
64 |
65 | 87 |
88 |
89 |
90 | 当前第${pageInfo.pageNum}页,共${pageInfo.pages}页,总共${pageInfo.size}条记录 91 |
92 |
93 | 136 |
137 |
138 |
139 |
140 |
141 |
142 | 143 | 144 | 145 | 146 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/register.jsp: -------------------------------------------------------------------------------- 1 | <%@page import="java.security.interfaces.RSAKey"%> 2 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 3 | <%request.setCharacterEncoding("utf-8");%> 4 | <%@ page import="java.sql.*"%> 5 | <%@ page import="java.text.*"%> 6 | 7 | 8 | 9 | 10 | 11 | 12 | Health Beauty - 个人注册 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 29 | 90 |
91 | 92 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/sidebar.jsp: -------------------------------------------------------------------------------- 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> 2 |
3 |
4 |
5 |

后台管理

6 |
7 |
8 | 9 |
10 | 22 |
23 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/views/verificationcodeimg.jsp: -------------------------------------------------------------------------------- 1 | <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 2 | <%--<%@ page contentType="text/html;charset=UTF-8" language="java" %>--%> 3 | <%@page import="org.healthbeauty.util.verificate.Verificate" %> 4 | <%--<% 5 | String path = request.getContextPath(); 6 | String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 7 | %>--%> 8 | <%@page contentType="image/jpeg"%> 9 | 10 | <% 11 | String str = image.getCertPic(0, 0, response.getOutputStream()); 12 | // 将认证码存入SESSION 13 | session.setAttribute("certCode", str); 14 | out.clear(); 15 | out = pageContext.pushBody(); 16 | %> 17 | 18 | 19 | 20 | Title 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/web.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Archetype Created Web Application 4 | 5 | contextConfigLocation 6 | classpath:applicationContext.xml 7 | 8 | 9 | org.springframework.web.context.ContextLoaderListener 10 | 11 | 12 | SpringMVC 13 | org.springframework.web.servlet.DispatcherServlet 14 | 15 | contextConfigLocation 16 | classpath:spring-mvc.xml 17 | 18 | 1 19 | 20 | 21 | SpringMVC 22 | / 23 | 24 | 25 | CharacterEncodingFilter 26 | org.springframework.web.filter.CharacterEncodingFilter 27 | 28 | encoding 29 | utf-8 30 | 31 | 32 | 33 | CharacterEncodingFilter 34 | /* 35 | 36 | 37 | HiddenHttpMethodFilter 38 | org.springframework.web.filter.HiddenHttpMethodFilter 39 | 40 | 41 | HiddenHttpMethodFilter 42 | /* 43 | 44 | -------------------------------------------------------------------------------- /src/main/webapp/css/MaterialIcons-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/css/MaterialIcons-Regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/css/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/main/webapp/css/bootstrap/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') -------------------------------------------------------------------------------- /src/main/webapp/css/chat.css: -------------------------------------------------------------------------------- 1 | .chat-div { 2 | width: 100%; 3 | margin: 40px auto 0px auto; 4 | } 5 | 6 | .chat { 7 | /*margin: 30px;*/ 8 | width: 73%; 9 | display: inline-block; 10 | /*margin-top: 0;*/ 11 | margin-left: 0%; 12 | position: relative; 13 | top: -45px; 14 | } 15 | 16 | .chat-content { 17 | padding: 20px; 18 | background: #F8F8F8; 19 | width: 100%; 20 | height: 500px; 21 | overflow-x: hidden; 22 | overflow-y: auto; 23 | } 24 | 25 | .chat-message { 26 | margin-top: 8px; 27 | margin-bottom: 8px; 28 | } 29 | 30 | .message-icon-left { 31 | position: absolute; 32 | right: auto; 33 | left: -21px; 34 | color: #FFF; 35 | } 36 | 37 | .message-icon-right { 38 | position: absolute; 39 | /*left: 5px;*/ 40 | right: -280px; 41 | color: #DDD; 42 | } 43 | 44 | .info-content { 45 | display: inline-block !important; 46 | display: inline; 47 | width: auto; 48 | } 49 | 50 | .chat-message-content1 { 51 | position: relative; 52 | float: left; 53 | background: #FFFFFF; 54 | margin-right: 20%; 55 | width: auto; 56 | box-shadow: none; 57 | padding: 11px; 58 | border: 1px solid #DDD; 59 | border-radius: 4px; 60 | } 61 | 62 | 63 | .chat-message-content2 { 64 | position: relative; 65 | float: right; 66 | background: #34BBF9; 67 | margin-left: 20%; 68 | width: auto; 69 | box-shadow: none; 70 | padding: 11px; 71 | border: 1px solid #34BBF9; 72 | border-radius: 4px; 73 | } 74 | 75 | /*.form-group { 76 | width: 100%; 77 | height: 100%; 78 | }*/ 79 | 80 | .form-div { 81 | /*padding: 1%;*/ 82 | } 83 | 84 | .input-div { 85 | width: 86%; 86 | margin: 2% 0.8% 2% 0.9%; 87 | } 88 | 89 | .send-div { 90 | width: 11%; 91 | height: 53px; 92 | margin-top: 2%; 93 | } 94 | 95 | #input-message { 96 | width: 100%; 97 | } 98 | 99 | .send-div>input { 100 | height: 100%; 101 | } 102 | 103 | .chat-list { 104 | width: 20%; 105 | height: 565px; 106 | display: inline-block; 107 | overflow-x: hidden; 108 | overflow-y: hidden; 109 | margin-left: 2%; 110 | position: relative; 111 | top: -15px; 112 | /*background: #EBEBEC;*/ 113 | 114 | } 115 | 116 | .list-item { 117 | height: 66px; 118 | border-right: 1px solid gray; 119 | background: #FAF7F4; 120 | padding-top: 4px; 121 | padding-left: 45px; 122 | /*font-size: 20px;*/ 123 | } 124 | 125 | .list-item { 126 | display: none; 127 | } 128 | 129 | #user-no { 130 | display: none; 131 | } 132 | 133 | .a-card { 134 | text-decoration: none !important; 135 | display: block; 136 | border: 1px solid #DDD; 137 | margin: 0; 138 | color: black; 139 | } 140 | 141 | .card { 142 | height: 60px; 143 | text-align: center; 144 | padding-top: 25px; 145 | } 146 | 147 | .a-card:hover { 148 | transition:transform .8s cubic-bezier(0.23, 1, 0.32, 1), box-shadow .8s cubic-bezier(0.23, 1, 0.32, 1); 149 | box-shadow:0 0 20px rgba(0, 0, 0, 0.3); 150 | transform:scale(1.01); 151 | background-color: #F8F8F8; 152 | z-index:2; 153 | } -------------------------------------------------------------------------------- /src/main/webapp/css/chatrobot.css: -------------------------------------------------------------------------------- 1 | .clear-float { 2 | clear: both; 3 | } 4 | 5 | #input-message { 6 | /*font-size: 30px;*/ 7 | } 8 | 9 | .chat-div { 10 | width: 100%; 11 | margin: 0 auto; 12 | } 13 | 14 | .chat { 15 | /*margin: 30px;*/ 16 | width: 100%; 17 | display: inline-block; 18 | /*margin-top: 0;*/ 19 | margin-left: 0%; 20 | position: relative; 21 | /*top: -45px;*/ 22 | } 23 | 24 | .chat-content { 25 | padding: 20px; 26 | background: #F8F8F8; 27 | width: 100%; 28 | height: 565px; 29 | overflow-x: hidden; 30 | overflow-y: auto; 31 | } 32 | 33 | .chat-message { 34 | margin-top: 8px; 35 | margin-bottom: 8px; 36 | } 37 | 38 | .message-icon-left { 39 | position: absolute; 40 | right: auto; 41 | left: -21px; 42 | color: #FFF; 43 | } 44 | 45 | .message-icon-right { 46 | position: absolute; 47 | /*left: 5px;*/ 48 | right: -280px; 49 | color: #DDD; 50 | } 51 | 52 | .info-content { 53 | display: inline-block !important; 54 | display: inline; 55 | width: auto; 56 | } 57 | 58 | .chat-message-content1 { 59 | position: relative; 60 | float: left; 61 | background: #FFFFFF; 62 | margin-right: 20%; 63 | width: auto; 64 | box-shadow: none; 65 | padding: 11px; 66 | border: 1px solid #DDD; 67 | border-radius: 4px; 68 | } 69 | 70 | 71 | .chat-message-content2 { 72 | position: relative; 73 | float: right; 74 | background: #34BBF9; 75 | margin-left: 20%; 76 | width: auto; 77 | box-shadow: none; 78 | padding: 11px; 79 | border: 1px solid #34BBF9; 80 | border-radius: 4px; 81 | } 82 | 83 | /*.form-group { 84 | width: 100%; 85 | height: 100%; 86 | }*/ 87 | 88 | .form-div { 89 | /*padding: 1%;*/ 90 | } 91 | 92 | .input-div { 93 | width: 86%; 94 | margin: 2% 0.8% 2% 0.9%; 95 | } 96 | 97 | .send-div { 98 | width: 11%; 99 | height: 53px; 100 | margin-top: 2%; 101 | } 102 | 103 | #input-message { 104 | width: 100%; 105 | } 106 | 107 | .send-div>input { 108 | height: 100%; 109 | } 110 | 111 | .chat-list { 112 | width: 20%; 113 | height: 625px; 114 | display: inline-block; 115 | overflow-x: hidden; 116 | overflow-y: hidden; 117 | margin-left: 2%; 118 | position: relative; 119 | top: 43px; 120 | /*background: #EBEBEC;*/ 121 | 122 | } 123 | 124 | .list-item { 125 | height: 66px; 126 | border-right: 1px solid gray; 127 | background: #FAF7F4; 128 | padding-top: 4px; 129 | padding-left: 45px; 130 | /*font-size: 20px;*/ 131 | } 132 | 133 | ::-webkit-scrollbar { 134 | height: 10px; 135 | width: 7px; 136 | background: rgba(0,0,0,.1); 137 | } 138 | 139 | ::-webkit-scrollbar-thumb { 140 | background: rgba(8, 174, 237, 0.3); 141 | border-radius: 6px; 142 | } 143 | 144 | -------------------------------------------------------------------------------- /src/main/webapp/css/favorite.css: -------------------------------------------------------------------------------- 1 | /**{ 2 | margin:0px; 3 | padding:0px; 4 | } 5 | */ 6 | body{ 7 | background:#e5e6d0; 8 | } 9 | 10 | .favorite { 11 | margin-top: 2%; 12 | } 13 | 14 | .favorite-side { 15 | margin-top: 2%; 16 | width: 30%; 17 | } 18 | 19 | .fav-menu { 20 | margin-top: 5%; 21 | } 22 | 23 | .fav-menu,#banner,#main-fav,#footer{ 24 | /*margin-top:1%;*/ 25 | /*width:1140px;*/ 26 | } 27 | 28 | .caret-right { 29 | position: absolute; 30 | top: 22px; 31 | left: 210px; 32 | } 33 | 34 | /* 万能的清除*/ 35 | .clear{ 36 | clear:both; 37 | } 38 | .fav-menu{ 39 | padding-top:1px; 40 | } 41 | .fav-menu ul{ 42 | list-style:none; 43 | /*padding-left: 15px;*/ 44 | } 45 | .fav-menu>ul{ 46 | /*list-style:none;*/ 47 | padding-left: 15px; 48 | } 49 | 50 | .top-li { 51 | border-top: 1px solid #FFFFFF; 52 | } 53 | 54 | .fav-menu ul li{ 55 | /*float:left;*/ 56 | margin:1px; 57 | width: 230px; 58 | border-bottom: 1px solid #FFFFFF; 59 | border-right: 1px solid #FFFFFF; 60 | /*border-left: 1px solid #FFFFFF;*/ 61 | position: relative; 62 | } 63 | 64 | .fav-menu ul li a{ 65 | color:#996699; 66 | 67 | font-family:Vivaldi; 68 | text-align:center; 69 | display:block; 70 | width:120px; 71 | height:50px; 72 | line-height:46px; 73 | font-size:25px; 74 | margin-left: 22px; 75 | text-decoration: none; 76 | } 77 | .fav-menu ul li a:hover{ 78 | background:#ffcccc; 79 | } 80 | .fav-menu ul li ul{ 81 | display:none; 82 | width:120px; 83 | position:absolute; 84 | z-index: 10; 85 | left: 100%; 86 | top: 0%; 87 | background:#ffcccc; 88 | } 89 | .fav-menu ul li:hover ul{ 90 | display:block; 91 | } 92 | .fav-menu ul li ul li{ 93 | width:120px; 94 | position: relative; 95 | right: 40px; 96 | } 97 | .fav-menu ul li ul li a{ 98 | width:120px; 99 | padding-left: 0px; 100 | margin-left: 0px; 101 | } 102 | .fav-menu ul li ul li a:hover{ 103 | background:#ff9999; 104 | } 105 | 106 | #main-fav{ 107 | padding:10px 10px; 108 | } 109 | /*#main-fav .container{ 110 | width:900px; 111 | float:left; 112 | } 113 | */#main-fav .product{ 114 | float:left; 115 | padding-left:10px; 116 | list-style:none; 117 | } -------------------------------------------------------------------------------- /src/main/webapp/css/icon.css: -------------------------------------------------------------------------------- 1 | /* fallback */ 2 | @font-face { 3 | font-family: 'Material Icons'; 4 | font-style: normal; 5 | font-weight: 400; 6 | src: url(MaterialIcons-Regular.woff2) format('woff2'); 7 | } 8 | 9 | .material-icons { 10 | font-family: 'Material Icons'; 11 | font-weight: normal; 12 | font-style: normal; 13 | font-size: 24px; 14 | line-height: 1; 15 | letter-spacing: normal; 16 | text-transform: none; 17 | display: inline-block; 18 | white-space: nowrap; 19 | word-wrap: normal; 20 | direction: ltr; 21 | -webkit-font-feature-settings: 'liga'; 22 | -webkit-font-smoothing: antialiased; 23 | } 24 | .error { 25 | color: red; 26 | } -------------------------------------------------------------------------------- /src/main/webapp/css/login.css: -------------------------------------------------------------------------------- 1 | .form-login { 2 | margin-top: 15%; 3 | /* background-image: url(../image/tao.jpg); */ 4 | } 5 | 6 | body { 7 | /* background-image: url(../image/tao.jpg); */ 8 | } 9 | 10 | .login-h2 { 11 | margin-left: 25px; 12 | } 13 | 14 | .form-register { 15 | margin-top: 6%; 16 | } 17 | 18 | .error { 19 | color: red; 20 | } 21 | -------------------------------------------------------------------------------- /src/main/webapp/css/main.css: -------------------------------------------------------------------------------- 1 | /*li { 2 | display: inline-block; 3 | list-style: none; 4 | margin-right: 7px; 5 | }*/ 6 | 7 | #header { 8 | margin-top: 8px; 9 | /*background: #F5F5F5;*/ 10 | } 11 | #header-bottom { 12 | 13 | } 14 | #header-nav-middle { 15 | /* background-color: #222; 16 | border-color: #080808; */ 17 | 18 | } 19 | 20 | #bs-example-navbar-collapse-1 { 21 | margin-left: 150px; 22 | } 23 | 24 | .header-bottom { 25 | height: auto; 26 | } 27 | 28 | .clear-float { 29 | clear: both; 30 | } 31 | 32 | #mycarousel { 33 | /* width: 80%; */ 34 | float: left; 35 | /* margin-left: 1%; */ 36 | /* display: inline; 37 | overflow: hidden; 38 | position: relative;*/ 39 | } 40 | 41 | .sort { 42 | width: 19%; 43 | height: auto; 44 | float: left; 45 | /*position: relative;*/ 46 | /*margin-right: 5%;*/ 47 | } 48 | 49 | .sort-channel { 50 | 51 | } 52 | 53 | .sort-detail { 54 | /*float: left;*/ 55 | position: absolute; 56 | z-index: 10; 57 | top: 0px; 58 | /*left: 218px;*/ 59 | left: 102%; 60 | background: white; 61 | width: 300px; 62 | display: none; 63 | /*float: left;*/ 64 | padding: 5px; 65 | border:1px solid gray; 66 | 67 | border-radius: 3px; 68 | 69 | } 70 | 71 | .sort-channel-list>li { 72 | list-style: none; 73 | padding: 10px 30px; 74 | } 75 | 76 | .list-group-item>a{ 77 | color: black; 78 | text-decoration: none; 79 | } 80 | 81 | /*.dl-horizontal dt { 82 | text-align: left !important; 83 | width: auto !important; 84 | } 85 | 86 | .dl-horizontal dd { 87 | text-align: left !important; 88 | width: auto !important; 89 | margin-left: 0; 90 | }*/ 91 | 92 | .dl-hor { 93 | /*border-top: none;*/ 94 | float: left; 95 | clear: both; 96 | margin: 10px 10px 10px 5px; 97 | } 98 | 99 | .dl-hor>dt { 100 | float: left; 101 | margin-right: 18px; 102 | } 103 | 104 | .dl-hor>dd { 105 | float: left; 106 | } 107 | 108 | .dl-hor>dd>a { 109 | margin-right: 8px; 110 | } 111 | 112 | .dl-hor>dt>a { 113 | color: red; 114 | } 115 | 116 | .hd>h2 { 117 | border-left: 3px solid black; 118 | padding-left: 10px; 119 | } 120 | 121 | .data>ul { 122 | padding: 0 15px; 123 | margin-bottom: 0 !important; 124 | } 125 | 126 | .data>ul>li { 127 | list-style: none; 128 | float: left; 129 | margin: 2px 9px; 130 | position: relative; 131 | } 132 | 133 | .hd>hr { 134 | margin-top: 10px; 135 | margin-bottom: 10px; 136 | } 137 | 138 | .content { 139 | margin: 23px 8px; 140 | } 141 | 142 | .module { 143 | border-bottom: 1px solid #EEE; 144 | margin-top: 6px; 145 | } 146 | 147 | p.text-right { 148 | margin-right: 5px; 149 | margin-bottom: 3px; 150 | margin-top: 3px; 151 | font-size: 20px; 152 | } 153 | 154 | p.text-right>a { 155 | color: black; 156 | text-decoration: none; 157 | } 158 | 159 | p.text-right>a:hover { 160 | color: orange; 161 | } 162 | 163 | div.text-right { 164 | margin-right: 5px; 165 | } 166 | 167 | .text-right>b { 168 | color: #f40; 169 | font-size: 15px; 170 | } 171 | 172 | .like-button { 173 | font-size: 15px !important; 174 | position: absolute !important; 175 | z-index: 10 !important; 176 | left: 70% !important; 177 | top: 60% !important; 178 | } 179 | 180 | /*.like-button2 { 181 | font-size: 15px !important; 182 | position: absolute !important; 183 | z-index: 10 !important; 184 | left: 80% !important; 185 | top: 70% !important; 186 | display: none !important; 187 | }*/ 188 | 189 | .dropdown-menu { 190 | top: 75% !important; 191 | } 192 | 193 | .login-out { 194 | color: red !important; 195 | } 196 | 197 | .navbar-nav>li>a { 198 | /* color: #d4c8bb !important; */ 199 | } 200 | 201 | .navbar-nav>li>a:hover{ 202 | color: #e83038 !important; 203 | } 204 | 205 | .logo-word { 206 | font-family:chiller; 207 | font-size:25px; 208 | color:#dad5d5 !important; 209 | } 210 | 211 | .log-word:hover { 212 | color:red !important; 213 | } 214 | 215 | .to-big:hover { 216 | transition:transform .8s cubic-bezier(0.23, 1, 0.32, 1), box-shadow .8s cubic-bezier(0.23, 1, 0.32, 1); 217 | box-shadow:0 0 20px rgba(0, 0, 0, 0.3); 218 | transform:scale(1.05); 219 | z-index:2; 220 | } 221 | #back-to-top { 222 | position: fixed; 223 | right: 10px; 224 | bottom: 10px; 225 | background: rgba(230, 126, 34, 0.6); 226 | color: #ffffff; 227 | text-align: center; 228 | border-radius: 2px; 229 | z-index: 1; 230 | display: none; 231 | } 232 | #back-to-top:hover { 233 | background: #e67e22; 234 | } 235 | #back-to-top i { 236 | width: 30px; 237 | height: 30px; 238 | line-height: 30px; 239 | } -------------------------------------------------------------------------------- /src/main/webapp/css/order.css: -------------------------------------------------------------------------------- 1 | .header-border { 2 | border-bottom: solid 1px #c6c5c5; 3 | } 4 | 5 | .h4-mar{ 6 | margin-top: 30px; 7 | } 8 | 9 | .h4-mar-2 { 10 | margin-top: 30px; 11 | } 12 | 13 | .address>.radio { 14 | padding-left: 50px; 15 | } 16 | 17 | .radio>label { 18 | margin: 5px 0 5px 0; 19 | } 20 | 21 | .address-check input[type='checkbox']:checked { 22 | background: #FFF0E8; 23 | border: solid 1px #f40; 24 | } 25 | 26 | .manage-a { 27 | font-size: 15px; 28 | color: #2aabd2; 29 | } -------------------------------------------------------------------------------- /src/main/webapp/css/release.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* CSS Document */ 3 | 4 | .release { 5 | margin-left: 10%; 6 | width: 80%; 7 | } 8 | 9 | .submit-input { 10 | /*width:30%; */ 11 | /*margin-left:*/ 12 | } 13 | 14 | .upload-button { 15 | /*width: 30%*/; 16 | margin-left: 0; 17 | } 18 | 19 | h1 { 20 | /*margin-left:-50px;*/ 21 | } -------------------------------------------------------------------------------- /src/main/webapp/css/shopdetail.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | /*通用样式*/ 4 | .shopdetails a{ 5 | text-decoration:none; 6 | color:#333; 7 | font-size:12px; 8 | } 9 | .shopdetails ul,li,dl,dt,dd,h1,h2,h3,h4,h5,h6,form,p{ 10 | padding:0; margin:0; 11 | list-style:none; 12 | } 13 | .shopdetails img{ border:0px;} 14 | .clear{ 15 | clear:both; 16 | } 17 | 18 | 19 | /*放大镜*/ 20 | #leftbox{ 21 | width:400px; 22 | z-index:999; 23 | margin-left: 15px; 24 | /*position:absolute;*/ 25 | } 26 | #showbox { background:#eee;} 27 | #showbox img{ 28 | z-index: 100; 29 | } 30 | #showbox span { 31 | background:url(../image/whitebg.png) repeat; 32 | } 33 | #showsum { 34 | left:25px; 35 | margin-top:10px; 36 | } 37 | #showsum span { 38 | border:1px solid #ddd; 39 | } 40 | #showsum span.sel { 41 | border:1px solid #f60; 42 | } 43 | 44 | .showpage { 45 | width:400px; 46 | position:relative; 47 | } 48 | .showpage a { 49 | display:block; width:15px; 50 | border:1px solid #ddd; 51 | height:60px; line-height:60px; 52 | background:#eee; 53 | text-align:center; 54 | font-size:18px; 55 | position:absolute; 56 | left:0; top:-62px; 57 | text-decoration:none; 58 | color:#999;} 59 | .showpage a#shownext { 60 | left:auto; right:0; 61 | } 62 | .showpage a:hover { 63 | background:#ccc; 64 | color:#777; 65 | } 66 | 67 | .rel-div { 68 | position: relative; 69 | top: 50px; 70 | } -------------------------------------------------------------------------------- /src/main/webapp/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /src/main/webapp/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /src/main/webapp/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /src/main/webapp/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /src/main/webapp/fonts/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/fonts/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /src/main/webapp/image/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/1.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/11.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/11.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/12.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/12.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/13.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/14.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/14.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/2.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/3.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/3333.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/3333.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/4.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/5.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/6.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/7.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/8.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/checkbox-radio-sheet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/checkbox-radio-sheet.png -------------------------------------------------------------------------------- /src/main/webapp/image/darkbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/darkbg.png -------------------------------------------------------------------------------- /src/main/webapp/image/head.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/head.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/img/cancel-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/img/cancel-off.png -------------------------------------------------------------------------------- /src/main/webapp/image/img/cancel-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/img/cancel-on.png -------------------------------------------------------------------------------- /src/main/webapp/image/img/star-half.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/img/star-half.png -------------------------------------------------------------------------------- /src/main/webapp/image/img/star-off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/img/star-off.png -------------------------------------------------------------------------------- /src/main/webapp/image/img/star-on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/img/star-on.png -------------------------------------------------------------------------------- /src/main/webapp/image/img01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/img01.png -------------------------------------------------------------------------------- /src/main/webapp/image/img02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/img02.png -------------------------------------------------------------------------------- /src/main/webapp/image/img03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/img03.png -------------------------------------------------------------------------------- /src/main/webapp/image/img04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/img04.png -------------------------------------------------------------------------------- /src/main/webapp/image/img05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/img05.png -------------------------------------------------------------------------------- /src/main/webapp/image/kebi.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/kebi.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/login.png -------------------------------------------------------------------------------- /src/main/webapp/image/login0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/login0.png -------------------------------------------------------------------------------- /src/main/webapp/image/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/logo.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/register.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/register.png -------------------------------------------------------------------------------- /src/main/webapp/image/register0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/register0.png -------------------------------------------------------------------------------- /src/main/webapp/image/tao.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/tao.jpg -------------------------------------------------------------------------------- /src/main/webapp/image/whitebg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/image/whitebg.png -------------------------------------------------------------------------------- /src/main/webapp/index.jsp: -------------------------------------------------------------------------------- 1 | <%@page contentType="text/html;charset=UTF-8" language="java" %> 2 | 3 | -------------------------------------------------------------------------------- /src/main/webapp/js/address.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function (){ 2 | var addresId; 3 | $("[name='changeAddr']").click(function (){ 4 | $("#update-addr").modal({ 5 | backdrop:'static' 6 | }); 7 | 8 | $("#name").val($(this).parents("#parent").find("#conname").text()); 9 | $("#telephone").val($(this).parents("#parent").find("#contel").text()); 10 | $("#detailaddress").val($(this).parents("#parent").find("#detailaddr").text()); 11 | addresId=$(this).parents("#parent").find("#table").attr("address-id"); 12 | 13 | }); 14 | 15 | 16 | $("#saveAddr").click(function (){ 17 | 18 | var isCheck =$('#addrForm').valid(); 19 | if(!isCheck){ 20 | return; 21 | } 22 | 23 | var saveAddr={}; 24 | saveAddr.addressid=addresId; 25 | saveAddr.province=$("#provinceUpdate").val(); 26 | saveAddr.city=$("#cityUpdate").val(); 27 | saveAddr.county=$("#countyUpdate").val(); 28 | saveAddr.detailaddr=$("#detailaddress").val(); 29 | saveAddr.conname=$("#name").val(); 30 | saveAddr.contel=$("#telephone").val(); 31 | /*if($("#telephone").val() == null || $("#telephone").val() == ''){ 32 | 33 | return false; 34 | }*/ 35 | /* if(!validate_add_form()){ 36 | return false; 37 | }*/ 38 | $.ajax({ 39 | type: "POST", 40 | url: "../saveAddr", 41 | contentType:"application/x-www-form-urlencoded; charset=utf-8", 42 | data:saveAddr, 43 | dateType:"json", 44 | success: function(result){ 45 | if (result.msg=="更新失败") 46 | { 47 | swal(result.msg); 48 | } 49 | else { 50 | $("#update-info").modal('hide'); 51 | swal("修改成功", "", "success"); 52 | $("button").click(function (){ 53 | location.reload(); 54 | }); 55 | } 56 | }, 57 | error:function (){ 58 | alert("更新失败"); 59 | } 60 | }); 61 | }); 62 | 63 | $("[name='deleteAddr']").click(function (){ 64 | addresId=$(this).parents("#parent").find("#table").attr("address-id"); 65 | var address={}; 66 | address.addressid=addresId; 67 | $.ajax({ 68 | type: "POST", 69 | url: "../deleteAddr", 70 | contentType:"application/x-www-form-urlencoded; charset=utf-8", 71 | data:address, 72 | dateType:"json", 73 | success:function (result){ 74 | swal(result.msg); 75 | $("button").click(function (){ 76 | location.reload(); 77 | }); 78 | }, 79 | error:function (){ 80 | alert("删除失败"); 81 | } 82 | }); 83 | }); 84 | 85 | $("#addAddr").click(function () { 86 | $("#insert-addr").modal({ 87 | backdrop:'static' 88 | }); 89 | }); 90 | 91 | $("#insertAddr").click(function (){ 92 | var isCheck= $('#insert-form').valid(); 93 | if(!isCheck){ 94 | return; 95 | } 96 | 97 | var insertAddr={}; 98 | insertAddr.addressid={}; 99 | insertAddr.userid={}; 100 | insertAddr.province=$("#provinceInsert").val(); 101 | insertAddr.city=$("#cityInsert").val(); 102 | insertAddr.county=$("#countyInsert").val(); 103 | insertAddr.detailaddr=$("#detailaddressInsert").val(); 104 | insertAddr.conname=$("#nameInsert").val(); 105 | /* if($("#nameInsert").val() == null || $("#nameInsert").val() == ''){ 106 | 107 | return false; 108 | }*/ 109 | insertAddr.contel=$("#telephoneInsert").val(); 110 | /* if($("#telephoneInsert").val() == null || $("#telephoneInsert").val() == ''){ 111 | 112 | return false; 113 | }*/ 114 | $.ajax({ 115 | type:"POST", 116 | url:"../insertAddr", 117 | contentType:"application/x-www-form-urlencoded; charset=utf-8", 118 | data:insertAddr, 119 | dataType:"json", 120 | success:function (result){ 121 | swal(result.msg); 122 | $("button").click(function (){ 123 | var query = {}; 124 | var qitems = location.search.substr(1).split('&')||[]; 125 | for(var i =0;i '; 8 | var element_float = '
'; 9 | $(".chat-content-body").append(element, element_float); 10 | send(message, '123456'); 11 | //始终保持滚动条滚动到最下方 12 | $(".chat-content").scrollTop($(".chat-content")[0].scrollHeight); 13 | 14 | } 15 | }); 16 | 17 | //回车 18 | $(document).keypress(function(e) { 19 | if (e.which == 13) { 20 | e.preventDefault(); 21 | jQuery("#send-message").click(); 22 | } 23 | }); 24 | 25 | 26 | /*var request = { 27 | "perception": { 28 | "inputText": { 29 | "text": "附近的酒店" 30 | }, 31 | "selfInfo": { 32 | "location": { 33 | "city": "北京", 34 | "latitude": "39.45492", 35 | "longitude": "119.239293", 36 | "nearest_poi_name": "上地环岛南", 37 | "province": "北京", 38 | "street": "信息路" 39 | }, 40 | } 41 | }, 42 | "userInfo": { 43 | "apiKey": "0a1bfc7154e94d009460be836523c1d1", 44 | "userId": "user" 45 | } 46 | };*/ 47 | 48 | 49 | }); 50 | 51 | function send(data,userid){ 52 | var request = { 53 | "key": "0a1bfc7154e94d009460be836523c1d1", 54 | "info": data, 55 | "loc": "沈阳市浑南新区", 56 | "userid": userid, 57 | }; 58 | 59 | $.post('http://www.tuling123.com/openapi/api', request, 60 | function(data, status){ 61 | // alert(data.code); 62 | if(data.code === 100000){ 63 | showMessage('123456', data.text); 64 | } else if(data.code === 200000) { 65 | //链接 66 | showUrl(data.text, data.url); 67 | } else if(data.code === 302000) { 68 | //新闻 69 | // alert(data.list.length); 70 | for(var i = 0; i '; 87 | var element_float = '
'; 88 | $(".chat-content-body").append(element, element_float); 89 | 90 | //始终保持滚动条滚动到最下方 91 | $(".chat-content").scrollTop($(".chat-content")[0].scrollHeight); 92 | 93 | } 94 | 95 | function showUrl(message, url) { 96 | var element = '
' + message + ' ' + '点击查看' +'
'; 97 | var element_float = '
'; 98 | $(".chat-content-body").append(element, element_float); 99 | 100 | //始终保持滚动条滚动到最下方 101 | $(".chat-content").scrollTop($(".chat-content")[0].scrollHeight); 102 | 103 | } 104 | 105 | function showNews(article, source, detailurl) { 106 | var element = '
' + article + '
来源:'+ source + '
查看详情' +'
'; 107 | var element_float = '
'; 108 | $(".chat-content-body").append(element, element_float); 109 | 110 | //始终保持滚动条滚动到最下方 111 | $(".chat-content").scrollTop($(".chat-content")[0].scrollHeight); 112 | 113 | } -------------------------------------------------------------------------------- /src/main/webapp/js/information.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | var oldPswflag=0; 3 | var newPswflag=0; 4 | $("#name").val($("#nameVal").text()); 5 | $("#email").val($("#emailVal").text()); 6 | $("#telephone").val($("#telephoneVal").text()); 7 | $("#changeInfo").click(function(){ 8 | $("#update-info").modal({ 9 | backdrop:'static ' 10 | }); 11 | }); 12 | 13 | 14 | $("#saveInfo").click(function (){ 15 | var isCheck =$('#update-form0').valid(); 16 | if(!isCheck){ 17 | return; 18 | } 19 | var saveInfo={}; 20 | saveInfo.name=$("#name").val(); 21 | saveInfo.email=$("#email").val(); 22 | saveInfo.telephone=$("#telephone").val(); 23 | $.ajax({ 24 | type: "POST", 25 | url: "saveInfo", 26 | contentType:"application/x-www-form-urlencoded; charset=utf-8", 27 | data:saveInfo, 28 | dateType:"json", 29 | success: function(result){ 30 | if (result.msg=="更新失败") 31 | { 32 | swal(result.msg); 33 | } 34 | else { 35 | $("#update-info").modal('hide'); 36 | swal("修改成功", "", "success"); 37 | $("button").click(function (){ 38 | location.reload(); 39 | }); 40 | } 41 | }, 42 | error:function (){ 43 | alert("更新失败"); 44 | } 45 | }); 46 | }); 47 | 48 | $("#changePsw").click(function (){ 49 | $("#update-Psw").modal({ 50 | backdrop:'static' 51 | }); 52 | }); 53 | 54 | $("#oldPsw").blur(function (){ 55 | if ($("#oldPsw").val()!=$("#Psw").attr("Psw")) 56 | { 57 | $("#oldPswError").show(); 58 | } 59 | else 60 | { 61 | $("#oldPswError").hide(); 62 | oldPswflag=1; 63 | } 64 | }) 65 | 66 | /* $("#newPsw").focus(function (){ 67 | if ($("#oldPsw").val()==$("#Psw").attr("Psw")) 68 | { 69 | $("#oldPswError").hide(); 70 | oldPswflag=1; 71 | } 72 | });*/ 73 | 74 | $("#newPsw").blur(function (){ 75 | if($("#newPsw").val().length<8) 76 | { 77 | $("#newPswError").show(); 78 | } 79 | else { 80 | $("#newPswError").hide(); 81 | newPswflag=1; 82 | } 83 | }); 84 | 85 | $("#savePsw").click(function (){ 86 | if (oldPswflag==1&&newPswflag==1) 87 | { 88 | var Psw={}; 89 | Psw.Psw=$("#newPsw").val(); 90 | $.ajax({ 91 | type: "POST", 92 | url: "savePsw", 93 | contentType:"application/x-www-form-urlencoded; charset=utf-8", 94 | data:Psw, 95 | dateType:"json", 96 | success: function(result){ 97 | if (result.msg=="更新失败") 98 | { 99 | swal(result.msg); 100 | } 101 | else { 102 | $("#update-info").modal('hide'); 103 | swal(result.msg); 104 | $("button").click(function (){ 105 | location.reload(); 106 | }); 107 | } 108 | }, 109 | error:function (){ 110 | alert("更新失败"); 111 | } 112 | }); 113 | } 114 | }); 115 | 116 | $('#addressManage').click(function () { 117 | location.replace('/minority/info/address'); 118 | }); 119 | 120 | 121 | }); 122 | $(function() { 123 | var tel = $("#telephone"); 124 | var span1 = $("#span1"); 125 | tel.blur(function() { 126 | 127 | if(tel.val() == "") { 128 | span1.html("*必填项"); 129 | } else { 130 | var reg_tel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/; //11位手机号码 正则,正则验证用户输入的数据是否合法 131 | if(reg_tel.test(tel.val())) 132 | span1.html(""); 133 | else { 134 | span1.html("") 135 | } 136 | } 137 | }); 138 | }); -------------------------------------------------------------------------------- /src/main/webapp/js/list.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function (){ 2 | $("[name='deleteList']").click(function (){ 3 | var orderid=$(this).parents("[name='parent']").find("[name='orderid']").text(); 4 | var order={}; 5 | order.orderid= parseInt(orderid); 6 | $.ajax({ 7 | type:"POST", 8 | url:"../deleteList", 9 | contentType:"application/x-www-form-urlencoded; charset=utf-8", 10 | data:order, 11 | dataType:"json", 12 | success:function (result){ 13 | swal(result.msg); 14 | $("button").click(function (){ 15 | location.reload(); 16 | }); 17 | }, 18 | error:function (){ 19 | alert("删除失败"); 20 | } 21 | }); 22 | }); 23 | 24 | $("[name='finishList']").click(function (){ 25 | var orderid=$(this).parents("[name='parent']").find("[name='orderid']").text(); 26 | var order={}; 27 | order.orderid=orderid; 28 | $.ajax({ 29 | type:"POST", 30 | url:"../finishList", 31 | contentType:"application/x-www-form-urlencoded; charset=utf-8", 32 | data:order, 33 | dataType:"json", 34 | success:function (result){ 35 | swal(result.msg); 36 | $("button").click(function (){ 37 | location.reload(); 38 | }); 39 | }, 40 | error:function (){ 41 | alert("点击失败"); 42 | } 43 | }); 44 | }) 45 | 46 | var goodsId={}; 47 | 48 | $("[name='evaluate']").click(function (){ 49 | $("#evaluate").modal({ 50 | backdrop:'static' 51 | }); 52 | goodsId=$(this).parents(".table-bordered").find(".col-lg-1").eq(0).text(); 53 | 54 | }) 55 | 56 | $("#star").raty({path: '../image/img'}); 57 | 58 | $("#saveEvaluate").click(function (){ 59 | var score=$("[name='score']").val(); 60 | var content=$("#description").val(); 61 | var comment={}; 62 | comment.commentid={}; 63 | comment.userid={}; 64 | comment.goodsid=goodsId; 65 | comment.point=score; 66 | comment.content=content; 67 | $.ajax({ 68 | type:"POST", 69 | url:"../comment", 70 | contentType:"application/x-www-form-urlencoded; charset=utf-8", 71 | data:comment, 72 | dataType:"json", 73 | success:function (result){ 74 | $("#evaluate").modal('hide'); 75 | swal(result.msg); 76 | }, 77 | error:function (){ 78 | alert("评论失败"); 79 | } 80 | }); 81 | 82 | 83 | }) 84 | 85 | }); -------------------------------------------------------------------------------- /src/main/webapp/js/login.js: -------------------------------------------------------------------------------- 1 | 2 | $.validator.setDefaults({ 3 | submitHandler: function() { 4 | form.submit(); 5 | } 6 | }); 7 | $(document).ready(function() { 8 | $('#form2').validate({ 9 | rules: { 10 | username: "required", 11 | 12 | password: { 13 | required: true, 14 | }, 15 | confirmlogo: "required", 16 | }, 17 | messages: { 18 | username: "用户名输入不能为空", 19 | 20 | password: { 21 | required: "密码输入不能为空", 22 | }, 23 | confirmlogo: "验证码输入不能为空", 24 | } 25 | }); 26 | }); -------------------------------------------------------------------------------- /src/main/webapp/js/order.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function () { 2 | $("#confirm-orders").click(function () { 3 | // alert("safd"); 4 | var selectAddr = $('input:radio[name="addressid"]:checked').val(); 5 | if(selectAddr == null) { 6 | swal("请先添加地址"); 7 | return; 8 | } 9 | var isPay = $('#pay-select').val(); 10 | var oldPrice = $('#total-old').text(); 11 | var newPrice = $('#total-new').text(); 12 | $.ajax({ 13 | url: "orderFinish", 14 | type: "POST", 15 | data: { 16 | oldPrice: oldPrice, 17 | newPrice: newPrice, 18 | isPay: isPay, 19 | addressid: selectAddr 20 | }, 21 | success: function () { 22 | swal("购买成功", "", "success"); 23 | location.href = "info/list" 24 | }, 25 | error: function () { 26 | swal("购买失败,无法连接到服务器!"); 27 | } 28 | }); 29 | }); 30 | }); -------------------------------------------------------------------------------- /src/main/webapp/js/shopcart.js: -------------------------------------------------------------------------------- 1 | /* 2 | $(document).ready(function(){ 3 | $('.delete-goods').click(function(){ 4 | var goodsid = $(this).attr("data-goodsid"); 5 | alert("asfd"); 6 | // deleteGoods(goodsid); 7 | }); 8 | 9 | $('.confirm-orders').click(function(){ 10 | confirmOrders(); 11 | alert("已成功加入订单,并已发送邮件至卖家,请等待卖家回复!"); 12 | location.href = "/index.jsp"; 13 | }); 14 | });*/ 15 | /* 16 | function deleteGoods(goodsid){ 17 | $.post("servlet/DeleteCartServlet", { 18 | goodsId: goodsid, 19 | }); 20 | } 21 | 22 | function confirmOrders(){ 23 | $.post("servlet/SaleServlet"); 24 | }*/ 25 | $(document).ready(function () { 26 | var path = $("#path").text(); 27 | showcart(); 28 | 29 | /*$('.delete-goods').click(function(){ 30 | alert("adf"); 31 | var goodsid = $(this).attr("data-goodsid"); 32 | $.ajax({ 33 | url: "/shop/deleteCart" + goodsid, 34 | type: "DELETE", 35 | success:function (result) { 36 | swal(result.msg, "","success"); 37 | showcart(); 38 | }, 39 | error:function () { 40 | /!*to_page('/shop',currentPage);*!/ 41 | swal("删除失败"); 42 | } 43 | }) 44 | });*/ 45 | }); 46 | 47 | /*$(document).on("click",".delete-good",function () { 48 | alert("afd"); 49 | });*/ 50 | 51 | function deleteCartGoods(goodsid) { 52 | $.ajax({ 53 | url: "deleteCart/" + goodsid, 54 | type: "DELETE", 55 | success: function (result) { 56 | // swal(result.msg, "","success"); 57 | showcart(); 58 | }, 59 | error:function () { 60 | swal("删除失败"); 61 | } 62 | }) 63 | } 64 | 65 | //改变商品数量更新购物车 66 | function updateCart(goodsid, newNum) { 67 | //获取当前数量 68 | // var newNum = $(".num").val(); 69 | $.ajax({ 70 | url: "update", 71 | data: { 72 | goodsid: goodsid, 73 | num:newNum 74 | }, 75 | method: "post", 76 | success: function (result) { 77 | // swal(result.msg, "", "success"); 78 | showcart(); 79 | }, 80 | error: function (result) { 81 | swal("更新购物车失败"); 82 | } 83 | }); 84 | } 85 | 86 | function showcart() { 87 | $.ajax({ 88 | url: "cartjson", 89 | type: "post", 90 | success: function (result) { 91 | //显示购物车 92 | build_cart_table(result); 93 | }, 94 | error: function (result) { 95 | swal("获取购物车失败"); 96 | } 97 | }); 98 | } 99 | 100 | function build_cart_table(result) { 101 | $("#cart-table tbody").empty(); 102 | var goods = result.info.shopcart; 103 | var totalnum = 0; 104 | var totalMoney = 0; 105 | 106 | if(goods.length === 0) { 107 | var spareTd = $('
购物车还是空的,快去首页看看吧!
'); 108 | spareTd.appendTo("#cart-table tbody"); 109 | $("#cart-form").empty(); 110 | } else { 111 | $.each(goods, function (index,item) { 112 | 113 | var delA = $("").addClass("delete-goods").attr("data-goodsid",item.goodsid).append("×"); 114 | 115 | var deleteCart = $("").addClass("product-remove product-remove_2") 116 | .append(delA); 117 | 118 | delA.click(function () { 119 | deleteCartGoods(item.goodsid); 120 | }); 121 | 122 | var shopimage = $("").addClass("product-thumbnail product-thumbnail-2") 123 | .append($("").attr("href","detail?goodsid="+item.goodsid) 124 | .append($("").attr("src","shopimage/"+item.imagePaths[0].path))); 125 | 126 | var goodsname = $("").addClass("product-name product-name_2") 127 | .append($("").attr("href","detail?goodsid="+item.goodsid).append(item.goodsname)); 128 | 129 | var goodsprice = $("").addClass("product-price") 130 | .append($("").addClass("amount-list amount-list-2").append("¥"+item.price)); 131 | 132 | var numIput = $("").addClass("num").attr("type","number").attr("value",item.num); 133 | 134 | var num = $("").addClass("product-stock-status") 135 | .append($("
").addClass("latest_es_from_2") 136 | .append(numIput)); 137 | 138 | numIput.change(function () { 139 | updateCart(item.goodsid,$(this).val()); 140 | }); 141 | 142 | var totalPrice = $("").addClass("product-price") 143 | .append($("").addClass("amount-list amount-list-2").append("¥"+item.price*item.num)); 144 | 145 | var goodsitem = $("").append(deleteCart) 146 | .append(shopimage) 147 | .append(goodsname) 148 | .append(goodsprice) 149 | .append(num) 150 | .append(totalPrice) 151 | .appendTo("#cart-table tbody"); 152 | totalnum++; 153 | totalMoney = totalMoney + item.price*item.num; 154 | }); 155 | } 156 | 157 | //小计 158 | $("#total-num").text(totalnum); 159 | $("#total-price").text("¥"+totalMoney); 160 | } 161 | -------------------------------------------------------------------------------- /src/main/webapp/js/sort.js: -------------------------------------------------------------------------------- 1 | $(document).ready(function(){ 2 | // $(".data-item-li").children("div").addClass("to-big"); 3 | //分类栏隐藏显示 4 | $(".list-group-item").hover(function(){ 5 | $(this).children("div.sort-detail").show(); 6 | },function(){ 7 | $(this).children("div.sort-detail").delay(1).hide(0); 8 | // $(this).children("div.sort-detail").hide(10); 9 | }); 10 | 11 | //幻灯片左右控制器 12 | $("#mycarousel").hover(function(){ 13 | $(this).children(".carousel-control").show(); 14 | },function(){ 15 | $(this).children(".carousel-control").hide(); 16 | }); 17 | 18 | //收藏按钮 19 | $(".data-item-li").hover(function(){ 20 | //需处理显示哪个按钮 21 | // $(this).find(".like-button").css("display","inline-block"); 22 | $(this).find(".like-button").show(); 23 | },function(){ 24 | $(this).find(".like-button").hide(); 25 | }); 26 | 27 | $(".info-a").hover(function(){ 28 | //需处理显示哪个按钮 29 | // $(this).find(".like-button").css("display","inline-block"); 30 | $(this).find(".dropdown-menu").show(); 31 | },function(){ 32 | $(this).find(".dropdown-menu").hide(); 33 | }); 34 | 35 | $('.like-button').click(function(){ 36 | //$(this).removeClass("glyphicon-heart-empty"); 37 | var goodsId = $(this).attr('data-id'); 38 | var isChangeBtn = true; 39 | if(!$(this).hasClass('glyphicon-heart')) { 40 | //收藏 41 | $.ajax({ 42 | url:"collect", 43 | type:"POST", 44 | data:{ 45 | goodsid:goodsId 46 | }, 47 | success:function (result) { 48 | //收藏成功 49 | if(result.code === 200){ 50 | location.href = "login"; 51 | isChangeBtn = false; 52 | } 53 | }, 54 | error:function () { 55 | alert("收藏失败"); 56 | } 57 | }) 58 | } else { 59 | //取消收藏 60 | $.ajax({ 61 | url:"deleteCollect", 62 | type:"POST", 63 | data:{ 64 | goodsid:goodsId 65 | }, 66 | success:function (result) { 67 | //取消收藏成功 68 | if(result.code === 200){ 69 | location.href = "login"; 70 | isChangeBtn = false; 71 | } 72 | }, 73 | error:function () { 74 | alert("取消收藏失败"); 75 | } 76 | }) 77 | } 78 | 79 | /*$.post("servlet/CollectServlet", { 80 | goodsId: goodsId, 81 | }); 82 | // alert("商品已加入购物车!");*/ 83 | 84 | if(isChangeBtn) { 85 | $(this).toggleClass("glyphicon-heart glyphicon-heart-empty"); 86 | } 87 | }); 88 | }); -------------------------------------------------------------------------------- /src/main/webapp/js/templatemo-script.js: -------------------------------------------------------------------------------- 1 | /* 2 | * www.templatemo.com 3 | *******************************************************/ 4 | 5 | /* HTML document is loaded. DOM is ready. 6 | -----------------------------------------*/ 7 | $(document).ready(function(){ 8 | 9 | /* Mobile menu */ 10 | $('.mobile-menu-icon').click(function(){ 11 | $('.templatemo-left-nav').slideToggle(); 12 | }); 13 | 14 | /* Close the widget when clicked on close button */ 15 | $('.templatemo-content-widget .fa-times').click(function(){ 16 | $(this).parent().slideUp(function(){ 17 | $(this).hide(); 18 | }); 19 | }); 20 | }); -------------------------------------------------------------------------------- /src/main/webapp/js/validate.js: -------------------------------------------------------------------------------- 1 | 2 | $.validator.setDefaults({ 3 | submitHandler: function() { 4 | form.submit(); 5 | } 6 | }); 7 | $(document).ready(function() { 8 | $('#form').validate({ 9 | rules: { 10 | username: "required", 11 | telephone: { 12 | required: true, 13 | number: true, 14 | minlength:11, 15 | maxlength:11, 16 | }, 17 | email: { 18 | required: true, 19 | email: true, 20 | }, 21 | password: { 22 | required: true, 23 | minlength: 8, 24 | }, 25 | confirmPassword: { 26 | required: true, 27 | minlength: 8, 28 | equalTo: "#password", 29 | } 30 | }, 31 | messages: { 32 | username: "用户名不能为空", 33 | telephone: { 34 | required:"联系电话不能为空", 35 | number: "请输入一个正确的电话号", 36 | minlength: "请输入一个正确的电话号", 37 | maxlength: "请输入一个正确的电话号", 38 | }, 39 | email: { 40 | required: "邮箱输入不能为空", 41 | email: "请输入一个正确的邮箱", 42 | }, 43 | password: { 44 | required: "密码输入不能为空", 45 | minlength: "密码长度不能小于8位", 46 | }, 47 | confirmPassword: { 48 | required: "输入不能为空", 49 | minlength: "密码长度不能小于8位", 50 | equalTo: "两次密码输入不一致", 51 | } 52 | } 53 | }); 54 | }); -------------------------------------------------------------------------------- /src/main/webapp/shopimage/0c7c33a4e6d046768a24927b6bc06ec3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/0c7c33a4e6d046768a24927b6bc06ec3.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/1.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/12dc59840787441f8b4d0e8f8dfb8dc4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/12dc59840787441f8b4d0e8f8dfb8dc4.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/13.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/13.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/2.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/3.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/4.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/5.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/76c7a5b27d174c2f9c09b267068351d2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/76c7a5b27d174c2f9c09b267068351d2.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/b4b845c8e36f4282bd3a2cd7a0131647.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/b4b845c8e36f4282bd3a2cd7a0131647.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/ball1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/ball1.png -------------------------------------------------------------------------------- /src/main/webapp/shopimage/ball2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/ball2.png -------------------------------------------------------------------------------- /src/main/webapp/shopimage/ball3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/ball3.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/e51ef13962bf45aa87091478ed00ef29.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/e51ef13962bf45aa87091478ed00ef29.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/maoshan1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/maoshan1.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/shirt1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/shirt1.png -------------------------------------------------------------------------------- /src/main/webapp/shopimage/shirt2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/shirt2.png -------------------------------------------------------------------------------- /src/main/webapp/shopimage/shirt3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/shirt3.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/shirt4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/shirt4.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/sport wear1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/sport wear1.png -------------------------------------------------------------------------------- /src/main/webapp/shopimage/sport2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/sport2.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/sport3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/sport3.jpg -------------------------------------------------------------------------------- /src/main/webapp/shopimage/troser1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/troser1.png -------------------------------------------------------------------------------- /src/main/webapp/shopimage/trouser2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/JavaGraduationProject/NBAOnlineBusinessPlatformManagementSystem/f76ada5d2d6dbe5b157d32c1175ac12e55e71057/src/main/webapp/shopimage/trouser2.png -------------------------------------------------------------------------------- /src/test/java/com/neu/shop/mybatis/EnvTest.java: -------------------------------------------------------------------------------- 1 | package com.neu.shop.mybatis; 2 | 3 | /** 4 | * Created . 5 | */ 6 | public class EnvTest { 7 | } 8 | -------------------------------------------------------------------------------- /src/test/java/com/neu/shop/mybatis/MBGTest.java: -------------------------------------------------------------------------------- 1 | package com.neu.shop.mybatis; 2 | 3 | import org.mybatis.generator.api.MyBatisGenerator; 4 | import org.mybatis.generator.config.Configuration; 5 | import org.mybatis.generator.config.xml.ConfigurationParser; 6 | import org.mybatis.generator.exception.InvalidConfigurationException; 7 | import org.mybatis.generator.exception.XMLParserException; 8 | import org.mybatis.generator.internal.DefaultShellCallback; 9 | 10 | import java.io.File; 11 | import java.io.IOException; 12 | import java.sql.SQLException; 13 | import java.util.ArrayList; 14 | import java.util.List; 15 | 16 | /** 17 | * Created 18 | */ 19 | /*public class MBGTest { 20 | public static void main(String[] args) throws IOException, XMLParserException, InvalidConfigurationException, SQLException, InterruptedException { 21 | List warnings = new ArrayList(); 22 | boolean overwrite = true; 23 | File configFile = new File("generatorConfig.xml"); 24 | ConfigurationParser cp = new ConfigurationParser(warnings); 25 | Configuration config = cp.parseConfiguration(configFile); 26 | DefaultShellCallback callback = new DefaultShellCallback(overwrite); 27 | MyBatisGenerator myBatisGenerator = new MyBatisGenerator(config, callback, warnings); 28 | myBatisGenerator.generate(null); 29 | } 30 | }*/ 31 | -------------------------------------------------------------------------------- /src/test/java/com/neu/shop/mybatis/MapperTest.java: -------------------------------------------------------------------------------- 1 | package com.neu.shop.mybatis; 2 | 3 | import org.healthbeauty.dao.AdminMapper; 4 | import org.healthbeauty.pojo.Admin; 5 | import org.junit.Test; 6 | import org.junit.runner.RunWith; 7 | import org.springframework.beans.factory.annotation.Autowired; 8 | import org.springframework.test.context.ContextConfiguration; 9 | import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; 10 | 11 | /** 12 | * Created 13 | */ 14 | 15 | @RunWith(SpringJUnit4ClassRunner.class) 16 | @ContextConfiguration(locations={"classpath:applicationContext.xml"}) 17 | public class MapperTest { 18 | 19 | /*@Autowired(required = false) 20 | DepartmentMapper departmentMapper;*/ 21 | 22 | @Autowired(required = false) 23 | AdminMapper adminMapper; 24 | 25 | /** 26 | * 测试DepartmentMapper 27 | */ 28 | @Test 29 | public void testInsertSelective() { 30 | /*//创建SpringIOC容器 31 | ApplicationContext ioc = new ClassPathXmlApplicationContext("applicationContext.xml"); 32 | //从容器中获取Mapper 33 | DepartmentMapper bean = ioc.getBean(DepartmentMapper.class);*/ 34 | 35 | /*System.out.println(bean);*/ 36 | 37 | /*System.out.println(departmentMapper); 38 | 39 | departmentMapper.insertSelective(new Department(null, "业务部")); 40 | departmentMapper.insertSelective(new Department(null, "销售部"));*/ 41 | 42 | System.out.println(adminMapper.selectByName(new Admin(null,"root","root"))); 43 | 44 | } 45 | 46 | } 47 | --------------------------------------------------------------------------------