package com.fs.company.controller;


import com.fs.common.core.controller.BaseController;
import com.fs.common.core.domain.AjaxResult;
import com.fs.company.service.ICompanyConfigService;
import com.fs.system.domain.SysConfig;
import com.fs.system.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 系统配置
 *

 */
@RestController
@RequestMapping("/company/companyConfig")
public class CompanyConfigController extends BaseController
{

    @Autowired
    private ICompanyConfigService companyConfigService;


    @Autowired
    private ISysConfigService configService;



    /**
     * 根据参数键名查询总后台参数值
     * @param configKey
     * @return
     */
    @GetMapping(value = "/getConfigByKey/{configKey}")
    public AjaxResult getConfigByKey(@PathVariable String configKey)
    {
        SysConfig config=configService.selectConfigByConfigKey(configKey);
        return AjaxResult.success(config);
    }



}
