Blogger homepage: Owl source code
Blogger profile: High-quality creator in the Java field, CSDN blog expert, company architect, 50,000+ fans across the entire network, focusing on Java technology and graduation project practice
Main content: Graduation project (Javaweb project | small program, etc.), resume template, study materials, interview question bank, technical consultation
Contact us at the end of the article
Project introduction:
This system is suitable for topic selection: campus, campus takeout, takeout, takeout service, etc. The system is developed using springboot + vue integration. The front-end framework mainly uses the element-ui framework, and the data layer uses mybatis. It has complete functions and a beautiful interface.
Function introduction:
When dividing the functional modules in the system, the campus takeout service system uses a hierarchical diagram to represent it. The hierarchical diagram has a tree structure and can use rectangular boxes to depict data information. The data structure represented by the top layer is very complete. The data represented by the rectangular box below the top layer is the subset data. Of course, the rectangular box at the bottom is the data element that cannot be subdivided. Using a hierarchical box diagram to describe the system functions allows users to understand at a glance. You can understand the functions of the system and the sub-functions under the corresponding function sections. The campus takeout service system is divided into two operating roles: administrator and user. Their functions will be explained below.
Administrators can manage users’ basic information and manage other functions. The administrator function structure diagram is as follows:
System includes technology:
Backend: springboot, mybatis
Front-end: element-ui, js, css, etc.
Development tools: idea/vscode
Database: mysql 5.7
JDK version: jdk1.8
Description of some screenshots:
Below is the home page
Announcement details
takeout
Takeaway details
shopping cart
Log in
Takeaway type management
Takeaway management
Announcement type management
User Management
Takeaway evaluation management
Part of the code:
/** * Backend list */ @RequestMapping("/page") public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){ logger.debug("page method:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params)); String role = String.valueOf(request.getSession().getAttribute("role")); if(false) return R.error(511,"Never enter"); else if("user".equals(role)) params.put("yonghuId",request.getSession().getAttribute("userId")); if(params.get("orderBy")==null || params.get("orderBy")==""){ params.put("orderBy","id"); } PageUtils page = cartService.queryPage(params); //Dictionary table data conversion List<CartView> list =(List<CartView>)page.getList(); for(CartView c:list){ //Modify the corresponding dictionary table fields dictionaryService.dictionaryConvert(c, request); } return R.ok().put("data", page); } /** * Backend details */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id, HttpServletRequest request){ logger.debug("info method:,,Controller:{},,id:{}",this.getClass().getName(),id); CartEntity cart = cartService.selectById(id); if(cart !=null){ //entity to view CartView view = new CartView(); BeanUtils.copyProperties( cart , view );//Reconstruct entity data into view //cascading table WaimaiEntity waimai = waimaiService.selectById(cart.getWaimaiId()); if(waimai != null){ BeanUtils.copyProperties(waimai, view,new String[]{ "id", "createTime", "insertTime", "updateTime"});//Add cascaded data to the view and exclude the id and creation time fields view.setWaimaiId(waimai.getId()); } //cascading table YonghuEntity yonghu = yonghuService.selectById(cart.getYonghuId()); if(yonghu != null){ BeanUtils.copyProperties(yonghu, view,new String[]{ "id", "createTime", "insertTime", "updateTime"});//Add cascaded data to the view and exclude the id and creation time fields view.setYonghuId(yonghu.getId()); } //Modify the corresponding dictionary table fields dictionaryService.dictionaryConvert(view, request); return R.ok().put("data", view); }else { return R.error(511,"No data found"); } } /** * Backend save */ @RequestMapping("/save") public R save(@RequestBody CartEntity cart, HttpServletRequest request){ logger.debug("save method:,,Controller:{},,cart:{}",this.getClass().getName(),cart.toString()); String role = String.valueOf(request.getSession().getAttribute("role")); if(false) return R.error(511,"Will never enter"); else if("user".equals(role)) cart.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")))); Wrapper<CartEntity> queryWrapper = new EntityWrapper<CartEntity>() .eq("yonghu_id", cart.getYonghuId()) .eq("waimai_id", cart.getWaimaiId()) .eq("buy_number", cart.getBuyNumber()) ; logger.info("sql statement:" + queryWrapper.getSqlSegment()); CartEntity cartEntity = cartService.selectOne(queryWrapper); if(cartEntity==null){ cart.setCreateTime(new Date()); cart.setInsertTime(new Date()); cartService.insert(cart); return R.ok(); }else { return R.error(511,"Item has been added to shopping cart"); } } /** * Backend modification */ @RequestMapping("/update") public R update(@RequestBody CartEntity cart, HttpServletRequest request){ logger.debug("update method:,,Controller:{},,cart:{}",this.getClass().getName(),cart.toString()); String role = String.valueOf(request.getSession().getAttribute("role")); // if(false) // return R.error(511,"Never entered"); // else if("user".equals(role)) // cart.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")))); //Query whether there is the same data based on the field Wrapper<CartEntity> queryWrapper = new EntityWrapper<CartEntity>() .notIn("id",cart.getId()) .andNew() .eq("yonghu_id", cart.getYonghuId()) .eq("waimai_id", cart.getWaimaiId()) .eq("buy_number", cart.getBuyNumber()) ; logger.info("sql statement:" + queryWrapper.getSqlSegment()); CartEntity cartEntity = cartService.selectOne(queryWrapper); cart.setUpdateTime(new Date()); if(cartEntity==null){ cartService.updateById(cart);//Update based on id return R.ok(); }else { return R.error(511,"The same data exists in the table"); } }
The above is a partial display of functions. On the whole, the functions of this system are very complete, the interface design is simple and elegant, and the interaction is friendly. The database design is also very reasonable, the scale is moderate, the code is neat and clear, and it is suitable for learning and use.
Okay, that’s it for today. Friends, like, favorite, comment, just click three times in a row to get started. See you in the next issue~~
The knowledge points of the article match the official knowledge files, and you can further learn related knowledge. Java Skill TreeHomepageOverview 134,154 people are learning the system