New file |
| | |
| | | package com.example.erp.controller; |
| | | |
| | | import com.example.erp.mapper.OrderTestMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | //@CrossOrigin //解决单个controller 跨域问题 |
| | | @RestController |
| | | @RequestMapping("/order11111111") |
| | | |
| | | public class OrderTestController { |
| | | @Autowired |
| | | private OrderTestMapper orderMapper; |
| | | |
| | | // @GetMapping //查询order表结果集 |
| | | // public Result index(){ |
| | | // return Result.seccess(orderMapper.findAll()); |
| | | // |
| | | // } |
| | | // |
| | | // @PostMapping //插入 |
| | | // public Integer save(@RequestBody Order order) { |
| | | // return orderMapper.insert(order); |
| | | // } |
| | | // |
| | | // @PostMapping("/update") |
| | | // public Integer updateOrder(@RequestBody Order order) { |
| | | // return orderMapper.update(order.getId(),order.getOrderid()); |
| | | // } |
| | | // |
| | | // @DeleteMapping("/{id}") //删除数据 |
| | | // public Integer delete(@PathVariable Integer id) { |
| | | // return orderMapper.deleteById(id); |
| | | // } |
| | | |
| | | |
| | | } |