package org.jeecg.modules.api.teambuyController;

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.ConfigService;
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("/teambuy/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);
    }

}
