package com.fjhx.controller;

import com.fjhx.entity.ExRegion;
import com.fjhx.service.ExRegionService;
import org.springblade.core.tool.api.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author ${author}
 * @since 2022-10-17
 */
@RestController
@RequestMapping("/region")
public class ExRegionController {

    @Autowired
    private ExRegionService exRegionService;

    @PostMapping("/list")
    public R page(@RequestBody ExRegion region) {
        List<ExRegion> regionList = exRegionService.getList(region);
        return R.success(regionList);
    }

}

