dcb
2025-06-19 303058307780d49e2ae4c815669f34b866206d86
src/main/java/com/se/nsl/controller/RegionController.java
@@ -3,16 +3,17 @@
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.se.nsl.domain.po.Region;
import com.se.nsl.domain.vo.R;
import com.se.nsl.domain.vo.RegionVo;
import com.se.nsl.service.RegionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.models.auth.In;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
@Api(tags = "1-推演区域")
@Api(tags = "02-推演区域")
@Slf4j
@RestController
@RequestMapping("/region")
@@ -30,13 +31,13 @@
     */
    @ApiOperation(value = "selectPage")
    @GetMapping("/selectPage")
    public R<Object> selectPage(Region region, Integer pageNum, Integer pageSize) {
    public R<Object> selectPage(RegionVo vo, Integer pageNum, Integer pageSize) {
        try {
            if (null == pageNum || pageNum < 1) pageNum = 1;
            if (null == pageSize || pageSize < 1) pageSize = 10;
            if (pageSize > 1000) pageSize = 1000;
            IPage<Region> paged = regionService.selectPage(region, pageNum, pageSize);
            IPage<Region> paged = regionService.selectPage(vo, pageNum, pageSize);
            if (null == paged) {
                return success(null, 0);
            }
@@ -55,7 +56,7 @@
     */
    @ApiOperation(value = "deleteByIds")
    @DeleteMapping("/deleteByIds")
    public R<Object> deleteByIds(java.util.List<Integer> ids) {
    public R<Object> deleteByIds(@RequestParam List<Integer> ids) {
        try {
            return success(regionService.deleteByIds(ids));
        } catch (Exception ex) {
@@ -70,8 +71,8 @@
     * @return 新增成功的记录数
     */
    @ApiOperation(value = "insert")
    @PostMapping("/insert")
    public R<Object> insert(Region region) {
    @PostMapping(value = "/insert", produces = "application/json; charset=UTF-8")
    public R<Object> insert(@RequestBody Region region) {
        try {
            return success(regionService.insert(region));
        } catch (Exception ex) {
@@ -86,8 +87,8 @@
     * @return 修改成功的记录数
     */
    @ApiOperation(value = "updateById")
    @PutMapping("/updateById")
    public R<Object> updateById(Region region) {
    @PutMapping(value = "/updateById", produces = "application/json; charset=UTF-8")
    public R<Object> updateById(@RequestBody Region region) {
        try {
            return success(regionService.updateById(region));
        } catch (Exception ex) {