package com.willalp.web.controller.common;

import com.alibaba.fastjson.JSON;
import com.willalp.common.core.controller.BaseController;
import com.willalp.common.core.domain.AjaxResult;
import com.willalp.common.utils.http.HttpUtils;
import com.willalp.system.service.ISysUserService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author Administrator
 */
@RestController
@RequestMapping("/common/api")
public class CommonApiOneController extends BaseController {

    @Resource
    private ISysUserService userService;



    @Resource
    private HttpUtils httpUtils;

    /**
     * 获取首页配置数据
     *
     * @return
     */
    @ApiOperation("获取首页配置数据")
    @GetMapping("/orgList")
    public AjaxResult orgList() {
        return AjaxResult.success(JSON.parse(
                httpUtils.sendGet(httpUtils.getHttpsMasterUrl("/orgList"))));
    }


}
