package com.zd.laboratory.controller;

import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.zd.common.core.web.domain.ResultData;
import com.zd.common.swagger.config.Knife4jConfiguration;
import com.zd.laboratory.interfaces.SysProperties;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: zhoupan
 * @Date: 2021/11/01/14:33
 * @Description:
 */
@Api(tags = {"实验室系统配置"})
@ApiSupport(author = Knife4jConfiguration.Author.ZP)
@RestController
@RequestMapping("/sys/lab")
@EnableConfigurationProperties(SysProperties.class)
public class SysController {

    @Autowired
    private SysProperties sysProperties;

    @ApiOperation("查询实验室项目配置")
    @GetMapping("/config")
    public ResultData<SysProperties> querySysProperties()
    {
        return ResultData.success(sysProperties);
    }

}
