package org.jeecg.modules.api.travelController;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.jeecg.common.api.vo.Result;
import org.jeecg.modules.apiBean.PageBean;
import org.jeecg.modules.apiService.IndexApiService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags="小程序-游玩项目相关接口")
@RestController
@RequestMapping("/api/amusement")
@Slf4j
public class AmusementApiController {

    @Resource
    private IndexApiService indexApiService;

    //遗产路径/我要研学列表
    @ApiOperation(value="小程序-获取游玩项目列表", notes="amusementType:0-遗产路径 1-我要研学；isPay:0-免费 1-付费")
    @RequestMapping(value = "/queryAmusementList", method = {RequestMethod.GET})
    public Result<?> queryAmusementList(String amusementType, String isPay, PageBean pageBean){
        return indexApiService.queryAmusementList(amusementType, isPay, pageBean);
    }

    //遗产路径/我要研学详情
    @ApiOperation(value="小程序-根据id获取游玩项目详情", notes="小程序-根据id获取游玩项目详情")
    @RequestMapping(value = "/queryAmusementById", method = {RequestMethod.GET})
    public Result<?> queryAmusementById(String amusementId){
        return indexApiService.queryAmusementById(amusementId);
    }

    //非遗列表
    @ApiOperation(value="小程序-获取非遗体验列表", notes="小程序-获取非遗体验列表")
    @RequestMapping(value = "/queryExperienceList", method = {RequestMethod.GET})
    public Result<?> queryExperienceList(PageBean pageBean){
        return indexApiService.queryExperienceList(pageBean);
    }

    //非遗体验详情
    @ApiOperation(value="小程序-根据id获取非遗体验详情", notes="小程序-根据id获取非遗体验详情")
    @RequestMapping(value = "/queryExperienceById", method = {RequestMethod.GET})
    public Result<?> queryExperienceById(String experienceId){
        return indexApiService.queryExperienceById(experienceId);
    }
}
