package com.usky.fire.controller.web;


import com.usky.common.core.bean.ApiResult;
import com.usky.fire.domain.BaseStreetTown;
import com.usky.fire.service.BaseStreetTownService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 街镇 前端控制器
 * </p>
 *
 * @author han
 * @since 2023-02-23
 */
@RestController
@RequestMapping("/baseStreetTown")
public class BaseStreetTownController {
    @Autowired
    private BaseStreetTownService baseStreetTownService;
    /**
     * 街镇-下拉框
     *
     * @param economize   省
     * @param market 市
     * @param districtCounty 区县
     * @return
     */
    @GetMapping("/baseStreetTownList")
    public ApiResult<List<BaseStreetTown>> baseStreetTownList(@RequestParam(value = "economize", required = false) String economize,
                                                              @RequestParam(value = "market", required = false) String market,
                                                              @RequestParam(value = "districtCounty", required = false) String districtCounty) {
        return ApiResult.success(baseStreetTownService.baseStreetTownList(economize,market,districtCounty));
    }

}

