package com.miaxis.app.controller.dict;

import com.miaxis.common.constant.Constants;
import java.util.List;
import java.util.Arrays;
import io.swagger.annotations.*;
import com.miaxis.common.core.domain.Response;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.ModelAttribute;
import com.miaxis.common.annotation.Log;
import com.miaxis.common.core.controller.BaseController;
import com.miaxis.common.enums.BusinessTypeEnum;
import com.miaxis.dict.domain.DictCity;
import com.miaxis.dict.service.IDictCityService;
import com.miaxis.common.utils.poi.ExcelUtil;
import com.miaxis.common.core.page.ResponsePageInfo;

/**
 * 【全国城市】Controller
 *
 * @author miaxis
 * @date 2021-03-18
 */
@RestController
@RequestMapping(Constants.STUDENT_PREFIX+"/dict/city")
@Api(tags={"【小程序-全国城市】"})
public class DictCityController extends BaseController{
    @Autowired
    private IDictCityService dictCityService;

    /**
     * 查询全国城市列表
     */

    @GetMapping("/list")
    @ApiOperation("查询全国城市列表")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum",value = "当前页码" ,dataType = "int", paramType = "query", required = false),
            @ApiImplicitParam(name = "pageSize",value = "每页数据量" , dataType = "int", paramType = "query", required = false),
    })
    public ResponsePageInfo<DictCity> list(@ModelAttribute DictCity dictCity){
        startPage();
        List<DictCity> list = dictCityService.selectDictCityList(dictCity);
        return toResponsePageInfo(list);
    }



}
