| | |
| | | package com.ruoyi.demo.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.demo.domain.TestDemo; |
| | | import com.ruoyi.demo.mapper.TestDemoMapper; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.RequiredArgsConstructor; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | * @author Lion Li |
| | | * @date 2021-05-30 |
| | | */ |
| | | @Tag(name = "测试批量方法", description = "测试批量方法") |
| | | @RequiredArgsConstructor |
| | | @RestController |
| | | @RequestMapping("/demo/batch") |
| | |
| | | testDemo.setValue("测试新增"); |
| | | list.add(testDemo); |
| | | } |
| | | return toAjax(testDemoMapper.insertBatch(list) ? 1 : 0); |
| | | return toAjax(testDemoMapper.insertBatch(list)); |
| | | } |
| | | |
| | | /** |
| | |
| | | testDemo.setId(null); |
| | | } |
| | | } |
| | | return toAjax(testDemoMapper.insertOrUpdateBatch(list) ? 1 : 0); |
| | | return toAjax(testDemoMapper.insertOrUpdateBatch(list)); |
| | | } |
| | | |
| | | /** |