package com.zbkj.front.controller;


import com.zbkj.common.response.CommonResult;
import com.zbkj.service.service.SystemCityService;
import com.zbkj.service.service.SystemGroupDataService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

/**
 * 城市服务

 */
@Slf4j
@RestController("GroupDataFrontController")
@RequestMapping("api/front/groupData")
@Api(tags = "静态数据")
public class GroupDataController {

    @Autowired
    private SystemGroupDataService systemGroupDataService;

    @ApiOperation(value = "静态数据")
    @RequestMapping(value = "/getData", method = RequestMethod.GET)
    @ApiImplicitParam(name="id", value="数据id")
    public CommonResult<Object> getData(@RequestParam(value = "id") Integer id) {
        List<HashMap<String, Object>> data = systemGroupDataService.getListMapByGid(id);
        return CommonResult.success(data);
    }
}



