Food delivery system based on springboot+vue

1 Introduction

Today, I would like to introduce to you a graduation design project that helped previous students complete, the food delivery system .
 1. The source code development function of the food delivery system

1. Smart scheduling mode: After setting some ratios, the system will intelligently and accurately calculate the exact location and order details of the delivery staff near the new order, and then automatically dispatch the new order to the delivery staff who are suitable for receiving the order.

2. Transit mode: divide the delivery staff, set up a transfer station, and send a dedicated delivery staff to pick up meals from nearby businesses. After picking up the meals, they will be placed according to different categories, and then the delivery staff will send them from the transfer station to the next area for transfer. station, collect first, and then distribute, and can deliver more than 3,000 orders within 2 hours.

3. Order receiving system: The basic function of an intra-city ordering and delivery system platform is to be able to receive orders and orders assigned from the background.

4. Recording orders: the food ordering and delivery system, receiving orders, should also have the function of recording orders. Wanyue Technology's food ordering and delivery platform can also send out food ordering and delivery orders that customers need based on the function of self-recording orders.

5. Map scheduling: By viewing the location of the delivery staff and the order information in the hands of the delivery staff on the background map, manually dispatch the order.

6. Member management: There are a variety of membership points to achieve different display modes and improve service experience.
 Login related
*/
@RequestMapping("users")
@RestController
public class UserController{

@Autowired
private UserService userService;

@Autowired
private TokenService tokenService;

/**

  • 登录
    */
    @IgnoreAuth
    @PostMapping(value = “/login”)
    public R login(String username, String password, String captcha, HttpServletRequest request) {

    UserEntity user = userService.selectOne(new EntityWrapper().eq(“username”, username));
    if(user==null || !user.getPassword().equals(password)) {

    return R.error("The account or password is incorrect");
    }
    String token = tokenService.generateToken(user.getId(),username, “users”, user.getRole());
    return R.ok().put( "token", token);
    }

/**

  • 注册
    */
    @IgnoreAuth
    @PostMapping(value = “/register”)
    public R register(@RequestBody UserEntity user){

    // ValidatorUtils.validateEntity(user);
    if(userService.selectOne(new EntityWrapper().eq(“username”, user.getUsername())) !=null) {

    return R.error("User already exists");
    }
    userService.insert(user);
    return R.ok();
    }

/**

  • 退出
    */
    @GetMapping(value = “logout”)
    public R logout(HttpServletRequest request) {

    request.getSession().invalidate();
    return R.ok("exit successful");
    }

/**

  • 密码重置
    */
    @IgnoreAuth
    @RequestMapping(value = “/resetPass”)
    public R resetPass(String username, HttpServletRequest request){

    UserEntity user = userService.selectOne(new EntityWrapper().eq(“username”, username));
    if(user==null) {

    return R.error("The account does not exist");
    }
    user.setPassword("123456");
    userService.update(user,null);
    return R.ok("The password has been reset to: 123456");
    }

/**

  • 列表
    */
    @RequestMapping(“/page”)
    public R page(@RequestParam Map<String, Object> params,UserEntity user){

    EntityWrapper ew = new EntityWrapper();
    PageUtils page = userService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.allLike(ew, user), params), params));
    return R.ok().put(“data”, page);
    }

/**

  • 列表
    */
    @RequestMapping(“/list”)
    public R list( UserEntity user){

    EntityWrapper ew = new EntityWrapper();
    ew.allEq(MPUtil.allEQMapPre( user, “user”));
    return R.ok().put(“data”, userService.selectListView(ew));
    }

/**

  • INFO
    */
    @RequestMapping(“/info/{id}”)
    public R info(@PathVariable(“id”) String id){

    UserEntity user = userService.selectById(id);
    return R.ok().put(“data”, user);
    }

/**

  • Get the user's session user information
    */
    @RequestMapping(“/session”)
    public R getCurrUser(HttpServletRequest request){

    Long id = (Long)request.getSession().getAttribute(“userId”);
    UserEntity user = userService.selectById(id);
    return R.ok().put(“data”, user);
    }

/**

  • 保存
    */
    @PostMapping(“/save”)
    public R save(@RequestBody UserEntity user){

    // ValidatorUtils.validateEntity(user);
    if(userService.selectOne(new EntityWrapper().eq(“username”, user.getUsername())) !=null) {

    return R.error("User already exists");
    }
    userService.insert(user);
    return R.ok();
    }

/**

  • 修改
    */
    @RequestMapping(“/update”)
    public R update(@RequestBody UserEntity user){

    // ValidatorUtils.validateEntity(user);
    userService.updateById(user);//Update all
    return R.ok()
    ;

/**

  • 删除
    */
    @RequestMapping(“/delete”)
    public R delete(@RequestBody Long[] ids){

    userService.deleteBatchIds(Arrays.asList(ids));
    return R.ok();
    }
    }

2. The unique advantages of the source code of the food delivery system:

1. Restaurant introduction: tell the original intention and development story of the restaurant, the restaurant business environment, business license, and enhance the overall goodwill and trust of customers;

2. Automatic positioning: mark on the map to facilitate customers to accurately locate the restaurant location;

3. Reserving a table: save the time for customers to queue up to order food, and make the dining process more enjoyable;

4. Order management: less time-consuming, convenient query, real-time location of delivery staff, efficient and convenient;

Takeaway system, takeaway rider order, takeaway management, takeaway commodity management

2 Design outline

The 21st century is the age of information. With the development of information technology and network technology, informatization has penetrated into all aspects of people's daily life. People can browse massive amounts of information anytime and anywhere, but these large amounts of information vary widely and require laborious screening. Identify data that you like or are interested in. For online movie services, it is necessary to use excellent collaborative filtering recommendation functions to assist the entire system.

This system is based on java technology, uses UML to model, adopts springboot framework combination for design, and Mysql database to store data.

The functions of this system mainly include:

  1. User registration, login,
  2. information maintenance,
  3. member search,
  4. personalized recommendation
  5. administrator for information management, etc.
  6. Takeaway system
  7. Takeaway riders take orders
  8. Takeaway store management

3 Key technologies of the system

Use springboot, vue, mysql, mybaties, typescript, html, css, js, etc. for development

4 Development Tools

Development tools mainly include: idea, jdk1.8, maven, mysql5.7, Navicat, etc.

5 code display

@RequestMapping("/strategy")
@RestController
@Scope("prototype")
public class StrategyController {
    
    
    @Autowired
    private StrategyService strategyService;
    @Value("${web.upload-path}")
    private String path;

    @RequestMapping("/findPage")
    public ObjDat<Strategy> findPage(Strategy strategy, @RequestParam(value="page", defaultValue="1") int page, @RequestParam(value="limit", defaultValue="10") int limit){
    
    
        return strategyService.findPage(strategy,page-1,limit);
    }

    @RequestMapping("/edit")
    public JsonResult edit(HttpServletRequest request, Strategy strategy) throws IOException {
    
    
        User user=(User)request.getSession().getAttribute("user");
        if(user==null){
    
    
            return JsonResult.error("请登录");
        }
        String str=strategyService.edit(request,strategy);
        if(str.equals("成功")){
    
    
            return JsonResult.success("操作成功");
        }else{
    
    
            return JsonResult.error("操作失败");
        }
    }

6 System function description

Project function demo
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/qq_42135426/article/details/128499957