package com.ics.controller.mobile.meeting;

import com.ics.admin.domain.Park;
import com.ics.admin.service.IParkService;
import com.ics.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import org.wf.jwtp.annotation.Ignore;
import org.wf.jwtp.annotation.RequiresPermissions;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("/api/admin/park")
public class ApiParkController {

    @Autowired
    private IParkService parkService;

    @RequiresPermissions("member:center:view")
    @GetMapping("get/{id}")
    public Park get(@PathVariable("id") Long id) {
        return parkService.selectParkById(id);
    }


    @Ignore
    @GetMapping("selectParkList")
    public R selectParkList() {
        List<Park> parkList = parkService.selectParkList(new Park());
        return R.data(parkList);
    }
}
