package org.jeecg.modules.api.carrentController;

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

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

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

    @ApiOperation(value="配置信息-获取商品分类列表", notes="配置信息-获取商品分类列表")
    @RequestMapping(value = "/queryCategoryList", method = {RequestMethod.GET})
    public Result<?> queryCategoryList(String categoryOneId){
        return configService.queryCatogoryList(categoryOneId);
    }

    @ApiOperation(value="配置信息-获取商品一级分类列表", notes="配置信息-获取商品一级分类列表")
    @RequestMapping(value = "/queryCategoryOneList", method = {RequestMethod.GET})
    public Result<?> queryCategoryOneList(PageBean pageBean){
        return configService.queryCatogoryOneList(pageBean);
    }

    @ApiOperation(value="配置信息-获取商品二级分类列表", notes="配置信息-获取商品二级分类列表")
    @RequestMapping(value = "/queryCategoryTwoList", method = {RequestMethod.GET})
    public Result<?> queryCategoryTwoList(PageBean pageBean){
        return configService.queryCatogoryTwoList(pageBean);
    }

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

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

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

    @ApiOperation(value="配置信息-获取在线客服电话", notes="配置信息-获取在线客服电话")
    @RequestMapping(value = "/queryPhone", method = {RequestMethod.GET})
    public Result<?> queryPhone(){
        return configService.queryPhone();
    }

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


}
