package org.jeecg.modules.api.controller2;

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("/employ/config")
@Slf4j
public class ConfigController {

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

    @ApiOperation(value="配置信息-获取配置信息列表", notes="配置信息-获取配置信息列表")
    @RequestMapping(value = "/queryConfigList", method = {RequestMethod.GET})
    public Result<?> queryConfigList(){
        return configService.queryConfigList();
    }

    @ApiOperation(value="配置信息-根据配置编码获取配置信息", notes="配置信息-根据配置编码获取配置信息")
    @RequestMapping(value = "/queryConfig", method = {RequestMethod.GET})
    public Result<?> queryConfig(String paramCode){
        return configService.queryConfig(paramCode);
    }

    //获取banner图列表带分页
    @ApiOperation(value="首页-获取banner图列表", notes="0-首页 1-会员中心")
    @RequestMapping(value = "/queryBannerList", method = {RequestMethod.GET})
    public Result<?> queryBannerList(String bannerCategoryType, PageBean pageBean){
        return configService.queryBannerList(bannerCategoryType, pageBean);
    }

    //获取工种列表
    @ApiOperation(value="首页-获取工种列表", notes="首页-获取工种列表")
    @RequestMapping(value = "/queryJobTypeList", method = {RequestMethod.GET})
    public Result<?> queryJobTypeList(PageBean pageBean){
        return configService.queryJobTypeList(pageBean);
    }

    //获取工作性质列表
    @ApiOperation(value="首页-获取工作性质列表", notes="首页-获取工作性质列表")
    @RequestMapping(value = "/queryJobNatureList", method = {RequestMethod.GET})
    public Result<?> queryJobNatureList(PageBean pageBean){
        return configService.queryJobNatureList(pageBean);
    }

    //获取地址列表
    @ApiOperation(value="首页-获取地址列表", notes="首页-获取地址列表")
    @RequestMapping(value = "/queryAddressList", method = {RequestMethod.GET})
    public Result<?> queryAddressList(PageBean pageBean){
        return configService.queryAddressList(pageBean);
    }

}
