| | |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | * @date 2021-05-30 |
| | | */ |
| | | @Api(value = "测试批量方法", tags = {"测试批量方法"}) |
| | | @RequiredArgsConstructor(onConstructor_ = @Autowired) |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/demo/batch") |
| | | public class TestBatchController extends BaseController { |
| | |
| | | |
| | | /** |
| | | * 新增批量方法 可完美替代 saveBatch 秒级插入上万数据 (对mysql负荷较大) |
| | | * |
| | | * <p> |
| | | * 3.5.0 版本 增加 rewriteBatchedStatements=true 批处理参数 使 MP 原生批处理可以达到同样的速度 |
| | | */ |
| | | @ApiOperation(value = "新增批量方法") |
| | |
| | | |
| | | /** |
| | | * 新增或更新 可完美替代 saveOrUpdateBatch 高性能 |
| | | * |
| | | * <p> |
| | | * 3.5.0 版本 增加 rewriteBatchedStatements=true 批处理参数 使 MP 原生批处理可以达到同样的速度 |
| | | */ |
| | | @ApiOperation(value = "新增或更新批量方法") |