package com.yunfeiyun.agmp.common.core.controller;

import com.yunfeiyun.agmp.common.core.domain.AjaxResult;
import com.yunfeiyun.agmp.common.core.domain.model.PortalInfo;
import com.yunfeiyun.agmp.common.framework.web.service.PortalService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Portal的统一接口
 * 
 * @author 杨晓辉
 */
@RestController
@RequestMapping("/portal/cfg")
public class PortalController
{
    protected final Logger logger = LoggerFactory.getLogger(this.getClass());

    @Autowired
    private PortalService portalService;


    /**
     * 得到sso的配置信息
     */
    @GetMapping("/cfg")
    public AjaxResult ssoCfg()
    {
        PortalInfo cfg = portalService.getSsoInfo();
        return AjaxResult.success(cfg);
    }


}
