package org.jeecg.modules.api.studytourController;

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.api.bean.PageBean;
import org.jeecg.modules.api.service.ConfigService;
import org.jeecg.modules.studytourCategory.entity.StudytourCategory;
import org.jeecg.modules.studytourComment.entity.StudytourComment;
import org.springframework.web.bind.annotation.RequestHeader;
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("/studytour/config")
@Slf4j
public class ConfigController {

    /******************************************************************************************************************/
    //配置信息
    @Resource
    private ConfigService configService;
    /******************************************************************************************************************/

    //查看系统配置列表
    @ApiOperation(value="系统配置-查询系统配置列表", notes="系统配置-查询系统配置列表")
    @RequestMapping(value = "/queryConfigList", method = {RequestMethod.GET})
    public Result<?> queryConfigList(PageBean pageBean){
        return configService.queryConfigList(pageBean);
    }

    //查看系统配置详情
    @ApiOperation(value="系统配置-查询系统配置详情", notes="系统配置-查询系统配置详情")
    @RequestMapping(value = "/queryConfigByParamCode", method = {RequestMethod.GET})
    public Result<?> queryConfigByParamCode(String paramCode){
        return configService.queryConfigByParamCode(paramCode);
    }

    @ApiOperation(value="系统配置-查询研学活动分类列表", notes="系统配置-查询研学活动分类列表")
    @RequestMapping(value = "/queryCategoryList", method = {RequestMethod.GET})
    public Result<?> queryCategoryList(StudytourCategory studytourCategory, PageBean pageBean){
        return configService.queryCategoryList(studytourCategory, pageBean);
    }


}
